Live data from Hacker News

Two Simple Steps Helped Me Learn Vim

adamdelong.com

51–60 of 92 posts

Re: Two Simple Steps Helped Me Learn Vim

#51
post #35

Earlier quoted context omitted.

Vim is much more efficient. For example, within Tmux, one never needs to leave the terminal; with ST, there's a frequent switching cost which compounds over the course of a day. If one were to put Tim Pope up against an ST master, it's almost certain Pope would win.

I love the iTerm2 + tmux + vim + zsh environment. It takes a little time to figure out how to juggle the configuration for them, but once you do, it's super efficient.

Are you dotfiles openly available? I have the same set of tools, but still find things are slightly off... would love to compare notes.

Re: Two Simple Steps Helped Me Learn Vim

#52
post #42

The most important thing I would say to anybody that wants to use vim is relax! Here are some steps I think will be helpful: 1 ) Install vim with janus and use gvim/macvim. This will allow you to use vim pretty close to your previous editor. 2) Learn hjkl movement and how to move between insert/movement/visual modes. 3) Try to use them as much as possible. It's ok if you use arrow keys or mouse from time to time. 4)…

I am still on the fence about the usefulness of Janus as someone starting with Vim. Sure it gets you closer to ST, but is that really the end goal? Why not still use ST?

Re: Two Simple Steps Helped Me Learn Vim

#53
I've been using vim pretty much full time since around 2000. The one important thing to accept about it: you'll never know all of it. It's just huge. (but you'll never know all of any big dev environment - such is the life of a software dev). To get really good with it, after the basics, I just kept (and still do) in mind that "there's probably a better/easier/faster way to do this". Then roughly once a quarter I'll spend an afternoon figuring out how to do something new, and consciously focus on incorporating it into my workflow. Just like I would with any other tool or technique.

Just because it's "old school stuff like vim" doesn't mean it isn't worth learning. I don't know how it's viewed so differently than say, learning how to use containers, or learning how to do event based programming, or any other concept that slows you down for a little before making you more productive.

Re: Two Simple Steps Helped Me Learn Vim

#54

Time and again, these "how to coerce yourself into learning this hostile tool called vim" posts appear. I read them, and it sparks my interest. But usually, whats missing is part 2, which goes: "... and this is why it was so totally worth it". An no, just because it works over SSH and is installed on every server is not quite sufficient. Also, are you programming in a script language or a .NET or JVM behemoth?

For me, I was always annoyed with how tedious it was to edit things. i.e, The gap between what I think vs what I have to do in the editor to get it done. This constant annoyance was what drove me to spend time and energy into learning it. I believe that if you don't care about it, you won't really benefit out of it. Because the whole point of switching to Vim/Emacs is to minimise the gap between what you think and ho…

Your example falls flat. Any text editor with regular expression support can do that...

Do you have another example?

Re: Two Simple Steps Helped Me Learn Vim

#55

Time and again, these "how to coerce yourself into learning this hostile tool called vim" posts appear. I read them, and it sparks my interest. But usually, whats missing is part 2, which goes: "... and this is why it was so totally worth it". An no, just because it works over SSH and is installed on every server is not quite sufficient. Also, are you programming in a script language or a .NET or JVM behemoth?

The ssh/server thing you noted is what got me; being able to search and navigate in really large log files on the cluster I used to work on. That was my gateway drug. I don't use it full time, but I use it quiet a bit now.

Re: Two Simple Steps Helped Me Learn Vim

#56
post #24

A more elegant solution than a notecard may be using a vim cheatsheet wallpaper, like this: http://vimfoo.com/2012/09/vim-shortcut-wallpaper/ The downside of that is that it isn't customizable, so I get why he likes the 3x5 card. But at least you can't lose this.

"Awesome! With my vim cheat sheet wallpaper I will never forget anything! This time next year, Rodney..."

"Oh..."

Re: Two Simple Steps Helped Me Learn Vim

#57

Earlier quoted context omitted.

For me, I was always annoyed with how tedious it was to edit things. i.e, The gap between what I think vs what I have to do in the editor to get it done. This constant annoyance was what drove me to spend time and energy into learning it. I believe that if you don't care about it, you won't really benefit out of it. Because the whole point of switching to Vim/Emacs is to minimise the gap between what you think and ho…

Your example falls flat. Any text editor with regular expression support can do that... Do you have another example?

vim:

step 1: type ci(. step 2: type what you want to replace with. step 3: press ESC.

notepad++:

step 1: press Ctrl-H. step 2: type \([^)]*\). step 3: press tab. step 4: press (. step 5: type what you want to replace with. step 6: press ). step 7: move hand to mouse. step 8: move cursor to and click on "Regular expression". step 9: press enter.

Do you have another example?

Re: Two Simple Steps Helped Me Learn Vim

#58

Earlier quoted context omitted.

For me, I was always annoyed with how tedious it was to edit things. i.e, The gap between what I think vs what I have to do in the editor to get it done. This constant annoyance was what drove me to spend time and energy into learning it. I believe that if you don't care about it, you won't really benefit out of it. Because the whole point of switching to Vim/Emacs is to minimise the gap between what you think and ho…

Your example falls flat. Any text editor with regular expression support can do that... Do you have another example?

Pepole don't use vim because it does things that are simply impossible in other editors - they use it because they find it lets them do that thing better. In this case, I guess the main point is about vim's modal editing in which the command is simple, easy to type and obeys a meaningful grammar.

Re: Two Simple Steps Helped Me Learn Vim

#59

Time and again, these "how to coerce yourself into learning this hostile tool called vim" posts appear. I read them, and it sparks my interest. But usually, whats missing is part 2, which goes: "... and this is why it was so totally worth it". An no, just because it works over SSH and is installed on every server is not quite sufficient. Also, are you programming in a script language or a .NET or JVM behemoth?

It's worth it for the same reason dvorak is worth it (to those who master it.)

Re: Two Simple Steps Helped Me Learn Vim

#60

Earlier quoted context omitted.

To to keep your fingers on the home row, in order to have better access to all the other keys in your keyboard. Having your fingers on the arrow keys mean your hand has to travel that much further to type the other keys—making you slower.

I've always wondered if the "disable the arrow key" advice given to every VIM novice makes any sense for the user of a 11" - 13" laptop. It was probably a good advice for a classical keyboard, but I find the arrow keys quite handy when I work on a small laptop keyboard.

I started seriously using vim around the time I started coding on the go with a very old eeePC (the first model, the absurdly small one). This was around 5-6 years ago probably. Back then I had already used vim before but only as a "normal" text editor, just go into insert mode and move around with arrows.

I was forced to use vim because that old piece of crap PC (I still love it though) wasn't powerful enough to run anything, really, and the screen was super small. I noticed using arrows key was super uncomfortable because yes, they were closer to the actual home row but they were also smaller, clunkier and harder to press. So I decided to force myself to use hjkl and disable arrow keys. It was definitely one of the best decisions of my (coding) life. Just comfortably resting your hands on the home row (either laptop keyboard or normal one) simply makes your typing more relaxed and after the couple of weeks (months?) struggling with left/right (up and down was fairly easy) you really stop noticing it.

Funnily enough, I re-enabled arrow keys a year or so ago and I haven't really felt the temptation to use them anymore.

DISCLAIMER: This turned me into a super slow and awkward typist when I am trying to work on text in an editor that does not support vim mode (like google docs for example). I have several documents around with jjjkkjhjjhjjllljh unfortunately.

Post reply on HN