Live data from Hacker News

Steve Losh's .vimrc

bitbucket.org

11–20 of 103 posts

Re: Steve Losh's .vimrc

#11
post #7

That's one thing that worries me about using vim full-time: if I become reliant on a .vimrc or a set of plugins to use vim effectively, but I'm on a computer that doesn't have my .vimrc on it, I'm doomed.

Does that computer have a network connection? Just store your plugins and settings in a git repo (a good idea anyway) and pull them down on whatever machine you're using.

This is what I do. I can clone a git repo, run an install script, and have my typical vim setup running in a trivial amount of time.

Re: Steve Losh's .vimrc

#12

That's one thing that worries me about using vim full-time: if I become reliant on a .vimrc or a set of plugins to use vim effectively, but I'm on a computer that doesn't have my .vimrc on it, I'm doomed.

I feel exactly the opposite. The previous editors that I used required configuration through a menu system. I wouldn't have known how to take that with me elsewhere.

With Vim, all my configuration is in files, which can be backed up. I have them in a dotfiles repo on Github. As I make tweaks, I regularly pull and push from my various computers and they are always up to date. If I'm on a computer that doesn't have my .vimrc, I'm just a `git pull` away from having it. (Same goes for zsh config, etc.)

The most likely time for me not to have my .vimrc is when sshing into a server, in which case I can use stock vim just fine. If my main editor were a GUI, I wouldn't have it available at all, so I think Vim has a leg up in that, too.

Re: Steve Losh's .vimrc

#16
post #13

function! NyanMe() " {{{ ... I very much hope that's just there as an easter egg for those of us who read to the bottom.

Actually I'm planning on splicing it into MakeGreen, so instead of getting a green bar when my tests pass I get Nyan Cat flying across my window. Maybe over Thanksgiving weekend I'll get around to it.

Edit: Also, if anyone can show me how to draw an ASCII-art Nyan Cat in one line of text that would be awesome. Nothing I tried looked recognizable.

Re: Steve Losh's .vimrc

#18
post #3

I think that having all of this in one file is too crazy. I suggest putting some of the stuff in the appropriate files in ftplugins, etc in your ~/.vim directory.

Some of this definitely belongs in separate files.

The problem is that most of these are things I came up with when, during the middle of coding, I thought "oh, this would be really nice". So I just switched to my vimrc, added it, and got back to working, instead of thinking about where to put it, creating new files, etc.

Every so often I'll go through and clean it up. I just haven't gotten around to it for a long time since it works perfectly fine as is.

Re: Steve Losh's .vimrc

#19
post #11
post #7

Earlier quoted context omitted.

Does that computer have a network connection? Just store your plugins and settings in a git repo (a good idea anyway) and pull them down on whatever machine you're using.

This is what I do. I can clone a git repo, run an install script, and have my typical vim setup running in a trivial amount of time.

Same here.

    cd
    hg clone http://bitbucket.org/sjl/dotfiles .dotfiles
    ln -s `pwd`/.dotfiles/vim/.vimrc ~/.vimrc
    cd -
My full Vim config is now installed, plugins included thanks to Mercurial's subrepos.

But really, I don't find myself editing files directly on servers all that often. And when I do I usually prefer bcvi anyway, because I can use MacVim instead of Vim through a terminal (which I hate because of all the shadowed keys).

Re: Steve Losh's .vimrc

#20

That's one thing that worries me about using vim full-time: if I become reliant on a .vimrc or a set of plugins to use vim effectively, but I'm on a computer that doesn't have my .vimrc on it, I'm doomed.

I run

    wget -qO - bit.ly/newbox | sh
or

    curl -Ls bit.ly/newbox | sh
and am up and running. No sweat. I keep this stuff in Dropbox too, just in case.
Post reply on HN