When I audit code I perform a lot of annotations/mark lines. (what audited, by whom, if we have open issue, etc etc...).

When I work with code I would like to mark lines (both individually and ranges), with some symbol (can be ascii, unicode would be awesome).

I would like this information to be stored in same way that I can later import/export with my scripts (in other programming languages).

How this could ideally look like:

*  1 This
?  2 is
T  3 test
!  4 file.

-- INSERT --     4,6  All

OR on the right side of numbers

  1* This
  2? is
  3T test
  4! file.

-- INSERT --     4,6  All

When I was searching for plugins the most promising I've found was: https://github.com/plutonly/vim-annotate , but does not do the job actually... as it only annotates when folded and I need to have it unfolded.

Again, as I need/want to integrate this information with other systems, I hope that this information would be stored in persistent way so I could programatically find it and read/write.

((I am using Vim8 but also fine with NeoVim.))

FTR. I am programmer so I can write import/export. I just don't know Vim programming well enough to make whole thing. If there would be similar project, maybe I could modify it/adopt it.

UPDATE: As I can not find a way to display symbols ( Display extra column before/after line numbers and modify using Vimscript ) I started prototyping with higlighting ( Generate relatively unique "cache filename" for given file path (like swap files do) )

  • 2
    You can place signs, but you'd have to do serialization/de-serialization yourself, AFAIK
    – D. Ben Knoble
    Nov 19, 2021 at 12:51
  • 1
    Thank you ! After you writing :help sign in another comment I understood that by "signs" you meant that there is command sing. I am so new to vimscripting, that I didn't get it from this comment :) . vimdoc.sourceforge.net/htmldoc/sign.html#:sign Nov 22, 2021 at 13:40


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.