I use vim to edit a lot of latex files using vim 7.4. Some trick of the syntax indenting annoys me and interferes with my intentions. Particularly, the automatic indentation during the addition of a line. I tried to remove this by

:set noautoindent

but it produces no effect. Which of the many options is working against my desires?

  • Please consider accepting the answer if it solved your problem :)
    – nobe4
    Feb 27, 2017 at 16:42

2 Answers 2


After examining similar questions, I've found the solution is to :set nosmartindent.


I had this just recently and my solution was different. My vim setup was:

--- Options ---
  background=dark     history=200         langnoremap       nomodeline            ruler               scrolloff=5         ttimeout            ttyfast             wildmenu
  display=truncate    incsearch         nolangremap           nrformats=bin,hex   scroll=37           showcmd             ttimeoutlen=100     ttymouse=sgr

if you pay attention, backspace has indent on it...

setting it differently (just removing the indent)

:set backspace=eol,start

solved the issue

  • Welcome to Vi and Vim! Your proposed change should only affect pressing Backspace, though, right? So not really "adding a new line" as in the question.
    – D. Ben Knoble
    Oct 4, 2021 at 23:17
  • Actually, when I see "Particularly, the automatic indentation during the addition of a line." by OP, i believe vim backspace would be this "addition of a line"
    – Sakk
    Oct 5, 2021 at 14:16
  • With this, my backspace doesn't remove indents anymore Feb 19 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.