Re: [OT]: vim tabs/spaces (Re: pattern matching)
"Douglas Lewit [email protected] [ocaml_beginners]" <[email protected]> Wed, 30 Mar 2016 08:30:15 -0500
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <CAM0XMJR+MQXWEZdid_LjMSd3CbbXcOWwra=Vq=2sphFxN6r2rw@mail.gmail.com> |
Thanks Oliver! I'm gonna try this in my .vimrc file. This Saturday morning I'm giving myself a break from my Java class to attend a Chicago Ruby conference where the topics include Vim versus Atom ( never heard of Atom before, but it should be interesting ) and I want to ask some questions about catching errors in user-entered input. It's also a great way to meet people, interact, make friends ( and probably make enemies too! Oh well.... ) I think that's really important. The path of the computer programmer/scientist/hacker/etc can be a lonely path at times, and I think it's very beneficial to study and learn with friends, peers, co-workers, classmates, etc, etc. I have found on MANY occasions a classmate will explain something to me much better than the professor can. Although to be fair I have encountered some really wonderful professors. I wish we had more of them. My Java prof this semester actually said on the first day of class, "I want you all to know that I don't care about you! I'm just here to make more money for my pension!" Well sure, we all want $$$$, but I can't imagine this guy's rudeness to actually announce that on the first day of class! But I guess I should give him kudos for his being extremely honest--although rather blunt and obnoxious about it. Anyhow, back to editors. So I told this guy that I'm not really into Eclipse that much. Eclipse is okay, but I think it fosters some laziness in Java programmers. I prefer Vim because then I am forced to really memorize stuff and really know what I'm doing. So I asked him, "Can I use Vim instead of Eclipse?" He said, "Not a problem. Use whichever IDE you want to!" Well.... guess what? On the midterm he actually asked some dumb question about file preferences in Eclipse!!!! Geesh!!!! I almost blew a gasket, but hey, I got a B on the midterm, so I guess I can't complain that much. But still.... why do these professors deliberately misdirect students in this way? I just don't get it. There are professors who really love to teach.... and then there are professors who want you to step on sharp nails before you get your degree. I just don't get it. Oh well. On Wed, Mar 30, 2016 at 2:08 AM, Oliver Bandel [email protected] [ocaml_beginners] <[email protected]> wrote: > > > > 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 > > >