- Published on
shift + j (J) to combine lines
Use shift and j to combine lines
If you had these lines:
aaaaaaaaa
bbbbbbbbb
And your cursor was on the first line and you pressed shift and j, then it would end up like:
aaaaaaaaa bbbbbbbbb
Note: for Jet Brains Idea VIM (for phpstorm/webstorm), turn on set ideajoin in your .ideavimrc.
Jetbrains specific (PHPStorm or WebStorm)
Edit .ideavimrc from your IDE
- In the bottom right there is a V logo (for the ideaVIM plugin) - click it, and in that menu is an option to edit the .ideavimrc file.
Change mode in modals
Sometimes ideaVIM will open a modal and you'll be in the wrong vim mode. Pressing escape would close the modal. So instead press shift + ] which does the same thing as escape.
NERDtree key bindings for the project/file explorer tab:
.ideavimrc
Plug 'preservim/nerdtree'
set NERDTree
I have it set with cmd + 1 to open the file/project browser.
From there I can use:
j/kto move down or up.- Press
oto open selected file - Press
mto open menu on selected file/dir - Press
goto open selected file, but keep cursor in the file list (useful if you want to open a few files at once) - Press
sto open selected file in a split vsplit.gsto open it in new vsplit but keep cursor in file list. - Press
pto go to the parent directory. - Press
xto close the current dir - Press
Pto go to top level dir - Press
/and then search for a file name