Live data from Hacker News

Ask HN: What's in your .vimrc file?

news.ycombinator.com

41–50 of 69 posts

Re: Ask HN: What's in your .vimrc file?

#41

someone mentioned listchars elsewhere, but I prefer these glyphs: set listchars=tab:»·,trail:· set list this makes it so all your tabs and trailing whitespace is visible. note, this will make you hate almost every other developer.

Indeed! I can't do it any more, just filled me with so much hate... It's like people use the spacebar just to think.

/rant ;)

Re: Ask HN: What's in your .vimrc file?

#42
post #29
post #16

Nothing. I work on many different systems from time to time. I don't like to get too used to things that aren't universal. I have found out (the hard way) that relying on convenience can bite you in the ass when it's 3AM and you've been up for 67 consecutive hours and you execute some keystrokes from habit and they don't do what you expected. I'll admit, I probably cripple my productivity overall for working this way…

> I have found out (the hard way) that relying on convenience can bite you in the ass when it's 3AM and you've been up for 67 consecutive hours and you execute some keystrokes from habit and they don't do what you expected. You really could say that about anything. You could say that one shouldn't program in dynamically-typed languages because 'one day' you'll have to program in a statically-typed language and all yo…

Don't get me wrong, there are many conveniences that I DO use.

However, for editors I've just always preferred to stay as basic and reliable as possible. vi is quick, easy, simple and has been on every *nix machine that I've ever walked up to. Relying on customizitions beyond that is, for me, sub-optimal.

I have had more than a handful of workdays that spanned 2 or 3 or 4 continuous days with little or no sleep at all (although thankfully not in several years). In those cases we were usually recovering from planned maintenance gone wrong. In one case I was trying to edit/update some config files, force software upgrades into a bunch core switches and dispatch pilots with spare parts. It was helpful, to me, to be able to rely on the basics as I hopped through SSH sessions from server to server (but, I did use host keys to speed my logins).

My case is moreso for edits and small customizations and not long sessions of coding, so I really don't NEED a whole lot beyond the basics of what I can memorize.

Re: Ask HN: What's in your .vimrc file?

#43
post #41

someone mentioned listchars elsewhere, but I prefer these glyphs: set listchars=tab:»·,trail:· set list this makes it so all your tabs and trailing whitespace is visible. note, this will make you hate almost every other developer.

Indeed! I can't do it any more, just filled me with so much hate... It's like people use the spacebar just to think. /rant ;)

And to answer the poster, I tend to just use the default vim. I'm bouncing around machines so much that I don't bother setting anything up on my main one that I'll miss on the others...

Re: Ask HN: What's in your .vimrc file?

#44
Mine, though I've (mostly) moved to emacs these days:

  set nocompatible
  source $VIMRUNTIME/vimrc_example.vim
  source $VIMRUNTIME/mswin.vim
  behave mswin
  set tabstop=4
  set shiftwidth=4
  set gfn=Consolas:h10:cANSI

  set number
  set cin!

  colorscheme evening

  map  :tabnext
  map  :tabprevious
  map  :browse tabnew

  set diffexpr=MyDiff()
  function MyDiff()
      let opt = ''
      if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
      if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
      silent execute '\"!C:\Program Files\vim\diff\" -a ' . opt . v:fname_in . ' ' . v:fname_new . ' > ' . v:fname_out
  endfunction
EDIT: Updated formatting.

Re: Ask HN: What's in your .vimrc file?

#45
post #4

Most of what I use was copied from this excellent site: http://www.vi-improved.org/vimrc.php

I wonder why you were voted down (not answering OP question to the letter?) -- that's one of the nicest references I've seen.

Downvoting seems to be in fashion lately. I've noticed a lot of perfectly good comments voted down without any apparent cause, only to float back up later on.

This is something of the last two weeks or so, before that it was happening too, but much less frequently.

Re: Ask HN: What's in your .vimrc file?

#46
post #16

Nothing. I work on many different systems from time to time. I don't like to get too used to things that aren't universal. I have found out (the hard way) that relying on convenience can bite you in the ass when it's 3AM and you've been up for 67 consecutive hours and you execute some keystrokes from habit and they don't do what you expected. I'll admit, I probably cripple my productivity overall for working this way…

> when it's 3AM and you've been up for 67 consecutive hours

That can't be healthy. My longest stretch (age 17) was something like that and I fell down half a flight of stairs without waking up when going home.

Please be careful.

Re: Ask HN: What's in your .vimrc file?

#48

Earlier quoted context omitted.

I wonder why you were voted down (not answering OP question to the letter?) -- that's one of the nicest references I've seen.

Downvoting seems to be in fashion lately. I've noticed a lot of perfectly good comments voted down without any apparent cause, only to float back up later on. This is something of the last two weeks or so, before that it was happening too, but much less frequently.

Could it have something to do with the mechanism for voting and the prevalence of iPhones? I think it would be the cats meow if when detecting the iPhone or any mobile browser the down vote arrow was moved to the right of the title bar area. I say this because my fat fingered attempt at upvoting a comment has the reverse effect of my intent on many occasion.

PG, Are you still looking for a specific iPhone interface?

Post reply on HN