:syntax on
This can also be added to .vimrc
These work for matching parenthesis (), square brackets [], curly brackets {}, angle brackets <>, etc…
y% - yank d% - delete
For visual mode
v%y - highlight between parenthesis and yank v%d - highlight between parenthesis and delete
With the cursor within a block
yab - yank the block including the enclosing parenthesis dab - delete the block including the enclosing parenthesis yib - yank the block excluding the enclosing parenthesis dib - delete the block excluding the enclosing parenthesis
For visual mode
v2a) - visual select, 2 nesting levels, including the enclosing parenthesis v1i) - visual select, 1 nesting level, excluding the enclosing parenthesis
v:s/^/# - shell scripts :s/^/\/\/ - C, C++, C#, Java, JavaScript :s/^/-- - SQL
v:s/^#/ - shell scripts :s/^\/\// - C, C++, C#, Java, JavaScript :s/^--/ - SQL
:set autoindent :set cindent
v> to increase indent one tab < to decrease indent one tab.n> to increase indent n tabs.n< to decrease indent n tabs.yw - to yank a word.vwp - v for visual select, w for the word, p to paste.:edit (without specifying a file name):edit!guwgUwg~w