Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

edit-and-execute-command bash with sublime text

In a bash terminal session, I notice that the edit-and-execute-command C-xC-e does not work with Sublime Text 3.

I've set EDITOR=subl, but when I try to edit a command line from bash, sublime-text opens an empty window.

Do I miss something ?


1 Answers

You should export the EDITOR as:

EDITOR="subl -w"

as:

To use Sublime Text as the editor for many commands that prompt for input, set your EDITOR environment variable:

export EDITOR='subl -w'

Specifying -w will cause the subl command to not exit until the file is >closed.

Full explanation here

like image 143
terence hill Avatar answered Jul 19 '26 20:07

terence hill



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!