2

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?

1
  • Please consider accepting the answer if it solved your problem :)
    – nobe4
    Feb 27 '17 at 16:42
2

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

0
0

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

:set
--- 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
  backspace=indent,eol,start

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

setting it differently (just removing the indent)

:set backspace=eol,start

solved the issue

2
  • 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 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 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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