Commits

Gabriel AHTUNE committed c42ae8b

set colorcolumn dynamic depending on tw + 1 value.

Comments (0)

Files changed (1)

     if exists("b:colorcolumnon") && b:colorcolumnon
         let b:colorcolumnon = 0
         exec ':set colorcolumn=0'
-        echo '80 column marker off'
+        echo (&tw + 1).' column marker off'
     else
         let b:colorcolumnon = 1
-        exec ':set colorcolumn=80'
-        echo '80 column marker on'
+        exec ':set colorcolumn='.(&tw + 1)
+        echo (&tw + 1).' column marker on'
     endif
 endfunc