aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2018-03-26 17:25:11 +0200
committerMax Christian Pohle2018-03-26 17:25:11 +0200
commita4383bb89be5ee4650780b87d66dd2724af4ad9f (patch)
treea1162f9327aae3703487d4fbbe266faade2d5955
parent11503dfcc23e5055d095463be1b35910ae932acf (diff)
downloadvim-karlmarks-a4383bb89be5ee4650780b87d66dd2724af4ad9f.tar.bz2
vim-karlmarks-a4383bb89be5ee4650780b87d66dd2724af4ad9f.zip
Minor changes to improve performance on huge files
-rw-r--r--ftplugin/text.vim2
-rw-r--r--vimrc-full12
2 files changed, 8 insertions, 6 deletions
diff --git a/ftplugin/text.vim b/ftplugin/text.vim
new file mode 100644
index 0000000..226de51
--- /dev/null
+++ b/ftplugin/text.vim
@@ -0,0 +1,2 @@
1" highlight double words (its unlikely they are right)
2autocmd InsertLeave * syntax match Convention /\v<(\w+)\_s+\1>/ containedin=ALL
diff --git a/vimrc-full b/vimrc-full
index 819222f..dfff12d 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -1043,7 +1043,6 @@ function! ExtendColorTheme()
1043 " highlight! link LightlineLeft_tabline_1 ColorColumn 1043 " highlight! link LightlineLeft_tabline_1 ColorColumn
1044 " highlight! link LightlineLeft_tabline_0_1 ColorColumn 1044 " highlight! link LightlineLeft_tabline_0_1 ColorColumn
1045 1045
1046
1047 highlight! Todo guibg=#ffffaa guifg=#000000 gui=bold term=bold 1046 highlight! Todo guibg=#ffffaa guifg=#000000 gui=bold term=bold
1048 highlight! cStatement guifg=red gui=bold term=bold 1047 highlight! cStatement guifg=red gui=bold term=bold
1049 1048
@@ -1051,13 +1050,13 @@ function! ExtendColorTheme()
1051 autocmd InsertEnter * set list 1050 autocmd InsertEnter * set list
1052 autocmd InsertLeave * set nolist 1051 autocmd InsertLeave * set nolist
1053 1052
1054 " highlight double words (its unlikely they are right)
1055 autocmd InsertLeave * syntax match Convention /\v<(\w+)\_s+\1>/ containedin=ALL
1056
1057 " Show trailing whitepace and spaces before a tab as part of the syntax highlighting 1053 " Show trailing whitepace and spaces before a tab as part of the syntax highlighting
1058 highlight! link Convention Error 1054 highlight! link Convention Error
1059 autocmd BufEnter,InsertLeave * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL 1055 " autocmd BufEnter,InsertLeave * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1060 autocmd InsertEnter * syntax clear Convention 1056 " autocmd BufEnter,InsertLeave * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1057 autocmd BufEnter,BufWritePost * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1058 " TODO: faster strategy
1059 " autocmd InsertEnter * syntax clear Convention
1061 " autocmd BufEnter,InsertLeave * execute ':syntax match Convention /\%>'.&textwidth.'v./ containedin=ALL' 1060 " autocmd BufEnter,InsertLeave * execute ':syntax match Convention /\%>'.&textwidth.'v./ containedin=ALL'
1062 1061
1063 autocmd InsertEnter * set colorcolumn=80,120 1062 autocmd InsertEnter * set colorcolumn=80,120
@@ -1074,6 +1073,7 @@ set termguicolors | " When on, uses highlight-guifg and highlight-guibg attribut
1074if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest")) 1073if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest"))
1075 let g:base16_shell_path="~/.config/base16-shell/scripts" 1074 let g:base16_shell_path="~/.config/base16-shell/scripts"
1076 let base16colorspace=256 1075 let base16colorspace=256
1076 let syntax_cmd="skip" " vim internal, use base16 and no default colors
1077 set background=dark 1077 set background=dark
1078 source ~/.vimrc_background 1078 source ~/.vimrc_background
1079else 1079else
..