Live data from Hacker News

A Good Vimrc

dougblack.io

61–70 of 178 posts

Re: A Good Vimrc

#61

Earlier quoted context omitted.

Apple reverses scrolling by default . I don't know about other coders' computers, but there are people who don't know how to change it, and whenever I boot into recovery mode it gets reversed.

It's only "reversed" if you consider the other direction "normal". Either one makes sense: Mac acts like your finger is moving the page itself; X11 and Windows act like your finger is moving the location indicator on the scrollbar. Either one makes sense a priori , but once you're used to one the other becomes intolerable.

Nah, I change back and forth between Mac and Linux. It's bearable.

Re: A Good Vimrc

#62
post #52
post #27

Earlier quoted context omitted.

Vim's default are indeed dumb, but what you described is not a vim-specific problem. Walk into any room full of coders and try to use their computers; you'll discover tons of weirdness that can't be explained by anything except by a desire to be treated like a princess.* Things like rebinding basic shortcuts, reversing the scroll direction (Mac users will get this), swapping Cmd/Ctrl, using some obscure shell or even…

* Regarding 'princess' dig, please see: http://www.thedailybeast.com/articles/2014/05/27/your-prince...

Is that article serious? I appreciate that GP's post is atrociously misguided but that article can't be serious can it? Are there really people out there who believe this?

I had a look at this guy's other articles and it looks like the trashiest of linkbaits. "Reddit's Terrorists Have Won". "How MRAs Killed the World". "The Big Business of Internet Bigotry".

Author might be overcompensating for something...

Edit: Took a closer look at his articles. I generally appreciate opinion pieces, but this guy is either writing about women/feminists (neither of which he is), or about gamers (which he quite clearly isn't either), in a way that lets him just talk without the "threat" of opinions opposite to his own, which he heavily bashes. Wow. I need a shower after this.

Re: A Good Vimrc

#63

Disabling the search highlight seems like a rather lowly use for leader+space. Great guide though, didn't know about quite a few options in here, wildmenu is great. I switched to vim from subl about a month ago - it took a bit of getting used to but I'm loving it now. I still use subl for some multi cursor wizardry but that's less and less common now. I found the disabling the arrow keys in normal mode was the point…

> I found the disabling the arrow keys in normal mode was the point of no return!

Is there any reason to do this when you have a keyboard that has easily reachable arrow keys? (Kinesis Advantage, in my case.)

Re: A Good Vimrc

#64
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 use 'jf' instead of 'jk', so I can type "Dijkstra" occasionally, not to mention they're both on the home row, under your index fingers, typically have physical nubs on the keys, and no words in any language I can find contain the letters 'jf'.

What about IKEA names?

Re: A Good Vimrc

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

[deleted]

Re: A Good Vimrc

#66
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'm a fan of 'C-c' for escaping.

That keybinding works to go from insert to normal in most filetypes (looking at you sql) without the binding so unconfigured vims are still usable with it, and it's really easy to reach.

I will admit it's a little more awkward than caps-lock, but I use my caps-lock for ctrl and thus can caps-lock-c instead.

Escape isn't really useful anywhere else in the system, so capslock as ctrl or super makes more sense to me.

Re: A Good Vimrc

#67
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.

Re: A Good Vimrc

#68
post #27

Earlier quoted context omitted.

Vim's default are indeed dumb, but what you described is not a vim-specific problem. Walk into any room full of coders and try to use their computers; you'll discover tons of weirdness that can't be explained by anything except by a desire to be treated like a princess.* Things like rebinding basic shortcuts, reversing the scroll direction (Mac users will get this), swapping Cmd/Ctrl, using some obscure shell or even…

> 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 to text editors, vim configs, even using emacs (get out your crosses, holy water and sliver bullets), it shouldn't really matter from my perspective.

Re: A Good Vimrc

#70

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…

It isn't just writing code faster, but also navigating (thus comprehending) faster, and in some cases writing code with less errors.
Post reply on HN