aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/KarlMarks.vim22
-rw-r--r--plugin/max-fix-colorschemes.vim78
-rw-r--r--plugin/max-splash.vim6
-rw-r--r--plugin/statusline.vim4
4 files changed, 73 insertions, 37 deletions
diff --git a/plugin/KarlMarks.vim b/plugin/KarlMarks.vim
new file mode 100644
index 0000000..effb22b
--- /dev/null
+++ b/plugin/KarlMarks.vim
@@ -0,0 +1,22 @@
1let g:markerbar_additional = '$^"^.`{}[]<>()'
2
3function! KarlMarks()
4 for c in map(split(g:markerbar_additional, '\zs'), "char2nr(v:val)") +
5 \ range(char2nr('a'), char2nr('z')) +
6 \ range(char2nr('A'), char2nr('Z')) +
7 \ range(char2nr('0'), char2nr('9'))
8
9 let p = getpos("'".nr2char(c))
10
11 if (p[0] == 0 || p[0] == winbufnr(0)) && p[1] > 0
12 exec "sign unplace ".c
13 exec "sign define mark_".c." text=".nr2char(c)." texthl=linenr"
14 exec "sign place ".c." name=mark_".c." line=".p[1]." buffer=".winbufnr(0)
15 endif
16 endfor
17endfunction
18
19autocmd CursorHold * call KarlMarks()
20
21" important for distraction free reading while changing windows
22set signcolumn=yes
diff --git a/plugin/max-fix-colorschemes.vim b/plugin/max-fix-colorschemes.vim
index a6fe45e..1c2c674 100644
--- a/plugin/max-fix-colorschemes.vim
+++ b/plugin/max-fix-colorschemes.vim
@@ -2,54 +2,60 @@
2" COLOR SCHEME: 2" COLOR SCHEME:
3"======================================================================================================================= 3"=======================================================================================================================
4function! ExtendColorTheme() 4function! ExtendColorTheme()
5 highlight! Bold cterm=bold gui=bold 5 highlight! Bold cterm=bold gui=bold
6 highlight! Italic cterm=italic gui=italic 6 highlight! Italic cterm=italic gui=italic
7 highlight! Underline cterm=underline gui=underline 7 highlight! Underline cterm=underline gui=underline
8 highlight! BoldUnderline cterm=bold,underline gui=bold,underline 8 highlight! BoldUnderline cterm=bold,underline gui=bold,underline
9 highlight! BoldItalic cterm=bold,Italic gui=Bold,Italic 9 highlight! BoldItalic cterm=bold,Italic gui=bold,italic
10 highlight! Todo cterm=bold gui=bold guibg=#ffffaa guifg=#000000 10 highlight! Todo cterm=bold gui=bold guibg=#ffffaa guifg=#000000
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! Folded cterm=NONE ctermbg=NONE
15 15
16 16
17 17
18 let w:color=synIDattr(hlID("Normal"), "bg#") 18
19 silent! exec 'highlight invisible gui=NONE guifg='.w:color.'guibg='.w:color.' cterm=NONE ctermfg='.w:color.' ctermbg='.w:color 19 if has("gui_running")
20 highlight invisible gui=NONE guifg=background guibg=background
21 else
22 let w:color=synIDtrans(synIDattr(hlID("Normal"), "bg"))
23 silent! exec 'highlight invisible cterm=NONE ctermfg='.w:color.' ctermbg='.w:color
24 endif
20 25
21 highlight! link EndOfBuffer Invisible 26 highlight! link EndOfBuffer Invisible
22 highlight! link qfSeparator Normal | " reserve one space
23 highlight! link qfLineNr Normal | " informational line numbers should look different
24 27
25 highlight! link SpecialKey NonText | " makes tab stop (see listchars) less disturbing 28 highlight! link qfSeparator Normal | " reserve one space
26 highlight! link WildMenu Search 29 highlight! link qfLineNr Normal | " informational line numbers should look different
27 highlight! link Convention Error
28 30
29 highlight! link VertSplit LineNr 31 highlight! link SpecialKey NonText | " makes tab stop (see listchars) less disturbing
30 highlight! link SignColumn LineNr 32 highlight! link WildMenu Search
31 highlight! link FoldColumn LineNr 33 highlight! link Convention Error
32 34
33 highlight! link PmenuSbar Pmenu 35 highlight! link VertSplit LineNr
34 highlight! PmenuThumb cterm=inverse 36 highlight! link SignColumn LineNr
35 highlight! MoreMsg cterm=inverse 37 highlight! link FoldColumn LineNr
38
39 highlight! link PmenuSbar Pmenu
40 highlight! PmenuThumb cterm=inverse
41 highlight! MoreMsg cterm=inverse
36 42
37endfunction 43endfunction
38autocmd ColorScheme * call ExtendColorTheme() 44autocmd ColorScheme * call ExtendColorTheme()
39 45
40 46
41set background=light 47set background=dark
42if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest")) 48if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest"))
43 let g:base16_shell_path = "~/.config/base16-shell/scripts" 49 let g:base16_shell_path = "~/.config/base16-shell/scripts"
44 let base16colorspace = 256 50 let base16colorspace = 256
45 source ~/.vimrc_background 51 source ~/.vimrc_background
46else 52else
47 let g:PaperColor_Theme_Options = { 53 let g:PaperColor_Theme_Options = {
48 \ 'theme': { 54 \ 'theme': {
49 \ 'default': { 55 \ 'default': {
50 \ 'transparent_background': 0 56 \ 'transparent_background': 1
51 \ } 57 \ }
52 \ } 58 \ }
53 \ } 59 \ }
54 colorscheme PaperColor 60 colorscheme PaperColor
55endif 61endif
diff --git a/plugin/max-splash.vim b/plugin/max-splash.vim
index 5282679..6b5e70d 100644
--- a/plugin/max-splash.vim
+++ b/plugin/max-splash.vim
@@ -21,3 +21,9 @@ if empty(argv())
21 \ {_, p->{'filename': fnamemodify(p, ':.')}}) 21 \ {_, p->{'filename': fnamemodify(p, ':.')}})
22 \ }) | lopen | only | setfiletype qf 22 \ }) | lopen | only | setfiletype qf
23endif 23endif
24
25" http://vimdoc.sourceforge.net/htmldoc/quickfix.html#:caddexpr
26" for c in range(char2nr('a'), char2nr('z')) + range(char2nr('A'), char2nr('Z')) + range(0,9) | let p = getpos("'".nr2char(c)) | if (p[1] > 0) | exec "sign define mark_".nr2char(c)." text=".nr2char(c)." linehl=linenr" | exec "sign place ".c." name=mark_".nr2char(c)." line=".p[1] | endif | endfor
27" for c in range(char2nr('a'), char2nr('z')) + range(char2nr('A'), char2nr('Z')) + range(0,9) | let p = line("'".nr2char(c)) | if (p > 0) | exec "sign define mark_".nr2char(c)." text=".nr2char(c)." linehl=linenr" | exec "sign place ".c." name=mark_".nr2char(c)." line=".p | endif | endfor
28" call sign_unplace('marks') | for c in range(char2nr('a'), char2nr('z')) + range(char2nr('A'), char2nr('Z')) + range(0,9) | let p = line("'".nr2char(c)) | if (p > 0) | call sign_define("mark_".nr2char(c), { "text" : nr2char(c), "linehl": "linenr"}) | call sign_place(c, 'marks', "mark_".nr2char(c), '', {'lnum': p}) | endif | endfor
29" call sign_unplace('marks') | for c in range(char2nr('a'), char2nr('z')) + range(char2nr('A'), char2nr('Z')) + range(char2nr('0'), char2nr('9')) | let p = line("'".nr2char(c)) | if (p > 0) | call sign_define("mark_".nr2char(c), { "text" : nr2char(c), "texthl": "linenr"}) | call sign_place(c, 'marks', "mark_".nr2char(c), '', {'lnum': p}) | endif | endfor
diff --git a/plugin/statusline.vim b/plugin/statusline.vim
index 7bcc963..0dc1040 100644
--- a/plugin/statusline.vim
+++ b/plugin/statusline.vim
@@ -42,6 +42,8 @@ augroup MAX_FANCYLINE
42 endfunction 42 endfunction
43 43
44 function! UpdateStatus(highlight_group) 44 function! UpdateStatus(highlight_group)
45 " TODO: make conditional (if devicons plugin is missing)
46 let l:webdev_ft_icon = WebDevIconsGetFileTypeSymbol('*.'.&filetype)
45 let l:invert_group = CreateInvertGroup(a:highlight_group) 47 let l:invert_group = CreateInvertGroup(a:highlight_group)
46 let l:mode = get({ 48 let l:mode = get({
47 \ 'n' : 'normal', 49 \ 'n' : 'normal',
@@ -76,7 +78,7 @@ augroup MAX_FANCYLINE
76 \ .g:status_sym_start 78 \ .g:status_sym_start
77 \ ."%#".a:highlight_group."#" 79 \ ."%#".a:highlight_group."#"
78 \ ."%{&buftype==''?'':' '.&buftype.' '.g:status_sym_sep_start.' '}" 80 \ ."%{&buftype==''?'':' '.&buftype.' '.g:status_sym_sep_start.' '}"
79 \ ."%{&filetype==''?'':' '.&filetype.' '.g:status_sym_sep_start.' '}" 81 \ .l:webdev_ft_icon." %{&filetype==''?'':&filetype.' '.g:status_sym_sep_start.' '}"
80 \ ."%{(&spell\ ?\ &spelllang.' '.g:status_sym_sep_end\ :\ '')}" 82 \ ."%{(&spell\ ?\ &spelllang.' '.g:status_sym_sep_end\ :\ '')}"
81 \ ."%{(&fileencoding=~'^$\\|^utf\-8$'?'':&fileencoding.' '.g:status_sym_sep_end.' ')}" 83 \ ."%{(&fileencoding=~'^$\\|^utf\-8$'?'':&fileencoding.' '.g:status_sym_sep_end.' ')}"
82 \ ."%{(&fileformat=~'^$\\|^unix$'?'':&fileformat.' '.g:status_sym_sep_end)}" 84 \ ."%{(&fileformat=~'^$\\|^unix$'?'':&fileformat.' '.g:status_sym_sep_end)}"
..