6

How do I get Quickly to use Gvim (or just vim in a terminal) as its default text editor instead of Gedit?

If this can be done, I must be doing it wrong...

Ubuntu 10.10 AMD64.

brews
  • 233

3 Answers3

7

I assume you mean you want to change the editor that Quickly loads when you ask it to.

Well I did some sleuthing... I'll show you what I did followed by the answer.

  1. I fired off this command:

    sudo find / -name "*quickly*" -exec grep gedit {} \;
    

    That searches for all files with quickly in and then greps them for gedit. It was a long shot -- I should have refined the search so it was any paths with quickly in but it matched!

    Binary file /usr/share/quickly/templates/ubuntu-application/internal/quicklyutils.pyc matches
        editor = "gedit"
    
  2. I opened up /usr/share/quickly/templates/ubuntu-application/internal/quicklyutils.py (not the compiled version) in nano, searched for gedit and saw:

    def get_quickly_editors():
        '''Return prefered editor for ubuntu-application template'''
    
        editor = "gedit"
        default_editor = os.environ.get("EDITOR")
        if not default_editor:
            default_editor = os.environ.get("SELECTED_EDITOR")
        if default_editor:
           editor = default_editor
        return editor
    
  3. From that you can see it asks for the environment value EDITOR!

    Just run your quickly commands as:

    env EDITOR=gvim quickly edit
    

    or export it to persist

    export EDITOR=gvim
    quickly edit
    

    Add the export line to your ~/.bashrc line if you want it to persist between sessions.

Oli
  • 293,335
2

After you install GVim , using Synaptic Package Manager, then it should be available in the Applications menu and you can right click on it and add the application shortcut to your desktop.

djangofan
  • 3,714
  • Thanks for the answer! But, I can run Gvim quite well. The issue is running it through Quickly (it's like ruby on rails, but for python and developed by Ubuntu) which generally uses Gedit as default. – brews Jan 17 '11 at 21:24
  • I answered this question before "brews" had capitalized the word "Quickly" in his question and provided a link. – djangofan Jan 18 '11 at 21:15
1

What about sudo update-alternatives –config editor? It will change the system default editor so you do not have to change individual program preferences..

From: Old article, but should still work..

SW1
  • 111