]> Sergey Matveev's repositories - gerrvim.git/commitdiff
Place highlighted signs on commented lines
authorSergey Matveev <stargrave@stargrave.org>
Fri, 11 Sep 2015 09:13:11 +0000 (12:13 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 11 Sep 2015 09:13:11 +0000 (12:13 +0300)
plugin/gerrvim.vim

index 481adc213cf4ae7ed70039599bb41d7716cce458..426e690a157e28b51a93abb41243cc2a00afa471 100644 (file)
@@ -39,6 +39,13 @@ function! s:Gerrvim() range
         let ready = add(ready, bufline)
     endfor
     let ready = add(ready, "-----END-----")
+    " 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 GerrvimCommenting
     resize 16