Skip to content
Advertisement

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 ?

Advertisement

Answer

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

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement