Live data from Hacker News

To Master Vim, Use It Like Language

danielmiessler.com

41–50 of 124 posts

Re: To Master Vim, Use It Like Language

#41

Thanks for this tutorial. I'm at Level 1 having switched from an IDE (PyCharm) and I find this helpful. Any reason why you use Pathogen vs Vundle for managing plugins? Does it even matter?

You're doing yourself a disservice. Intellij (PyCharm) has a vi plugin. Whatever extra stuff you give up from regular Vim, you gain an order of magnitude of productivity using a development environment that is "smart". Think about what PyCharm does for you and what Vim doesn't. Vi(m) is a model, not an implementation. I wish people would stop handicapping themselves with very bad implementations. Intellij, Visual Stu…

> Vi(m) is a model, not an implementaion

No, vim is an editor, not a model (whatever that means) and definitely not an IDE. These are very different things.

I use vim to edit all sorts of text (including for instance this text box, using It'sAllText[1] ). Why would I use an IDE for that ? That'd be silly now, wouldn't it ? ...and at least for me, once I got used to using vim, I didn't see how the IDE could better '...aid you in the launguage ...' than vim itself.

[1] https://addons.mozilla.org/en-US/firefox/addon/its-all-text/

Re: To Master Vim, Use It Like Language

#42
post #37

Earlier quoted context omitted.

You're doing yourself a disservice. Intellij (PyCharm) has a vi plugin. Whatever extra stuff you give up from regular Vim, you gain an order of magnitude of productivity using a development environment that is "smart". Think about what PyCharm does for you and what Vim doesn't. Vi(m) is a model, not an implementation. I wish people would stop handicapping themselves with very bad implementations. Intellij, Visual Stu…

In that spirit, I find it hilarious that the entire industry proudly releases products weekly that do things like re-order laundry detergent at the press of a button or games that require the player to do nothing more than swipe their finger this way or that. On the other hand then there is this long raging religious war over the tools used to build these products where some claim the end all be all is this text only…

Text-interfaces are the most direct and flexible way to get the machine to do work. When you're stuck to a consumer-friendly GUI, you can only command the computer the way the product has been designed to command the computer. You learn how to use a product rather than how to teach the computer.

That said, of course I use a web browser for 99% of my Internet actions. But being able to Alt-Tab into the terminal and run wget to quickly pull down a list of files may feel like 1970s-era, but it's still a powerful technique today, and for as long as users need to do things beyond what designers intended them to.

Re: To Master Vim, Use It Like Language

#43

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…

I asked on /r/vim about "Who uses folds?" Didn't get any takers. I always forget they exist and haven't used them in my workflow yet.

Tag files would be another good one.

Re: To Master Vim, Use It Like Language

#44
post #42
post #37

Earlier quoted context omitted.

In that spirit, I find it hilarious that the entire industry proudly releases products weekly that do things like re-order laundry detergent at the press of a button or games that require the player to do nothing more than swipe their finger this way or that. On the other hand then there is this long raging religious war over the tools used to build these products where some claim the end all be all is this text only…

Text-interfaces are the most direct and flexible way to get the machine to do work. When you're stuck to a consumer-friendly GUI, you can only command the computer the way the product has been designed to command the computer. You learn how to use a product rather than how to teach the computer. That said, of course I use a web browser for 99% of my Internet actions. But being able to Alt-Tab into the terminal and ru…

Respectfully, I propose you are limiting yourself when using left-to-right text-interfaces. I think consumer-friendly may be a bit unfair as well. I'm currently learning sign language and in parallel programming a Leap Motion interface so as to bypass one-dimension (a line of symbols) and two-dimensions (a gui on a plane) and more easily encapsulate concepts (words) by states of motion in three dimensions.

Text-interfaces work well because they restrict input to precise parameters, however as interfaces become "smarter" and are able to capture the meaning of imprecise interfaces such as hand gestures and interpret them precisely without requiring the user to deliver them with robotic precision, interfaces will become more expressive, we will be able to work more naturally in the domain in which we think, which is, these physical three dimensions.

If you've ever watched a mathematics professor write on the chalk board you'll know what I mean. So expressive. So much conveyed with so few markings. And yet, very sloppy. But still. Reading it off the board, those symbols just feel so much better in your head than any words would.

Re: To Master Vim, Use It Like Language

#45
post #43

Earlier quoted context omitted.

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…

I asked on /r/vim about "Who uses folds?" Didn't get any takers. I always forget they exist and haven't used them in my workflow yet. Tag files would be another good one.

I use them. They don't help as much with new development, but when editing a large pre-existing code base it makes perusing the contents of a file much easier. It's like getting a table of contents for free if your code is cleanly organized.

Re: To Master Vim, Use It Like Language

#46

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…

The thing I've found to be really effective at learning "what you don't know"is pairing with other more experienced vim users. You'll see some wizardry occur and you can ask them how they did it. I consider myself an experienced vim user and I still learn new tricks when pairing with other people. Obviously not everyone knows vim users to pair with, but you may be able to find people at meetups.

Re: To Master Vim, Use It Like Language

#47
post #4

Vim is a regular expression system hooked to a 1970s user interface. If you need to apply regular expressions to text files, vim is useful. I used vi to write code for years, but that was decades ago. There's been some progress since the 1970s.

I barely use the regexps. There are 2 things that vi/vim are quite good at that are very relevant today. I don't know of any alternative that is as good. First, efficiency of bandwidth over an ssh connection. You might think, "Oh but there is tons of bandwidth on the internet today". However, I actually use vim to pair program with people in the UK while I'm in Japan. Vi commands can easily deal with variable latency…

I by no means agree with the guy you're replying to, but I don't think your vocalized example is fair. With vim, your state is in the "sentence" you've written. With a typical editor your selection is in the state of your editor, primarily its selections. It's more like "Do this here." vs. "Look here. Do this."

One thing I used to do is visit http://www.vimgolf.com/ and compete with the best solutions there. Aside from a higher usage of meta characters (which is a modal vs. quasimodal thing, rather than a sentence vs. select thing), my editor of choice (Sublime Text) rarely lost out.

There is the caveat that some things that are great for golfing are relatively useless elsewhere (eg. numeric modifiers) and vice-versa (command panel: trim trailing spaces). I miss the later in vim much more than I miss the former in typical editors... although I still hacked it into Sublime anyway.

Re: To Master Vim, Use It Like Language

#48

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…

Marks (non-global, global), the quickfix list, tabs, vimscript, python bindings, there's a lot.

Vimcasts (http://vimcasts.org/) has some good tutorials. Vimgolf (http://vimgolf.com/) also has some good exercises.

Re: To Master Vim, Use It Like Language

#49
post #43

Earlier quoted context omitted.

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…

I asked on /r/vim about "Who uses folds?" Didn't get any takers. I always forget they exist and haven't used them in my workflow yet. Tag files would be another good one.

I don't use folds that often, but when I do they are be extremely helpful. When you run across that block of code that's way longer than it should be, and need to collapse it so you can see the context around it, folds can be very useful. Also for taking care of long comment blocks.

So while I agree with you in that they aren't a part of my typical workflow, they are a piece of vim that I'm glad I familiarized myself with.

Re: To Master Vim, Use It Like Language

#50

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…

[deleted]
Post reply on HN