Live data from Hacker News

A Good Vimrc

dougblack.io

131–140 of 178 posts

Re: A Good Vimrc

#131

Earlier quoted context omitted.

This isn't an argument about "vim" vs "IDEs". You really should read the entire thread.. or re-read it.

Linked post is about vim. The first post of this thread is about vim setups all being different causing problems. The next post is about vim, configs and developers not conforming being a pain in the ass. The next post is about you taking offense to his colourful comment ( he was poking fun btw, you shouldn't be offended ) The next post is me backing his point as having merit without the negative connotations. Specif…

Have you seriously missed that this is a discussion about general customization of things such as keybinds/mappings, shells, dotfiles etc? Somehow you turned that into "IDEs vs vim" and you were the only one mentioning IDEs. Customization can happen in IDEs too, you know...

Re: A Good Vimrc

#133
post #96

Earlier quoted context omitted.

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…

ctrl+] will act as escape in any vim out there. At least that I've encountered. Having caps as ctrl makes it really easy to hit.

Ctrl-C seems to work in any vim (though, I think, not actual vi), and at some point my muscle memory rewired itself to that. It's usually directly under my left hand, and it's a keyboard shortcut I use elsewhere, like in the shell.

Re: A Good Vimrc

#134
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…

Here's what works for me:

capslock remapped to ctrl jw for escape in vim

jw is convenient if capslock is used as a control key. I had to pay attention to what I was doing in a vim file in order to remember what I had escape mapped to :)

Re: A Good Vimrc

#135
post #111

Earlier quoted context omitted.

Same here, and I don't even understand why people want to remap Ctrl to Caps (but I never used Mac, so I don't know: maybe it is inconvenient on their keyboards). And recommendation to remap "jk" to Esc always almost made me ignore the whole post, because being able to enter any letter sequence I want is the very least I would expect from a goddamn text editor .

I find pushing ctrl to be at an extremely inconveninet position. Do you look at the keyboard when you type? If so it might explain it. Being a touch typist my left pinky is 1 character away from Capslock so it's way easier to press.

No, I generally don't. But thinking of it, I don't know where my pinky usually is. I mean, I don't always keep it on "a": after all, I have to press Shift pretty often anyway. And Ctrl is pretty close: I don't even need to move my finger to put fingertip on Ctrl, I just use side of the finger to push it.

I tried to use Caps Lock instead of Ctrl, and it wasn't uncomfortable or anything, I just didn't get used to it. I don't remember how it happened that I started to use Ctrl again: maybe it's because I don't always use 1 computer and Ctrl is too important of a key to be looking for every time I need it on somebody else's keyboard. Anyways, currently Caps is Caps and I don't really use it often. Or maybe even ever.

Re: A Good Vimrc

#136

Earlier quoted context omitted.

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…

You may wish to look into xcape. Currently i have capslock = escape when pressed alone, or control when pressed with another key. [0] https://github.com/alols/xcape

> Currently i have capslock = escape when pressed alone, or control when pressed with another key.

This is brilliant idea. And it works on OSX too - using http://apple.stackexchange.com/a/132569

Re: A Good Vimrc

#137
One thing I've added fairly recently is:

    try
            source ./.vimlocal
    catch /^Vim\%((\a\+)\)\=:E484/
    endtry
which lets me tweak my settings (project specific key bindings, &c) by dropping a .vimlocal file in the directory I'm editing from. The try-catch ignores the error raised when the file is absent.

Re: A Good Vimrc

#138
post #130

Earlier quoted context omitted.

IKEA also frequently use first names (for people), e.g. Billy or Erik, and even abstract words, e.g. Poäng (point, as in "that's a good point".). As for jf: I searched through the pdf of a 1300 page Norwegian dictionary, and the single word in there containing jf is the abbreviation "jfr." which is the same as the abbreviation "cf." (confer) in English. So jf appears to be a very good choice.

Note that in Norwegian (and, I think, Swedish and Danish) words are joined without a hypen. So anythime a word ending with "j" like "marsj" ("march/marching") is joined with a word beginning with "f" like "fart" ("speed") you'll see "jf": "marsjfart" ("marching speed"/"cruis(e|ing) speed"). Also jfr isn't a particularly rare abbreviations - so ymmv. At any rate, with how words can be combined in Norwegian, there's ge…

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).
Post reply on HN