Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

sneaky invoke-editor trick

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

sneaky invoke-editor trick

#1 Post by Grifter »

playing around on the keyboard I just learned that hitting ^X^E invokes the editor (which is specified in /etc/alternatives) with the text you have typed in the current commandline in the editor and wanted to share this marvelous discovery :D
Eagles may soar, but weasels don't get sucked into jet engines...

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#2 Post by Grifter »

the best way to choose which editor should be the default to use, is this (as root):
update-alternatives --config editor
it will then ask you which to use
Eagles may soar, but weasels don't get sucked into jet engines...

Lou
Posts: 1739
Joined: 2006-05-08 02:15

#3 Post by Lou »

Hmm, it doesn't kick in, probably because my kb is a spanish Logitech. I launch my terminal in ion3 with Ctrl+F1 .

ajdlinux
Posts: 2452
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

#4 Post by ajdlinux »

It works for me.

ajdlinux
Posts: 2452
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

#5 Post by ajdlinux »

Also when you save it that becomes the command that is executed, e.g.:

$ ls^X^E
== editor ==
ls -la
^X (exit)
ls -la

total 1644
drwxr-xr-x 13 andrew andrew 4096 2006-06-09 21:11 .
drwxr-xr-x 38 andrew andrew 4096 2006-06-10 08:47 ..

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#6 Post by lacek »

If it doesn't work for you (as it didn't for me at the first time), try setting the EDITOR environmental variable like this:

Code: Select all

export EDITOR=/usr/bin/vim
After this, the specified editor will be spawned upon pressing ^X^E.

Post Reply