Quick Open, another plugin for Geany

Some have been able to use Sublime Text, a very elegant, extensible and usable editor for a programmer; but closed therefore I do not want to collaborate with Mr. Jon Skinner its author ("Don't sell your freedom to someone who doesn't tell you their secrets", B.Franklin).

One of the most practical things about this is the functionality that runs when pressed Ctrl-P, where the editor opens a text box where you can type the name of a file, or something similar to this name, and the editor looks for the file in the project. Using an exact search and then a fuzzy one. See:

This saves one from having to navigate the project tree, reading a bunch of file names, when you generally know what you are looking for. It is more or less the same as the Unity HUD.

Long ago I had used snake, an editor written in Python by Antón Bobrov who also implements quick open, in my struggle to improve Geany I did a Quick Open-tomy where I removed this dialog from Snaked and made it a standalone app which I then integrated with Geany via a plugin in Lua, being that way:

To use the plugin first install: python-gtk2, python-glade2 and geany-plugin-lua.

$ sudo aptitude install python-gtk2 python-glade2 geany-plugin-lua

Start your trial q open (the plugin) and unzip it in your personal folder .config / geany / plugins / geanylua /, if it doesn't exist create it.

Then create or modify the .config / geany / plugins / geanylua / hotkeys.cfg file by adding the following line to it

qopen/quick_open.lua

To be able to assign a keyboard shortcut to the plugin. Then open geany and look in your settings for keyboard shortcuts: "Edit" »" Preferences "» "Combinations", and assign the action "Quick Open" the keyboard shortcut you want. I over put " p ", which overwrites the action of printing, but I never print anything and it also looks like the Sublime Text.

I hope you report your impressions using the plugin.
Happy Hacking.

Update: Now what matches in the list of files is marked in bold and if the project to explore cannot be detected, it is assumed that this is the directory of the file where the search is requested. If you use kde you will also need to install a gnome icon pack otherwise it will not work.

Source: Written by xigurat for CodeNinja


3 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Pedro said

    I want this but the archive appears to be broken. would you be so kind and push the code to github instead?

    and possibly to open a pull request to geany plugins repo?
    https://github.com/geany/geany-plugins

    this is a killer feature. I am sure many people would want it.

  2.   Bartolo wanted said

    Hi, I just read a post, in which you show a plugin for geany
    that you wrote in lua (quick-open I think it was called) ..

    you'll see:
    I love geany, but I miss the .LOG function of the notepad, yes, hehehe
    I am also quite bad at English ...

    as a substitute for geany, I use SciTE, and I have made it a plugin
    .LOG that I put below:

    I add the following lines in User Options File (SciTEUser.properties)
    command.name.12. * = InsertDateTimeLog
    command.12. * = InsertDateTimeLog
    command.subsystem.12. * = 3
    command.mode.12. * = savebefore: no
    command.shortcut.12. * = Enter

    I add the following lines in Lua Startup Script:
    function InsertDateTimeLog ()
    local Line1, esLog, esLogMayus
    Line1 = editor: GetLine (0)
    if Line1 == nil then Line1 = "0000" end
    esLog = string.sub (Line1,1,4)
    isLogCapus = string.upper (isLog)
    if esLogMayus == ".LOG" then
    editor: AddText ("\ n \ n ——————– \ n")
    editor: AddText (os.date ("% d.% b.% Y __% Hh:% Mm"))
    editor: AddText ("\ n ——————– \ n")
    else editor: AddText ("\ n")
    end
    end

    And I would like you to do something similar in GEANY ... or give me some clues ...

    surely for you it means little, and for the community muco: many people
    I would use…

    thanks for reading and greetings ..

  3.   ronal said

    good, congratulations, I'm studying the code. thanks for sharing. I'm looking specifically at the icons.py file, I want to put other icons than the system ones