Jovian cheat sheet for vim
mx
to bookmark with letter x
`x
to go to x
gu
and movement to lowercase
gU
and movement to uppercase
when you forgot to sudo with Vim ...
:w !sudo tee %
Beware, that is not recommanded to run a editor as Vim.
Use sudoedit
Catch with \n
and put one with \r
.
vimdiff basics
git config --global diff.tool vimdiff
dp
: diffput throws changement in the other window
do
: diffget obtains changements from the other window
]c
next
[c
previous
Three files : LOCAL | BASE | REMOTE
+--------------------------------+ | LOCAL | BASE | REMOTE | +--------------------------------+ | MERGED | +--------------------------------+
Three commands : :diffget LO
, :diffget BO
, :diffget RE
zo
Useful to see more context.