Blog 1

Random Talk on Random Thoughts

How to Stop Auto Indenting?

| Comments |

After reading this guide, I created a file $HOME/vimfiles/indent/html.vim with only one line.

let b:did_indent = 1

In the past, I would :setlocal noautoident nosmartindent before pasting anything into a Vim buffer. However, as I paste the jQuery code from a website while I was writing a recent post, the code was still wrongly indented.1 After reading the last section of the tip, I now know to use :set paste.


  1. See Cheat in an Online Quiz in Blog 1 for the copied jQuery function.

Comments