From cac1dda765feb39b2308b0dbc56c1da889e6216c Mon Sep 17 00:00:00 2001 From: katherine Date: Fri, 29 Sep 2017 12:24:51 -0700 Subject: add auto-wrapping mode toggle for tex/md/txt --- .vimrc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.vimrc b/.vimrc index 75625f7..978db21 100644 --- a/.vimrc +++ b/.vimrc @@ -252,6 +252,16 @@ autocmd FileType text call Settings_text() autocmd FileType vim call Settings_vim() autocmd FileType zsh call Settings_shell() +function! Settings_sub_wmodetoggle() + if &fo =~ 'a' + setlocal formatoptions-=a + echo 'wmode off' + else + setlocal formatoptions+=a + echo 'wmode on' + end +endfunction + function! Settings_asm() "settings setlocal foldmethod=syntax @@ -329,10 +339,11 @@ function! Settings_markdown() setlocal shiftwidth=4 setlocal tabstop=4 setlocal softtabstop=4 - setlocal nojoinspaces "single-space sentences + setlocal nojoinspaces setlocal spell "mappings nnoremap -- O-->3hi