Hacker News new | past | comments | ask | show | jobs | submit login

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 cause they have to?




For me, it's because I can. When I find a job I do often, I add it to the config, when I find a tool that makes a job easier I pick it up. Bare, freshly installed vim is quite useable, but is missing the affordances of my personally customized environment.

It's kind of like the difference between being able to cook and walking into a strange kitchen and immediately knowing where everything is. In my home I'm comfortable, I know that the vegetable peeler is in a different drawer than the steak knives. In a friend's home, I'm just going to have to ask where something is every few minutes if I want to get work done.


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).


Interesting. I tried out the built-in terminal and found that I couldn't navigate around panes as quickly as if I just used tmux instead. Are you using the default mappings, or have you made them easier to use somehow?


The current defaults discussion is at https://github.com/neovim/neovim/issues/2676.


On my home machine I have a vimrc of about 30 lines, but I could do without most of it, I could probably reduce it to about 5 lines if I had to. So whenever I use vim on a computer at university or on a new machine in the workplace, as long as it has syntax highlighting and auto indent on, which it usually does, that's fine for me.


Correct, the defaults are indeed idiotic, probably because they are from the last century. I even have a freaking plugin installed to properly close buffers (https://github.com/cespare/vim-sbd/).

It's indeed harder to use vim without my customizations. I guess it's more like a "build-your-own-editor from parts" kind of thing.


The defaults are just fine. (As a sysadmin) I tend to work on systems that mostly aren't my own workstation and have never found it to be an issue (can't be arsed to push out my own config everywhere, not to mention other admins may not like what I like). I imagine it might be different for a coder...line numbers and pretty colors are nice I guess?


If there is only one thing I can complain about vim/vi, it's the esc key. The key is too far away to reach easily. It is most accessible with the little finger, which is our weakness finger. Coupled with the fact that it's likely the most important key in vim. I hate it.

So when I use a non-configured vim, it's the thing that I miss the most. The rest is trivial.

However, using someone else vim is completely different!

You must keep in mind that vim is much similar to a programming language. You can remap keys all over the place. You can create exotic combinations that do wonderful and/or terrible things with few key strokes. You can install plugins that argument and alter vim behaviours.

Jumping into a well tuned vim setup is not unsimilar to starting to use a new programming framework. It's hard to be productive right away.

In that case usually, I just rename .vimrc, remap <esc>, do my things and get out of the way.


Yes, the vim defaults suck.

If you're building a new vimrc or want a common ground for pairing, I would recommend checking out [vim-sensible](https://github.com/tpope/vim-sensible) by tpope. It's a vim plugin that provides a set of sensible default options.


Vim Bootstrap (www.vim-bootstrap.com) is one I recently discovered and really like.


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 infecting other people's machines with some haphazardly scp'd dotfiles.

This kind of overcustomization is fine if you live in a basement and work on a project alone. As soon as you become a part of a team, please stop. You're making cooperation unnecessarily hard and spending company time on an optimization that isn't.

*I sometimes joke that coders who refuse to conform to the industry standards should wear a tiara as an indication they are, indeed, unique snowflakes free from the usual social expectations. It seems to work.


> 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 comment is not just hostile, it is unbelievably pretentious. You quite clearly don't understand why people customize things. If you want to live in your undecorated, perfectly square single-room house you're welcome to do so without telling others they're not "part of the team" for having different preferences than you do.

Damn...


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.


This, I don't want anyone else's disgusting unwashed hands on my keyboard or mouse. I work with a guy who regularly walks out of a bathroom stall and back to his desk, bypassing the sink entirely. He tried taking over my machine, I was like hell no. So I get a rep for ocd germaphobe, big deal.


How do people who like to customize their environment do pair programming? I belong to that group, and I like the idea of pair programming, but I've never had the chance to try it in practice...


tmux/screen sharing work just fine.


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.


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.


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 understanding each other system. If we conformed, teaching a junior how to profile code will be easier than showing him how to do it with your vim setup, for example.

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. Sure, they will make you faster, but I'd rather most people took longer and delivered solutions that weren't actually worse than the problem. All too often the quick people land me with stuff that pisses me off.


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


Nope, that's where you assume my problem lies. I actually used vim myself for about 8 years as a developer and still generally default to it as my editor doing ops. I just honestly don't think it's generally worth the bother.

That said, I typically wouldn't mandate uniformity either as, as you said, I'd rather work with the curios. I think this ones a crapshoot, but the same folks are much more likely to know a bunch of useful stuff too.


>> 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?


Maybe you have a career that's different from mine. I've spent time upskilling, pairing and mentoring. It's helpful to sit next to these people and show them something and as I said I can teach a junior how to profile on my tricked out vim setup, but helping them do it if we're both using intellij will be less effort in my opinion.

Honestly though, I often work with developers (I'm a contractor so I work with tons of people ) who use GUIs for git or vagrant and the like. If you sit down next to me with your windows system using a gui for some development tool asking me questions about why it doesn't work, I'm going to struggle to help you.


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.


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


Has this "faster" thing been measured and profiled scientifically in some kind of A/B testing?

Or it's just based on subjective feelings and cargo cult?


This whole discussion is ridiculous. When you customize your vim key bindings, you do so either on your machine, or your profile on some remote server. One does not mess with other's computers or settings. But ...

> Or it's based on subjective feelings and cargo cult?

What if it is? What if I am _factually_ not "more efficient", what if I am just "happier" with _my_ setup on _my computer_? how does that in reality could have a negative effect on a team? I am of course assuming that the "we mess around with other's machines or profiles" is an obvious-enough bad practice that it doesn't happen. Right? Right!?


In my tests it's always made quite a difference if your fingers are already on the keyboard, and you want to invoke some specific, non-interactive function; you can usually hit the shortcut, whatever it is, in less than the time it takes to move to the mouse alone.

Few would argue that moving from keyboard to mouse and back between every keypress would be more efficient than just typing one key after the other, as is more usual. The same applies, when activating a shortcut: for example, starting with my hands on the home row, I can do 10 activations of copy (Cmd+C), returning my hands to the home row between each activation, in about 8 seconds. Using the mouse in a similar manner to select the corresponding menu item takes about 22 seconds. Just moving my hand from the home row to the mouse and back again ten times takes around 9 seconds.

(These times are all slightly approximate, because I'm going by eye, because with 2 hands on the home row I don't have a hand left to operate the stopwatch.)

The longer the shortcut, the more time it takes to activate, of course; here, I picked a nice easy one, in the form of Cmd+C. Maybe that's cheating. Some of the fiddlier emacs shortcuts can be quite time-consuming to enter - the rect ones are particularly bad - C-x r C-w, that sort of thing. I wonder how much quicker those are? But I'd imagine they'll still win out over moving from keyboard to mouse to menu bar and back, since for shortcuts you invoke often, muscle memory takes over and you can rattle them off without even thinking.

Maybe all those piano lessons helped after all.

The reader is invited to use their preconceived opinions about microoptimization to decide which conclusion to draw.

(I have no particular opinion about what to do if your hand is on the mouse to start with. Generally I move it back to the keyboard if I don't know how to do something with the mouse, or leave it there if I do. For things such as moving the cursor, or scrolling, the mouse is very effective anyway; usually effective enough that in many cases it's worth using in preference to the keyboard, if you don't have some non-interactive higher-level motion that you could conceivable invoke, such as M-x forward-sexp, or whatever.)


Interestingly I've also played an unfathmoly amount of FPS games to the point where my mouse skills are pretty fricking nifty, so I may be bias, but I'd question why I have both hands on the keyboard when trying to read and understand code anyways?

The thing is, I'm not arguing that you're not quicker anyways. Just that the speed difference between someone good with a mouse and someone good with keyboard shortcuts generally don't matter in a world where IDEs exist and where understanding code properly takes longer than just navigating through it.

Anyways, I'm not actually bothered what you use as long as you can take care of yourself, which a user with a weird vim configuration generally can. However, as I said in a post above, if you're struggling to use git, I'm only gonna be able to help if you use the cli. That won't be the vim guy, but it will be the windows guy who asked me for ftp access.

Point is though, I think the counter argument that using the same tools is super valid. I don't think it's the most important thing in the world, but I do think it has merit.


https://ux.stackexchange.com/questions/30682/are-there-any-r...

With that said, this is in the realm of common sense for anyone who's ever used vim bindings at least semi-seriously. We're not just talking millisecond improvements, we're talking about doing some tasks that can take several minutes in mere seconds.


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.


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


Listen, I get that you're outraged that I've had the audacity to question the worth of customisations but nitpicking an example doesn't encompass the entire argument doesn't detract from the point that this is a thinking mans game.

As it stands I'm not trying to take your toys from you. If you can take care of yourself, do what you like. If you are likely to need some assistance you'll likely annoy anyone who needs to touch your computer.


Glad someone had the same reaction I did. What's the value of conforming to a company standard when it makes you less efficient? Yeah, okay, chastise me and call me a princess - I'm going to go work somewhere else for someone who doesn't hold such a misguided set of principals and let's me work in my own best environment.


>Am I some kind of princess because I decided to use a different keyboard layout than the default?

Maybe you just bought into some myth:

https://www.utdallas.edu/~liebowit/keys1.html


I made my own layout because Azerty is unusable for programming; hitting three keys to produce an @ sign or a {} is inexcusable. And, since I play a lot of games, I wanted the default qwerty wasd keys.

But sure, I bought into some typing speed myth, whatever floats your boat. XKCD774.

https://github.com/jleclanche/dotfiles/blob/master/X11/xkb/s...


Probably missed the whole "Maybe" thing I wrote.

In your case those are valid reasons and apply to several "national" layouts -- but there are many people who go for the cargo cult version too.


> This kind of overcustomization is fine if you live in a basement and work on a project alone.

Hahahahaha! You trolling?

I wonder, you work like 5 people on the same computer or something? And if 'yes', the OS doesn't support multiple users?! I don't wanna ruin a happy relationship or anything, but it's 2015... ;-)


Wait, am I missing something obvious here, or are you seriously complaining about people reversing the scroll direction on their own computers?


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.


Try using it Down Under...


I'm actually glad this complaint was made. But only because I was unaware that you could change the scroll direction on a Mac.

I will definitely be making that "overcustomization" on my Mac. :-D


"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."

Yes, shame on those evil coders for wanting to use their own computers in a manner which they find most enjoyable and productive! They must be assimilated! Give me a break.

"Things like rebinding basic shortcuts,"

Again, give me a break. Developers should be allowed to configure their individual machines in any way they wish. Different people work differently.

"reversing the scroll direction (Mac users will get this),"

When you've worked on platforms for decades where the scroll direction works one way, then end up on a platform where it is reversed, what is wrong with changing the new system to work the way you are used to? Yeah, I might decide to get used to the differences, or I might change it because I prefer it the old way, but who cares?

"swapping Cmd/Ctrl,"

again, who cares -- it's their machine.

"using some obscure shell"

I also see no problem with this -- if they prefer it, just let them.

"or even infecting other people's machines with some haphazardly scp'd dotfiles."

This is a legitimate complaint, if the person is leaving stuff behind that screws up the other person's computer. But if the person is expected to work on other peoples machines, then I think a reasonable solution could be worked out. You should try to defer as much as reasonably possible to the person who the machine belongs to. On the other hand, if you are asking someone else to do work on your machine, it seems reasonable to let them copy some dotfiles in order to help them do the work -- as long as they don't affect your stuff.

"This kind of overcustomization is fine if you live in a basement and work on a project alone."

I don't buy the "overcustomization" label. Yes, it is possible to spend too much time customizing things (if, for example, it prevents you from getting your actual work done). However, programmers can make themselves much more efficient by many of these customizations. Different people have different ways of working, and they have different jobs. Vanilla configurations of things like editors are fine, but the ability to customize exists for a reason -- you can make your job easier and yourself more efficient by customizing your tools.

"As soon as you become a part of a team, please stop. You're making cooperation unnecessarily hard and spending company time on an optimization that isn't."

I've worked on many different development teams over the years. At all of those jobs, it was an extremely rare thing to even do development on someone elses computer. Everyone uses their own.

"I sometimes joke that coders who refuse to conform to the industry standards should wear a tiara as an indication they are, indeed, unique snowflakes free from the usual social expectations. It seems to work."

What "industry standards" are you referring to? Is there an ISO standard for vim keybindings? Please. Also, I don't think the whole "Princess" analogy is fair. Just because someone has their own way of working doesn't make them self-absorbed and shallow.

(edited for better formatting)


Do you not have your own computer at work? Because that's what these ridiculous complaints sound like.



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.


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


I've never heard of him before today, FWIW, but you did get me to google his profile - what with your reverse psychology ;-) - and... well, it's not that bad. It's a pretty standard twitter profile for someone who thinks having 25k followers makes him the voice of god... but I've seen a lot worse on twitter than merely misguided people.

Regardless, I genuinely don't understand the appeal of outrage-writing over subjects that simply do not concern you. For example, I'm straight but I'm also a proponent of gay rights - does that give me any right to speak "on behalf" of gays? Isn't the entire "I'm not [gay/black/a woman] but..." ideology of people stealing other people's voices exactly the reason some countries or communities have societal problems with various minorities?


I guess that's part of the reason I hold him in such contempt- a lot of his comments have made their way into my Twitter feed, and I've yet to see something that wasn't either directly advocating irrationality (c.f. https://archive.is/xfjyi), blatantly speaking on behalf of the supposedly marginalized, or making uninformed statements on something or other.

No intelligent being should ever have the right to speak "on behalf of" any other intelligent being without their direct approval, any other standard is massively insulting.


The journey to learning vim is so long that people at different stages will have things set up differently. I'm still adding and removing things as I learn and understand them, or conversely, as I no longer need them. I'm not kidding when I say it's a 10-year learning curve.


Most code editors are half-useless by default though. I don't think anyone is using the default Atom or Sublime. It takes time to both tweak them and learn how to use them. So I don't think Vim is THAT different.


I think of vim almost as two separate editors. (1) my setup which is customised exactly like I like it and borders onto a IDE and (2) default setup which I can happily use to edit a few config files.


The default settings on Windows and Red Hat based systems are pretty good. On the other hand, I was very disappointed ~8 years ago when I touched an Ubuntu system. It was too plain for me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: