In VIM a new change usually only starts when you leave insert mode (i.e. if you press u
for undo, everything in the last insert is reverted).
By pressing ctrl+g
and then u
, you can start a new change while in insert mode. You could even map the return key to do this automatically when you start a new line: :inoremap u
(undo will now only undo single lines).
Use J
in NERDTree to jump to the last node of the directory in the current tree depth (very usefull for the migrations directory).
I highly recommend checking out https://github.com/scrooloose/nerdtree/blob/master/doc/NERDTree.txt if you are using NERDTree.