[Geany] Couple of small patches

Catalin Marinas catalin.marinas at xxxxx
Thu Dec 13 11:31:33 UTC 2007


Hi,

I attached two simple patches that make geany easier to use for me.

The first one is support for "move document first/last" via <Alt>-Home
and <Alt>-End. I end up opening tens of files and navigation becomes
really difficult (and I don't like using the mouse). With these key
bindings, I can easily move tabs I use most often to the beginning and
quickly switch between them with the context menu key. Ideally, a
pop-up with features for easy file selection using the keyboard
(similar to the tag completion in the editor window) would be best but
I don't really have experience with GUI programming. The "Files"
plugin allows selecting a file by typing but the project I use geany
with has sources scattered all over the place (and the open dialogue
box doesn't allow fast switching either).

The second patch adjusts the indentation if there is an open bracket
on the previous line (similar to emacs but only checks the previous
line). This is useful when writing function arguments on multiple
lines, multiple conditions in an if statement, lists in Python etc.
The indentation is done with spaces rather than a combination of
spaces and tabs. I find this more useful since it doesn't break the
code alignment if I change the tab width. It doesn't check whether the
bracket is inside a string or comment (the existing code doesn't check
for a brace inside comment either).

Please feel free to modify them.

Regards.

-- 
Catalin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: document-first-last.patch
Type: text/x-patch
Size: 1834 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20071213/ae0d768e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bracket-indent.patch
Type: text/x-patch
Size: 2199 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20071213/ae0d768e/attachment-0001.bin>


More information about the Users mailing list