Reputation: 77029
I used vim
for a long time, but switched to Sublime Text last year for most of my programming work.
Now, every time I have to make use of a console editor (mostly over ssh
), I feel extremely uncomfortable with vim
. The shortcuts and commands have slowly left my memory, my once carefully curated vimrc
is gathering dust, and I just can't use the editor effectively without re-learning everything.
On the other hand, nano
is just dumb. Great for opening a file, adding a flag and closing it, but way too primitive for anything else.
Is there something in between I can use? I can settle for not-as-easy-as-nano-nor-as-powerful-as-vim.
Upvotes: 19
Views: 10593
Reputation: 116297
You can use mcedit
. It is much more user friendly than other editors - it even supports mouse over ssh (even in Putty console from Windows).
Simply install package Midnight Commander as follows:
Ubuntu/Debian:
sudo apt-get install mc
Fedora/Redhat:
sudo yum install mc
MacOS:
brew install mc
and it will make mcedit
available.
In local console it even supports Shift+Del
, Shift+Ins
, Ctrl+Ins
shortcuts that we use in Windows.
It also has nice ability to copy blocks into arbitrary files, effectively giving you unlimited number of clipboards.
Upvotes: 22
Reputation: 7142
Since you're a Sublime user, you'll probably feel comfortable with Suplemon https://github.com/richrd/suplemon.
It's a bit like Sublime and it's specifically created to be easy and powerfull at the same time. It also has multiple cursors and similar key mapping as Sublime. It's written in Python and supports addon modules. Hopefully one day it'll support Sublime packages too.
Disclaimer: I'm the developer of Suplemon.
Upvotes: 2
Reputation: 172638
I haven't personally used it, but the Cream flavor of Vim modifies Vim with more standard-style mappings (e.g. CTRL-F for Find), no modal editing (normal vs. insert mode) as in Vi(m), and it also works in the console (with menus). Maybe that makes Vim suitable to you.
Upvotes: 2
Reputation: 196741
You could try these, but you'll have to install them on the machines you SSH into:
But my opinion is that you should drop the seriously underpowered Sublime and go back to Vim.
$ vimtutor
is your friend.
Upvotes: 3
Reputation: 154564
If you want to learn a text editor that's available on just about every machine you could possibly SSH into, basically your only options are vim, emacs, nano, and ed.
Emacs is an okay choice, so long as you can remember c-x c-s
(save) and c-x c-c
(close)… But that's only two fewer commands than you need to remember with vim (i
for insert mode, <esc>
for normal mode, :w
to save, and :q
to quit).
Possibly a better alternative would be to run X11 locally, so you can use gedit
, gvim
, or one of the other graphical editors from the remote machine? Or maybe print off a couple of cheat sheets (see: https://stackoverflow.com/questions/442057/what-is-your-linux-vim-cheat-sheet) and keep them on your person at all times?
Upvotes: 2