Today's Daily Vim says the following:
Assuming you are using a bash shell, the following might be helpful when compiling long command lines:Start typing on the command line, and then type Ctrl-x Ctrl-e, it should put you in your default system editor (hopefully Vim) and let you edit the command line from there. When finished, save the command line and bash will run the command.
Assuming you are using a bash shell, the following might be helpful when compiling long command lines:
Start typing on the command line, and then type Ctrl-x Ctrl-e, it should put you in your default system editor (hopefully Vim) and let you edit the command line from there. When finished, save the command line and bash will run the command.
Is there any way to do this in tcsh ?
Hmmm ... IIRC, tcsh uses a command called bindkey . Try bindkey -v on the command line. Then hit escape and then v . It has been a while since I used tcsh, so the details are a bit blurry. If in doubt, google ,
bindkey
bindkey -v
v
A little explanation for the uninitiated.
puts you in vi mode (oh yes!)
and pressing v from there will lead you to $EDITOR - and everything will be fine with the world from there.
$EDITOR