> For the complete documentation index, see [llms.txt](https://til.yulrizka.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.yulrizka.com/fish/edit-last-command-in-editor.md).

# edit last command in editor

Sometimes it's easier to edit your last command in text editor (e.g. vim) than fixing the command line in cli. while bash has fc, `fish` has built in commands.

go to your previous command with up arrow (or ctrl-p), and press alt-e

make sure `$EDITOR` environment is set.
