Comments by "MrAbrazildo" (@MrAbrazildo) on "ThePrimeagen"
channel.
-
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
-
2:24, it's hard to figure out how this can be better than Codeblocks. Cursor up/down I can do with arrow keys. Insert mode is default, I can type anytime. Visual mode doesn't need special keys: it already starts selecting all the block by holding Shift-Down (can be done by just the right hand). Ctrl-S (can be left hand only) to save file, Alt-F4 (left hand) to quit.
4:36, holding Ctrl-Right (can be right hand only) does that. 4:44, same thing with Ctrl-Left (right hand too), for backwards.
5:09, this is nice. I don't know how to do this 1. But holding Up/Down or using the mouse I will take 1s more. So it's not big deal to me.
6:21, for that I need Home (1 or 2x, depending on its config, to reach leftmost position) , Shift-Down (select line), Del. Or 4x left-click with mouse (2x for selecting the word, other 2 for the line) and Del. 6:26, Ctrl-Z/R is enough.
6:40, that was fast. I would need hold Shift-Down till the return line, then Ctrl-Shift-Left, to "undo" selection till return's left side, and Del (all can be made with right hand). 6:54, holding Ctrl-Shift-Right (to select how many words), and Del (to delete all at once) - right hand recommended. 7:04, same thing for backwards, exchanging Right by Left.
8:00, I can type left or right that 0 without worrying about modes. I just need to use Right/Left arrow to move the cursor.
9:00, holding Ctrl-Shift-Right it goes selecting by words. I don't need mouse, despite it being an extra option. 9:20, Ctrl-C/V is almost as fast, can be made with left hand, and won't make another line, because the new line character wasn't copied on the selection.
9:34, C::B is faster on this 1: hold Ctrl-D to duplicate the line how many times desired.
9:47, Shift-End select the line, but the new line character. Then Ctrl-C and go to the other, Shift-End and Ctrl-V. 10:00, that was a nice exchange. I've Ctrl-X to delete and memorize, but could not do that on an exchanging. I would have to paste the selection above, and then Ctrl-X on the what should be replaced over, to memorize it as the new 1.
10:35, I use Home to reach the leftmost side, then hold Shift-Down, till selecting all the block + the other piece. Then Ctrl-D to duplicate it.
1
-
1
-
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
-
1:59, ha! Codeblocks is faster on this 1! On error, it opens a small windows, hidden from bottom, then I just click on it, and I'm already on 45! No extra typing, no new screens. Then F2 to get rid of that screen. 2:11, that would be Ctrl-G (left hand) and 45 (right hand, on keypad), IF, and only if, I have to do that! :elbowcough:
2:54, FC? That was fast. I hold Ctrl-Right, and arrive on that in 1s I guess. Then right-click -> 'Find Implementation'.
3:41, for that, I would had left a Ctrl-B (bookmark) on there and here, then Alt + PgUp/PgDown, I go there and back.
3:55, I open those on tabs, then Alt + Right (it opens a menu with those), then Up/Down to navigate them, while still holding Alt. 4:14, but never at this speed.
6:29, faster on that too: just Ctrl-D, and it doubles the line. It doesn't even need to select it, just having the cursor on it.
8:16, I save often too, but never more than once per time.
8:20, 5-Down? That was nice. I guess C::B doesn't jump that way.
10:44, I hold Ctrl-Up, to roll the screen up, towards the cursor. 10:46, Shift-Down or Shift-End to select the whole line. The 1st gets the newline character too, but needs the cursor positioned at leftmost.
1