Live data from Hacker News

To Master Vim, Use It Like Language

danielmiessler.com

71–80 of 124 posts

Re: To Master Vim, Use It Like Language

#71
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 for learning a library or framework. I'll fold all of the functions, methods, etc. in a file and and then unfold to dig deeper. I work on a 13" mba so it helps with the lack of vertical screenspace.

Re: To Master Vim, Use It Like Language

#72
This article is well written, but it has nothing to do with mastering Vim. It goes no further than running "vimtutor" at the command line. It has all the same tips and shortcuts as any other vanilla Vim tutorial. This is a common problem among Vim articles and tutorials. Authors title them as if it will give you Vim mastery, but instead it only offers the basics.

Mastering Vim means going beyond vanilla movements and learning all of Vim's nasty warts to replace good GUI features. It means learning the wonky, dead Vimscript language. It means knowing how to use the arcane arglist. It means knowing how to go into insert-normal mode, and when to use the expression register. It means knowing everything about very magic search, and why default search is poorly designed. These are all randomly chosen examples, because mastering Vim involves mentally juggling a very large playbook of oddball features to complete editing tasks.

The main resources to help you master Vim are the book "Practical Vim" by Drew Neil, and if you're ever in the unfortunate position of needing to write or edit a Vim plugin, "Learn Vimscript the Hard Way" is invaluable http://learnvimscriptthehardway.stevelosh.com/

Re: To Master Vim, Use It Like Language

#73

This article is well written, but it has nothing to do with mastering Vim. It goes no further than running "vimtutor" at the command line. It has all the same tips and shortcuts as any other vanilla Vim tutorial. This is a common problem among Vim articles and tutorials. Authors title them as if it will give you Vim mastery, but instead it only offers the basics. Mastering Vim means going beyond vanilla movements and…

Drew Neil also has this worthwhile video:

Vim - precision editing at the speed of thought

https://vimeo.com/53144573

Re: To Master Vim, Use It Like Language

#74

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…

Ag support and ctrl-p https://github.com/rking/ag.vim https://github.com/kien/ctrlp.vim Save me so much time opening files and finding matches+open-at-match

the active fork of ctrl-p https://github.com/ctrlpvim/ctrlp.vim

Re: To Master Vim, Use It Like Language

#76

Does work less well if you do not think in English.

Wouldn't the same apply to every programming language?

Kinda works in reverse for Ruby. I wish the Ruby maintainers had seen the need for proper English language documentation.

Re: To Master Vim, Use It Like Language

#77

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…

Slightly tangential, I also found "Your problem with Vim is that you don't grok Vi" a good source of things to learn from. While it starts off sounding like a rant, it isn't - I think it actually manages to convey a fair bit of the philosophy :)

HN thread: https://news.ycombinator.com/item?id=2911930

Re: To Master Vim, Use It Like Language

#78
Learning vim is easy, I've done it a thousand times! (As Mark Twain might say)

This time around I've been keeping a list of the stuff I miss from my usual workflow. Here's two of the most maddening:

1. Searching for literal text. Is there a way to avoid having to manually escape special characters?

2. Maintaining cursor position when scrolling. Maybe I want to go look at another part of the file and come back. How can I scroll without it moving my cursor?

As far as I can tell, I'm SOL on both counts.

Re: To Master Vim, Use It Like Language

#79

Learning vim is easy, I've done it a thousand times! (As Mark Twain might say) This time around I've been keeping a list of the stuff I miss from my usual workflow. Here's two of the most maddening: 1. Searching for literal text. Is there a way to avoid having to manually escape special characters? 2. Maintaining cursor position when scrolling. Maybe I want to go look at another part of the file and come back. How ca…

1. /\Vliteral search

2. C-e and C-y as long as the cursor position doesn't move out of the visible area

Post reply on HN