Skip to content

Instantly share code, notes, and snippets.

@fikriauliya

fikriauliya/basic

Last active May 20, 2017
Embed
What would you like to do?
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
- ctrl + f: open
- ctrl + d: document search
- ctrl + r: Regex search
- ctrl + j/k: navigate list
- ctrl + t: open in new tab
- ctrl + x: open in new split
- ctrl + n/p: navigate history
- ctrl + b: buffer search
- 'div>p#foo$*3>a' and type '<c-y>,'
- ctrl + y + n: go to next edit point
- ctrl + y + N: go to prev edit point
- ctrl + y + /: toggle comment
- ctrl + y + d: select enclosing tag
:grep -F "submit" **/*.html
:copen
:close
:cn
:cp
o or enter: open
O: open recursively
cd: change dir
CD: change root dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.