Score:4

Which terminal text editor uses GUI-like keyboard shortcuts?

cn flag

I seek an editor where Ctrl+C copies, Ctrl+X cuts, Ctrl+V pastes, Ctrl+Z undos, Ctrl+Y redos, F3 searches and F2 renames. When I click the left mouse button, the cursor should go there. All modes should be active at the same time (command and insert and ...).

Also Ctrl+W closes the current tab in tabbed interfaces, Alt+F4 closes the currently focused app, Ctrl+Tab tabs between guess what, tabs, Ctrl+O brings up open dialog, Ctrl+P brings up print dialog,

What Linux editor exists out there that can be used in the terminal and has that behavior?

us flag
Did you try any GUI editors like gedit or mousepad or VS Code ?
Saeed Neamati avatar
cn flag
VS Code is awesome. But it can't be installed on the server. That doesn't make sense. Thus I prefer another choice. I have not tested `gedit` or `mousepad` yet. I'll test them. But I just wanted to see if the community knows a compliant editor already.
us flag
Mousepad and gedit are also GUI. See https://askubuntu.com/q/1227102/124466 for how to copy and paste into terminal (these work in `nano`, I don't know if they work in `vi`)
guiverc avatar
cn flag
Universal shortcuts??? The keys used by `vi` are the same for other tools, and were a standard created in the early 1970s. You want it to follow another *later* standard?? What is a universal shortcut? as to me the standard used by unix/posix/vi makes sense given so many *nix tools use them.
Nmath avatar
ng flag
Ummm... The history of these text editors, especially vi, go way way back, before there were window managers and mice. What you're describing is a GUI notepad. There are dozens of them.
pLumo avatar
in flag
You **can** install VS Code/ium on your server and connect using X-Forwarding.
pLumo avatar
in flag
@guiverc If you didn't start programming in the 70s or 80s but in the GUI world of the 90s and 00s, you will get used to exactly the shortcuts, OP mentioned. While I also disagree with the term universal, many people feel exactly like OP. I personally never got into `nano`, so I directly used `vim` and enjoy it. However, I am a poweruser, and cannot really recommend it to newcomers who want to edit a file once in a while in the terminal. So I really think this is a good question. With some less rant against other editors it would be **very** good :-)
guiverc avatar
cn flag
I agree @pLumo that it been worded without the off-topic *rant* it would have been a much better question.
jamesqf avatar
ng flag
Re "We all know that Ctrl+C copies, Ctrl+X cuts, Ctrl+V pastes", no, we DON'T all know that. Unfortunately, we're stuck with those badly-designed Windoze commands when we use a browser (at least, I've never seen one where it's configurable). Elsewhere, many of us prefer to use a more rationale command set. And many, if not most, decent editors allow you to configure commands to your liking. So if you want Windoze-like commands, configure them, or find a profile from someone who's already done the work.
qwr avatar
kr flag
qwr
If you're ok with using a graphical text editor, gedit is surprisingly capable for a simple text editor
Score:11
cn flag

What are "universal shortcuts"? There is something like a "universe" but there are no "universal shortcuts". It is a subjective term. Many vim users will consider the vim shortcuts "universal" and do everything to change different keybindings to resemble these of Vim.

The keyboard shortcuts you mention resemble these that are quite common in graphical environments. There is a terminal based text editor, micro, that implements this style of shortcuts. It is available as a Snap in the software center of Ubuntu. At least in Ubuntu 19.04, it is also available as an APT package.

Saeed Neamati avatar
cn flag
thanks for answering. Universal shortcuts are those shortcuts that you use almost everywhere and you don't care about the original vendor. You open Google Sheets and they work. You open an online form and they work in every text field. Yes they are part of graphical environment. But the terminal is also graphical isn't it? We see stuff there don't we?
Saeed Neamati avatar
cn flag
I read the `README.md` of `micro` and OMG, it says **Common keybindings (Ctrl-s, Ctrl-c, Ctrl-v, Ctrl-z, …).** and **Sane defaults**. This shows a lot of other people felt the pain I felt using those stupid `vi` and `nano` etc.
Saeed Neamati avatar
cn flag
@vnandium, thank you a million times. I immediately fell in love with this `micro`. It's just what I wanted. Productive from the first moment. No need for complex searches on `how to copy paste in vi, or in nano`. No need to spend 40 minutes to figure out what weird codes you should use to get a simple task done. No need to always worry and get tired of knowing your current environment.
vanadium avatar
cn flag
Glad you like it! I explored it some time ago. In 21.04 (but not in 20.04, I think), it is also available as a normal .deb package.
pLumo avatar
in flag
+1 Didn't know about `micro`. While I will continue using `vim`, this is at last something to recommend to newcomers.
gq flag
Also know as the Macintosh/CUA/Windows accelerator key bindings.
gq flag
VIM and EMACS have CUA modes. VIM has one called CREAM.
vanadium avatar
cn flag
According to CUA, Ctrl+Ins is the copy key, Shift+Del the cut key and Shift+Ins the paste key ;-)
Ghos3t avatar
cn flag
You are being pedantic about universal shortcuts, are you gonna tell me Ctrl+C and Ctrl+V shortcuts for copy and paste are not used in every OS in some form and almost in every application with text input. It's pretty clear from OP's question what he's asking.
vanadium avatar
cn flag
@Ghos3t Downvoted the other answer, that tells the same, also?
Score:2
ng flag

These keystrokes are not "universal." They are part of an IBM project called "Common User Access" (CUA).

Vim can do what you're asking if you install the cua-mode plugin. (Note that this plugin is very old and has not been updated in a long time; I have no idea if it will work with the current version of vim. I only add it here because it is the first link DuckDuckGo returned to me when I searched.)

Saeed Neamati avatar
cn flag
The very word **common** means they are universal. Something that exists in Photoshop, Windows, Ubuntu, Word, Autocad, Notepad, Chrome, ... is universal. OK? so please don't even argue about that.
ng flag
I've been speaking English since I was a toddler and I'm very good at it. "Common" and "universal" are not synonyms.
Score:0
eg flag

Mine. I wrote a text editor exactly for this reason. Unfortunately I don't have a ready-made installer but as long as you have Tcl installed (and optionally Tk for clipboard support) you should be able to use it. It's just a single file of code: https://github.com/slebetman/tcled

Just place the tcled file somewhere in your $PATH and make it executable by doing chmod +x.

If you don't like my editor there's also slap which is quite nice: https://github.com/slap-editor/slap. It tries to implement a terminal editor that feels like sublime.

Unlike my editor you can easily install slap via npm (you need node.js installed of course):

sudo npm install -g slap

Honestly I would recommend using slap but I could not resist plugging my own software . The number of users for tcled is around a dozen (mostly people who need a better editor than plain vi on routers and embedded devices - because almost all installs of Linux come with tcl pre-installed so installing my editor is just copying a single text file).

Score:0
kr flag

texteditors.org provides a long list of text editors that use this type of keyboard shortcuts, also known as CUA shortcuts. Here are some of the more current and available examples.

  • Cream - Vim editor repackaged to use CUA look and feel
  • CTE - The standard CUA editor for the Linux console
  • PE64 - IBM Personal Editor
  • PyPE - Python-centric text editor that uses does code folding
  • TDE - Thomson-Davis Editor (public domain, DOS, Windows, Linux)
  • SetEdit - Borland-style text editor
  • THE - The Hessling Editor - open source multi-platform XEDIT clone
  • Tilde - Open source comfortable Linux editor for those used to GUI editors
  • X2 - a multiplatform text editor much like SlickEdit and the IbmEditorFamily.

additionally, many of the available text editors let you reconfigure the shortcuts.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.