about summary refs log tree commit diff
path: root/vim
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2020-05-13 12:10:02 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2020-05-13 12:10:02 +0700
commit895991bbf7cfbfb1565338db2a19d23e26a499b1 (patch)
tree74747d6f348486afa63ffbd82a9158629f3cb4d7 /vim
parentdd1019cb27d3fc6e00c5fa0d30dfeca453744613 (diff)
downloaddotfiles-895991bbf7cfbfb1565338db2a19d23e26a499b1.tar.gz
Update 2020-05-13
Diffstat (limited to 'vim')
-rwxr-xr-xvim/.vim/vimrc10
1 files changed, 6 insertions, 4 deletions
diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc
index 56a99fe..c350000 100755
--- a/vim/.vim/vimrc
+++ b/vim/.vim/vimrc
@@ -24,10 +24,12 @@ autocmd FileType vim,sh,lua,tex,cmake,cpp,html,octave,pascal
       \ setlocal shiftwidth=2
 autocmd FileType rst setlocal shiftwidth=3
 autocmd FileType java setlocal omnifunc=javacomplete#Complete
-autocmd FileType python,cython
-      \ let w:m1=matchadd('ColorColumn', '\%<80v.\%>73v', -1)
-autocmd BufWinEnter * if !exists('w:m1') |
-      \ let w:m1=matchadd('ColorColumn', '\%<81v.\%>80v', -1) | endif
+autocmd BufWinEnter *
+      \ if &filetype ==# 'python' || &filetype ==# 'cython'
+      \ | let w:m1=matchadd('ColorColumn', '\%<80v.\%>73v', -1) |
+      \ else
+      \ | let w:m1=matchadd('ColorColumn', '\%<81v.\%>80v', -1) |
+      \ endif
 
 let g:srcery_italic=1
 let g:jedi#popup_on_dot = 0