• @Mikina
    link
    2
    edit-2
    1 month ago

    One of the best explanations I’ve heard about difference between most text editors (nano, notepad, vscode…) and Vi (and it’s derivatives, like vim, neovim, helix, etc) is that Vi doesn’t have editing shortcuts, but editing grammar. So, you can do a lot more a lot faster, if you take the time to use it, and the more you use it, the faster you can get.

    While I’m sure there’s a better definition what exactly is meant by grammar here, a similar example would be like the difference in capabilities between plain text search, and regex. In Vi*, you have shortcuts for navigating almost everywhere you’d want - next word, start of next word, end of next work, next parameter, next matching bracket, etc, and also have a lot of commands for searching or selecting text. And you can combine all of that with numbers, i.e 5se would select everything up to the end of fifth word, I think.

    And you can also record and replay macros on the fly, on multiple lines at once. All done with relatively simple key combinations and commands, that may take a while to learn, but once you get proficient at them, you never have to take you hands of your keyboard, and you can do almost everything you ever need really fast, way faster that you’d be able to in regular IDE.

    On the other hand, Neovim (and vim-like IDEs) are something like Rust. Everyone likes talking about it, and most programmers admire it, but everyone has actually learning it on their ToDo list for tomorrow for the last few years. Me included.