Is there a way to indent code segment in vim? -



Is there a way to indent code segment in vim? -

in basic editors in windows can select few lines of code , indent them , forth, there simple way in vim?

in normal/visual mode can utilize > , < adjust indentation in insert mode, can press ctrl-t , ctrl-d adjust indentation in command mode, can still utilize :> , :< adjust indentation

besides, can seek = magic auto format text.

:h = :h > :h :>

if want select lines (visual mode), indent them , forth , remain in visual mode, can have these 2 lines in vimrc (i have in mine):

"reselect visual block after indent/outdent vnoremap < <gv vnoremap > >gv

now can visual select, press >>>> <<<< play indentations.

p.s

in basic editors in windows can....

vim not basic editor, don't bring old habit advanced editor. :-)

vim

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -