Maybe you can cover macros since they are conceptually very simple and very powerful. They may seem a bit complex but are quite simple. Basically you just record your editing movements and play it back. How macros work: press q x to record and q to end. Then repeat with @ x, where x is the name of the macro you want to use (you can have several macros). Anything you do will be played back. That's it... Conceptually s…
Intermediate Vim
71–80 of 130 posts
Re: Intermediate Vim
#72Maybe you can cover macros since they are conceptually very simple and very powerful. They may seem a bit complex but are quite simple. Basically you just record your editing movements and play it back. How macros work: press q x to record and q to end. Then repeat with @ x, where x is the name of the macro you want to use (you can have several macros). Anything you do will be played back. That's it... Conceptually s…
A macro like this will just keep calling itself until it fails, which is nice for files with thousands of lines and you want to make a change that is not conducive to a regex.
As a tip that took me a while to figure out, you can search within a visual selection using `\%V`, which may make it easier to reliably go to a specific part of the current line (compared to t or f like I mention above).
Also wanted to point out that iVim for iOS is pretty good, for those rare cases you want to do some text processing on the move that makes you miss Vim: https://itunes.apple.com/us/app/ivim/id1266544660?mt=8
A decent post on recursive macros: https://jovicailic.org/2018/06/recursive-macros-in-vim/
Re: Intermediate Vim
#73Re: Intermediate Vim
#74I imagine it might be quite a good starting point for somebody who's used to VsCode productivity but wanted to get into vim without going full vim!
Re: Intermediate Vim
#75Disappointingly elementary. Even I, an Emacs user who occasionally uses vi am familiar the material in this. Can anybody suggest any real intermediate vi material?
Re: Intermediate Vim
#76Re: Intermediate Vim
#77Maybe you can cover macros since they are conceptually very simple and very powerful. They may seem a bit complex but are quite simple. Basically you just record your editing movements and play it back. How macros work: press q x to record and q to end. Then repeat with @ x, where x is the name of the macro you want to use (you can have several macros). Anything you do will be played back. That's it... Conceptually s…
Re: Intermediate Vim
#78For anybody who's found more IDE-y activities a bit beyond the current generation of VIM plugins (looking at you Typescript), the Vim plugins for VsCode and Visual Studio are actually surprisingly good and I find myself at least as productive as I do in Vim. I imagine it might be quite a good starting point for somebody who's used to VsCode productivity but wanted to get into vim without going full vim!
Re: Intermediate Vim
#79Maybe you can cover macros since they are conceptually very simple and very powerful. They may seem a bit complex but are quite simple. Basically you just record your editing movements and play it back. How macros work: press q x to record and q to end. Then repeat with @ x, where x is the name of the macro you want to use (you can have several macros). Anything you do will be played back. That's it... Conceptually s…
For that example I would open the document in Sublime Text, select all, and split selection into lines so that I have an independent caret on every line. Then I'd just type the quote at the beginning and end of each line - the home/end keys will put each caret at the beginning or end of its respective line.
Macros and other solutions are great, but for this very simple and surprisingly common task, multiple cursors are perfect.
Re: Intermediate Vim
#80For anybody who's found more IDE-y activities a bit beyond the current generation of VIM plugins (looking at you Typescript), the Vim plugins for VsCode and Visual Studio are actually surprisingly good and I find myself at least as productive as I do in Vim. I imagine it might be quite a good starting point for somebody who's used to VsCode productivity but wanted to get into vim without going full vim!
Nevertheless, I think that VIM support for IDEs has improved a lot these past years. VSCode and Jet brains have done an awesome work integrating it to their software.