1) UI improvements like better syntax highlighting, split windows and tabs, and mouse support.
2) A cohesive language of key bindings that allows you to easily construct and perform commands like "delete everything from the cursor up to the next quotation mark" or "lower-case this paragraph".
3) A huge library of scripts and extensions to add or extend features like syntax highlighting and indentation rules for new languages, Git integration, or language server support (which provides IDE-style features like jump-to-definition, error/warning indications, and autocompletion)
Usually when nano is mentioned, it’s not a full development context, but instead e.g. crafting a systemd service file or editing crontab on a remote server. Do you really pull extensions and use mouse there? I think there’s nothing important that vim could add for gp, realistically.
Even without any plugins Vim has useful stuff you might need in a pinch.
Eg:
Column editing using visual mode.
Syntax highlighting
Tree-based undo features.
Fuzzy file finding in a project path.
Spell checking
Support for c tags
Line numbers
Mouse support
File navigation
On top of that you might want to learn vi for systems built with busybox.
Or tools that use readline like repls and sql clients.
You probably wouldn't install all your extensions on a remote server, correct, but you get the basics like syntax highlighting and mouse support by default nowadays. Even a minimal vim install is considerably more featureful than nano.
- Fuzzy file search - I can't find a way to do this in nano? Where you can search a whole directory by name for the file you want to open. This is very useful in larger projects when you need to jump about a lot.
- LSP and all its uses - jump to definition is a big one.
- Window management - while you can use a multiplexer, using one session allows copy/paste to work, saves your file/search/command history, etc.
- While often overstated, it is undeniably more efficient... once you've learnt it.
However, if you are not doing programming, but are just editing e.g. Linux config files, then I would probably stick to nano (in fact, I usually use nano for these jobs, since getting my neovim config to work when running as sudo failed).
> While often overstated, it is undeniably more efficient... once you've learnt it.
And on this note, I'd recommend not jumping in and trying to learn everything. Too easy to get overwhelmed.
Start with the bare basics and treat it like nano with syntax highlighting, then start learning and getting used to its broader functionality in small bursts.
Vim has a ton of features. I don't know much about nano, so I'm not sure, but there's a feature for most things in Vim.
I'll do a simple one then, as an example: In vim you can select a range of lines and indent or dedent those lines. With spaces or tabs as appropriate, set per filetype (or other ways of configuring). Can this be done in nano?
Its not that I wanted to use vim, but either it was the tool of choice for other people, or the tool of choice for other tools (like yay/paru on Arch linux (and yes I eventually learned default editors can be changed...)).
Kind of hard without knowing what you do and what your constraints are but at least for me vim is more widely available on the tools I use. I use neovim, but I also need to use Android studio and xcode sometimes, and there is a vim mode for each of those. So basically if you get used to it, it's a standard way to interact with several editors. Also it's just more fun and fluid to use for me but that's a matter of taste.
One thing I like about Vi vs other editors even for non full fledged development experiences like editing config files, is that Vi allows very surgical edits to change only what you want and nothing else.
You can easily control exactly what portion of the line or file you are making the edit to, and Vi will not allow you to change beyond that area without a further intentional command.
If by "only used" you really mean you never ever use anything else I don’t believe you are missing anything. Other than bragging rights of using Vim, of course /s
But if you occasionally use other editors, many of them have plugins or modes enabling Vim keybindings. In my daily work I switch between Emacs, IntelliJ, Vim and XCode, and all of them have varying degrees of Vim emulation, which makes switching a lot easier.