Live data from Hacker News

Steve Losh's .vimrc

bitbucket.org

91–100 of 103 posts

Re: Steve Losh's .vimrc

#91
post #88

God bless nvi. I will never understand why people go out of their way to write and maintain such monster configuration files. Learning core/traditional vi gets one a long way, instead of delusioning themselves with false cleverness and productivity.

I don't think that the author wrote his 1200 lines of .vimrc in one sit. More likely it's years of accumulated 1-2 line additions and removals.

My vimrc has slowly accumulated, I add 1 or 2 new keybinds every now and then and I might remove them later if I notice they don't suit my workflow. Most of my changed keybindings are related to making Vim usable with my native keyboard layout (finnish/swedish).

Also per-language additions accumulate over time. The author seems to have put all settings for all file types in the same file.

Learning standard Vi gets you a long way, but sometimes adding or changing a keybind will make things work more fluently.

Re: Steve Losh's .vimrc

#92
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)

Mapping to keys lets one map to the first part of a key sequence as opposed to the whole sequence/command name.

Re: Steve Losh's .vimrc

#93
post #75

Earlier quoted context omitted.

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.

You use $ too sometimes?

Re: Steve Losh's .vimrc

#94
post #39

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.

echo set ts=3 > ~/.vimrc echo "Toggle search highlighting on and off with F5 >> ~/.vimrc echo map " : set hls\! set hsl? " >> ~/.vimrc Everything else is gravy for me. While an extended rc is handy and I often store one where I can get to it, if I'm just editing a couple of files, vanilla + the tab size I want and a shortcut to highlighting search terms gets me going. YMMV I tried to get into emacs, but I kept coming…

Enter is actually a good candidate for something like that:

  " turn off highlighted results (set nohlsearch) when pressing enter.
  " just pressing n or N will turn the highlight back again
  nnoremap  :noh 
https://github.com/sce/dotfiles

Re: Steve Losh's .vimrc

#95
post #88

God bless nvi. I will never understand why people go out of their way to write and maintain such monster configuration files. Learning core/traditional vi gets one a long way, instead of delusioning themselves with false cleverness and productivity.

I think it is all about productivity and if he feels or thinks he is more productive with these additions then it is really good for him. I don't think anyone should use plain vim because it's 'way it should be done'.

Re: Steve Losh's .vimrc

#96
post #91
post #88

God bless nvi. I will never understand why people go out of their way to write and maintain such monster configuration files. Learning core/traditional vi gets one a long way, instead of delusioning themselves with false cleverness and productivity.

I don't think that the author wrote his 1200 lines of .vimrc in one sit. More likely it's years of accumulated 1-2 line additions and removals. My vimrc has slowly accumulated, I add 1 or 2 new keybinds every now and then and I might remove them later if I notice they don't suit my workflow. Most of my changed keybindings are related to making Vim usable with my native keyboard layout (finnish/swedish). Also per-lang…

My point was, time better spent is coding, not dicking around (and relying) on .vimrc.

We often forgot about the essence of things such as typing the actual code or words, and focus on tools. Better investment is learning how to properly type than having countless little helpers which are nothing more than debt.

Increasing complexity in all areas of life really is troublesome.

Re: Steve Losh's .vimrc

#97
post #95
post #88

God bless nvi. I will never understand why people go out of their way to write and maintain such monster configuration files. Learning core/traditional vi gets one a long way, instead of delusioning themselves with false cleverness and productivity.

I think it is all about productivity and if he feels or thinks he is more productive with these additions then it is really good for him. I don't think anyone should use plain vim because it's 'way it should be done'.

Sometimes we don't realize things. I was using Vim before. I loved it, tweaking it all the time, thinking it helped me to achieve various things faster etc.

When I switched to nvi I realized how wrong I was. My .nexrc contains less than ten lines. There is no syntax highlighting. I was also forced to learn real vi properly. When you do such things amazing things happen.

Re: Steve Losh's .vimrc

#98
post #96
post #91

Earlier quoted context omitted.

I don't think that the author wrote his 1200 lines of .vimrc in one sit. More likely it's years of accumulated 1-2 line additions and removals. My vimrc has slowly accumulated, I add 1 or 2 new keybinds every now and then and I might remove them later if I notice they don't suit my workflow. Most of my changed keybindings are related to making Vim usable with my native keyboard layout (finnish/swedish). Also per-lang…

My point was, time better spent is coding, not dicking around (and relying) on .vimrc. We often forgot about the essence of things such as typing the actual code or words, and focus on tools. Better investment is learning how to properly type than having countless little helpers which are nothing more than debt. Increasing complexity in all areas of life really is troublesome.

I think you're thinking about it backwards. It's usually not thinking "what could I tweak today" that results in adding something to .vimrc. It's "I keep doing this a lot / this feel uncomfortable, maybe there's an easier way" that results in changes. And if you take time to actually implement it, that's a good indication it was worth the tweak.

Let's say you work with splits a lot. Sure you could press ctrl+w all the time, but it's a bit annoying. Rebinding doesn't take much time, but makes it (in the presented example) actually simpler. So did it waste time? A minute or so. Does it make life easier? A little bit. Did the "coding time" suffer? Who cares about a minute or so ;)

Re: Steve Losh's .vimrc

#99
post #88

God bless nvi. I will never understand why people go out of their way to write and maintain such monster configuration files. Learning core/traditional vi gets one a long way, instead of delusioning themselves with false cleverness and productivity.

"""Learning core/traditional vi gets one a long way, instead of delusioning themselves with false cleverness and productivity."""

Sure, you know a lot more than me what makes me productive in my text editor use.

And that is traditional vi. Sure no need to go beyond that. Oh, and 640K should be enough for everybody.

Re: Steve Losh's .vimrc

#100

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.

Really? You are doomed because you don't have some extra configuration niceties? Basic vim editing is not enough?

Then I have to ask: what exactly are you doing in that other computer?

If it's just some temporary sysadmin stuff and the like, then you surely can get by with the basic vim functionality.

Now, If you're gonna be using that other computer for a longer period, then why not just add your .vimrc there? With github, bitbucket, dropbox et al you can have your configuration pushed to the other computer in seconds.

I also find that with everybody having laptops these days, the need to use some "other computer" is much less frequent.

Post reply on HN