Re: [Ilugc] [Tip] Edit The Command Line With Vim

2010-08-04 Thread பாலாஜி நாராயணன்
On 4 August 2010 09:46, Tha.Suresh jemenisur...@gmail.com wrote:
 Edit The Command Line With Vim

 This is a quick (and great) tip I found at Daily Vim:

 Open a linux terminal, and type some (long) command.
 Now type [ctrl]+[x] and then [ctrl]+[e]
 The command should be moved now to a vim window.
 Edit the command (fix typos, change parameters, etc..) and save.
 The command will now be executed. :)

You cn do most of the command line editing via readline.

set -o emacs or set -o vim

and most of the vim and emacs command line editing will work on the shell.

-balaji


-- 
http://balajin.net/blog
http://flic.kr/balajijegan
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Tip] Edit The Command Line With Vim

2010-08-04 Thread Arun Khan
2010/8/4 Balaji Narayanan (பாலாஜி நாராயணன்) li...@balajin.net:
 On 4 August 2010 09:46, Tha.Suresh jemenisur...@gmail.com wrote:
 You cn do most of the command line editing via readline.

 set -o emacs or set -o vim

 and most of the vim and emacs command line editing will work on the shell.

emacs is the default behavior in bash, ksh, zsh in my experience which
can be overriden by shell's builtin function

bash being the CLI by default, simply put the above in your .bashrc.

In csh, again the default is emacs.  For vi use bindkey -v for vi
editing behavior.

-- Arun Khan
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


[Ilugc] [Tip] Edit The Command Line With Vim

2010-08-03 Thread Tha.Suresh
Edit The Command Line With Vim

This is a quick (and great) tip I found at Daily Vim:

Open a linux terminal, and type some (long) command.
Now type [ctrl]+[x] and then [ctrl]+[e]
The command should be moved now to a vim window.
Edit the command (fix typos, change parameters, etc..) and save.
The command will now be executed. :)


-- 
Regards,
Tha.Suresh

Kanchi Linux User Group Rocks 
http://kanchilug.wordpress.com

My experiences with Linux are here,
http://thasulinux.wordpress.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Tip] Edit The Command Line With Vim

2010-08-03 Thread Balaji Damodaran

On Wednesday 04 August 2010 09:46 AM, Tha.Suresh wrote:

Edit The Command Line With Vim

This is a quick (and great) tip I found at Daily Vim:

Open a linux terminal, and type some (long) command.
Now type [ctrl]+[x] and then [ctrl]+[e]
The command should be moved now to a vim window.
Edit the command (fix typos, change parameters, etc..) and save.
The command will now be executed. :)


   


Didn't work in zsh, works in bash.
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Tip] Edit The Command Line With Vim

2010-08-03 Thread Balachandran Sivakumar
On Wed, Aug 4, 2010 at 9:46 AM, Tha.Suresh jemenisur...@gmail.com wrote:
 Edit The Command Line With Vim

 This is a quick (and great) tip I found at Daily Vim:

 Open a linux terminal, and type some (long) command.
 Now type [ctrl]+[x] and then [ctrl]+[e]
 The command should be moved now to a vim window.

   Actually, it would open the user's editor, i.e. which ever is
pointed to by the $EDITOR var. So, not just vim, but any preferred
editor can be opened this way for editing the command. But given that
a shell like bash by itself supports editor key-bindings, it should be
easy enough to do it in the shell itself(at least for bash). By
default, it is emacs key bindings and can be set to vi as well. Thanks



-- 
Thank you
Balachandran Sivakumar

Arise Awake and stop not till the goal is reached.

Mail: benignb...@gmail.com
Blog: http://benignbala.wordpress.com/
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Tip] Edit The Command Line With Vim

2010-08-03 Thread Balaji Damodaran

On Wednesday 04 August 2010 09:53 AM, Balaji Damodaran wrote:

On Wednesday 04 August 2010 09:46 AM, Tha.Suresh wrote:

Edit The Command Line With Vim

This is a quick (and great) tip I found at Daily Vim:

Open a linux terminal, and type some (long) command.
Now type [ctrl]+[x] and then [ctrl]+[e]
The command should be moved now to a vim window.
Edit the command (fix typos, change parameters, etc..) and save.
The command will now be executed. :)




Didn't work in zsh, works in bash.

and in Ubuntu, it opened in nano - apparently, vim was not installed.
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc