As my school-funded GitHub education pack is about to expire, I have to let go of the InitelliJ IDEs and I decided to sell my soul and use NeoVim. I am already using Ubuntu after all, so why not continue the 10x cargo culting?
I soon realized that NeoVim is hard. I keep on forgetting how to do things. I figured the best course of action to take would be to start a project that I am writing entirely with using NeoVim... and I figured I'll build a cheat sheet for myself! I was not really satisfied with the existing cheat sheets as I couldn't really search in them and save my favorites to look them up later.
I decided to deploy it after all, so I can look on it on my phone as well. Then I figured, why do not I open source it, so the community can also help broaden this app?
I already feature a search by keyword, category and the favourites function. I plan to add popular remaps also and command breakdowns, to understand why and how eg. 'ggVP' highlights all the texts.
Perhaps I'll add guides later on too.
Enjoy! Now excuse me but I have to configure an LSP for JavaScript...
Please don't take it in a bad way, but I suspect you don't really grok Vi[0].
Vi/ViM/NeoVim is a language for text manipulation. If you keep thinking in terms of "a bunch of shortcuts" you will have a pretty bad time with this editor.
For example, in your cheatsheet 'gg' and 'dd' are presented in the same way. Sure, both are commands in the normal mode but the similarities end there. 'gg' is a motion command whereas 'dd' is a shortcut for 'delete the current line' which can also be expressed as: 'Vd', '0d$', '0D', '$d_', ...
The important part to note about 'dd' is that it has 2 parts: 'delete' and 'current line'. 'delete' define what you want to do and 'current line' defines where the action should be applied. When you understand this things get way easier because you just need to learn a couple 'actions' and a couple 'motions' to do most of the things. And every time you learn something new you can also combine it with everything you already know.
But don't be discouraged by what I just wrote, you are in the right path. Have fun and keep hacking!
[0] - https://stackoverflow.com/questions/1218390/what-is-your-mos...
The nice thing with neovim is that people got together to make Neovim distributions. I'd recommend starting with one and you will learn by tuning it to your preferences because if you have to get some work done, this will take a lot of your time imho.
I still use vanilla vim + ALE linter + ctags + makefiles for simple C/C++ projects but once you start to get into webdev with ten different syntaxes and tools, it gets hard to keep up.
But if you have the time and curiosity to explore of course, it's worth it
Also don't forget to add in the excellent vim-surround for editing braces and parentheses, I was pleasantly surprised to find it installed by default in the VSCode vim plugin, not that I stuck with VSCode but it was worth trying out.
>> decided to sell my soul and use NeoVim
If you really wanted to make a deal with the devil, you'd try out Evil mode in Emacs with Spacemacs.
I'll take a look on the Evil mode... Should I be scared? :D
Not as much as you think. Learning vim translates to a lot of things. I started learning vim by using vim emulator on vscode for a week, once I was comfortable with moving around in a file I moved to using neovim, learned lua to set it up the way I wanted. Eventually ended up just using lazyvim with some custom opts, custom keybindings and plugins I like.
But the point really is, what you learn in vim can be carried to most (if not all) code editors. Most will have a way to setup custom key bindings or a vim emulator.
I say that because there are times when you need to use a code editor that most devs use (mostly vscode) to work with other devs. And for those times, I really appreciate that I can keep using vim motion and key bindings.
Great job OP!
I like how you're not focusing on creating a complete list of commands but instead including only the ones you use and expanding it as you learn more.
Aside: I find it fascinating how you can often deduce how long someone has been using vim based on how they accomplish certain tasks. It made me smile seeing OP use ggVG - I can think of two reasons why someone would do that: to delete everything ggVGd or to yank everything ggVGy. We (probably) all did that at one point.
And at some point you ask yourself what actually are ex commands? - and that's when you learn about :%d and :%y.
:q!
echo “” > file.txt
vi file.txt
I have a ways to go:)
So you say there is another way? Haha, I'll definitely check that out! Thank you for the heads up <3
Web version: https://neovim.io/doc/user/change.html#change.txt