How to use Sublime Text 2 as Quickly default editor?

10,217

Solution 1

Set the EDITOR environment variable to sublime and then quickly edit will use it:

export EDITOR=/usr/bin/subl

Just add the above line to your ~/.bashrc file

Solution 2

It does this because gedit is programmed to do that when you run it from the command line. You can make quickly do that with other editors by using quickly edit &.

Edit: I wrote a Perl script that will run the editor as a as a child of init so when you close the terminal the editor will remain open: script

You can set the following vaiables at the top of the script:

  • command: the command to be run
  • stdout: The standard output to be passed to the command (must be set or it will still output to terminal)
  • stderr: The standard output to be passed to the command (must be set or it will still output to terminal)
Share:
10,217
boywithaxe
Author by

boywithaxe

Updated on September 18, 2022

Comments

  • boywithaxe
    boywithaxe over 1 year

    I used this answer to change the editor used with quickly and it worked, however now,when I type quickly edit the command line stays on the open and does not allow me to enter other commands as long as Sublime Text 2 is open. I realise this is a daft question, but I can't seem to find a way to get around it.

  • Sam Bickley
    Sam Bickley almost 12 years
    I wrote a script to work around that, details above.
  • boywithaxe
    boywithaxe almost 12 years
    Thanbk you! That's great help :)
  • Eliah Kagan
    Eliah Kagan almost 12 years
    @borax12 It's perhaps better to add it to ~/.profile, since adding it to ~/.bashrc won't set it for login shells.
  • Dmitriy Budnik
    Dmitriy Budnik over 11 years
    … or even into ~/.bash_login if it exists.
  • Elder Geek
    Elder Geek over 7 years
    Your script link is dead due to the loss of ubuntuone.com I realize this is an old answer but is there any chance of making this answer valid again?