My Vim for Linux!
sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt upgrade
sudo apt install vim
sudo apt install python3 python3-pip
pip3 install pynvim
Debian / Ubuntu, installing Yarn
wget -O - https://git.io/JUzw5 | bash
Leader key ,
Ctrl+k
- expand snippet
Tab
- Next step
,,
- open/close
Ctrl+\
- path where open file
Ctrl+s
- add cursor in palace
Ctrl+f
or ,j
- open
Ctrl+b
- open buffers
Ctrl+e
expand
gc
- Comment selection in visual mode
gcc
- Comment line in normal mode
gcap
- Comment paragraph in normal mode
:7,17Commentary
- Comment from 7 to 17 lines
:g/TODO/Commentary
- Comment lines with text "TODO"
,vv
- Grep for the word under the cursor, match all occurences, like |gstar|
,vV
- Grep for the word under the cursor, match whole word, like |star|
,va
- Like vv, but add to existing list
,vA
- Like vV, but add to existing list
,vr
- Perform a global search search on the word under the cursor and prompt for a pattern with which to replace it.
,vo
- Select the files to search in and set grep options
,vy*
- Invoke any option from the options explorer, where * is the shortcut for that option.
e.g. ,vyr
- toggles recursion
,vyb
- sets buffer grepping mode etc.
,ff
- Run prettier formating
Uncomment this line for nerd-fonts is on
let g:airline_powerline_fonts = 1
,m
- remove the Windows ^M - when the encodings gets messed up
,q
- quickly open a buffer for scribble
,x
- quickly open a markdown buffer for scribble
,pp
- toggle paste mode on and off
0
- Remap VIM 0 to first non-blank character
,f
- auto format all doc
,ba
- close all the buffers
,cd
- switch CWD to the directory of the open buffer
,<Enter>
- disable highlight
,e
- fast editing and reloading of vimrc configs
,w
- fast saving
;;
- replace word in cursor without confirm
;'
- replace word in cursor with confirm
Pressing ,ss
will toggle and untoggle spell checking
Shortcuts using <leader>
,sn
- ]s
,sp
- [s
,sa
- zg
,s?
- z=
,y
- copy the current visual selection to ~/.vbuf
,y
- copy the current line to the buffer file if no visual selection
,p
- paste the contents of the buffer file
Ctrl+c
- copy
Ctrl+v
- paste