Skip to content

Latest commit

 

History

History
executable file
·
33 lines (29 loc) · 833 Bytes

vimCMD.md

File metadata and controls

executable file
·
33 lines (29 loc) · 833 Bytes

Vim Useful Commands

Fold sections of the code

:start,end fo                 #Usesage
:5,20fo                       #Example

Place curser on line

zo                            #Open fold
zc                            #Close fold

Split Window with VIM

:split filename  - split window horizontally and load filename
:vsplit file     - vertical split and open file
ctrl-w up arrow  - move cursor up a window
ctrl-w ctrl-w    - move cursor to another window (cycle)
ctrl-w _         - maximize current window vertically
ctrl-w |         - maximize current window horizontally
ctrl-w =         - make all equal size
:sview file      - same as split, but readonly
:close           - close current window

Run shell commands inside Vim

:!ls
:!node server.js
:!man grep