I have C++ code with more than 10,000 lines. I am looking for something which stores some lines. Like bookmarking some lines or some functions in order to facilitate access to them.

For example, a list which contains bookmark lines or functions.


This is the normal way to create bookmarks in Geany:


Geany provides a handy bookmarking feature that lets you mark one or more lines in a document, and return the cursor to them using a key combination.

To place a mark on a line, either left-mouse-click in the left margin of the editor window, or else use Ctrl-m. This will produce a small green plus symbol in the margin. You can have as many marks in a document as you like. Click again (or use Ctrl-m again) to remove the bookmark. To remove all the marks in a given document, use "Remove Markers" in the Document menu.

To navigate down your document, jumping from one mark to the next, use Ctrl-. (control period). To go in the opposite direction on the page, use Ctrl-, (control comma). Using the bookmarking feature together with the commands to switch from one editor tab to another (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to navigate around multiple files.


To add a list of these bookmarks, you have to install the Geany plugin "Addons":

sudo apt-get install geany-plugin-addons

To remember the bookmarks at each file load, the plugin "Numbered Booksmarks" is required:

sudo apt-get install geany-plugin-numberedbookmarks

(You have to save the file if you want save the bookmarks.)

After the installation, enable the plugin to load at startup:

Enter image description here

Next step: Activate the bookmarklist -

Enter image description here

Bookmarklist example:

Enter image description here

  • Yes, it is pretty terrible that Geany does not remember the normal bookmarks by default. To set a numbered bookmark (numbered bookmarks are independent of the normal bookmarks), use Ctrl + Shift + number (e.g. Ctrl + Shift + 4 to set numbered bookmark "4" - appears as a yellow "4" in the margin) and Ctrl + number to jump to a particular numbered bookmark (e.g. Ctrl + 4) – Peter Mortensen Mar 29 '20 at 17:04
  • If you don't need the sidebar list, then you don't need the Addons plugin. – Humpity Oct 23 '20 at 15:47

As a recent and enthusiastic adopter of Geany (migrating from Windows/Notepad++, which I think Geany already beats!), who has been dealing a lot with bookmarks, I have some additions/caveats to the existing answer - for the benefit of people who arrive from a search engine, since this thread is quite high up the list. These are in relation to the two plugins it mentions and I think important to note:

  1. Bookmarks Sidebar does not update when bookmarked lines are moved up or down, using the current version of Addons. I reported this as a bug - and the response from the Geany team was immediate, so there's already a pull on SourceForge - which I've compiled and can confirm fixes it flawlessly. :-) I assume this'll be in the next release.

  2. The Numbered Bookmarks plugin, to save changed bookmarks/folds, requires the source file be saved - so if we've finished typing, saved, then change bookmarks/folds - we must re-save, which requires enabling Preferences/Various/allow_always_save (allow saving files not marked changed), or make 'dummy' edit to re-save. I am trying to log a FR to have bookmarks/folds auto-saved, or - maybe better (if not bad design/UX) - mark the file changed so we can see and choose whether to save them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.