LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Rate this Entry

Terminal with similar keybindings to kwrite / kate / gedit / html text fields?

Posted 10-06-2015 at 09:04 PM by the dsc
Updated 01-13-2016 at 05:02 AM by the dsc (alternative solution)

EDIT: As it turns out, it's not really needed.

With control+x+e your current command line will be opened with the $EDITOR application. From there you edit freely, then you save it, and as you exit, it will run.

http://www.commandlinefu.com/command...to-text-editor

I think the text editor Nedit is an excellent $EDITOR to have for that. It uses the tcl/tk toolkit (or actually motiff, if it's not the same thing), so it's super fast to open, like the minimalistic web-browser Dillo. It does however allow for more sophisticated/standard keybindings than, say, nano, such as using control+arrows to navigate fast between words, and control+shift+arrow to go on selecting sequences of words.

So if you have a long one-liner and want to delete a long sequence of it, it's much easier than going to where the to-be-deleted sequence starts and holding delete, keeping an eye on the "not to be deleted" ahead, or "vice-versa" with backspace.

In fact I think I'll eventually almost completely ditch nano when I'm on an X-session due to that. I also has control+f to find stuff, instad of the annoying control+w as default, which in the non-nano world will close your window. When you click on "close" it will ask to save the command line/text, which also makes it quite foolproof.

https://en.wikipedia.org/wiki/NEdit


The earlier post will remain there just because it sort of worths the rant anyway.

___________________________________________________________________

Not tremendously important, so I'll not post on the forums.


On text editors I'm frequently using things like shift/control+shift to select text and overwrite it. But besides holding control and using the keys to jump between words, terminals usually don't do selection the same way. You can try to select with the mouse, but it just works to copy to the clipboard, it won't be replaced by the text you type next. And regarding the mouse aspects, I think pasting will often/always be whenever the text cursor is on the line, not where the mouse cursor is, unlike a graphical text editor.

At one time I had control+left-key bound to delete the last word/segment between delineator characters, like control+backspace commonly does (not on this text field, here it deletes the whole line), but that's as far as I could make things more similar.

Control+Z for "undo" (undo the text editing, not somehow undo the command after its run!) would also be neat.
Posted in Uncategorized
Views 1591 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 10:39 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration