Geany vs Notepad++

type: note | domain: technology | topic: software | lang: en | pub: 2023-11-12

Notepad++ is Windows-only. For cross-platform development, Geany is an attractive alternative. This article lists a number of useful actions and settings for everyday use.

Daily procedures compared

Action Geany Notepad++
Selecting: Parts including opening and closing parenthesis Select word, Ctrl-Shift-M or use plugin Extra Selection, Create key binding like: Ctrl-Alt-B put cursor before or after "(" or ")" and Ctrl-Alt-B
Selecting: Parts between parenthesis: Same as above, depending on cursor position. Ctrl+DLMB
Selecting: A complete line, carriage return etc. included TLMB TLMB
Indent: Select block and Tab or Shift-Tab. Select block and Tab or Shift-Tab.
Find, replace (regex) like: ^FindMe or ^.SecondCharacter or Me$: Ctrl-F or Ctrl-H Ctrl-F or Ctrl-H
Find, replace (extended) like: Replace \r\n with space character: Ctrl-F or Ctrl-H Ctrl-F or Ctrl-H
Remove empty lines: PlugIn Line Operations, then “Tools” > “Line operations” > … “Edit” > “Line operations” > …
Duplicate line: Ctrl-D Ctrl-D
Mark instances Yes, PlugIn Auto-mark Yes
Delete lines (and add to clipboard): TLMB Ctrl-X or Ctrl+Shift-X (or Ctrl-K without clipboard). Ctrl-l
Toggle comment lines: Ctrl-E Ctrl-Q
Bookmark line: LMB in front. LMB in front.
Bookmark navigation: Ctrl+. or Ctrl-, F2 or Shift-F2
For DLMB selection of words, seperators... Edit filetypes.common, search for whitespace and remove - and * for example. (1) Add characters in Prefs.

Mouse buttons: Left, Middle, Right: <L|M|R>MB, like LMB. D is Double, T is Triple.

(1): If that doesn't work, copy the file from %programfiles%\geany\data to %appdata\geany.

If permission problems arise , Notepad++ can restart elevated automatically while keeping the open files in memory. This is very polished. Geany should be started elevated before permission problems arise. So editing a file by RMB and select Geany from Explorer is not an option in that case. For me that is a big disadvantage because I often edit files in environment %ProgramFiles%.

A tip for starting Geany elevated from the start menu, beside RMB > "as admin": ctrl-shift-LMB on icon. A more consistent approach is to change properties at the cost of safety: start menu > RMB Geany > Properties > Tab Compatibility > Run this as administrator. Then in Explorer RMB a file > open with > Geany > Always.

CAD-Lisp

Syntax highlighting definitions are available for both Notepad++ and Geany:

Both are based on the same CAD-Lisp keyword list and can be extended with project-specific functions and libraries.

Conclusion

Geany has become matured, all functions you look for are probably on board. Some plugins are extremely valuable. As an alternative for Notepad++ it is really good. When you work with multiple OS's, then Geany is a logical choice for a consistent way of working on all platforms.