What editor can I use as a simple vi/vim alternative?
If you are looking for an alternative editor, you are not alone. Basically life is too short to learn vi
and I say this being a software developer for a living. However you should learn how to exit it because it's a problem for one out of 20k programmers. Also performing some basic append/insert operation might be worth learning, because on some stubborn servers you won't find any other editor.
Now, the answer to your question is probably nano
.
If you are running some automated build script, using git
or running other commands, they might open vim
without you wanting it. You can prevent this by running the following before proceeding:
export EDITOR=nano
It is a matter of opinion.
Beginners use nano.
vim ("vi improved") has a bit of a learning curve but it is very powerful. See this beginner's guide for vim or any other vim guides or the vim tutorial vimtutor
(included in vim).
For now I highly suggest nano
nano -B /path/to/file/to/edit
-B makes a backup
Commands are issued with the control key and are listed at the bottom of the editor window.
There' a a guide on syntax highlighting see: How do I enable syntax highlighting in nano?
emacs
is an alternate to both vim
and nano
and has many benefits as well. emacs
is more complex than nano. You can see emac's tour.
Just for completeness, vim + themes such as Zenburn can be quite helpful
as a windows power user, after trying vim
and nano
I found out that I need something in between, complexity-wise.
so I tried slap and It was the exact thing that I was looking for.
slap is a Sublime-like terminal-based text editor that strives to make editing from the terminal easier. slap has first-class mouse support, even over SSH connection.
installation:
curl -sL https://raw.githubusercontent.com/slap-editor/slap/master/install.sh | sh