#adventofvim
@hyde @jasper @celfred @loupbrun
Awesome stuff π₯°
Will be very nice to complement #AdventOfVim with to practice on π€
Found #AdventOfVim
https://youtu.be/1emnf6lITLo
First episode is simply about various ways of opening files. But quickly made me realize how little I know about
still.
Like "nvim example.md +7" to open that file with cursor on 7th line π€―
I will really enjoy this learning-trip for the next 23 days π₯°
One of the most powerful feature we have is the macro. We can record anything with macros and replay them, we can even say “replay it N times”. It’s a big beast, we can even do nested macros, but be careful, that can hurt your brain. We have two parts: Recording Replaying Recording With q, we can start and stop recoding our macro. q{0-9a-zA-Z"} Record typed characters into register {0-9a-zA-Z"} (uppercase to append).
Finally finished all the articles for my #adventofvim series. It's a small booklet based on the number of words π
β― wc -w content/posts/advent-of-vim/2021/day*.md | grep total
11399 totalAdvent of Vim: t/T and f/F Dec 1 Advent of Vim: Around and Inside Dec 2 Advent of Vim: c as Change Dec 3 Advent of Vim: The Yank, The Delete and The Paste Dec 4 Advent of Vim: Jumps and Changes Dec 5 Advent of Vim: :read Dec 6 Advent of Vim: Save and Manipulate Selection Dec 7 Advent of Vim: Send Buffer Content to Command Dec 8 Advent of Vim: Spell checker Dec 9 Advent of Vim: Substitute Dec 10 Advent of Vim: Ignore substitution Dec 11 Advent of Vim: Subtitution magic Dec 12 Advent of Vim: Delete matching lines Dec 13 Advent of Vim: Open Vim Dec 14 Advent of Vim: Jump to next file Dec 15 Advent of Vim: Magic with :args Dec 16 ?
Advent of Vim: t/T and f/F Dec 1 Advent of Vim: Around and Inside Dec 2 Advent of Vim: c as Change Dec 3 Advent of Vim: The Yank, The Delete and The Paste Dec 4 Advent of Vim: Jumps and Changes Dec 5 Advent of Vim: :read Dec 6 Advent of Vim: Save and Manipulate Selection Dec 7 Advent of Vim: Send Buffer Content to Command Dec 8 Advent of Vim: Spell checker Dec 9 Advent of Vim: Substitute Dec 10 Advent of Vim: Ignore substitution Dec 11 Advent of Vim: Subtitution magic Dec 12 Advent of Vim: Delete matching lines Dec 13 Advent of Vim: Open Vim Dec 14 Advent of Vim: Jump to next file Dec 15 Advent of Vim: Magic with :args Dec 16 ?
This little c is a very kind specimen and can save you a lot of time. First let’s see what :help tells us about it. ["x]c{motion} Delete {motion} text [into register x] and start insert. Basically delete content based on the provided motion and switch to insert mode. An easy way to remember: c as [c]hange. The {motion} can be anything that falls under the motion category, even our lovely t/T/f/F from day 1.
I call them around and inside because that was an easy way to remember, but it’s actually not “around” it’s “a [block]”, like “a word” or “a sentence”. Most of the cases it works with “around”, but for example with sentence, it does not make sense. When I refer to a as “around”, keep in mind, it’s not around, but close enough. A full list from :help: aw a word (with white space) iw inner word aW a WORD (with white space) iW inner WORD as a sentence (with white space) is inner sentence ap a paragraph (with white space) ip inner paragraph ab a () block (with parentheses) ib inner () block aB a {} block (with braces) iB inner {} block at a <tag> </tag> block (with tags) it inner <tag> </tag> block a< a <> block (with <>) i< inner <> block a[ a [] block (with []) i[ inner [] block a" a double quoted string (with quotes) i" inner double quoted string a' a single quoted string (with quotes) i' inner simple quoted string a` a string in backticks (with backticks) i` inner string in backticks Basically if you are inside a () block: