From cfaf341754dc7b9144a2805e8f1f843108bca7c8 Mon Sep 17 00:00:00 2001 From: jdhao Date: Wed, 29 Apr 2020 20:54:52 +0800 Subject: [PATCH] update: add function to toggle cursorcolumn --- autoload/utils.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autoload/utils.vim b/autoload/utils.vim index 0493ab7..9e6d875 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -74,4 +74,15 @@ function! utils#MyFoldText() let fillcharcount = &textwidth - len(line_text) - len(folded_line_num) - 10 return '+'. repeat('-', 4) . line_text . repeat('.', fillcharcount) . ' (' . folded_line_num . ' L)' endfunction + +" Toggle cursor column +function! utils#ToggleCursorCol() + if &cursorcolumn + set nocursorcolumn + echo "cursorcolumn: OFF" + else + set cursorcolumn + echo "cursorcolumn: ON" + endif +endfunction "}