A Vim Guide for Advanced Users
thevaluable.dev
thevaluable.dev
Most advanced guides throw a lot at you at once. Digesting one or few commands at a time works better for me to really make it stick (and that is the goal right?)
I need to use `z` for refocusing more
To disable, add these lines to .vimrc:
map <C-a> <Nop>
map <C-x> <Nop>Spitballing:
We could probably make a general solution for organically producing "learning guide" if power users 1) share their custom configurations and share the frequencies of commands they use.
Start with the general configuration, knowing nothing about the commands the tool offers. The learning guide is just a queue of "here's the most common config edit that you don't have" and "here's the most common command that you don't know about."
We are already share configs with eachother via the dotfiles pattern. We somewhat share command patterns via coding streams. Seems doable.
(In general, making it easier to learn new tech and for devs to share / refresh the learning material for a new tech seem underdeveloped.)
I never it existed! It was incredibly helpful with some features I'd never used such as Put, Replace and Visual mode. If you have vim, you should just be able to run `vimtutor` in the command line. If you have trouble, you can run `:help vimtutor` within vim.
I still don't know how to do project navigation in vi, as I mainly use it for editing config files. I used emacs back in the day, but vscode is what I'm currently most comfortable with for moving between files in a large, deeply nested project.
https://catonmat.net/vim-plugins-nerdtree-vim and https://github.com/preservim/nerdtree
On the plus side, it enables "* + cgn + ." which is a neat way to do quick multiple substitutions, so yay I guess?
Personally I think most of the normal mode mappings make no sense, other than the core motions and "q". A lot of precious "one-key" mappings are kind of wasted. You can of course override them, but it feels very "bolted on"
One of my high hopes for Neovim is that eventually they will start migrating the hard-coded default mappings to something more akin to a default config layer, which will be easier to override or disable. They have already started doing this for built-in commands, e.g. :cscope has been removed.
Here's the reference manual: https://vimhelp.org/#reference_toc (`:h reference_toc`)
There's also a cheatsheet: https://vimhelp.org/quickref.txt.html (`:h quickref`)
Incidentally, the same advice apply to Bash: just read the man page, and search into it each time it is needed. It is just worth it.
1. It's way too long, the complete stuff is ten of thousand of lines. 2. It goes into needless details, especially at the beginning (the "finding help" section is intense for example). It turns me off each time. 3. It's too dry, not really enjoyable to read to me.
You don’t grok vi
https://stackoverflow.com/questions/72498282/your-problem-wi...
https://stackoverflow.com/questions/1218390/what-is-your-mos...
I’ve recently switched to Helix editor after 10 years of vim and haven’t looked back. If you’re looking for something a bit simpler, zero configuration, but with the same philosophy as vim (select -> action) give it a try.
For instance, if you press "A", you are now after the \n of the end of line, and pressing backspace will remove the \n, joining with the line below.
I tried to ask whether that peculiar behavior could be toggled off somehow, but was welcomed by a wall of extreme purism on how treating differently visible and invisible characters would break the character model of the editor...
I'm too old to entertain the argument, and will just stick back to vim. Maybe its character model is unpure, but at least it's understandable by a mere mortal like me.
https://github.com/helix-editor/helix/pull/4204
It would be nice to have a comprehensive and convincing explanation in the documentation which sheds lights at the advantages of helix's treating lines. Maybe we vim old timers could learn something new and make a more informed decision about switching to helix.but Vim is not select -> action?
say `d2w` (to delete two words after the cursor) it's action then selection
"select->action" is definitely possible thanks to visual mode but it certainly is not Vim's "philosophy", which would be more in the line of "action->object".
Ctrl-w + v == split current viewport vertically
Ctrl-w + s == split current viewport horizontally
Ctrl-w + = == resize viewports to equal height/widths
You can then move around the viewports with Ctrl-w + j == move one viewport down from current viewport (if available)
Ctrl-w + k == moves one viewport up from current viewport (if available)
Ctrl-w + h == moves one viewport to the left from current viewport (if available)
Ctrl-w + l == moves one viewport to the right from current viewport (if available)
You can then :q viewports or :e to open a different file in that viewport.Maybe it's so basic it never gets mentioned but I find a lot of people under utilize it.
Another good one is typing . to repeat previous command. You can do
A, "something"
and then just type `.` to have "something" appended to whatever line the cursor is on.(Sometimes ppl would demand I follow the syllabus. I don’t like to follow the guidelines.)
You could always use emacs if you’re into that kind of thing, but telling them you should use pico is like telling them to clean their dorm with equal parts bleach and ammonia soaked in castor beans.
(Don’t do that.)
I used to have a mental cue that terminal was hjkl; and GUI was pointy-clicky.
Now if I ever go to something like intellij IDEA, I'm spamming home row all over the code :)
gI - Insert text at the beginning of the line, no matter what the first characters are.
There's always more to learn. 0 move to beginning of line
i enter insert mode before current charNot sure about this arrangement.
I’d highly recommend folks learn some vimscript. Mappings, functions, commands. My most recent use for these was for quickly generating a lot of permalinks for building internal documentation. Macros and argdo are also invaluable for large scale edits.
There is nothing advanced about this and nothing to learn for an "advanced user".
If you frequently find yourself needing German (or other European) symbols like ä then you can also look into using EurKEY [1] which is basically the American layout but gives you easy access to the "umlauts".
If you press " followed by o you get ö.
' + e prints é.
The only thing to get used to is that if you want quotes for example, you need to press <space> or another character that doesn't accept accents after the key. I used this layout for French and it's way better than the weird French AZERTY layout.
C-h i
> Is there such a thing for emacs?
Evil ))* Edited for "Sublime Text," though I don't know why I'm bothering, as this is being downvoted.
But who was making that claim? Yours was a top-level comment, so I can only suppose that it was responding to the article; but I do not find your claim in the article—specifically, I only find two occurrences of the quoted word ‘better’ in the article, neither of which is even mentionining GUIs.
Myself, I have never used any other editor, GUIs included, that matches the experience I have with vim, and I'm a pedestrian user of vim at best. As long as vim keeps existing, it doesn't bother me that other people prefer other experiences; so why inveigh against people with different tastes to yours, or different uses for their text editor from yours, who prefer vim and, preferring it, want to learn how to use it well?