Re: [OT]: vim tabs/spaces (Re: pattern matching)

"Kenneth Miller [email protected] [ocaml_beginners]" <[email protected]> Wed, 30 Mar 2016 13:46:31 +0000 (UTC)
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
Hi Doug,

I appreciate your enthusiasm, and we're here with you in the spirit of learning. 

Eclipse really is the defacto standard for Java work, because it just does so much so well. Vim may force you to learn now, but after you learn maven and have 13 other libraries you depend on, you will move past vim for Java. Vim is still a great tool, but it's predominantly a C/++ programmer's favorite.

Sometimes people in academia actually just want to pursue their own interests, and other times they get a bit jaded, because their enthusiasm is so infrequently matched by their students. Think about it this way - what if you had to put up with people haggling for points every day, who hadn't actually tried, but that always seemed to step on your pride for craft and engineering? It might drive you nuts if you had to deal with everyone who just wants to get a piece of paper so they can go work somewhere and forget everything you said. 

What I said might not be the most accurate, but actively exercising empathy and understanding while you're talking to your professor (or anyone for that matter) can really return value, although you should do it only because it's the good thing to do first and foremost. There's a good book I read not too long ago called Non-Violent Communication, it's really sweet and simple, but basically, if you exercise those principles when you speak to him, I bet you can get him to care.

In any case, don't worry about the eclipse problem, you're on the right path to learning. When you take your learning into your own hands and actually strive to be the best you can be, you're deriving value that other students can't and won't. After you graduate, you'll learn that what matters isn't some GPA, although that might help you out in the beginning, but what you've done and who you work with.


 

    On Wednesday, March 30, 2016 9:31 AM, "Douglas Lewit [email protected] [ocaml_beginners]" <[email protected]> wrote:
 

     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

   

  #yiv6254465482 #yiv6254465482 -- #yiv6254465482ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv6254465482 #yiv6254465482ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv6254465482 #yiv6254465482ygrp-mkp #yiv6254465482hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv6254465482 #yiv6254465482ygrp-mkp #yiv6254465482ads {margin-bottom:10px;}#yiv6254465482 #yiv6254465482ygrp-mkp .yiv6254465482ad {padding:0 0;}#yiv6254465482 #yiv6254465482ygrp-mkp .yiv6254465482ad p {margin:0;}#yiv6254465482 #yiv6254465482ygrp-mkp .yiv6254465482ad a {color:#0000ff;text-decoration:none;}#yiv6254465482 #yiv6254465482ygrp-sponsor #yiv6254465482ygrp-lc {font-family:Arial;}#yiv6254465482 #yiv6254465482ygrp-sponsor #yiv6254465482ygrp-lc #yiv6254465482hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv6254465482 #yiv6254465482ygrp-sponsor #yiv6254465482ygrp-lc .yiv6254465482ad {margin-bottom:10px;padding:0 0;}#yiv6254465482 #yiv6254465482actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv6254465482 #yiv6254465482activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv6254465482 #yiv6254465482activity span {font-weight:700;}#yiv6254465482 #yiv6254465482activity span:first-child {text-transform:uppercase;}#yiv6254465482 #yiv6254465482activity span a {color:#5085b6;text-decoration:none;}#yiv6254465482 #yiv6254465482activity span span {color:#ff7900;}#yiv6254465482 #yiv6254465482activity span .yiv6254465482underline {text-decoration:underline;}#yiv6254465482 .yiv6254465482attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv6254465482 .yiv6254465482attach div a {text-decoration:none;}#yiv6254465482 .yiv6254465482attach img {border:none;padding-right:5px;}#yiv6254465482 .yiv6254465482attach label {display:block;margin-bottom:5px;}#yiv6254465482 .yiv6254465482attach label a {text-decoration:none;}#yiv6254465482 blockquote {margin:0 0 0 4px;}#yiv6254465482 .yiv6254465482bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv6254465482 .yiv6254465482bold a {text-decoration:none;}#yiv6254465482 dd.yiv6254465482last p a {font-family:Verdana;font-weight:700;}#yiv6254465482 dd.yiv6254465482last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv6254465482 dd.yiv6254465482last p span.yiv6254465482yshortcuts {margin-right:0;}#yiv6254465482 div.yiv6254465482attach-table div div a {text-decoration:none;}#yiv6254465482 div.yiv6254465482attach-table {width:400px;}#yiv6254465482 div.yiv6254465482file-title a, #yiv6254465482 div.yiv6254465482file-title a:active, #yiv6254465482 div.yiv6254465482file-title a:hover, #yiv6254465482 div.yiv6254465482file-title a:visited {text-decoration:none;}#yiv6254465482 div.yiv6254465482photo-title a, #yiv6254465482 div.yiv6254465482photo-title a:active, #yiv6254465482 div.yiv6254465482photo-title a:hover, #yiv6254465482 div.yiv6254465482photo-title a:visited {text-decoration:none;}#yiv6254465482 div#yiv6254465482ygrp-mlmsg #yiv6254465482ygrp-msg p a span.yiv6254465482yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv6254465482 .yiv6254465482green {color:#628c2a;}#yiv6254465482 .yiv6254465482MsoNormal {margin:0 0 0 0;}#yiv6254465482 o {font-size:0;}#yiv6254465482 #yiv6254465482photos div {float:left;width:72px;}#yiv6254465482 #yiv6254465482photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv6254465482 #yiv6254465482photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv6254465482 #yiv6254465482reco-category {font-size:77%;}#yiv6254465482 #yiv6254465482reco-desc {font-size:77%;}#yiv6254465482 .yiv6254465482replbq {margin:4px;}#yiv6254465482 #yiv6254465482ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv6254465482 #yiv6254465482ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv6254465482 #yiv6254465482ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv6254465482 #yiv6254465482ygrp-mlmsg select, #yiv6254465482 input, #yiv6254465482 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv6254465482 #yiv6254465482ygrp-mlmsg pre, #yiv6254465482 code {font:115% monospace;}#yiv6254465482 #yiv6254465482ygrp-mlmsg * {line-height:1.22em;}#yiv6254465482 #yiv6254465482ygrp-mlmsg #yiv6254465482logo {padding-bottom:10px;}#yiv6254465482 #yiv6254465482ygrp-msg p a {font-family:Verdana;}#yiv6254465482 #yiv6254465482ygrp-msg p#yiv6254465482attach-count span {color:#1E66AE;font-weight:700;}#yiv6254465482 #yiv6254465482ygrp-reco #yiv6254465482reco-head {color:#ff7900;font-weight:700;}#yiv6254465482 #yiv6254465482ygrp-reco {margin-bottom:20px;padding:0px;}#yiv6254465482 #yiv6254465482ygrp-sponsor #yiv6254465482ov li a {font-size:130%;text-decoration:none;}#yiv6254465482 #yiv6254465482ygrp-sponsor #yiv6254465482ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv6254465482 #yiv6254465482ygrp-sponsor #yiv6254465482ov ul {margin:0;padding:0 0 0 8px;}#yiv6254465482 #yiv6254465482ygrp-text {font-family:Georgia;}#yiv6254465482 #yiv6254465482ygrp-text p {margin:0 0 1em 0;}#yiv6254465482 #yiv6254465482ygrp-text tt {font-size:120%;}#yiv6254465482 #yiv6254465482ygrp-vital ul li:last-child {border-right:none !important;}#yiv6254465482