Live data from Hacker News

To Master Vim, Use It Like Language

danielmiessler.com

121–124 of 124 posts

Re: To Master Vim, Use It Like Language

#121

Earlier quoted context omitted.

We actually have several licenses of Sublime kicking around at work because everybody moved over to Vim. I know several people who are really fond of Sublime, but lack of a text mode put it at a bit of an evolutionary disadvantage in our shop since we do a lot of remote pair programming over SSH. It's a bit of a shame since we are almost a monoculture now (one guy still uses Emacs and 2 are vim/sublime bilingual -- e…

> I was more trying to convey the idea that the way of thinking was different. Instead of concentrating on the immediate motion of the cursor, I'm concentrating on the structure of the document. In what way does the multiple selection model not concentrate equally on the structure of the document? It's true that vim has a larger vocabulary than a typical editor, but its grammar is actually weaker . For example, I kno…

Multiple selection does seem to be quite a powerful feature. I've never actually used it myself, so I'm not completely clear on all the possible workflows, but it's something that I know the Sublime people I work with miss in vim.

Speaking of token aware editing, smalltalk had an AST aware "editor" called a "refactoring browser". It could even infer the type of a variable by running tests and seeing what type the variable held in the running code. This is where you can get some crazy utility happening with automatic refactoring. Unfortunately most languages these days are needlessly complicated to parse (ahem... ruby).

I am toying with the idea of writing an Evil like mode in Emacs that gives the utility of vim, but without some of the cruft from vi. I think Emacs is a good platform to do it in since it gives you a lot for free (especially a nice lisp interpreter to implement features in ;-) ). However, I have far too many things on the go as it stands :-(

Re: To Master Vim, Use It Like Language

#123
post #105

My issue with getting better at vim is that I've gotten to the point where I'm comfortable moving around text, copying/pasting, and everything I would normally do with a mouse. I know vim is so much more than that, but it's one of those things where "you don't know what you don't know" and because of that, I don't have the incentive to continue learning. Hopefully this post will inspire me to incrementally advance my…

Here's the secret to getting good at vim, at least in the beginning (and at least for me). Step 1: Start using it in your work. Step 2: Find out something that bothers you. E.g., something you miss from another editor, or some kind of movement that you make a lot and would really love to automate. Step 2': Very important for Step 2 - you have to really hate doing anything repetitive or annoying. With time you'll get…

Step 4 (for me) was realizing that all of these plugins to solve small individual problems were just a bunch of cruft. Especially when you use these plugins, mapings, or remappings (I did that a lot) to hide from learning all of the vanilla movements. So, I still use plugins, but I use them to solve things that I cannot myself solve. Or deal with major vim deficiencies that I just don't want to mess with. And focus my attention on grokking 'help' to learn more abscure movements.

Oh, and mappings/macros are awesome in cases were you want solve specific problems in less moves. I use macros to test out my ideas. I sometimes then make them a mapping. That isn't often, but when I do that, it's because they are general and needed enough.

Re: To Master Vim, Use It Like Language

#124

My issue with getting better at vim is that I've gotten to the point where I'm comfortable moving around text, copying/pasting, and everything I would normally do with a mouse. I know vim is so much more than that, but it's one of those things where "you don't know what you don't know" and because of that, I don't have the incentive to continue learning. Hopefully this post will inspire me to incrementally advance my…

Aiming to combat "you don't know what you don't know", here's a list of things to consider. How comfortable are you with: * find/replace/regexes * registers and macros * vim settings (spell, list, highlight, number, wrap) * the plugin ecosystem * editing multiple files simultaneously (splits, buffers, moving between them) * folds Anyone else want to chime in with stuff I've either forgotten or don't know I don't know…

Ugh. I still haven't truly mastered buffers/splits. It's all because I'm too comfortable with tmux :(
Post reply on HN