Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Vim have indentation guides, Notepad++-style?

In Notepad++, there is a dotted line that runs down from the function keyword through the end of the method. It looks like this:

Notepad++ indentation guide example

Does Vim support something similar?

like image 584
Apotheosis Avatar asked Jan 14 '11 11:01

Apotheosis


People also ask

Does Vim have auto indent?

How to Turn On Auto Indent in Vim. To automatically indent when editing a file in Vim, enable the auto indenting feature using the :set autoindent flag in command mode: Press Enter, and this will auto-indent the file you are currently editing.

How do I change the indentation in Vim?

Start in the top of a file (to get there, press gg anywhere in the file.). Then press =G , and Vim will fix the indentation in the whole file. If you don't start in the beginning of the file, it will fix indentation from current line to the bottom of file.

How do I indent 4 spaces in Vim?

The shiftwidth parameter controls your indentation size; if you want four space indents, use :set shiftwidth=4 , or the abbreviation :set sw=4 . If only this is done, then indentation will be created using a mixture of spaces and tabs, because noexpandtab is the default. Use :set expandtab .


1 Answers

You can take a look at "Indent Guides : A plugin for visually displaying indent levels in gvim" here http://www.vim.org/scripts/script.php?script_id=3361

Screenshots: http://nathanaelkane.imgur.com/indent_guides

like image 139
grimgav Avatar answered Sep 21 '22 10:09

grimgav