Getting Quickly to use Gvim instead of Gedit

Solution 1:

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.

Solution 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.

Solution 3:

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..