SHORTCUT | Description |
---|---|
o | open file in horizontal split |
v | open file in vertical split |
git diff | Show file differences that haven't been staged |
COMMAND | Description |
---|---|
Vexplore | open file tree in vertical split |
Hit the .
key to perform an exact replay of the very last command (other than movement). For example, I type cw
then hello to change a word to "hello". After moving my cursor to a different word, I hit .
to do it again.
:s/foo/bar/g
: Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'.:%s/foo/bar/gc
: Change each 'foo' to 'bar', but ask for confirmation first.:%s/\<foo\>/bar/gc
: Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation.
select some text and yank it inside the *
registry using: "*y
Helpful:
https://gist.github.com/squarism/ae3613daf5c01a98ba3a
vimgrep keyword **/*.paths_here
. This looks (sync) for occurences and populates thequickfix window
.- Navigate through the quick fix using
cn
andcp
:copen " Open the quickfix window
:ccl " Close it
:cn " Go to the next error in the window
:cnf " Go to the first error in the next file
<C-k>
and<C-j>
to move back and forth in errors.make
to run eslint on the whole folder and populate quick fix list