Live data from Hacker News

A Good Vimrc

dougblack.io

171–178 of 178 posts

Re: A Good Vimrc

#171
post #49

Rebinding jk to escape because escape is too far away seemed like a fairly ugly hack to me, especially because you can't type it anymore without waiting. Why not simply rebind caps lock to escape? Caps lock is used awfully little, considering how prominent its position on the keyboard is. On Linux, you can rebind it by adding setxkbmap -option caps:escape to your .profile. If instead of an additional escape you prefe…

I agree. If you're on Mac, the tool Seil will allow you to map Caps to Esc. And I use SharpKeys when on Windows. The downside however is when you're stuck using someone else's computer or don't have root on Mac and Windows. I don't find myself on someone else's machine often though, so for me it's worth it to not have that half second delay.

To add to this, Seil [1] is free and has been available for many years. If anyone here uses it, a donation is probably a good idea.

[1] https://pqrs.org/osx/karabiner/seil.html.en

Re: A Good Vimrc

#172
post #163

syntax enable " enable syntax processing The comment should be enough to describe this one. Sorry, no it's not. The syntax processing of what? The syntax of the current file loaded? Some sort of commands?

A good example of a completely useless comment.

Re: A Good Vimrc

#173

Earlier quoted context omitted.

> that can't be explained by anything except by a desire to be treated like a princess Do you mean a desire to be more efficient? Am I some kind of princess because I decided to use a different keyboard layout than the default? That I decided to learn a different language than the one I was told to learn in school? That I wanted to install a different operating system than the one that came with my computer? Your com…

You may personally be more efficient but as a team or class our overall efficiency drops by being different. Now I'd argue that the class is more important than you personally. We can agree that it matters a lot less what your own personal setup is as long as it saving stuff in the same format but I wouldn't say it doesn't matter at all. As soon as someone asks you for a bit of help you're going to be slowed down by…

Hey I'm sorry to change focus here, but your peers are going to have a much more effective learning session if they're "doing" rather than "watching". I know it takes longer to fix their problem that way, but theyll appreciate the motions when they have to go through them themselves.

I can understand what you mean though. I've certainly had to take over a couple of times with fresh juniors and interns, but their setup was usually very under-customized, and those times were pretty rare. People who had complex setups were usually smart enough to figure out directions on their own, and really just wanted some documentation or an example to guide their way.

Re: A Good Vimrc

#177
post #49

Rebinding jk to escape because escape is too far away seemed like a fairly ugly hack to me, especially because you can't type it anymore without waiting. Why not simply rebind caps lock to escape? Caps lock is used awfully little, considering how prominent its position on the keyboard is. On Linux, you can rebind it by adding setxkbmap -option caps:escape to your .profile. If instead of an additional escape you prefe…

Hi! Author here. Fair points. I'm gonna start out on the defensive: I didn't post the article, which kinda stinks because if I knew it was going to get such attention I would have updated it to my current setup. Anyways as the 1.5 year old article states: This article will almost certainly fall out of date with my vimrc in the very near future I don't do jk escape anymore. I have since abandoned custom escapes becaus…

This depends on what you're hosting your article on, but you could either generate the vimrc programatically from the code in the article or generate the article from comments placed in your vimrc. Similar to a .litcoffee file.

Re: A Good Vimrc

#178
post #168

Earlier quoted context omitted.

Ah, hadn't thought of that. I had a feeling there had to be more words, but couldn't come up with any off the top of my head. Apparently I write very little Norwegian in vim (I use jk for Esc).

FWIW (again, not sure about rules for joining words in Swedish): for abb in jk jf; do echo "Occurances of ${abb}:" grep ${abb} -c \ /usr/share/dict/{bokmål,nynorsk,british*,svenska} done Occurances of jk: /usr/share/dict/bokmål:90 /usr/share/dict/nynorsk:39 /usr/share/dict/british-english-insane:20 /usr/share/dict/svenska:70 Occurances of jf: /usr/share/dict/bokmål:31 /usr/share/dict/nynorsk:32 /usr/share/dict/britis…

Words are joined the same way in Swedish as described above for Norwegian, so not safe there either.
Post reply on HN