Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Next time you are using your shell, try typing ctrl-x e [...]. The shell will take what you've written on the command line thus far and paste it into the editor specified by $EDITOR.

I'm astonished this works in bash but not in zsh.



I have these in my .zshrc:

  autoload edit-command-line
  zle -N edit-command-line
  bindkey '^X^E' edit-command-line


And if you use set -o vi in .bashrc, or set editing-mode vi in .inputrc, then 'v' will do the same thing, e.g.

    $ blah blah[ESC]v
puts you in vim with the command line thus far.


I tried "set -o vi" and every v sent me into the editor. This was on the latest cygwin.


Well, you must have been command mode. Try pressing "i".


ctrl-x ctrl-e ... the e isn't naked as you suggested.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: