Created
July 6, 2015 05:21
-
-
Save dahu/6ff4de11ca9c5bb25902 to your computer and use it in GitHub Desktop.
Use colorcolumn as a poor-man's indent indicator in vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" toggle colorcolumn | |
" at cursor (mnemonic: indicate cursor) | |
nnoremap <leader>ic :exe 'set cc'.(&cc =~ virtcol('.')?'-=':'+=').virtcol('.')<cr> | |
" at start of line (mnemonic: indicate indent) | |
nnoremap <leader>ii :exe "normal m`^\<leader>ic``"<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment