20

Every once in a while, I find myself editing some text file on a remote Linux server. Most of the time, I do my best to avoid this, because I'm used to, and like, the windows way of editing files:

  • Shift+arrows to highlight text
  • Ctrl-X,C,V for cut/copy/paste
  • Tab/Shift Tab to indent/dedent highlighted text
  • etc...

I'm not saying that vi and emacs are bad, it's just that I'm not used to them. Right now nano is my editor of choice, but it has very limited support of cut and paste, no smart indent, and some unusual shortcuts.

so my question is: it there an editor that feels like Notepad++/Notepad2/eclipse/kate/gedit but can run on a linux terminal?
Alternatively, is there a way to configure vi/emacs/nano to feel more like those apps?

And please, no "you should really learn vi" answers. Tried that, didn't take.

UPDATE: I was suffering from keyword blockage. Googling for "linux console text editors" gets much better results than "linux terminal text editors".

2
  • 3
    I know you asked not to hear "learn vi", but I'd like add one point to that issue. It's worth knowing the MINIMUM set of commands like (insert mode, delete lines/chars, save, quit). While I don't know your situation, I've had to edit files of many different linux/solaris servers and vi is the one editor that is ALWAYS installed. On many of the machines, installing other editors is not an option. Don't throw vi out completely, just keep in your toolbox. More tools makes it easier to pick the right tool for the job
    – basszero
    Nov 12, 2009 at 13:12
  • 2
    I agree wholeheartedly. I just find that answers like that get lots of upvotes and really distract from finding a genuine answer to the question. So thanks for leaving it as a comment.
    – itsadok
    Nov 13, 2009 at 5:30

13 Answers 13

6

Have a look at the Sanos editor:

http://www.jbox.dk/sanos/editor.htm

Only a 28k binary can do what all those other editors try to -- and fail.

It does exactly what the OP asked for:

Shift+arrows to highlight text

Ctrl-X,C,V for cut/copy/paste

You can also have several open files simultaneously, and "pipe" commands into it. For example, press Ctrl-P and at the prompt enter:

cat yourfile

and it will insert yourfile at the position of the cursor. This way the full power of the bash commands are at your disposal ( use grep to get only specific parts of the file inserted ).

4
  • You would have to compile the source for it to work on Linux though. Please add a small description of the program in your answer, as to inform people of what the program actually is. Oct 8, 2013 at 21:51
  • Wow, finally something that just works!
    – itsadok
    Oct 9, 2013 at 5:34
  • It would work even better if it ran on the linux console, instead of xterm.
    – ernobe
    Oct 9, 2013 at 13:06
  • I also use sanos and happy with it. make sure you are using xterm as the terminal protocol and also that alt cursor keys is enabled otherwise you will not be able to move the cursor. Mar 14, 2017 at 14:13
4

I did a search for the same thing recently. There are several (see JumpingPA's list, plus, 'joe'). Joe or jed are good choices for a no-nonsense simple editor that does more than nano. Diakonos is under active development, and is aiming at users exactly like yourself, but has higher than normal dependencies (Ruby), which not everyone would be able to install on their hosts.

An entirely different solution, which might work depending on your setup is to use a Windows text editor with the ability to edit files remotely. Notepad++, for example, has an FTP plugin, and several Windows IDE's have such functionality. The advantage is that you don't have to install anything on the web host, and you can edit in a full GUI.

Hope that helps.

4
  • To add info to the alternative you suggested, I recently discovered dokan-dev.net/en which allows you to map a drive on windows to a remote ssh server.
    – itsadok
    Dec 17, 2009 at 13:18
  • Tried DokanSSHFS - it is unfortunately at best alpha-quality. Diakonos rocks though!
    – RomanSt
    Jan 7, 2011 at 14:45
  • I'm a happy user of DokanSSHFS. It is not "production-ready", but it is very convenient to have and suitable for text editing purposes.
    – n611x007
    Apr 7, 2013 at 7:03
  • Notepad++ in the distant past had a buggy FTP plugin what resulted in data loss for me. I think it is fixed but the bad memories kept me from using it again.
    – n611x007
    Apr 7, 2013 at 7:04
3

As I just noted in another answer, you're looking for TUI (Text-based User Interface) text editors that adhere to the CUA (Common User Access) conventions. See the other answer for a full discussion. Then note that some (almost) CUA TUI text editors are still available as Linux/Unix TUI programs, including ones built upon Turbo Vision (which is close to, but not quite, CUA) such as SET's Editor.

1
2

a quick scan in the web revealed: diakonos, nano and jed all are OpenSource

1
  • These look promising. I think the hard part is making the key bindings work, which seems to be very fragile.
    – itsadok
    Nov 12, 2009 at 11:48
2

Check out Ash:

https://akashnag.github.io/ash/

It is exactly what the OP asked for; and also looks & feels more like Windows than any of the other editors mentioned here. And it has the same "windows like" key bindings like Shift+arrow/home/end/pgup/pgdown for selection, and Ctrl+C/X/V for copy cut paste...

1

fte (in many distributions as fte-terminal) is fairly CUA. Mad props to it for supporting mouse cursor movement even over ssh.

1

Try micro editor: https://github.com/zyedidia/micro

Supports ctrl+c, ctrl+z and so on, plugins, commands, even mouse pointer selection and integrates into the OS clipboard.

0

Have you tried nano? The shortcuts are a bit different, but it's more "Windows"-y like vi and emacs.

1
  • 1
    Nano is the best I got right now, but it's still too limited, as I mentioned in my question.
    – itsadok
    Nov 12, 2009 at 9:36
0

NEdit is a multi-purpose text editor for X Window System that is available on all major Unix and Linux systems. Users of Windows based text editors should find NEdit a familiar and comfortable environment.

1
  • 2
    I try to avoid installing libx11 on servers. That's why I'm looking for a console based one.
    – itsadok
    Nov 12, 2009 at 11:42
0

I just found the fiflo text editor.

Doesn't need any dependencies. Simple and lacks some features.

0

If you like good ol' WordStar commands, I can recommend JOE - Joe's Own Editor. It can be installed on Ubuntu and Debian with

sudo apt-get -y install joe

JOE is a full featured terminal-based screen editor which is distributed under the GNU General Public License (GPL). JOE has been around since 1988 and comes standard with many Linux distributions. [...] most of the basic editing keys are the same as in WordStar as is the overall feel of the editor. JOE also has some of the key bindings and many of the powerful features of EMACS.

0

This is exactly the situation why we at e10labs created CTE! You'll love this. https://cte.e10labs.com.

Details:

Cᴛᴇ is a text editor for the Unix terminal, like nano and vi, but is better as there is no learning curve. It behaves like a modern application with mouse, menus and dialog boxes. This makes it like Linux Gedit, Kate, a web browser, Microsoft Notepad or Word. For example: To find some text one presses Ctrl-F and a dialog box appears.

Cᴛᴇ is distributed as a single binary, ready to run, with no dependencies, or a .deb or .rpm with the same. Cᴛᴇ is free for personal use.

cte screenshot

2
  • We have added indenting, that behaves as one expects in cte v3.1, rounding out the requirements that began this discussion, we think this makes cte the best, tilde configures the tab width which is a mistake [tabs are always 8 wide], the indent width is separate, enjoy. cte.e10labs.com
    – e10labs
    Apr 28, 2021 at 3:27
  • this looks nice but not free Feb 1, 2022 at 11:05
0
sudo apt install ne

ne, the nice editor

if you do copying and pasting with the mouse, (select with left mouse button, copy with right button, insert at cursor with right button) then ne is pretty decent.

cmd shortcut
F1 toggle menu bar
open ctrl-o
save ctrl-s
quit ctrl-q
mark block ctrl-b
cut ctrl-x
find ctrl-f
replace ctrl-r

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .