Tuesday, July 31, 2012

How to turn off auto-indentation?

Hello,

   I've started to use gVim in place of Notepad++ on my Windows 7 machine (something I prefer since I use vim on my Ubuntu box).  However, I'm running into 2 particular issues that are quite annoying.

1 - When I try to modify JavaScript and I write the function, the editor automatically inserts a tab (8 spaces) before the existing spaces and somehow after I delete the tab, it also seems to have deleted 2 spaces on top of that!  I like code high-lighting, makes code readable, but generally I hate any sort of auto-indentation (a preference -- or lack of a preference? -- that spans all existing browsers and now just in VI).  How do I turn of _all_ auto-indentation and just have me worry about that stuff?

2 - Say I'm modifying multiple files.  The "buffers" feature makes it much easier to have multiple files in a single window and then switch between them.  This keeps my desktop sane by having just one window to look at.  However, when I'm finished with a particular file (or it was modified by one of my apps and I don't care about it any more) I would like to do :close and just be done with it.  But... that buffer does not "close".  What am I doing wrong and what is the purpose of :close?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment