aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-09-28 01:01:30 +0000
committerDuncaen <mail@duncano.de>2017-09-28 01:01:30 +0000
commit31a0d28db06b2dfade3729fbaef15d2103b50603 (patch)
tree43d5747b89791719d05a940ca863266f567322fe
parent52bec3503db41d7e3999186377434e6cfe4f56c1 (diff)
downloaddotfiles-31a0d28db06b2dfade3729fbaef15d2103b50603.tar.gz
vim: add syntax toggle
-rw-r--r--vimrc4
1 files changed, 3 insertions, 1 deletions
diff --git a/vimrc b/vimrc
index 79fd99f..3ca8481 100644
--- a/vimrc
+++ b/vimrc
@@ -111,9 +111,11 @@ call s:map_change_option('n', 'number', 'setlocal number!')
call s:map_change_option('h', 'hlsearch', 'setlocal hlsearch!')
call s:map_change_option('l', 'list', 'setlocal list!')
call s:map_change_option('p', 'paste')
-call s:map_change_option('w', 'wrap', 'setlocal wrap!')
+call s:map_change_option('s', 'syntax',
+ \ 'if exists("g:syntax_on")<bar>syntax off<bar>else<bar>syntax enable<bar>endif<bar>redraw')
call s:map_change_option('t', 'textwidth',
\ 'let &l:textwidth = input("textwidth (". &l:textwidth ."): ")<bar>redraw')
+call s:map_change_option('w', 'wrap', 'setlocal wrap!')
" ============================================================================