Live data from Hacker News

Steve Losh's .vimrc

bitbucket.org

71–80 of 103 posts

Re: Steve Losh's .vimrc

#71
post #53

Anyone who knows who sjl is could have easily found his vimrc through his website. According to the bitbucket history, the file has been hosted there since at least 2009.

Which doesn't make it less useful. And for those of use who don't know sjl, this was useful.

Re: Steve Losh's .vimrc

#73
post #20

Earlier quoted context omitted.

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.

That's a huge amount of trust you've placed in bit.ly, and in insecure http. You might at least consider typing out https://bit.ly/newbox so that you only have to trust bit.ly. Better yet, memorize the URL that bit.ly links to. Also, why do you symlink your dotfiles into your cloned git repo, rather than just checking out the git repo as ~? Personally, I just move the .git directory from the clone to ~, and then "git…

I'm lazy and don't want to type out the github URL, but you're right I should place the redirection under my control and use HTTPS. Honestly though I cannot think of a single reason why anyone would want to hijack my script. I don't do anything very interesting that would make my machine a lucrative target for that sort of malicious activity. I'm a very small fish in a massive pond.

Also due to laziness I don't want to add a bunch of stuff to .gitignore, or add * and then add exceptions. I like having the symlinks.

Re: Steve Losh's .vimrc

#75
post #47

I didn't know this was possible: " Resize splits when the window is resized au VimResized * exe "normal! \ =" That's really handy. Also, this part made me smile: " Heresy inoremap I inoremap A

The comment is cute, but doesn't it make more sense to just map to End itself since A is essentially a shortcut for a

  inoremap  
Technical note: I's behavior changes depending on 'cpo' so you can't just map it to ^.

Re: Steve Losh's .vimrc

#76

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.

Even in new computer without net connection vanilla vim is good enough for editing. When sit in an alien computer with vanilla vim. At first I put these lines in .vimrc

   set nocp
   set hidden
   set ts=2
   set sw=2
   set autoindent
   set incsearch
   filetype on
   filetype plugin on
   map  j
   map  k
   map  l
   map  h
For buffer management, combination of :ls, :b and :b# does the job well enough, compiling command-t plugin isn't necessary :). For listing of files there is :sexplore . For code browsing there is plain old ctags. There you go, almost 90% of environment created. Other things like surround or snipets support would be better. But I don't use them most of the time :).

Re: Steve Losh's .vimrc

#77
post #26

Does this affect performance in any way? 1k+ lines is quite a lot.

In my experience a huge .vimrc loading tons of plugins is not much. It's completely dwarfed by the overhead of starting X11 gvim, for example.

Re: Steve Losh's .vimrc

#78
post #47

I didn't know this was possible: " Resize splits when the window is resized au VimResized * exe "normal! \ =" That's really handy. Also, this part made me smile: " Heresy inoremap I inoremap A

(I love both editors)

That's something disgusting about Vim - mapping to other keys instead of commands. In Emacs its much nicer IMO:

    (global-set-key (kbd "C-a") 'beginning-of-line)

Re: Steve Losh's .vimrc

#79
post #78
post #47

I didn't know this was possible: " Resize splits when the window is resized au VimResized * exe "normal! \ =" That's really handy. Also, this part made me smile: " Heresy inoremap I inoremap A

(I love both editors) That's something disgusting about Vim - mapping to other keys instead of commands. In Emacs its much nicer IMO: (global-set-key (kbd "C-a") 'beginning-of-line)

Disgusting but practical. I already know the keys on the right because I use them every day. If it were a function I'd have to look it up first.

Re: Steve Losh's .vimrc

#80
post #75
post #47

I didn't know this was possible: " Resize splits when the window is resized au VimResized * exe "normal! \ =" That's really handy. Also, this part made me smile: " Heresy inoremap I inoremap A

The comment is cute, but doesn't it make more sense to just map to End itself since A is essentially a shortcut for a inoremap Technical note: I's behavior changes depending on 'cpo' so you can't just map it to ^.

Huh, I never thought of that. I always use A to get to the end of the line, so I never touch the End key. Good idea.
Post reply on HN