Live data from Hacker News

A Good Vimrc

dougblack.io

71–80 of 178 posts

Re: A Good Vimrc

#71

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…

>> but as a team or class our overall efficiency drops by being different.

Wait, what? How does this follow? In my whole professional career I don't think I've ever sat down at another persons machine, so I don't see how Bob using vim/querty and me using emacs/dvorak could possibly impact our aggregate performance as a team.

Do teams really spend a chunk of time fiddling around on each other's computers?

Re: A Good Vimrc

#72
post #56
post #20

Earlier quoted context omitted.

The default vim config is pretty barebones. Actually, one of the main goals of Neovim[1] is to provide better defaults[2], such has syntax highlighting. [1] https://neovim.io/ [2] https://github.com/neovim/neovim/issues/276

Holy ish! Neovim has progressed so much. Exciting.

I'm actually using it currently and I really enjoy the built-in terminal. It makes my workflow much better.

Be aware that some plugins might have some bugs. I also got segfaults when using multiple terminals (although that's quite rare).

Re: A Good Vimrc

#73

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…

> Finally I'm never going to buy the efficiency of keyboard shortcuts when coding is generally worth the time sink in learning them over clicking a mouse in an IDE.

So here's your problem, right. I'm not selling this to you. If I were stating it, I'd be stating it as a fact. Most of HN would agree with it because they themselves experienced it. Indeed the only ones who would disagree with it are the ones "not buying it".

Try it if you want, I don't really care if you don't, but you're making assumptions and reacting to this with fear instead of curiosity. And that, above anything else, is something that will make you less efficient not just in your work but in your entire life - so you're in a pretty bad spot to lecture others on efficiency...

Re: A Good Vimrc

#74
post #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.)

Yea, it forces you to use the vim bindings. This is advantageous, since your hands don't leave the home row. It seems minor, but when you actually "get" vim, you'll actually see speed improvements. It sounds silly, the half second saved here and there, but once you've done it long enough, you get into a flow that you just can't get moving your hands to the arrows or mouse.

Re: A Good Vimrc

#75
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 came across [xcape](https://github.com/alols/xcape) this week. It is a great little utility which can map escape to another key like control or shift but only when pressed once. For example you can configure the control key to be escape if pressed once, but will still act as control if held down. Combined with mapping caps lock to control, I now have the best of all worlds. Highly recommended.

Re: A Good Vimrc

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

yup. i find binding ctrl caps way more useful than binding ctrl to esc (and my keyboard even has a ctrl key made for the caps place and a caps key made for the ctrl position).

BUT there's also a way to do something like: if you press and hold caps, it acts like control. but if you press and release quickly it acts like esc. stevelosh describes how to do that on osx here http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#cont... but i still haven't found a way of doing that on linux.

Re: A Good Vimrc

#77
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 because I work often enough on remote servers with vanilla vimrcs that don't have custom escape bindings set that the penalty I pay having to stop and consider which environment I'm in before every escape wasn't worth the small quality of life enhancement from having it set locally.

Good tip on caps lock, though I currently have it set to control which I find is a much better use of the key. Especially once you know about ctrl-o.

Re: A Good Vimrc

#78
post #10

This is a very nice write up, but the tabs/spaces part of it makes no sense at all. "I like it, since it means my source code looks the same on every machine." That reason just makes no sense at all. There's only one reason for configuring tabs to be anything but tabs, and that's because someone else set the standard. So if you're editing python or bash, and you don't feel like being a rebel with a cause, you set exp…

Author here.

I literally meant that I enjoy that it will be forced to look the same on every machine. I like that it's not configurable by others.

Personal preference.

Good tip on autodecection!

Re: A Good Vimrc

#79
post #52

Earlier quoted context omitted.

* 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: Too…

Arthur Chu is a rather... special case. Stay far away from his Twitter if you value your sanity and faith in humanity.

Re: A Good Vimrc

#80
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]
Post reply on HN