[OT]: vim tabs/spaces (Re: pattern matching)
"Oliver Bandel [email protected] [ocaml_beginners]" <[email protected]> Wed, 30 Mar 2016 09:08:44 +0200
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <20160330090844.Horde.6lch0Rv8DHWnlgz4b-ZFGPU@webmail.in-berlin.de> |
Zitat von "Douglas Lewit [email protected] [ocaml_beginners]" <[email protected]> (Tue, 29 Mar 2016 19:28:26 -0500) [...] > But I must confess that I don't really use Emacs that much anymore. I've > become more of a Vim guy. The reason is simple. I've noticed that Vim has > way more online resources and online support than Emacs. There is online > help for Emacs too, but.... it just seems like I need a PhD. in CS or > Physics from MIT in order to utilize those resources. The Vim tutorials > are a little more "down to earth" for the "average" programmer. ( I kind > of hate that word "average", but you know what I mean. ) I've also found > that when I write a file in Vim, it looks really weird when I open it up in > Emacs. All the tabs and indentations are way too big! I think in my > .vimrc file I specified a tab of 4 spaces, but when I open the file in > Emacs I end up with one tab being equal to like 8 spaces or something like > that. Very annoying. [...] This looks like you just use TAB-spaces and have changed vim's settings in a way that you display a TAB as 4 spaces, but did not expanded the TAB to four spaces. So, when emacs shows TAB as eight spaces, you could change the display-settings in emacs too. Or if you want to automatically replace TAB by spaces, you need to use "expandtab" in vim. You could use (for your .vimrc-file): set expandtab set sw=4 set tabstop=4 Then TAB will be replaced by four spaces. (When editing Makefile's, you need to use ":set noexpandtab" to switch off the replacement of TAB with spaces.) Ciao, Oliver