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.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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:
Next step: Activate the bookmarklist -
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:
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.
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.