The terminal is common to many operating systems and keyboard shortcuts leant there are pretty universal.
If you prefer a keyboard driven workflow learning to use a terminal and terminal based editor will give you a very portable solution.
Vi's commands are somewhat like a language for manipulating text. This is a different philosophy to many non-modal editors. In vi you can say change the next 3 paragraphs to foo or replace the text inside the this tag with bar. When you learn the language it's almost painful to watch someone trying to select text with a mouse. (I realise GUI tools often have vi plugins. I think that only proves that modal editing is useful and ergonomic once you've learnt how to use it).
CLI based tools are also very scriptable where that is often not the case for GUI based tools. Vi/Vim/NVim are part of a wider ecosystem of tools. If you learn the Ex commands for things like substitute/replace in Vim you're taking a step along the road of learning sed also.
You mention a lot of scripting, and also the terminal.
Would you also recommend vim for working on large projects with 100+ files? I believe in this case, a full on IDE is suited better.
Also I'm not so sure about the portability. Sure, some of the knowledge is reusable, but when all the vim installations are not "batteries included", every installation will be configured differently.
Another point: I think with strongly and statically typed languages one shouldn't think about writing code as writing text, but about building a syntax tree that happens to be text.
I think vim with a fuzzy finder plugin like FZF will easily handle 1000s of files not 100s. The project I'm currently working in has 6495 files, I don't regard that as a large number.
You would be surprised by what Vim can do out of the box simply by turning features on. It's also very easy to move configs about. I use github for that job but I can use Vi/Vim without a config if needed.
However what I really mean by portability is that once set up I have exactly the same shortcuts on both my own mac, client's linux laptop and servers. Currently I use tmux for window management but I could use NeoVim for that now. If I want to open a split terminal window or move an existing one about it's exactly the same short cut on each machine.
> Another point: I think with strongly and statically typed languages one shouldn't think about writing code as writing text, but about building a syntax tree that happens to be text.
That's in no way tied to a GUI and there's nothing to stop you adding IDE like features to an editor like Vim. The terminal is just another way of representing tooling to the user.
However if you prefer a GUI interface then nothing stops you from using that in preference to the terminal either. I only point this out as the grand parent asked why we would bother in 2019.
> Would you also recommend vim for working on large projects with 100+ files? I believe in this case, a full on IDE is suited better.
I do that now.
IMO, it depends on the language. For C#, nothing beats Visual Studio. For all of its warts, the autocomplete, go-to-def, and debugging just work too well. I do use a Vim plugin in it. It's missing some features that full Vim has, but the other advantages make up for it.
For Ruby, Python, etc, I think pure Vim wins, including with large projects. I know it's possible to get autocomplete support in Vim, but never found it to be worth the trouble for those languages. No issue in handling a bunch of files with Nerdtree and CtrlP. I think the terminal is better for actually running the program and related tasks than any IDE environment I've tried. Especially with Tmux to spin up new windows easily and switch between them, all without ever leaving the keyboard.
It is true that vim installs tend to be highly configured. IME, the bone-stock Vim on servers is easy enough to live with for the purpose of editing a couple of config files. Wouldn't be thrilled to use it on a large project though.
If you prefer a keyboard driven workflow learning to use a terminal and terminal based editor will give you a very portable solution.
Vi's commands are somewhat like a language for manipulating text. This is a different philosophy to many non-modal editors. In vi you can say change the next 3 paragraphs to foo or replace the text inside the this tag with bar. When you learn the language it's almost painful to watch someone trying to select text with a mouse. (I realise GUI tools often have vi plugins. I think that only proves that modal editing is useful and ergonomic once you've learnt how to use it).
CLI based tools are also very scriptable where that is often not the case for GUI based tools. Vi/Vim/NVim are part of a wider ecosystem of tools. If you learn the Ex commands for things like substitute/replace in Vim you're taking a step along the road of learning sed also.