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…
To Master Vim, Use It Like Language
81–90 of 124 posts
Re: To Master Vim, Use It Like Language
#82Vim 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.
That's just not what vim is... I don't even really know where to begin, you're just flat out wrong. I'd say you're confusing vim with something else, but I don't even know what else fits that description.
Even if you agree with vim's approach to modal editing and object motions, there is plenty bad to be said about it in light of some of the tools we have available to us today. But humble origins do not always lead on to humble ends. There is no use in calling a book bad and giving as your reason that it was once pulp. It would be just as unhelpful to call the Lisps of today slow, and to use as your crutch the old adage that "LISP programmers know the value of everything and the cost of nothing."[1] As GP said, "There's been some progress since the 1970s."
[1] https://en.wikiquote.org/wiki/Alan_Perlis#Epigrams_on_Progra...
Re: To Master Vim, Use It Like Language
#83This 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…
The irony in your comment is that I recommend Drew's book in the primer, and Drew has recommended this primer as well.
Maybe they're both good ways to learn Vim.
Re: To Master Vim, Use It Like Language
#84Learning 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…
2. Ctrl+o will bring you back to previous locations in many cases (e.g. after a search).
Re: To Master Vim, Use It Like Language
#85> inoremap jk Using two keystrokes instead of ESC to leave insert mode is definitely a personal preference and not necessarily more efficient or comfortable.
Way more useful (for me anyway) is mapping Capslock to ESC. It works with any vi anywhere as long as you are using your main machine to connect. Also with inoremap don't you have to wait for the letter j to show up until you type your next character? That would drive me crazy. Edit now that I have actually looked at the article: Yes, you can map it to Control but for me it's an awkward place to put a modifier. What i…
* I have to quickly explain something on my colleagues machine. * A colleague wants to show me something on my machine.
The `` is, I daresay, one of the most ingrained keys when operating a computer. When you keep mistyping it, levels of stress will go up.
Re: To Master Vim, Use It Like Language
#86Learning 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
Re: To Master Vim, Use It Like Language
#87This 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…
Re: To Master Vim, Use It Like Language
#88Learning 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…
If you want to go back and forth, you can set two marks.
Re: To Master Vim, Use It Like Language
#89My 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…
then, code in vim. at every pain point ask "is there some faster/easier way to do this?" sometimes you'll find something that seems great, then never use it again. other times, you'll relieve a recurring pain point and at the same time incorporate expanded facility with vim. after awhile, you'll pretty naturally start messing with vimscript as well.
in other words, i think videos and tutorials of "look at how powerful vim is in this situation!" can only go so far, at least until you've really expanded your horizons through practical use and need.
edit: the earlier advice in responses to you (some of which i basically just repeated) is good too. mine could be distilled into a sentence: "learn vim by coding in it, but allowing time for 'how could i do this better?'" on the one hand, just do your normal work. on the other hand, don't stay satisfied with being "good enough" at vim to do your normal work. that's where the learning curve is, and after you do that artificial thing (overdoing "can i make this easier?") it quickly becomes natural.
Re: To Master Vim, Use It Like Language
#90Bill Joy, regarding vi: "It's like one of those pinatas--things that have candy inside but has layer after layer of paper mache on top. It doesn't really have a unified concept. I think if I were going to go back--I wouldn't go back, but start over again."
Hunter S. Thompson, on an unrelated topic: "That was the fatal flaw [...] the desperate assumption that somebody--or at least some force--is tending the Light at the end of the tunnel."
I think vim is a useful tool. It's available on most systems and is powerful. But trying to grok it and appreciate its UI isn't really something I want to do.