Skip to content

Latest commit

 

History

History

vim

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Vim

Think of vi/vim as a family of text-editing tools that work using roughly the same commands.

macvim "classic" vim, neovim

Bindings

IntelliJ Vim bindings Visual Studio Code Vim bindings

Resources

Books

Capture Groups

:%s/\(\w\)\(\w\w\)/\2\1/g

or use \m magic or \v very magic mode -- in the pattern, characters except '0'-'9', 'a'-'z', 'A'-'Z' and '_' have their regex meaning, e.g., () is a capturing group rather than literal parens:

:%s/\v(\w)(\w\w)/\1y\2/g

Other

linebreak http://vim.wikia.com/wiki/Add_a_newline_after_given_patterns

/[(,)] :s//\r&/g

Visual Mode Commands

Cmd Action
v Visual mode - character
Visual mode - line
Visual mode - block
gv Reselect last visual selection
o Toggle free end