Without IdeaVim in PhpStorm, the tab key can be used to indent a selected block of text. However, I'm interested to know if there's a shortcut key that does the same thing with the IdeaVim plugin installed (without losing any functionality that the tab key otherwise has).
To indent the current line, or a visual block: ctrl-t, ctrl-d - indent current line forward, backwards (insert mode) visual > or < - indent block by sw (repeat with . )
To tab or add the indentation at multiple lines, try “shift+dot” i.e., “.” Shortcut once. You will see it will add an indentation of one character at each selected line from the start. If you want to add indentation without stopping, then you have to try the “.” Key from the keyword after using “shift+.”.
See Indent multiple lines quickly in vi
You must be in normal mode, i.e. go Esc
before indenting.
You can select a block of lines with Shift+V
, then up/down arrows, then >
to indent (<
reverses indent).
I think following settings are what you want! :)
Put the followings to ~/.ideavimrc
nnoremap <Tab> >>_
nnoremap <S-Tab> <<_
inoremap <S-Tab> <C-D>
vnoremap <Tab> >gv
vnoremap <S-Tab> <gv
ideavim support vimrc with .ideavimrc
also see: Is there a way to get IdeaVIM to honor the mappings from my .vimrc file?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With