User Tools

Site Tools


geany

Geany

Geany is a nice text editor that can do a fair chunk of things proper IDEs can.

Features

Terminal

To add a terminal emulator to the messages pane you just need to install vte3.

Split Window

To split the window, so that you can view two separate files simultaneously, you have to install a plug-in:

This seems to live in the big plug-in pack you can download too.

External Commands

You can use the 'Send Selection to' function to send chunks of text to other programs for modification.

  • Right-mouse > Format > Send Selection to > or
  • Edit > Format > Send Selection to > or
  • Ctrl+[n]

I have one setup that sends highlit text to sort when I press Ctrl+1, which alphabetises it. Nice for CSS and lists.

Context Actions

Like external commands, you can use the single context action to send bits of text off to other places. There being only one is a bit limiting, but. I have mine set to send stuff to Firefox, which I use for URLs. To set:

  1. Edit > Preferences > Tools
  2. Find the 'Context action:' field

or

  1. Edit ~/.config/geany/geany.conf
  2. Find context_action_cmd= and add your command here.

I have firefox %s. If you want send stuff to DDG use firefox "https://duckduckgo.com/?t=ffab&q=%s", etc.

You can also have a different context action configured per file type. To do this:

  1. Copy the files you want from /usr/share/geany/filedefs to ~/.config/geany/filedefs
  2. Add your command to context_action_cmd=

I have https://developer.mozilla.org/en-GB/search?q=%s for CSS and HTML files, for example.

Keyboard Shortcuts

Some ones I find useful:

Ctrl+Shift+X Cut line
Ctrl+Shift+C Copy line
Ctrl+K Delete line
Ctrl+D Duplicate line
Ctrl+E Comment-out line (toggle)
Ctrl+I Indent line
Ctrl+U Outdent line
Alt+PgUp Shift line up
Alt+PgDn Shift line down
Ctrl+H Find and replace dialogue
Ctrl+[n] Custom commands. The number depends on the command's place in the list

editorconfig

You can enable .editorconfig support with a plug-in:

Syntax Highlighting

To add new filetypes to existing syntax highlighting styles:, you can add them to ~/.config/geany/filetype_extensions.conf. Currently mine looks like:

# Adds to defaults /usr/share/geany/filetype_extensions.conf
[Extensions]
Conf=*.ssa;*.ass;
 
[Groups]

See Also

geany.txt · Last modified: 2022/05/26 19:49 by rjt