2014/11/27

VIM tips

:vim foo * | cw
Find the "foo" in files in current folder

:vim foo **/*.js | cw
Search for foo in every JavaScript file in the current directory recursively

gt
Switch between tabs

Ctrl+ww
Switch between windows

Ctrl+ws
Split window

Ctrl+r "
Paste yanked text to VIM command prompt

ma, mb
Make a marker "a" , "b"

`a, `b
Got to marker "a", "b"


Reference:
http://stackoverflow.com/questions/12526274/vim-search-text-in-folder

No comments:

Post a Comment

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...