aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2019-06-10 23:40:23 +0200
committerMax Christian Pohle2019-06-10 23:40:23 +0200
commit450d847e42582ef2734015869c59c7d1fdd6b208 (patch)
treed8a051de440c9d581b20657bf446a7ddc474c4f6
parent7a09b882a53e44125488f8aab750b8bffed7b8ea (diff)
downloadvim-450d847e42582ef2734015869c59c7d1fdd6b208.tar.bz2
vim-450d847e42582ef2734015869c59c7d1fdd6b208.zip
Improved color schemes, indentation, autocompletion for text
-rw-r--r--after/indent/yaml.vim18
-rw-r--r--ftplugin/text.vim15
m---------pack/_all/start/base16-vim0
m---------pack/vim/opt/YouCompleteMe0
-rw-r--r--plugin/KarlMarks.vim2
-rw-r--r--plugin/max-fix-colorschemes.vim8
-rw-r--r--plugin/max-highlight-word-under-cursor.vim8
7 files changed, 45 insertions, 6 deletions
diff --git a/after/indent/yaml.vim b/after/indent/yaml.vim
new file mode 100644
index 0000000..3027571
--- /dev/null
+++ b/after/indent/yaml.vim
@@ -0,0 +1,18 @@
1set colorcolumn=80
2set textwidth=80
3
4let g:yaml_schema = "pyyaml"
5
6
7
8function! YamlFix()
9 if(match(getline(v:lnum), ':$') > -1)
10 return -1
11 elseif(match(getline(v:lnum), '^[^ ].*:$\|^\s*\.\.\.\|^\s*---\') > -1)
12 return 0
13 else
14 return GetYAMLIndent(v:lnum)
15 endif
16endfunction
17setlocal indentexpr=YamlFix()
18
diff --git a/ftplugin/text.vim b/ftplugin/text.vim
index 2095ef5..0336a13 100644
--- a/ftplugin/text.vim
+++ b/ftplugin/text.vim
@@ -5,4 +5,17 @@ autocmd InsertLeave * syntax match Convention /\v<(\w+)\_s+\1>/ containedin=ALL
5set autoindent nosmartindent nocindent 5set autoindent nosmartindent nocindent
6 6
7set formatoptions+=n " When formatting text, recognize numbered lists. 7set formatoptions+=n " When formatting text, recognize numbered lists.
8set formatoptions+=a " Automatic formatting of paragraphs. 8set formatoptions+=1 " do not break after a one letter word
9set formatoptions+=p " Don't break lines at single spaces that follow periods.
10
11set formatoptions+=aw " Automatic formatting of paragraphs (w=only if space in the end)
12
13
14set noexpandtab
15set spell
16set complete+=kspell
17
18inoremap <C-Space> <C-n>
19
20" nnoremap <c-s> :normal <c-n>
21" autocmd CursorHoldI * normal <c-x>s
diff --git a/pack/_all/start/base16-vim b/pack/_all/start/base16-vim
Subproject 2073e2dd9fa0172ccdba92b3f0df25642a69f7d Subproject 6191622d5806d4448fa2285047936bdcee57a09
diff --git a/pack/vim/opt/YouCompleteMe b/pack/vim/opt/YouCompleteMe
Subproject d691404ae2f7c79ec5d053f2c22a4c775b4bf91 Subproject 25ebc0b9abb1b135c809ee850085a0305cbc553
diff --git a/plugin/KarlMarks.vim b/plugin/KarlMarks.vim
index a36ecab..6e5a408 100644
--- a/plugin/KarlMarks.vim
+++ b/plugin/KarlMarks.vim
@@ -16,7 +16,7 @@ function! KarlMarks()
16 16
17 if (p[0] == 0 || p[0] == winbufnr(0)) && p[1] > 0 17 if (p[0] == 0 || p[0] == winbufnr(0)) && p[1] > 0
18 exec "sign unplace ".c 18 exec "sign unplace ".c
19 exec "sign define mark_".c." text=".nr2char(c)." texthl=linenr" 19 exec "sign define mark_".c." text=".nr2char(c)." texthl=SignColumn"
20 exec "sign place ".c." name=mark_".c." line=".p[1]." buffer=".winbufnr(0) 20 exec "sign place ".c." name=mark_".c." line=".p[1]." buffer=".winbufnr(0)
21 endif 21 endif
22 endfor 22 endfor
diff --git a/plugin/max-fix-colorschemes.vim b/plugin/max-fix-colorschemes.vim
index 87c9efe..7dda5bf 100644
--- a/plugin/max-fix-colorschemes.vim
+++ b/plugin/max-fix-colorschemes.vim
@@ -11,7 +11,8 @@ function! ExtendColorTheme()
11 highlight! Error cterm=NONE ctermbg=NONE gui=NONE guibg=NONE 11 highlight! Error cterm=NONE ctermbg=NONE gui=NONE guibg=NONE
12 highlight! SpellBad cterm=NONE gui=undercurl guibg=NONE guifg=red 12 highlight! SpellBad cterm=NONE gui=undercurl guibg=NONE guifg=red
13 highlight! Ignore cterm=NONE ctermbg=NONE ctermfg=NONE gui=NONE guibg=NONE guifg=NONE 13 highlight! Ignore cterm=NONE ctermbg=NONE ctermfg=NONE gui=NONE guibg=NONE guifg=NONE
14 highlight! Folded cterm=NONE ctermbg=NONE 14 highlight! LineNr cterm=bold,italic,inverse ctermbg=NONE ctermfg=fg
15 " highlight! VertSplit ctermbg=252 ctermfg=252
15 16
16 17
17 18
@@ -37,6 +38,7 @@ function! ExtendColorTheme()
37 highlight! link VertSplit LineNr 38 highlight! link VertSplit LineNr
38 highlight! link SignColumn LineNr 39 highlight! link SignColumn LineNr
39 highlight! link FoldColumn LineNr 40 highlight! link FoldColumn LineNr
41 highlight! link Folded LineNr
40 42
41 highlight! link PmenuSbar Pmenu 43 highlight! link PmenuSbar Pmenu
42 highlight! PmenuThumb cterm=inverse 44 highlight! PmenuThumb cterm=inverse
@@ -48,7 +50,7 @@ endfunction
48autocmd ColorScheme * call ExtendColorTheme() 50autocmd ColorScheme * call ExtendColorTheme()
49 51
50 52
51set background=dark 53" set background=light
52if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest")) 54if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest"))
53 let g:base16_shell_path = "~/.config/base16-shell/scripts" 55 let g:base16_shell_path = "~/.config/base16-shell/scripts"
54 let base16colorspace = 256 56 let base16colorspace = 256
@@ -57,7 +59,7 @@ else
57 let g:PaperColor_Theme_Options = { 59 let g:PaperColor_Theme_Options = {
58 \ 'theme': { 60 \ 'theme': {
59 \ 'default': { 61 \ 'default': {
60 \ 'transparent_background': 1 62 \ 'transparent_background': 0
61 \ } 63 \ }
62 \ } 64 \ }
63 \ } 65 \ }
diff --git a/plugin/max-highlight-word-under-cursor.vim b/plugin/max-highlight-word-under-cursor.vim
index 2e7f5a0..c6d6964 100644
--- a/plugin/max-highlight-word-under-cursor.vim
+++ b/plugin/max-highlight-word-under-cursor.vim
@@ -11,7 +11,13 @@ function! HighlightWordUnderCursor()
11 let l:currentword = escape(expand('<cword>'), '.') 11 let l:currentword = escape(expand('<cword>'), '.')
12 if(strlen(l:currentword) > 0) 12 if(strlen(l:currentword) > 0)
13 let w:m1=100 13 let w:m1=100
14 silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) 14 if(match(expand('<cWORD>'), '^#\x\{6\}') == 0)
15 exec 'highlight! CurrentColor guibg='.expand('<cWORD>')
16 hi CurrentColor
17 " silent! call matchadd('CurrentColor', escape(expand('<cWORD>'), '.'), -1, w:m1)
18 else
19 silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1)
20 endif
15 endif 21 endif
16endfunction 22endfunction
17 23
..