Most used VIM shortcuts (Config: https://github.com/amix/vimrc)
leader: , | |
- ctrl + w + direction: move to selected window | |
- ctrl + w + ctrl + w: move to another window | |
- ctrl + w + =: male all window equals | |
- ctrl + w + _: maximize current window | |
- :hide: close current window | |
- :only: close other windows | |
- u: undo | |
- ctrl + r: redo | |
- G: go to last line | |
- , + b + a: close all buffers | |
- , + b + d: close current buffer | |
- dd: delete line | |
- y: copy | |
- yy: copy line | |
- p: paste | |
- shift + v: select current line | |
- >> or <<: indent | |
- zi: toggle all folding | |
- zj, zk: navigate between folds | |
- za: toggle current folding | |
- zc: toggle parent folding | |
- zM: close all folding | |
- zv: reveal current cursor | |
# MRU | |
- , + f: show MRU | |
#open_file_under_cursor.vim: | |
- gf: open file under cursor | |
#Formating | |
- gg=G: format all | |
#Tabs | |
:set expandtab | |
:set tabstop=4 | |
:set shiftwidth=4 | |
:retab | |
:set tabstop=4 shiftwidth=4 expandtab | |
#Replace | |
:%s/foo/bar/g |
- ,o: list all buffer | |
- t: open buffer in new tab | |
- d: delete buffer | |
- ls: list all buffer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment