- 
  Notifications
 You must be signed in to change notification settings 
- Fork 166
Selected symbol highlighting #430
-
OpenGrok supports manually adding highlights to selected symbols in multiple colors, which is bound to 2-7 on the keyboard.
This is pretty useful for browsing code, as it helps focus on specific variables, functions, etc.
In OG, it's implemented in utils.js and was originally added in oracle/opengrok@2bf0d6d, with first keybinding added in oracle/opengrok@e77d517 and then expanded to support multiple colors in oracle/opengrok#1662.
Also, it might be a good idea to not just copy the feature but improve it a bit - OG supports 5 colors with 8 on the keyboard being bound to removing all highlighting, which is honestly a bit annoying since it's easy to forget which is the last highlighting key. And since I think Sourcebot doesn't bind 1 to anything, it might be possible to do 9-10 colors (5 isn't always enough) and use 0 or - keys for clearing the highlights.
Also note that in OG it's not saved in any way - but the ability to share highlighted symbols also seems like something that might be useful (similar to current selection sharing)
Beta Was this translation helpful? Give feedback.