Live data from Hacker News

A Good Vimrc

dougblack.io

121–130 of 178 posts

Re: A Good Vimrc

#121

Earlier quoted context omitted.

Faster than what? Faster than clicking on the function name and seeing where it's reference in an IDE? Like I said, I dont buy that your vim plugins and shortcuts are going to help you understand that code better. I'm in no way arguing we should all be using notepad though.

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. Specifically mentioning IDEs.

The next post is saying it's not just about writing code quicker but navigating and understanding quicker.

Then there's me again saying is how is a tricked out vim really any faster than an IDE to the point it matters.

Then there's you saying I don't understand the thread.

Are you trolling or just totally missing the point because I don't agree with you? Either way, my comment was totally on point for this thread but I'd rather be arguing the point than responding to silly off-topic comments.

Re: A Good Vimrc

#122
post #68

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…

Realistically, what justification is there any more for working on somebody else's machine, being force to use their config? Ok, if your machine explodes and you need their's for a bit fine. But in the long run, the amount of times where you need to actually edit some code by typing on another person's machine should be vanishingly small. I'm all for standards when it comes to collaborating on code. But when it comes…

This reminded me that more often than I'd like, people want me to debug their dev setup on local Vagant VM (I'm an Op and among other I partially support the development environment). I hate that, to use the different layout and not having my tools ans aliases.

Tried to tell them to use dev env on some local shared machine, where it's easier to setup and manage, but they refuse and want to do these things in a local VM.

I just try to say that there might be semi-legit cases when you must go and use other person's laptop.

Re: A Good Vimrc

#123

I don't use vim as my go to editor so I may be asking a silly question; does it just use idiotic defaults or something? I've only met a couple 'vim users' who could just hop onto someone else's vim setup and be productive, and I've never met a single vim user who could use someone else's setup without making comments about everything being different. I guess the question is do people modify vim cause they can or caus…

[deleted]

Re: A Good Vimrc

#124

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

Thank you for this! I've been using capslock as Ctrl for a long time time, and fell into the bad habit to use C-c to exit insert mode.

Re: A Good Vimrc

#125
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+[ works in any vim because it sends the exact same character as Escape. Unless your terminal emulator is very oddly configured, then it will work the same.

Re: A Good Vimrc

#126
post #58
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…

Ack, no. Bind caps lock to Ctrl, and escape is now the trivial chord C-[. As an added benefit, getting used to this layout will help you out with migrating out of vim to emacs.

C-[ is trivial in an English keyboard, but in the Spanish layout it's an awkward three-key chord. I use the latter, and I've been happily inoremapping jj to for a decade.

Re: A Good Vimrc

#127
post #39
post #31

Earlier quoted context omitted.

Why would either tabs or spaces be better than the other? Isn't that one of those pedantic style debates that often come down to a matter of personal preference? I'd get rather annoyed if someone on my team was constantly changing the indentation from tabs to spaces or vice versa every time they opened a file. To elaborate on the author's reasoning for using spaces, people sometimes mix spaces with tabs in the indent…

You're mixing up arguments. No one on your team should be changing indentations. You should decide as a team what your settings are going to be, that's why I suggest using DetectIndent to make sure your settings match whatever the project guidelines are. It's not a matter of personal preference though. Tabs are simply superior for encoding indentation. If you use tabs for indentation you can configure their width in…

> What's the fact that sometimes people mix up tabs and spaces got to do with anything?

Its a concession to the fact that humans are imperfect. When I am working with a group of people I find it easier to just use spaces instead of relaying on everyone configuring to use tabs correctly.

Re: A Good Vimrc

#128
post #68

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…

Realistically, what justification is there any more for working on somebody else's machine, being force to use their config? Ok, if your machine explodes and you need their's for a bit fine. But in the long run, the amount of times where you need to actually edit some code by typing on another person's machine should be vanishingly small. I'm all for standards when it comes to collaborating on code. But when it comes…

Far more common these days, I think, than actually typing on another person's keyboard is sharing an account on a server (physical or virtual). Not that that's a great practice.

Re: A Good Vimrc

#129
post #111
post #85

Earlier quoted context omitted.

Instead of remapping keys, I've always used Ctrl-[ for escape.

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.

Re: A Good Vimrc

#130

Earlier quoted context omitted.

Did you know that IKEA names tend to be names of towns and places in Sweden/Norway? So if IKEA names have jf then Swedish/Norwegian must have that letter combo as well..

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 generally no good safe choice...

Another example, in line with the IKEA theme: "dusjforheng" ("shower curtain").

Post reply on HN