vimtricks.wiki Concise Vim tricks, one at a time.

How do you enable auto-indentation in Vim?

Answer

set autoindent smartindent

Explanation

Use autoindent to copy indentation from the current line. smartindent adds C-like indentation logic. For filetype-specific, use filetype indent on.

Next

How do I visually select a double-quoted string including the quotes themselves?