]> Sergey Matveev's repositories - codecomm.git/commitdiff
Place signs on commented lines
authorSergey Matveev <stargrave@stargrave.org>
Wed, 27 May 2020 10:15:54 +0000 (13:15 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 27 May 2020 10:15:54 +0000 (13:15 +0300)
plugin/codecomm.vim

index 3a552be1c57d7b7eb35ac6ac2c773dcbc3e41633..e7d1a762ed2bd6daf2edf40fddb6d3e1f5435a06 100644 (file)
@@ -43,6 +43,13 @@ function! s:CodeComm() range
         let ready = add(ready, fmted)
     endfor
     let ready = add(ready, "---------------------------------- >8 ----------------------------------")
+    " Place commented signs
+    sign define commented text=C texthl=Search
+    for linen in range(a:firstline, a:lastline)
+        let cmd = ":sign place " . linen . " line=" . linen
+        let cmd .= " name=commented buffer=" . bufnr("%")
+        execute cmd
+    endfor
     " Spawn a new small code commenting window nonbinded to file
     new CodeCommCommenting
     setlocal noswapfile