Comments by "MrAbrazildo" (@MrAbrazildo) on "0 to LSP : Neovim RC From Scratch" video.
-
Continuing to compare it to Codeblocks IDE:
26:12, I use to be satisfied with PgUp/PgDown, for entire page jumps. If I want less than that, hold Ctrl and hit Up/Down: the entire screen rolls towards my cursor. This can be executed using only the right hand.
26:34,
1) If the idea was to print bar many times, it would be needed to put the cursor over it (no need for selection), then hold Ctrl and press or hold as many 'D's as bars I want.
2) Instead, to replace it by foo, just like you did, I 1st select foo. Double click on it or, starting by its leftmost, Ctrl-Shift-Right (all by the right hand!). Then Ctrl-C (copy). Down, to bar leftmost, select it to overwrite (as previously shown), then hold Ctrl and press V continuously or not, to replace it for as many foo as I want.
3) It's also possible to replace it vertically. On foo leftmost, Shift-Down (selects all the line), Ctrl-C (copy), Down (reach bar), hold Ctrl and press or hold V, and it'll keep adding foo vertically, even over bar.
27:27, this was fast indeed. I have to hold Shift and 5xDown (or select all the paragraph with mouse), Ctrl-C, to only then start with Ctrl-Vs.
28:20, hold Alt + Right/Left I can switch between opened tabs. If different projects are there, it can reach them. I prefer to focus on only 1 project at a time, so those tabs use to be files towards the project.
1
-
Other things I often use on C::B, and I don't remember you had mention:
- Bookmarks: Ctrl-B on different locations. Then hold Alt, and PgUp/PgDown (hold or not) to navigate 1 or more times through them (without release them, in this last case).
- Applying current syntax highlight to any file extension opened. It "doesn't make sense", but I find it to be much pleasant to read that way. I just need to add that extension in a menu, for applying any current highlight I have at the moment. Easier to memorize, due to key colors on key locations. So, often I use to open files on this IDE, instead of text editors. Because these apply highlight according to the file extension, with iron fist.
- Abbreviations: Ctrl-J expands some user custom keywords to code. It's possible to set variables dynamically, so that it'll open a menu to type what variable will be placed in what location, among the code expansion. I can put an entire big fat class there, with plenty of variables.
- Jump between words, horizontally: hold Ctrl, and Right/Left (hold or not).
Let's say I have an abbreviation for a for with const iterators, and for some reason I don't have the nonconst version. So I type rngfor and Ctrl-J. It expands to:
for (const auto some_itr = obj.cbegin(); some_itr != obj.cend(); some_itr++);
So I want to cut const and the 'c's. I can't do that in 1 replace. Plus, it could erase other 'c's. So it's faster to go Ctrl-RightRightRight... till reach any word to delete. Then Ctrl-Shift-Right (select word), Del (all with the right hand).
- Default code: if I have a template of a project, this is faster than load from some other project, and saving as...
1
-
Let's compare it to Codeblocks IDE (aka C::B):
24:36, it has a sharing config. file. It's a xml-like. But it's possible to do this at a higher level, through a small app it provides.
24:50, I remember an old version came with this instant replace all enabled by default. I don't use it, because I think it's "too aggressive". I replace all when I expect it to stop on the page I'm. So I double click on the word, Ctrl-R (opens a menu with that word already selected) , then I only have to type for what. So a new menu opens, I hit All. And I pay attention to where the cursor will stop:
a) On the same page. Perfect. And it was just a bit slower than what you did.
b) On other place. Then I Ctrl-Z, undoing that all at once. I rethink my strategy.
However, I still don't know how you made appear n and v on the same replace. Was it a regex-like replace?
25:34, I use Shift-Down (selects the 1st line), Down again, not releasing Shift (selects the other 1). Then only hold Alt, followed by Up/Down, moving those 2 together, even leaving both inside an if block. It can also navigate line-by-line automatically, if I hold both keys pressed.
26:00, for this I use End (goes to the end of the line), Del (deletes the new line character, making the line below rise to the right side). Then I go End/Del for each 1. At the end, the cursor ends at rightmost side. I only have to press Home, and it goes to the leftmost.
1