From 4dc4017f69baf4229f6a7ab7ba7d1c289bfa805f Mon Sep 17 00:00:00 2001 From: dragonxlwang Date: Mon, 28 Mar 2016 15:26:02 -0500 Subject: [PATCH 01/12] enable search with visual selection with highlight fix issue @178 --- vimrcs/basic.vim | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 8bdc61c4..70439321 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -199,8 +199,8 @@ set wrap "Wrap lines """""""""""""""""""""""""""""" " Visual mode pressing * or # searches for the current selection " Super useful! From an idea by Michael Naumann -vnoremap * :call VisualSelection('f', '') -vnoremap # :call VisualSelection('b', '') +vnoremap * :call VisualSelection('', '')/=@/ +vnoremap # :call VisualSelection('', '')?=@/ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -384,14 +384,10 @@ function! VisualSelection(direction, extra_filter) range let l:pattern = escape(@", '\\/.*$^~[]') let l:pattern = substitute(l:pattern, "\n$", "", "") - if a:direction == 'b' - execute "normal ?" . l:pattern . "^M" - elseif a:direction == 'gv' + if a:direction == 'gv' call CmdLine("Ag \"" . l:pattern . "\" " ) elseif a:direction == 'replace' call CmdLine("%s" . '/'. l:pattern . '/') - elseif a:direction == 'f' - execute "normal /" . l:pattern . "^M" endif let @/ = l:pattern From 10ed7781d1b767c5aea0df5b80fdd9c5c9e90c5f Mon Sep 17 00:00:00 2001 From: Julio Pescador Date: Tue, 26 Apr 2016 13:04:59 -0700 Subject: [PATCH 02/12] Adding column number to status line --- vimrcs/basic.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 8c579772..7e6c4a35 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -275,7 +275,7 @@ endtry set laststatus=2 " Format the status line -set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l +set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" From 5d1fca4b44966dd9c93da5b7022e044c3ff80364 Mon Sep 17 00:00:00 2001 From: Tonni Date: Fri, 29 Apr 2016 23:52:07 +0800 Subject: [PATCH 03/12] Use ctrlpvim/ctrlp.vim instead of unmaintained kien/ctrlp.vim --- README.md | 2 +- sources_non_forked/ctrlp.vim/.gitignore | 6 - .../ctrlp.vim/autoload/ctrlp.vim | 472 +++-- .../ctrlp.vim/autoload/ctrlp/autoignore.vim | 173 ++ .../ctrlp.vim/autoload/ctrlp/bookmarkdir.vim | 21 +- .../ctrlp.vim/autoload/ctrlp/buffertag.vim | 16 +- .../ctrlp.vim/autoload/ctrlp/mrufiles.vim | 12 +- .../ctrlp.vim/autoload/ctrlp/tag.vim | 14 +- sources_non_forked/ctrlp.vim/doc/ctrlp.cnx | 1570 +++++++++++++++++ sources_non_forked/ctrlp.vim/doc/ctrlp.txt | 235 ++- sources_non_forked/ctrlp.vim/plugin/ctrlp.vim | 10 +- sources_non_forked/ctrlp.vim/readme.md | 36 +- update_plugins.py | 2 +- 13 files changed, 2400 insertions(+), 169 deletions(-) delete mode 100644 sources_non_forked/ctrlp.vim/.gitignore create mode 100644 sources_non_forked/ctrlp.vim/autoload/ctrlp/autoignore.vim create mode 100644 sources_non_forked/ctrlp.vim/doc/ctrlp.cnx diff --git a/README.md b/README.md index 41e9fc19..6c97109e 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ I recommend reading the docs of these plugins to understand them better. Each of * [NERD Tree](https://github.com/scrooloose/nerdtree): A tree explorer plugin for vim * [ack.vim](https://github.com/mileszs/ack.vim): Vim plugin for the Perl module / CLI script 'ack' * [ag.vim](https://github.com/rking/ag.vim): A much faster Ack -* [ctrlp.vim](https://github.com/kien/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. In my config it's mapped to ``, because `` is used by YankRing +* [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. In my config it's mapped to ``, because `` is used by YankRing * [mru.vim](https://github.com/vim-scripts/mru.vim): Plugin to manage Most Recently Used (MRU) files. Includes my own fork which adds syntax highlighting to MRU. This plugin can be opened with `` * [open_file_under_cursor.vim](https://github.com/amix/open_file_under_cursor.vim): Open file under cursor when pressing `gf` * [vim-indent-object](https://github.com/michaeljsmith/vim-indent-object): Defines a new text object representing lines of code at the same indent level. Useful for python/vim scripts diff --git a/sources_non_forked/ctrlp.vim/.gitignore b/sources_non_forked/ctrlp.vim/.gitignore deleted file mode 100644 index 06fcd832..00000000 --- a/sources_non_forked/ctrlp.vim/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.markdown -*.zip -note.txt -tags -.hg* -tmp/* diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim index 19ac1463..fe2cdf87 100644 --- a/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim @@ -86,9 +86,16 @@ let [s:pref, s:bpref, s:opts, s:new_opts, s:lc_opts] = \ 'status_func': ['s:status', {}], \ 'tabpage_position': ['s:tabpage', 'ac'], \ 'use_caching': ['s:caching', 1], - \ 'use_migemo': ['s:migemo', 0], \ 'user_command': ['s:usrcmd', ''], + \ 'validate': ['s:validate', ''], \ 'working_path_mode': ['s:pathmode', 'ra'], + \ 'line_prefix': ['s:lineprefix', '> '], + \ 'open_single_match': ['s:opensingle', []], + \ 'brief_prompt': ['s:brfprt', 0], + \ 'match_current_file': ['s:matchcrfile', 0], + \ 'compare_lim': ['s:compare_lim', 3000], + \ 'bufname_mod': ['s:bufname_mod', ':t'], + \ 'bufpath_mod': ['s:bufpath_mod', ':~:.:h'], \ }, { \ 'open_multiple_files': 's:opmul', \ 'regexp': 's:regexp', @@ -148,8 +155,6 @@ if !has('gui_running') cal add(s:prtmaps['PrtBS()'], remove(s:prtmaps['PrtCurLeft()'], 0)) en -let s:compare_lim = 3000 - let s:ficounts = {} let s:ccex = s:pref.'clear_cache_on_exit' @@ -162,6 +167,9 @@ let s:fpats = { \ '^\S\\?$': '\\?', \ } +let s:has_conceal = has('conceal') +let s:bufnr_width = 3 + " Keypad let s:kprange = { \ 'Plus': '+', @@ -181,7 +189,24 @@ let s:hlgrps = { \ 'PrtBase': 'Comment', \ 'PrtText': 'Normal', \ 'PrtCursor': 'Constant', + \ 'BufferNr': 'Constant', + \ 'BufferInd': 'Normal', + \ 'BufferHid': 'Comment', + \ 'BufferHidMod': 'String', + \ 'BufferVis': 'Normal', + \ 'BufferVisMod': 'Identifier', + \ 'BufferCur': 'Question', + \ 'BufferCurMod': 'WarningMsg', + \ 'BufferPath': 'Comment', \ } + +" lname, sname of the basic(non-extension) modes +let s:coretypes = [ + \ ['files', 'fil'], + \ ['buffers', 'buf'], + \ ['mru files', 'mru'], +\ ] + " Get the options {{{2 fu! s:opts(...) unl! s:usrign s:usrcmd s:urprtmaps @@ -219,6 +244,7 @@ fu! s:opts(...) for each in ['byfname', 'regexp'] | if exists(each) let s:{each} = {each} en | endfo + if !exists('g:ctrlp_tilde_homedir') | let g:ctrlp_tilde_homedir = 0 | en if !exists('g:ctrlp_newcache') | let g:ctrlp_newcache = 0 | en let s:maxdepth = min([s:maxdepth, 100]) let s:glob = s:showhidden ? '.*\|*' : '*' @@ -283,7 +309,8 @@ fu! s:Open() sil! exe 'let s:glb_'.ke.' = &'.ke.' | let &'.ke.' = '.string(va) en | endfo if s:opmul != '0' && has('signs') - sign define ctrlpmark text=+> texthl=Search + sign define ctrlpmark text=+> texthl=CtrlPMark + hi def link CtrlPMark Search en cal s:setupblank() endf @@ -305,7 +332,7 @@ fu! s:Close() if s:winres[1] >= &lines && s:winres[2] == winnr('$') exe s:winres[0].s:winres[0] en - unl! s:focus s:hisidx s:hstgot s:marked s:statypes s:cline s:init s:savestr + unl! s:focus s:hisidx s:hstgot s:marked s:statypes s:init s:savestr \ s:mrbs s:did_exp cal ctrlp#recordhist() cal s:execextvar('exit') @@ -343,7 +370,9 @@ fu! ctrlp#files() " Get the list of files if empty(lscmd) if !ctrlp#igncwd(s:dyncwd) + cal s:InitCustomFuncs() cal s:GlobPath(s:fnesc(s:dyncwd, 'g', ','), 0) + cal s:CloseCustomFuncs() en el sil! cal ctrlp#progress('Indexing...') @@ -369,6 +398,18 @@ fu! ctrlp#files() retu g:ctrlp_allfiles endf +fu! s:InitCustomFuncs() + if s:igntype == 4 && has_key(s:usrign, 'func-init') && s:usrign['func-init'] != '' + exe call(s:usrign['func-init'], []) + en +endf + +fu! s:CloseCustomFuncs() + if s:igntype == 4 && has_key(s:usrign, 'func-close') && s:usrign['func-close'] != '' + exe call(s:usrign['func-close'], []) + en +endf + fu! s:GlobPath(dirs, depth) let entries = split(globpath(a:dirs, s:glob), "\n") let [dnf, depth] = [ctrlp#dirnfile(entries), a:depth + 1] @@ -387,11 +428,18 @@ fu! s:UserCmd(lscmd) if exists('+ssl') && &ssl let [ssl, &ssl, path] = [&ssl, 0, tr(path, '/', '\')] en - if has('win32') || has('win64') + if (has('win32') || has('win64')) && match(&shellcmdflag, "/") != -1 let lscmd = substitute(lscmd, '\v(^|\&\&\s*)\zscd (/d)@!', 'cd /d ', '') en let path = exists('*shellescape') ? shellescape(path) : path - let g:ctrlp_allfiles = split(system(printf(lscmd, path)), "\n") + if (has('win32') || has('win64')) && match(&shell, 'sh') != -1 + let path = tr(path, '\', '/') + en + if has('patch-7.4-597') && !(has('win32') || has('win64')) + let g:ctrlp_allfiles = systemlist(printf(lscmd, path)) + else + let g:ctrlp_allfiles = split(system(printf(lscmd, path)), "\n") + end if exists('+ssl') && exists('ssl') let &ssl = ssl cal map(g:ctrlp_allfiles, 'tr(v:val, "\\", "/")') @@ -439,9 +487,27 @@ fu! s:lsCmd() en endf " - Buffers {{{1 +fu! s:bufparts(bufnr) + let idc = (a:bufnr == bufnr('#') ? '#' : '') " alternative + let idc .= (getbufvar(a:bufnr, '&mod') ? '+' : '') " modified + let idc .= (getbufvar(a:bufnr, '&ma') ? '' : '-') " nomodifiable + let idc .= (getbufvar(a:bufnr, '&ro') ? '=' : '') " readonly + + " flags for highlighting + let hiflags = (bufwinnr(a:bufnr) != -1 ? '*' : '') " visible + let hiflags .= (getbufvar(a:bufnr, '&mod') ? '+' : '') " modified + let hiflags .= (a:bufnr == s:crbufnr ? '!' : '') " current + + let bname = bufname(a:bufnr) + let bname = (bname == '' ? '[No Name]' : fnamemodify(bname, s:bufname_mod)) + + let bpath = empty(s:bufpath_mod) ? '' : fnamemodify(bufname(a:bufnr), s:bufpath_mod).s:lash() + + retu [idc, hiflags, bname, bpath] +endf fu! ctrlp#buffers(...) - let ids = sort(filter(range(1, bufnr('$')), 'empty(getbufvar(v:val, "&bt"))' - \ .' && getbufvar(v:val, "&bl")'), 's:compmreb') + let ids = sort(filter(range(1, bufnr('$')), '(empty(getbufvar(v:val, "&bt"))' + \ .' || s:isneovimterminal(v:val)) && getbufvar(v:val, "&bl")'), 's:compmreb') if a:0 && a:1 == 'id' retu ids el @@ -463,9 +529,12 @@ fu! s:MatchIt(items, pat, limit, exc) \ : s:martcs.a:pat for item in a:items let id += 1 - try | if !( s:ispath && item == a:exc ) && call(s:mfunc, [item, pat]) >= 0 - cal add(lines, item) - en | cat | brea | endt + try + if (s:matchcrfile || !( s:ispath && item == a:exc )) && + \call(s:mfunc, [item, pat]) >= 0 + cal add(lines, item) + en + cat | brea | endt if a:limit > 0 && len(lines) >= a:limit | brea | en endfo let s:mdata = [s:dyncwd, s:itemtype, s:regexp, s:sublist(a:items, id, -1)] @@ -497,9 +566,6 @@ endf fu! s:SplitPattern(str) let str = a:str - if s:migemo && s:regexp && len(str) > 0 && executable('cmigemo') - let str = s:migemo(str) - en let s:savestr = str if s:regexp let pat = s:regexfilter(str) @@ -533,6 +599,7 @@ fu! s:Render(lines, pat) let height = min([max([s:mw_min, s:res_count]), s:winmaxh]) let pat = s:byfname() ? split(a:pat, '^[^;]\+\\\@ winheight(0) | cal s:BuildPrompt(0) | en + let wv = winsaveview() + cal s:BuildPrompt(0) + cal winrestview(wv) endf fu! s:PrtSelectJump(char) @@ -789,8 +864,9 @@ fu! s:PrtSelectJump(char) let [jmpln, s:jmpchr] = [npos == -1 ? pos : npos, [chr, npos]] en exe 'keepj norm!' ( jmpln + 1 ).'G' - if s:nolim != 1 | let s:cline = line('.') | en - if line('$') > winheight(0) | cal s:BuildPrompt(0) | en + let wv = winsaveview() + cal s:BuildPrompt(0) + cal winrestview(wv) en endf " Misc {{{2 @@ -817,6 +893,8 @@ endf fu! s:PrtDeleteEnt() if s:itemtype == 2 cal s:PrtDeleteMRU() + elsei s:itemtype == 1 + cal s:delbuf() elsei type(s:getextvar('wipe')) == 1 cal s:delent(s:getextvar('wipe')) en @@ -875,7 +953,7 @@ fu! s:MapSpecs() if !( exists('s:smapped') && s:smapped == s:bufnr ) " Correct arrow keys in terminal if ( has('termresponse') && v:termresponse =~ "\" ) - \ || &term =~? '\vxterm|','\B ','\C ','\D '] exe s:lcmap.' ['.each endfo @@ -888,15 +966,25 @@ fu! s:MapSpecs() endf fu! s:KeyLoop() + let [t_ve, guicursor] = [&t_ve, &guicursor] wh exists('s:init') && s:keyloop - redr - let nr = getchar() + try + set t_ve= + set guicursor=a:NONE + let nr = getchar() + fina + let &t_ve = t_ve + let &guicursor = guicursor + endt let chr = !type(nr) ? nr2char(nr) : nr if nr >=# 0x20 cal s:PrtFocusMap(chr) el let cmd = matchstr(maparg(chr), ':\zs.\+\ze$') - exe ( cmd != '' ? cmd : 'norm '.chr ) + try + exe ( cmd != '' ? cmd : 'norm '.chr ) + cat + endt en endw endf @@ -922,8 +1010,8 @@ endf fu! s:ToggleType(dir) let max = len(g:ctrlp_ext_vars) + 2 let next = s:walker(max, s:itemtype, a:dir) - cal ctrlp#syntax() cal ctrlp#setlines(next) + cal ctrlp#syntax() cal s:PrtSwitcher() endf @@ -959,23 +1047,19 @@ fu! s:SetWD(args) if has_key(a:args, 'dir') && a:args['dir'] != '' cal ctrlp#setdir(a:args['dir']) | retu en - let pmode = has_key(a:args, 'mode') ? a:args['mode'] : s:pathmode + let pmodes = has_key(a:args, 'mode') ? a:args['mode'] : s:pathmode let [s:crfilerel, s:dyncwd] = [fnamemodify(s:crfile, ':.'), getcwd()] - if s:crfile =~ '^.\+://' | retu | en - if pmode =~ 'c' || ( pmode =~ 'a' && stridx(s:crfpath, s:cwd) < 0 ) - \ || ( !type(pmode) && pmode ) - if exists('+acd') | let [s:glb_acd, &acd] = [&acd, 0] | en - cal ctrlp#setdir(s:crfpath) - en - if pmode =~ 'r' || pmode == 2 - let markers = ['.git', '.hg', '.svn', '.bzr', '_darcs'] - let spath = pmode =~ 'd' ? s:dyncwd : pmode =~ 'w' ? s:cwd : s:crfpath - if type(s:rmarkers) == 3 && !empty(s:rmarkers) - if s:findroot(spath, s:rmarkers, 0, 0) != [] | retu | en - cal filter(markers, 'index(s:rmarkers, v:val) < 0') - en - cal s:findroot(spath, markers, 0, 0) + if (!type(pmodes)) + let pmodes = + \ pmodes == 0 ? '' : + \ pmodes == 1 ? 'a' : + \ pmodes == 2 ? 'r' : + \ 'c' en + let spath = pmodes =~ 'd' ? s:dyncwd : pmodes =~ 'w' ? s:cwd : s:crfpath + for pmode in split(pmodes, '\zs') + if ctrlp#setpathmode(pmode, spath) | retu | en + endfo endf " * AcceptSelection() {{{1 fu! ctrlp#acceptfile(...) @@ -990,18 +1074,15 @@ fu! ctrlp#acceptfile(...) if !type(line) let [filpath, bufnr, useb] = [line, line, 1] el - let filpath = fnamemodify(line, ':p') - if s:nonamecond(line, filpath) - let bufnr = str2nr(matchstr(line, '[\/]\?\[\zs\d\+\ze\*No Name\]$')) - let [filpath, useb] = [bufnr, 1] - el - let bufnr = bufnr('^'.filpath.'$') + let [bufnr, filpath] = s:bufnrfilpath(line) + if bufnr == filpath + let useb = 1 en en cal s:PrtExit() let tail = s:tail() let j2l = atl != '' ? atl : matchstr(tail, '^ +\zs\d\+$') - if ( s:jmptobuf =~ md || ( s:jmptobuf && md =~ '[et]' ) ) && bufnr > 0 + if bufnr > 0 && ( !empty(s:jmptobuf) && s:jmptobuf =~ md ) \ && !( md == 'e' && bufnr == bufnr('%') ) let [jmpb, bufwinnr] = [1, bufwinnr(bufnr)] let buftab = ( s:jmptobuf =~# '[tTVH]' || s:jmptobuf > 1 ) @@ -1127,6 +1208,13 @@ fu! s:MarkToOpen() retu en let line = ctrlp#getcline() + + " Do not allow to mark modified or current buffer + let bufnr = s:bufnrfilpath(line)[0] + if (s:itemtype == 1 && s:delbufcond(bufnr)) + retu + en + if empty(line) | retu | en let filpath = s:ispath ? fnamemodify(line, ':p') : line if exists('s:marked') && s:dictindex(s:marked, filpath) > 0 @@ -1283,7 +1371,16 @@ endf fu! s:compmreb(...) " By last entered time (bufnr) let [id1, id2] = [index(s:mrbs, a:1), index(s:mrbs, a:2)] - retu id1 == id2 ? 0 : id1 > id2 ? 1 : -1 + if id1 == id2 + return 0 + endif + if id1 < 0 + return 1 + endif + if id2 < 0 + return -1 + endif + return id1 > id2 ? 1 : -1 endf fu! s:compmref(...) @@ -1369,11 +1466,7 @@ endf " Statusline {{{2 fu! ctrlp#statusline() if !exists('s:statypes') - let s:statypes = [ - \ ['files', 'fil'], - \ ['buffers', 'buf'], - \ ['mru files', 'mru'], - \ ] + let s:statypes = copy(s:coretypes) if !empty(g:ctrlp_ext_vars) cal map(copy(g:ctrlp_ext_vars), \ 'add(s:statypes, [ v:val["lname"], v:val["sname"] ])') @@ -1433,18 +1526,27 @@ endf fu! s:formatline(str) let str = a:str if s:itemtype == 1 - let filpath = fnamemodify(str, ':p') - let bufnr = s:nonamecond(str, filpath) - \ ? str2nr(matchstr(str, '[\/]\?\[\zs\d\+\ze\*No Name\]$')) - \ : bufnr('^'.filpath.'$') - let idc = ( bufnr == bufnr('#') ? '#' : '' ) - \ . ( getbufvar(bufnr, '&ma') ? '' : '-' ) - \ . ( getbufvar(bufnr, '&ro') ? '=' : '' ) - \ . ( getbufvar(bufnr, '&mod') ? '+' : '' ) - let str .= idc != '' ? ' '.idc : '' + let bufnr = s:bufnrfilpath(str)[0] + let parts = s:bufparts(bufnr) + let str = printf('%'.s:bufnr_width.'s', bufnr) + if s:has_conceal + let str .= printf(' %-13s %s%-36s', + \ ''.parts[0].'', + \ ''.parts[1], '{'.parts[2].'}') + if (!empty(s:bufpath_mod)) + let str .= printf(' %s', ''.parts[3].'') + en + el + let str .= printf(' %-5s %-30s %s', + \ parts[0], + \ parts[2]) + if (!empty(s:bufpath_mod)) + let str .= printf(' %s', parts[3]) + en + en en - let cond = s:ispath && ( s:winw - 4 ) < s:strwidth(str) - retu '> '.( cond ? s:pathshorten(str) : str ) + let cond = s:itemtype != 1 &&s:ispath && ( s:winw - 4 ) < s:strwidth(str) + retu s:lineprefix.( cond ? s:pathshorten(str) : str ) endf fu! s:pathshorten(str) @@ -1532,9 +1634,21 @@ fu! ctrlp#dirnfile(entries) endf fu! s:usrign(item, type) - retu s:igntype == 1 ? a:item =~ s:usrign - \ : s:igntype == 4 && has_key(s:usrign, a:type) && s:usrign[a:type] != '' - \ ? a:item =~ s:usrign[a:type] : 0 + if s:igntype == 1 | retu a:item =~ s:usrign | end + if s:igntype == 2 + if call(s:usrign, [a:item, a:type]) + retu 1 + end + elsei s:igntype == 4 + if has_key(s:usrign, a:type) && s:usrign[a:type] != '' + \ && a:item =~ s:usrign[a:type] + retu 1 + elsei has_key(s:usrign, 'func') && s:usrign['func'] != '' + \ && call(s:usrign['func'], [a:item, a:type]) + retu 1 + end + end + retu 0 endf fu! s:samerootsyml(each, isfile, cwd) @@ -1544,8 +1658,16 @@ fu! s:samerootsyml(each, isfile, cwd) endf fu! ctrlp#rmbasedir(items) + if a:items == [] + retu a:items + en let cwd = s:dyncwd.s:lash() - if a:items != [] && !stridx(a:items[0], cwd) + let first = a:items[0] + if has('win32') || has('win64') + let cwd = tr(cwd, '\', '/') + let first = tr(first, '\', '/') + en + if !stridx(first, cwd) let idx = strlen(cwd) retu map(a:items, 'strpart(v:val, idx)') en @@ -1586,6 +1708,23 @@ fu! s:findroot(curr, mark, depth, type) retu [] endf +fu! ctrlp#setpathmode(pmode, ...) + if a:pmode == 'c' || ( a:pmode == 'a' && stridx(s:crfpath, s:cwd) < 0 ) + if exists('+acd') | let [s:glb_acd, &acd] = [&acd, 0] | en + cal ctrlp#setdir(s:crfpath) + retu 1 + elsei a:pmode == 'r' + let spath = a:0 ? a:1 : s:crfpath + let markers = ['.git', '.hg', '.svn', '.bzr', '_darcs'] + if type(s:rmarkers) == 3 && !empty(s:rmarkers) + cal filter(markers, 'index(s:rmarkers, v:val) < 0') + let markers = s:rmarkers + markers + en + if s:findroot(spath, markers, 0, 0) != [] | retu 1 | en + en + retu 0 +endf + fu! ctrlp#setdir(path, ...) let cmd = a:0 ? a:1 : 'lc!' sil! exe cmd s:fnesc(a:path, 'c') @@ -1609,25 +1748,83 @@ endf fu! ctrlp#syntax() if ctrlp#nosy() | retu | en for [ke, va] in items(s:hlgrps) | cal ctrlp#hicheck('CtrlP'.ke, va) | endfo - if synIDattr(synIDtrans(hlID('Normal')), 'bg') !~ '^-1$\|^$' - sil! exe 'hi CtrlPLinePre '.( has("gui_running") ? 'gui' : 'cterm' ).'fg=bg' + let bgColor=synIDattr(synIDtrans(hlID('Normal')), 'bg') + if bgColor !~ '^-1$\|^$' + sil! exe 'hi CtrlPLinePre guifg='.bgColor.' ctermfg='.bgColor en sy match CtrlPNoEntries '^ == NO ENTRIES ==$' if hlexists('CtrlPLinePre') sy match CtrlPLinePre '^>' en + + if s:itemtype == 1 && s:has_conceal + sy region CtrlPBufferNr matchgroup=CtrlPLinePre start='^>\s\+' end='\s' + sy region CtrlPBufferInd concealends matchgroup=Ignore start='' end='' + sy region CtrlPBufferRegion concealends matchgroup=Ignore start='' end='' + \ contains=CtrlPBufferHid,CtrlPBufferHidMod,CtrlPBufferVis,CtrlPBufferVisMod,CtrlPBufferCur,CtrlPBufferCurMod + sy region CtrlPBufferHid concealends matchgroup=Ignore start='\s*{' end='}' contained + sy region CtrlPBufferHidMod concealends matchgroup=Ignore start='+\s*{' end='}' contained + sy region CtrlPBufferVis concealends matchgroup=Ignore start='\*\s*{' end='}' contained + sy region CtrlPBufferVisMod concealends matchgroup=Ignore start='\*+\s*{' end='}' contained + sy region CtrlPBufferCur concealends matchgroup=Ignore start='\*!\s*{' end='}' contained + sy region CtrlPBufferCurMod concealends matchgroup=Ignore start='\*+!\s*{' end='}' contained + sy region CtrlPBufferPath concealends matchgroup=Ignore start='' end='' + en endf fu! s:highlight(pat, grp) if s:matcher != {} | retu | en cal clearmatches() if !empty(a:pat) && s:ispath - let pat = s:regexp ? substitute(a:pat, '\\\@ \\zs', 'g') : a:pat - if s:byfname - let pat = substitute(pat, '\[\^\(.\{-}\)\]\\{-}', '[^\\/\1]\\{-}', 'g') - let pat = substitute(pat, '\$\@ \\zs', 'g') + cal matchadd(a:grp, ( s:martcs == '' ? '\c' : '\C' ).pat) + el + let pat = a:pat + + " get original characters so we can rebuild pat + let chars = split(pat, '\[\^\\\?.\]\\{-}') + + " Build a pattern like /a.*b.*c/ from abc (but with .\{-} non-greedy + " matchers instead) + let pat = join(chars, '.\{-}') + " Ensure we match the last version of our pattern + let ending = '\(.*'.pat.'\)\@!' + " Case sensitive? + let beginning = ( s:martcs == '' ? '\c' : '\C' ).'^.*' + if s:byfname() + " Make sure there are no slashes in our match + let beginning = beginning.'\([^\/]*$\)\@=' + end + + for i in range(len(chars)) + " Surround our current target letter with \zs and \ze so it only + " actually matches that one letter, but has all preceding and trailing + " letters as well. + " \zsa.*b.*c + " a\(\zsb\|.*\zsb)\ze.*c + let charcopy = copy(chars) + if i == 0 + let charcopy[i] = '\zs'.charcopy[i].'\ze' + let middle = join(charcopy, '.\{-}') + else + let before = join(charcopy[0:i-1], '.\{-}') + let after = join(charcopy[i+1:-1], '.\{-}') + let c = charcopy[i] + " for abc, match either ab.\{-}c or a.*b.\{-}c in that order + let cpat = '\(\zs'.c.'\|'.'.*\zs'.c.'\)\ze.*' + let middle = before.cpat.after + endif + + " Now we matchadd for each letter, the basic form being: + " ^.*\zsx\ze.*$, but with our pattern we built above for the letter, + " and a negative lookahead ensuring that we only highlight the last + " occurrence of our letters. We also ensure that our matcher is case + " insensitive or sensitive depending. + cal matchadd(a:grp, beginning.middle.ending) + endfor en - cal matchadd(a:grp, ( s:martcs == '' ? '\c' : '\C' ).pat) + cal matchadd('CtrlPLinePre', '^>') en endf @@ -1735,15 +1932,33 @@ fu! s:bufwins(bufnr) retu winns endf -fu! s:nonamecond(str, filpath) - retu a:str =~ '[\/]\?\[\d\+\*No Name\]$' && !filereadable(a:filpath) - \ && bufnr('^'.a:filpath.'$') < 1 +fu! s:isabs(path) + if (has('win32') || has('win64')) + return a:path =~ '^\([a-zA-Z]:\)\{-}[/\\]' + el + return a:path =~ '^[/\\]' + en +endf + +fu! s:bufnrfilpath(line) + if s:isabs(a:line) || a:line =~ '^\~[/\\]' + let filpath = a:line + el + let filpath = s:dyncwd.s:lash().a:line + en + let filpath = fnamemodify(filpath, ':p') + let bufnr = bufnr('^'.filpath.'$') + if (a:line =~ '[\/]\?\[\d\+\*No Name\]$' && !filereadable(filpath) && bufnr < 1) + let bufnr = str2nr(matchstr(a:line, '[\/]\?\[\zs\d\+\ze\*No Name\]$')) + let filpath = bufnr + en + retu [bufnr, filpath] endf fu! ctrlp#normcmd(cmd, ...) if a:0 < 2 && s:nosplit() | retu a:cmd | en let norwins = filter(range(1, winnr('$')), - \ 'empty(getbufvar(winbufnr(v:val), "&bt"))') + \ 'empty(getbufvar(winbufnr(v:val), "&bt")) || s:isneovimterminal(winbufnr(v:val))') for each in norwins let bufnr = winbufnr(each) if empty(bufname(bufnr)) && empty(getbufvar(bufnr, '&ft')) @@ -1775,6 +1990,9 @@ fu! s:setupblank() if v:version > 702 setl nornu noudf cc=0 en + if s:has_conceal + setl cole=2 cocu=nc + en endf fu! s:leavepre() @@ -1911,7 +2129,7 @@ fu! s:nosort() endf fu! s:byfname() - retu s:ispath && s:byfname + retu s:itemtype != 1 && s:ispath && s:byfname endf fu! s:narrowable() @@ -1946,22 +2164,6 @@ fu! s:getinput(...) retu spi == 'c' ? prt[0] : join(prt, '') endf -fu! s:migemo(str) - let [str, rtp] = [a:str, s:fnesc(&rtp, 'g')] - let dict = s:glbpath(rtp, printf("dict/%s/migemo-dict", &enc), 1) - if !len(dict) - let dict = s:glbpath(rtp, "dict/migemo-dict", 1) - en - if len(dict) - let [tokens, str, cmd] = [split(str, '\s'), '', 'cmigemo -v -w %s -d %s'] - for token in tokens - let rtn = system(printf(cmd, shellescape(token), shellescape(dict))) - let str .= !v:shell_error && strlen(rtn) > 0 ? '.*'.rtn : token - endfo - en - retu str -endf - fu! s:strwidth(str) retu exists('*strdisplaywidth') ? strdisplaywidth(a:str) : strlen(a:str) endf @@ -2005,6 +2207,33 @@ fu! s:delent(rfunc) cal s:BuildPrompt(1) unl s:force endf + +fu! s:delbufcond(bufnr) + retu getbufvar(a:bufnr, "&mod") || a:bufnr == s:crbufnr +endf + +fu! s:delbuf() + let lines = [] + if exists('s:marked') + let lines = values(s:marked) + cal s:unmarksigns() + unl s:marked + el + let lines += [ctrlp#getcline()] + en + for line in lines + let bufnr = s:bufnrfilpath(line)[0] + if (s:delbufcond(bufnr)) + con + en + exe 'bd '. bufnr + endfo + cal s:PrtClearCache() +endf + +fu! s:isneovimterminal(buf) + retu has('nvim') && getbufvar(a:buf, "&bt") == "terminal" +endf " Entering & Exiting {{{2 fu! s:getenv() let [s:cwd, s:winres] = [getcwd(), [winrestcmd(), &lines, winnr('$')]] @@ -2097,7 +2326,13 @@ fu! s:matchfname(item, pat) retu len(a:pat) == 1 ? mfn : len(a:pat) == 2 ? \ ( mfn >= 0 && ( len(parts) == 2 ? match(parts[0], a:pat[1]) : -1 ) >= 0 \ ? 0 : -1 ) : -1 - en +endf + +fu! s:matchbuf(item, pat) + let bufnr = s:bufnrfilpath(a:item)[0] + let parts = s:bufparts(bufnr) + let item = bufnr.parts[0].parts[2].s:lash().parts[3] + retu match(item, a:pat) endf fu! s:matchtabs(item, pat) @@ -2120,6 +2355,8 @@ fu! s:mfunc() let mfunc = 'match' if s:byfname() let mfunc = 's:matchfname' + elsei s:itemtype == 1 + let mfunc = 's:matchbuf' elsei s:itemtype > 2 let matchtypes = { 'tabs': 's:matchtabs', 'tabe': 's:matchtabe' } if has_key(matchtypes, s:matchtype) @@ -2133,6 +2370,7 @@ fu! s:mmode() let matchmodes = { \ 'match': 'full-line', \ 's:matchfname': 'filename-only', + \ 's:matchbuf': 'full-line', \ 's:matchtabs': 'first-non-tab', \ 's:matchtabe': 'until-last-tab', \ } @@ -2193,7 +2431,7 @@ fu! s:getextvar(key) let vars = g:ctrlp_ext_vars[s:itemtype - 3] retu has_key(vars, a:key) ? vars[a:key] : -1 en - retu -1 + retu get(g:, 'ctrlp_' . s:matchtype . '_' . a:key, -1) endf fu! ctrlp#getcline() @@ -2206,6 +2444,10 @@ fu! ctrlp#getmarkedlist() retu exists('s:marked') ? values(s:marked) : [] endf +fu! ctrlp#clearmarkedlist() + let s:marked = {} +endf + fu! ctrlp#exit() cal s:PrtExit() endf @@ -2247,6 +2489,24 @@ fu! ctrlp#setlines(...) let g:ctrlp_lines = eval(types[s:itemtype]) endf +" Returns [lname, sname] +fu! s:CurTypeName() + if s:itemtype < 3 + return s:coretypes[s:itemtype] + else + return [s:getextvar("lname"), s:getextvar('sname')] + endif +endfu + +fu! s:ExitIfSingleCandidate() + if len(s:Update(s:prompt[0])) == 1 + call s:AcceptSelection('e') + call ctrlp#exit() + return 1 + endif + return 0 +endfu + fu! ctrlp#init(type, ...) if exists('s:init') || s:iscmdwin() | retu | en let [s:ermsg, v:errmsg] = [v:errmsg, ''] @@ -2256,11 +2516,17 @@ fu! ctrlp#init(type, ...) cal s:SetWD(a:0 ? a:1 : {}) cal s:MapNorms() cal s:MapSpecs() - cal ctrlp#syntax() cal ctrlp#setlines(s:settype(a:type)) + cal ctrlp#syntax() cal s:SetDefTxt() + let curName = s:CurTypeName() + let shouldExitSingle = index(s:opensingle, curName[0])>=0 || index(s:opensingle, curName[1])>=0 + if shouldExitSingle && s:ExitIfSingleCandidate() + return 0 + endif cal s:BuildPrompt(1) if s:keyloop | cal s:KeyLoop() | en + return 1 endf " - Autocmds {{{1 if has('autocmd') diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp/autoignore.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp/autoignore.vim new file mode 100644 index 00000000..ec2329e0 --- /dev/null +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp/autoignore.vim @@ -0,0 +1,173 @@ +" ============================================================================= +" File: autoload/ctrlp/autoignore.vim +" Description: Auto-ignore Extension +" Author: Ludovic Chabant +" ============================================================================= + + +" Global Settings {{{ + +if exists('g:ctrlp_autoignore_loaded') && g:ctrlp_autoignore_loaded + \ && !g:ctrlp_autoignore_debug + finish +endif +let g:ctrlp_autoignore_loaded = 1 + +if !exists('g:ctrlp_autoignore_debug') + let g:ctrlp_autoignore_debug = 0 +endif + +if !exists('g:ctrlp_autoignore_trace') + let g:ctrlp_autoignore_trace = 0 +endif + +" }}} + +" Initialization {{{ + +if !exists('g:ctrlp_custom_ignore') + let g:ctrlp_custom_ignore = {} +endif +let g:ctrlp_custom_ignore['func'] = 'ctrlp#autoignore#ignore' +let g:ctrlp_custom_ignore['func-init'] = 'ctrlp#autoignore#ignore_init' +let g:ctrlp_custom_ignore['func-close'] = 'ctrlp#autoignore#ignore_close' + +if !exists('g:ctrlp_root_markers') + let g:ctrlp_root_markers = [] +endif +call add(g:ctrlp_root_markers, '.ctrlpignore') + +" }}} + +" Internals {{{ + +function! s:trace(message) abort + if g:ctrlp_autoignore_trace + echom "ctrlp_autoignore: " . a:message + endif +endfunction + +let s:proj_cache = {} +let s:active_cwd = '' +let s:active_cwd_len = 0 +let s:active_patterns = [] +let s:changed_wildignore = 0 +let s:prev_wildignore = '' + +function! s:load_project_patterns(root_dir) abort + let l:ign_path = a:root_dir . '/.ctrlpignore' + if !filereadable(l:ign_path) + call s:trace("No pattern file at: " . l:ign_path) + return [] + endif + let l:cursyntax = 'regexp' + let l:knownsyntaxes = ['regexp', 'wildignore'] + let l:patterns = [] + let l:lines = readfile(l:ign_path) + for line in l:lines + " Comment line? + if match(line, '\v^\s*$') >= 0 || match(line, '\v^\s*#') >= 0 + continue + endif + " Syntax change? + let l:matches = matchlist(line, '\v^syntax:\s?(\w+)\s*$') + if len(l:matches) > 0 + let l:cursyntax = l:matches[1] + if index(l:knownsyntaxes, l:cursyntax) < 0 + echoerr "ctrlp_autoignore: Unknown syntax '".l:cursyntax."' in: ".l:ign_path + endif + continue + endif + " Patterns! + let l:matches = matchlist(line, '\v^((dir|file|link)\:)?(.*)') + let l:mtype = l:matches[2] + let l:mpat = l:matches[3] + call add(l:patterns, {'syn': l:cursyntax, 'type': l:mtype, 'pat': l:mpat}) + endfor + call s:trace("Loaded " . len(l:patterns) . " patterns from: " . l:ign_path) + return l:patterns +endfunction + +function! s:get_project_patterns(root_dir) abort + let l:ign_path = a:root_dir . '/.ctrlpignore' + let l:ign_mtime = getftime(l:ign_path) + let l:patterns = get(s:proj_cache, a:root_dir) + if type(l:patterns) == type({}) + " Check that these patterns are still valid. + if l:ign_mtime < 0 + " File got deleted! :( + let l:patterns['pats'] = [] + return l:patterns['pats'] + elseif l:ign_mtime <= l:patterns['mtime'] + " File hasn't changed! :) + return l:patterns['pats'] + endif + endif + + call s:trace("Loading patterns for project: " . a:root_dir) + let l:loaded = s:load_project_patterns(a:root_dir) + let s:proj_cache[a:root_dir] = { + \'mtime': localtime(), + \'pats': l:loaded} + return l:loaded +endfunction + +" The custom ignore function that CtrlP will be using in addition to +" normal pattern-based matching. +function! ctrlp#autoignore#ignore(item, type) abort + let l:cnv_item = tr(strpart(a:item, s:active_cwd_len), "\\", "/") + for pat in s:active_patterns + if pat['syn'] != 'regexp' + continue + endif + if pat['type'] == '' || pat['type'] == a:type + if match(l:cnv_item, pat['pat']) >= 0 + call s:trace("Ignoring ".l:cnv_item." because of ".pat['pat']) + return 1 + endif + endif + endfor + return 0 +endfunction + +function! ctrlp#autoignore#ignore_init() abort + let l:root = getcwd() + let s:active_cwd = l:root + " len+1 is for including the next separator after the root. + let s:active_cwd_len = len(l:root) + 1 + let s:active_patterns = s:get_project_patterns(l:root) + call s:trace("Got ".len(s:active_patterns)." patterns for ".l:root) + + let s:changed_wildignore = 0 + let s:prev_wildignore = &wildignore + for pat in s:active_patterns + if pat['syn'] == 'wildignore' + execute 'set wildignore+='.pat['pat'] + let s:changed_wildignore = 1 + endif + endfor + if s:changed_wildignore + call s:trace("Set wildignore to ".&wildignore) + endif +endfunction + +function! ctrlp#autoignore#ignore_close() abort + if s:changed_wildignore + execute 'set wildignore='.s:prev_wildignore + let s:prev_wildignore = '' + call s:trace("Set wildignore back to ".&wildignore) + endif +endfunction + +" List patterns for a given project's root. +function! ctrlp#autoignore#get_patterns(root_dir) abort + let l:patterns = s:get_project_patterns(a:root_dir) + for pat in l:patterns + let l:prefix = pat['type'] == '' ? '(all)' : pat['type'] + echom l:prefix . ':' . pat['pat'] + endfor +endfunction + +" }}} + +" vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2 diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp/bookmarkdir.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp/bookmarkdir.vim index 89bda895..f7fc14dc 100644 --- a/sources_non_forked/ctrlp.vim/autoload/ctrlp/bookmarkdir.vim +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp/bookmarkdir.vim @@ -112,13 +112,20 @@ fu! ctrlp#bookmarkdir#accept(mode, str) en endf -fu! ctrlp#bookmarkdir#add(dir, ...) - let str = 'Directory to bookmark: ' - let cwd = a:dir != '' ? a:dir : s:getinput(str, getcwd(), 'dir') - if cwd == '' | retu | en - let cwd = fnamemodify(cwd, ':p') - let name = a:0 && a:1 != '' ? a:1 : s:getinput('Bookmark as: ', cwd) - if name == '' | retu | en +fu! ctrlp#bookmarkdir#add(bang, dir, ...) + let ctrlp_tilde_homedir = get(g:, 'ctrlp_tilde_homedir', 0) + let cwd = fnamemodify(getcwd(), ctrlp_tilde_homedir ? ':p:~' : ':p') + let dir = fnamemodify(a:dir, ctrlp_tilde_homedir ? ':p:~' : ':p') + if a:bang == '!' + let cwd = dir != '' ? dir : cwd + let name = a:0 && a:1 != '' ? a:1 : cwd + el + let str = 'Directory to bookmark: ' + let cwd = dir != '' ? dir : s:getinput(str, cwd, 'dir') + if cwd == '' | retu | en + let name = a:0 && a:1 != '' ? a:1 : s:getinput('Bookmark as: ', cwd) + if name == '' | retu | en + en let name = tr(name, ' ', ' ') cal s:savebookmark(name, cwd) cal s:msg(name, cwd) diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp/buffertag.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp/buffertag.vim index a38cad56..7d16dc1d 100644 --- a/sources_non_forked/ctrlp.vim/autoload/ctrlp/buffertag.vim +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp/buffertag.vim @@ -43,6 +43,7 @@ let s:bins = [ \ ] let s:types = { + \ 'ant' : '%sant%sant%spt', \ 'asm' : '%sasm%sasm%sdlmt', \ 'aspperl': '%sasp%sasp%sfsv', \ 'aspvbs' : '%sasp%sasp%sfsv', @@ -52,6 +53,8 @@ let s:types = { \ 'cpp' : '%sc++%sc++%snvdtcgsuf', \ 'cs' : '%sc#%sc#%sdtncEgsipm', \ 'cobol' : '%scobol%scobol%sdfgpPs', + \ 'delphi' : '%spascal%spascal%sfp', + \ 'dosbatch': '%sdosbatch%sdosbatch%slv', \ 'eiffel' : '%seiffel%seiffel%scf', \ 'erlang' : '%serlang%serlang%sdrmf', \ 'expect' : '%stcl%stcl%scfp', @@ -62,6 +65,7 @@ let s:types = { \ 'lisp' : '%slisp%slisp%sf', \ 'lua' : '%slua%slua%sf', \ 'make' : '%smake%smake%sm', + \ 'matlab' : '%smatlab%smatlab%sf', \ 'ocaml' : '%socaml%socaml%scmMvtfCre', \ 'pascal' : '%spascal%spascal%sfp', \ 'perl' : '%sperl%sperl%sclps', @@ -69,16 +73,20 @@ let s:types = { \ 'python' : '%spython%spython%scmf', \ 'rexx' : '%srexx%srexx%ss', \ 'ruby' : '%sruby%sruby%scfFm', + \ 'rust' : '%srust%srust%sfTgsmctid', \ 'scheme' : '%sscheme%sscheme%ssf', \ 'sh' : '%ssh%ssh%sf', \ 'csh' : '%ssh%ssh%sf', \ 'zsh' : '%ssh%ssh%sf', + \ 'scala' : '%sscala%sscala%sctTmlp', \ 'slang' : '%sslang%sslang%snf', \ 'sml' : '%ssml%ssml%secsrtvf', \ 'sql' : '%ssql%ssql%scFPrstTvfp', + \ 'tex' : '%stex%stex%sipcsubPGl', \ 'tcl' : '%stcl%stcl%scfmp', \ 'vera' : '%svera%svera%scdefgmpPtTvx', \ 'verilog': '%sverilog%sverilog%smcPertwpvf', + \ 'vhdl' : '%svhdl%svhdl%sPctTrefp', \ 'vim' : '%svim%svim%savf', \ 'yacc' : '%syacc%syacc%sl', \ } @@ -130,7 +138,7 @@ fu! s:exectags(cmd) endf fu! s:exectagsonfile(fname, ftype) - let [ags, ft] = ['-f - --sort=no --excmd=pattern --fields=nKs ', a:ftype] + let [ags, ft] = ['-f - --sort=no --excmd=pattern --fields=nKs --extra= ', a:ftype] if type(s:types[ft]) == 1 let ags .= s:types[ft] let bin = s:bin @@ -151,7 +159,11 @@ fu! s:esctagscmd(bin, args, ...) let [ssl, &ssl] = [&ssl, 0] en let fname = a:0 ? shellescape(a:1) : '' - let cmd = shellescape(a:bin).' '.a:args.' '.fname + if (has('win32') || has('win64')) + let cmd = a:bin.' '.a:args.' '.fname + else + let cmd = shellescape(a:bin).' '.a:args.' '.fname + endif if &sh =~ 'cmd\.exe' let cmd = substitute(cmd, '[&()@^<>|]', '^\0', 'g') en diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp/mrufiles.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp/mrufiles.vim index a1821114..32473dad 100644 --- a/sources_non_forked/ctrlp.vim/autoload/ctrlp/mrufiles.vim +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp/mrufiles.vim @@ -6,6 +6,7 @@ " Static variables {{{1 let [s:mrbs, s:mrufs] = [[], []] +let s:mruf_map_string = '!stridx(v:val, cwd) ? strpart(v:val, idx) : v:val' fu! ctrlp#mrufiles#opts() let [pref, opts] = ['g:ctrlp_mruf_', { @@ -15,6 +16,7 @@ fu! ctrlp#mrufiles#opts() \ 'case_sensitive': ['s:cseno', 1], \ 'relative': ['s:re', 0], \ 'save_on_update': ['s:soup', 1], + \ 'map_string': ['g:ctrlp_mruf_map_string', s:mruf_map_string], \ }] for [ke, va] in items(opts) let [{va[0]}, {pref.ke}] = [pref.ke, exists(pref.ke) ? {pref.ke} : va[1]] @@ -51,7 +53,7 @@ fu! s:reformat(mrufs, ...) let cwd = tr(cwd, '\', '/') cal map(a:mrufs, 'tr(v:val, "\\", "/")') en - retu map(a:mrufs, '!stridx(v:val, cwd) ? strpart(v:val, idx) : v:val') + retu map(a:mrufs, g:ctrlp_mruf_map_string) endf fu! s:record(bufnr) @@ -66,10 +68,12 @@ fu! s:record(bufnr) endf fu! s:addtomrufs(fname) - let fn = fnamemodify(a:fname, ':p') + let fn = fnamemodify(a:fname, get(g:, 'ctrlp_tilde_homedir', 0) ? ':p:~' : ':p') let fn = exists('+ssl') ? tr(fn, '/', '\') : fn + let abs_fn = fnamemodify(fn,':p') if ( !empty({s:in}) && fn !~# {s:in} ) || ( !empty({s:ex}) && fn =~# {s:ex} ) - \ || !empty(getbufvar('^'.fn.'$', '&bt')) || !filereadable(fn) | retu + \ || !empty(getbufvar('^' . abs_fn . '$', '&bt')) || !filereadable(abs_fn) + retu en let idx = index(s:mrufs, fn, 0, !{s:cseno}) if idx @@ -143,7 +147,7 @@ fu! ctrlp#mrufiles#init() let s:locked = 0 aug CtrlPMRUF au! - au BufAdd,BufEnter,BufLeave,BufWritePost * cal s:record(expand('', 1)) + au BufWinEnter,BufWinLeave,BufWritePost * cal s:record(expand('', 1)) au QuickFixCmdPre *vimgrep* let s:locked = 1 au QuickFixCmdPost *vimgrep* let s:locked = 0 au VimLeavePre * cal s:savetofile(s:mergelists()) diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp/tag.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp/tag.vim index 626363a4..31504dcc 100644 --- a/sources_non_forked/ctrlp.vim/autoload/ctrlp/tag.vim +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp/tag.vim @@ -21,7 +21,7 @@ cal add(g:ctrlp_ext_vars, { let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars) " Utilities {{{1 -fu! s:findcount(str) +fu! s:findcount(str, tgaddr) let [tg, ofname] = split(a:str, '\t\+\ze[^\t]\+$') let tgs = taglist('^'.tg.'$') if len(tgs) < 2 @@ -48,7 +48,13 @@ fu! s:findcount(str) for tgi in ntgs let cnt += 1 if tgi["filename"] == ofname - let [fnd, pos] = [0, cnt] + if a:tgaddr != "" + if a:tgaddr == tgi["cmd"] + let [fnd, pos] = [0, cnt] + en + else + let [fnd, pos] = [0, cnt] + en en endfo retu [1, fnd, pos, len(ctgs)] @@ -92,8 +98,9 @@ endf fu! ctrlp#tag#accept(mode, str) cal ctrlp#exit() + let tgaddr = matchstr(a:str, '^[^\t]\+\t\+[^\t]\+\t\zs[^\t]\{-1,}\ze\%(;"\)\?\t') let str = matchstr(a:str, '^[^\t]\+\t\+[^\t]\+\ze\t') - let [tg, fdcnt] = [split(str, '^[^\t]\+\zs\t')[0], s:findcount(str)] + let [tg, fdcnt] = [split(str, '^[^\t]\+\zs\t')[0], s:findcount(str, tgaddr)] let cmds = { \ 't': ['tab sp', 'tab stj'], \ 'h': ['sp', 'stj'], @@ -121,6 +128,7 @@ fu! ctrlp#tag#accept(mode, str) en cal feedkeys(":".cmd." ".tg."\r".ext, 'nt') en + cal feedkeys('zvzz', 'nt') cal ctrlp#setlcdir() endf diff --git a/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx b/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx new file mode 100644 index 00000000..ac4fa3b6 --- /dev/null +++ b/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx @@ -0,0 +1,1570 @@ +*ctrlp.txt* 模糊的 文件, 缓冲区, 最近最多使用, 标签, ... 检索. v1.79 +*CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'* +=============================================================================== +# # +# :::::::: ::::::::::: ::::::::: ::: ::::::::: # +# :+: :+: :+: :+: :+: :+: :+: :+: # +# +:+ +:+ +:+ +:+ +:+ +:+ +:+ # +# +#+ +#+ +#++:++#: +#+ +#++:++#+ # +# +#+ +#+ +#+ +#+ +#+ +#+ # +# #+# #+# #+# #+# #+# #+# #+# # +# ######## ### ### ### ########## ### # +# # +=============================================================================== +名词对照(译注) + + buffer:缓冲区 mapping:按键绑定 + mru:最近最多使用 prompt:提示符面板 + tag:标签 tab:页签 + tab:制表符 + +=============================================================================== +内容 *ctrlp-content* + + 1. 介绍.............................................|ctrlp-intro| + 2. 选项.............................................|ctrlp-options| + 3. 命令.............................................|ctrlp-commands| + 4. 按键绑定.........................................|ctrlp-mappings| + 5. 输入格式.........................................|ctrlp-input-formats| + 6. 扩展.............................................|ctrlp-extensions| + +=============================================================================== +介绍 *ctrlp-intro* + +带有直观接口的全路径模糊文件, 缓冲区, 最近最多使用, 标签, ... 检索。 +使用纯净的Vimscript编写,可以运行在MacVim,gVim和版本号7.0以上的Vim中。 +全面支持Vim的正则表达式 |regexp| 作为搜索模式,内建最近最多使用文件监测, +项目根目录定位和更多特性。 + +开启可选的扩展(标记,目录,rtscript...),参考 |ctrlp-extensions| 。 + +=============================================================================== +OPTIONS *ctrlp-options* + +总览:~ + + |loaded_ctrlp|................禁用插件。 + |ctrlp_map|...................默认按键绑定。 + |ctrlp_cmd|...................默认按键绑定调用的命令。 + |ctrlp_by_filename|...........是否默认开启文件名模式。 + |ctrlp_regexp|................是否默认开启正则表达式模式。 + |ctrlp_match_window|..........匹配窗口的显示位置。 + |ctrlp_switch_buffer|.........如果文件已在缓冲区中打开,跳转到该打开的缓冲区。 + |ctrlp_reuse_window|..........重用特殊窗口(帮助、快速修复 |quickfix| ,等等)。 + |ctrlp_tabpage_position|......新标签页出现的位置。 + |ctrlp_working_path_mode|.....如何设置CtrlP的本地工作目录。 + |ctrlp_root_markers|..........额外的,高优先级的根目录标识。 + |ctrlp_use_caching|...........针对每个会话,设置是否开启缓存的。 + |ctrlp_clear_cache_on_exit|...退出Vim后是否保留缓存。 + |ctrlp_cache_dir|.............缓存目录的位置。 + |ctrlp_show_hidden|...........是否显示隐藏文件和隐藏文件夹。 + |ctrlp_custom_ignore|.........使用 |globpath()| 时自定义忽略的文件或目录。 + |ctrlp_max_files|.............扫描文件的最大数目。 + |ctrlp_max_depth|.............扫描目录的最大层数。 + |ctrlp_user_command|..........使用外部的扫描工具。 + |ctrlp_max_history|...........历史提示符面板中保留的最大条目数。 + |ctrlp_open_new_file|.........由创建的文件的打开方式。 + |ctrlp_open_multiple_files|...由选择的文件的打开方式。 + |ctrlp_arg_map|...............是否拦截 命令。 + |ctrlp_follow_symlinks|.......是否跟随链接。 + |ctrlp_lazy_update|...........停止输入时才更新。 + |ctrlp_default_input|.........为提示符面板提供一个种子。 + |ctrlp_abbrev|................输入缩写。 + |ctrlp_key_loop|..............为多字节输入开启输入事件循环。 + |ctrlp_prompt_mappings|.......改变提示符面板内部的按键绑定。 + |ctrlp_line_prefix|...........ctrlp 窗口中为每一行添加前缀。 + |ctrlp_open_single_match|.....当只有一个候选时自动接受。 + |ctrlp_brief_prompt|..........提示符为空的时候使用退出 CtrlP。 + |ctrlp_match_current_file|....在匹配条目中包含当前文件。 + + 最近最多使用模式: + |ctrlp_mruf_max|..............记录的最近最多使用的最大数据。 + |ctrlp_mruf_exclude|..........需要被排除的文件。 + |ctrlp_mruf_include|..........需要被记录的文件。 + |ctrlp_mruf_relative|.........只显示在工作目录内的最近最多使用。 + |ctrlp_tilde_homedir|.........保存 home 目录中的 MRU 的目录路径为波浪扩展的形式 ~/。 + |ctrlp_mruf_default_order|....禁用排序。 + |ctrlp_mruf_case_sensitive|...最近最多使用文件是否大小写敏感。 + |ctrlp_mruf_save_on_update|...只要有一个新的条目添加,就保存到磁盘。 + + 缓冲模式: + |ctrlp_bufname_mod|...........文件名部分修饰符。 + |ctrlp_bufpath_mod|...........文件路径部分修饰符。 + + 缓冲标签模式: (开启此模式,参考 |ctrlp-extensions| ) + |g:ctrlp_buftag_ctags_bin|....兼容的ctags二进制程序的位置。 + |g:ctrlp_buftag_systemenc|....ctags命令的编码。 + |g:ctrlp_buftag_types|........添加新的文件类型和设置命令行参数。 + + 高级选项: + |ctrlp_open_func|.............使用自定义的打开文件的函数。 + |ctrlp_status_func|...........改变CtrlP的两个状态栏 + |ctrlp_buffer_func|...........在CtrlP的缓冲区内调用自定义的函数。 + |ctrlp_match_func|............替换内建的匹配算法。 + +------------------------------------------------------------------------------- +详细描述和默认值:~ + + *'g:ctrlp_map'* +使用该选项来改变普通模式 |Normal| 下调用CtrlP的按键绑定: > + let g:ctrlp_map = '' +< + + *'g:ctrlp_cmd'* + +设置当按下上面的按键绑定时,使用的默认打开命令: > + let g:ctrlp_cmd = 'CtrlP' +< + + *'g:loaded_ctrlp'* +使用该选项完全禁用插件: > + let g:loaded_ctrlp = 1 +< + + *'g:ctrlp_by_filename'* +修改该选项为1,设置默认为按文件名搜索(否则为全路径): > + let g:ctrlp_by_filename = 0 +< +在提示符面板内可以使用 来切换。 + + *'g:ctrlp_regexp'* +修改该选项为1,设置默认为使用正则表达式匹配。: > + let g:ctrlp_regexp = 0 +< +在提示符面板内可以使用 来切换。 + + *'g:ctrlp_match_window'* +改变匹配窗口的位置,结果的排列顺序,最小和最大高度: > + let g:ctrlp_match_window = '' +< +例子: > + let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:10' +< +位置: (默认:底部) + top - 在屏幕顶部显示匹配窗口。 + bottom - 在屏幕底部显示匹配窗口。 + +结果的排列顺序: (默认: btt) + order:ttb - 从顶部到底部。 + order:btt - 从底部到顶部。 + +最小和最大高度: + min:{n} - 最少显示 {n} 行 (默认: 1). + max:{n} - 最多显示 {n} 行 (默认: 10). + +结果集的最大数目: + results:{n} - 列出最多 {n} 条结果 (默认: 和最大高度同步). + +注意: 当一个设置项没有被设置时,将会使用默认值。 + + *'g:ctrlp_switch_buffer'* +当尝试打开一个文件时,如果它已经在某个窗口被打开,CtrlP会尝试跳到那个窗口,而 +不是新打开一个实例。: > + let g:ctrlp_switch_buffer = 'Et' +< + e - 当 被按下时跳转,但是只跳转到当前页签内的窗口内。 + t - 当 被按下时跳转, 但是只跳转到其它标签的窗口内。 + v - 类似 "e", 但是当 被按下时跳转。 + h - 类似 "e", 但是当 被按下时跳转。 + E, T, V, H - 行为类似 "e", "t", "v", and "h", 但是跳转到任何地方的窗口中。 + 0 或者 - 禁用这项功能。 + + *'g:ctrlp_reuse_window'* +当使用 打开新文件时,CtrlP避免在插件,帮助,快速修复创建的窗口中打开该文 +件。使用该选项来设置一些例外: > + let g:ctrlp_reuse_window = 'netrw' +< +接受的值可以为特殊缓冲区的名字的一部分,文件类型或者缓冲区类型使用正则表达式来 +指定匹配模式。 +例子: > + let g:ctrlp_reuse_window = 'netrw\|help\|quickfix' +< + + *'g:ctrlp_tabpage_position'* +新打开页签的位置: > + let g:ctrlp_tabpage_position = 'ac' +< + a - 后面。 + b - 前面。 + c - 当前页签。 + l - 最后一个页签。 + f - 第一个页签。 + + *'g:ctrlp_working_path_mode'* +当启动时,CtrlP依据这个变量来设置它的工作目录: > + let g:ctrlp_working_path_mode = 'ra' +< + c - 当前文件所在的目录。 + a - 当前文件所在的目录,除非这个目录为当前工作目录的子目录 + r - 包含下列文件或者目录的最近的祖先目录: + .git .hg .svn .bzr _darcs + w - 用来修饰r:使用当前工作目录而不是当前文件所在目录进行查找 + 0 或者 - 禁用这项功能。 + +注意 #1: 如果 "a" 或者 "c" 和 "r"一起被包含,当无法找到根目录时使用 "a" 或者 +"c" 的行为(作为备选)。 + +注意 #2: 你可以在每个缓冲区内使用 |b:var| 来设置该选项。 + + *'g:ctrlp_root_markers'* +使用该选项来设置自定义的根目录标记作为对默认标记(.hg, .svn, .bzr, and _darcs) +的补充。自定义的标记具有优先权: > + let g:ctrlp_root_markers = [''] +< +注意: 你可以在每个缓冲区内使用 |b:var| 来设置该选项。 + + *'g:ctrlp_use_caching'* +启用/禁用每个会话的缓存: > + let g:ctrlp_use_caching = 1 +< + 0 - 禁用缓存。 + 1 - 启用缓存。 + n - 当大于1时,禁用缓存,使用该数值作为重新启用缓存的限制条件。 + +注意: 当在CtrlP中时你可以使用 来快速的清除缓存。 + + *'g:ctrlp_clear_cache_on_exit'* +设置该选项为0通过退出Vim时不删除缓存文件来启用跨会话的缓存: > + let g:ctrlp_clear_cache_on_exit = 1 +< + + *'g:ctrlp_cache_dir'* +设置存储缓存文件的目录: > + let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp' +< + + *'g:ctrlp_show_hidden'* +如果你想CtrlP扫描隐藏文件和目录,设置该选项为1: > + let g:ctrlp_show_hidden = 0 +< +注意: 当命令使用 |g:ctrlp_user_command| 定义时该选项无效。 + + *'ctrlp-wildignore'* +你可以使用Vim的 |'wildignore'| 来从结果集中排序文件或目录。 +例子: > + " 排除版本控制文件 + set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX + set wildignore+=*\\.git\\*,*\\.hg\\*,*\\.svn\\* " Windows ('noshellslash') +< +注意 #1: 每个目录设置前的字符 `*/` 是必须的。 + +注意 #2: |wildignore| 影响 |expand()| , |globpath()| 和 |glob()| 的结果,这些函数被很 +多插件用来在系统中执行查找。(例如和版本控制系统有关的插件在查找.git/、.hg/等, +一些其他插件用来在Windows上查找外部的*.exe工具),所以要修改 |wildignore| 时请先 +考虑清楚。 + + *'g:ctrlp_custom_ignore'* +作为对 |'wildignore'| 的补充,用来设置你只是想在CtrlP中隐藏的文件和目录。使用正 +则表达式来指定匹配模式: > + let g:ctrlp_custom_ignore = '' +< +例子: > + let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$' + let g:ctrlp_custom_ignore = { + \ 'dir': '\v[\/]\.(git|hg|svn)$', + \ 'file': '\v\.(exe|so|dll)$', + \ 'link': 'SOME_BAD_SYMBOLIC_LINKS', + \ } + let g:ctrlp_custom_ignore = { + \ 'file': '\v(\.cpp|\.h|\.hh|\.cxx)@ + let g:ctrlp_max_files = 10000 +< +注意: 当命令使用 |g:ctrlp_user_command| 定义时该选项无效。 + + *'g:ctrlp_max_depth'* +目录树递归的最大层数: > + let g:ctrlp_max_depth = 40 +< +注意: 当命令使用 |g:ctrlp_user_command| 定义时该选项无效。 + + *'g:ctrlp_user_command'* +指定用来代替Vim的 |globpath()| 的外部工具来列出文件,使用 %s 代表目标目录: > + let g:ctrlp_user_command = '' +< +例子: > + let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux + let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows +< +你也可以使用 'grep', 'findstr' 或者其它东西来过滤结果集。 +例子: > + let g:ctrlp_user_command = + \ 'find %s -type f | grep -v -P "\.jpg$|/tmp/"' " MacOSX/Linux + let g:ctrlp_user_command = + \ 'dir %s /-n /b /s /a-d | findstr /v /l ".jpg \\tmp\\"' " Windows +< +在扫描一个大型项目时,在仓库目录中使用版本控制系统的列出命令会加快扫描速度: > + let g:ctrlp_user_command = [root_marker, listing_command, fallback_command] + let g:ctrlp_user_command = { + \ 'types': { + \ 1: [root_marker_1, listing_command_1], + \ n: [root_marker_n, listing_command_n], + \ }, + \ 'fallback': fallback_command, + \ 'ignore': 0 or 1 + \ } +< +一些例子: > + " 单个版本控制系统,列出命令不会列出没有被追踪的文件: + let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files'] + let g:ctrlp_user_command = ['.hg', 'hg --cwd %s locate -I .'] + + " 多个版本控制系统: + let g:ctrlp_user_command = { + \ 'types': { + \ 1: ['.git', 'cd %s && git ls-files'], + \ 2: ['.hg', 'hg --cwd %s locate -I .'], + \ }, + \ 'fallback': 'find %s -type f' + \ } + + " 单个版本控制系统,列出命令列出没有被追踪的文件(较慢): + let g:ctrlp_user_command = + \ ['.git', 'cd %s && git ls-files -co --exclude-standard'] + + let g:ctrlp_user_command = + \ ['.hg', 'hg --cwd %s status -numac -I . $(hg root)'] " MacOSX/Linux + + let g:ctrlp_user_command = ['.hg', 'for /f "tokens=1" %%a in (''hg root'') ' + \ . 'do hg --cwd %s status -numac -I . %%a'] " Windows +< +注意 #1: 在 |Dictionary| 格式, 'fallback' 和 'ignore' 是可选的,在 |List| 格式, +备选命令是可选的。 + +注意 #2: 如果备选命令是空的或者属性 'fallback' 没有定义,当扫描仓库之外目录时, +|globpath()| 会被使用。 + +注意 #3: 除非使用了 |Dictionary| 格式并且 'ignore' 被定义并且设置为1,当这些自 +定义的命令被使用时 |wildignore| 和 |g:ctrlp_custom_ignore| 选项不会生效。没有出现 +时,'ignore' 被默认设置为0来保留使用外部命令的性能优势。 + +注意 #4: 当改变了选项的变量类型时,记得先 |:unlet| ,或者重启Vim来避免这个错误: +"E706: Variable type mismatch" 。 + +注意 #5: 你可以在每个缓冲区内使用 |b:var| 来设置该选项。 + + *'g:ctrlp_max_history'* +你希望CtrlP记录的用户输入历史的最大数目。默认值是Vim的全局选项 |'history'| : > + let g:ctrlp_max_history = &history +< +设置为0来禁用提示符面板的历史。使用 来浏览历史。 + + *'g:ctrlp_open_new_file'* +使用该选项指定当使用 打开新建的文件时,文件的打开方式: > + let g:ctrlp_open_new_file = 'v' +< + t - 在新页签中。 + h - 在新的水平分割窗口。 + v - 在新的竖直分割窗口。 + r - 在当前窗口。 + + *'g:ctrlp_open_multiple_files'* +如果非0, 会启用使用 打开多个文件: > + let g:ctrlp_open_multiple_files = 'v' +< +例子: > + let g:ctrlp_open_multiple_files = '2vjr' +< +对于数字: + - 如果指定,会被用来作为打开文件时创建的窗口或者页签的最大数量(剩余的会在隐 + 藏的缓冲区中打开)。 + - 如果没有指定, 会打开所有文件,每个在一个新的窗口或者页签中。 + +对于字母: + t - 每个文件在一个新页签中。 + h - 每个文件在一个新的水平分割窗口中。 + v - 每个文件在一个新的竖直分割窗口中。 + i - 所有的文件在隐藏的缓冲区中。 + j - 打开以后,跳转到第一个打开的页签或者窗口。 + r - 在当前窗口打开第一个文件,其他文件根据同时出现的"h","v"和"t"中的一个, + 在新的分割窗口或者页签中打开。 + + *'g:ctrlp_arg_map'* +当设置为1时, 会接收一个额外的键值作为参数,来覆盖默认行为: > + let g:ctrlp_arg_map = 0 +< +按下 或者 会提示一次按键。按键可以是: + t - 在新标签页中打开。 + h - 每个文件在一个新的水平分割窗口中。 + v - 每个文件在一个新的竖直分割窗口中。 + i - 所有的文件在隐藏的缓冲区中(只有 生效)。 + c - 清楚标记的文件(只有 生效)。 + r - 在当前窗口中打开(只有 生效)。 + , , - 取消并且回到提示符面板。 + - 使用 |g:ctrlp_open_new_file| 和 |g:ctrlp_open_multiple_files| 指定的默 + 认行为。 + + + *'g:ctrlp_follow_symlinks'* +如果非0,当列出文件时CtrlP会跟随链接: > + let g:ctrlp_follow_symlinks = 0 +< + 0 - 不要跟随链接。 + 1 - 跟随但是忽略内部循环的链接,避免重复。 + 2 - 无差别的跟随所有链接。 + +注意: 当命令使用 |g:ctrlp_user_command| 定义时该选项无效。 + + *'g:ctrlp_lazy_update'* +设置为1将开启延迟更新特性:只在输入停止一个确定的时间后才更新匹配窗口: > + let g:ctrlp_lazy_update = 0 +< +如果设置为1,在250毫秒后更新。如果大于1,数字会被作为延迟时间使用。 + + *'g:ctrlp_default_input'* +设置为1将为提示符面板提供当前文件的相对路径作为种子: > + let g:ctrlp_default_input = 0 +< +如果不指定1或0,如果选项的值是字符串,会被用来作为默认输入: > + let g:ctrlp_default_input = 'anystring' +< +这个选项可以和 |g:ctrlp_open_single_match| 配合使用。 + + + *'g:ctrlp_match_current_file'* +在匹配条目中包含当前文件: + let g:ctrlp_match_current_file = 1 + +默认情况下,当前文件不包含在列表中。 + +注意: 当使用 |g:ctrlp_match_func| 时不会应用这个选项。 + + + *'g:ctrlp_abbrev'* +定义可以在提示面包内被扩展(内部的或者可见的)的输入缩写: > + let g:ctrlp_abbrev = {} +< +例子: > + let g:ctrlp_abbrev = { + \ 'gmode': 'i', + \ 'abbrevs': [ + \ { + \ 'pattern': '^cd b', + \ 'expanded': '@cd ~/.vim/bundle', + \ 'mode': 'pfrz', + \ }, + \ { + \ 'pattern': '\(^@.\+\|\\\@ 创建新文件时(使用扩展后的字符串作为文件名)。 + c - 当使用 自动补全目录名时(在自动补全之前立即扩展模式)。 + 或者未定义 - 总是启用。 + +注意: 缩写条目按顺序求值,后求值的条目会覆盖先求值的条目;当 'gmode' 为"t"时, +包括他自己。 + + *'g:ctrlp_key_loop'* +一个实验性的特性。设置该选项为1将为多字节字符开启输入事件循环: > + let g:ctrlp_key_loop = 0 +< +注意 #1: 当设置时,该选项会重置 |g:ctrlp_lazy_update| 选项。 + +注意 #2: 你可以在提示符面板使用自定义的按键绑定切换这个特性: > + let g:ctrlp_prompt_mappings = { 'ToggleKeyLoop()': [''] } +< + + *'g:ctrlp_prompt_mappings'* +使用该选项来自定义CtrlP的提示窗口内的按键绑定为你喜欢的方式。你只需要保留你改 +变值(在[]内部)的行: > + let g:ctrlp_prompt_mappings = { + \ 'PrtBS()': ['', ''], + \ 'PrtDelete()': [''], + \ 'PrtDeleteWord()': [''], + \ 'PrtClear()': [''], + \ 'PrtSelectMove("j")': ['', ''], + \ 'PrtSelectMove("k")': ['', ''], + \ 'PrtSelectMove("t")': ['', ''], + \ 'PrtSelectMove("b")': ['', ''], + \ 'PrtSelectMove("u")': ['', ''], + \ 'PrtSelectMove("d")': ['', ''], + \ 'PrtHistory(-1)': [''], + \ 'PrtHistory(1)': [''], + \ 'AcceptSelection("e")': ['', '<2-LeftMouse>'], + \ 'AcceptSelection("h")': ['', '', ''], + \ 'AcceptSelection("t")': [''], + \ 'AcceptSelection("v")': ['', ''], + \ 'ToggleFocus()': [''], + \ 'ToggleRegex()': [''], + \ 'ToggleByFname()': [''], + \ 'ToggleType(1)': ['', ''], + \ 'ToggleType(-1)': ['', ''], + \ 'PrtExpandDir()': [''], + \ 'PrtInsert("c")': ['', ''], + \ 'PrtInsert()': [''], + \ 'PrtCurStart()': [''], + \ 'PrtCurEnd()': [''], + \ 'PrtCurLeft()': ['', '', ''], + \ 'PrtCurRight()': ['', ''], + \ 'PrtClearCache()': [''], + \ 'PrtDeleteEnt()': [''], + \ 'CreateNewFile()': [''], + \ 'MarkToOpen()': [''], + \ 'OpenMulti()': [''], + \ 'PrtExit()': ['', '', ''], + \ } +< +注意: 如果按 后光标向左移动一个字符而不是删除一个字符,在你的.vimrc中添加 +下面的设置来禁用插件默认的 绑定: > + let g:ctrlp_prompt_mappings = { 'PrtCurLeft()': ['', ''] } +< + + *'g:ctrlp_line_prefix'* +这个前缀会被加到ctrlp的条目列表中每一行的前面。 +默认值: > + let g:ctrlp_line_prefix = '> ' +< + + *'g:ctrlp_open_single_match'* +当CtrlP处于列表中配置的模式中时,如果只有一个候选条目,CtrlP会直接接受该条目。 +例子: > + let g:ctrlp_open_single_match = ['buffer tags', 'buffer'] +< +目前这个选项的作用是和 |g:ctrlp_default_input| 一起,使用类似下面的函数,在使用 +前设置,使用完后还原: > + fu! tagsUnderCursor() + try + let default_input_save = get(g:, 'ctrlp_default_input', '') + let g:ctrlp_default_input = expand('') + CtrlPBufTagAll + finally + if exists('default_input_save') + let g:ctrlp_default_input = default_input_save + endif + endtry + endfu +> +< +---------------------------------------- +MRU mode options:~ + + *'g:ctrlp_mruf_max'* +指定你希望CtrlP记录的最近打开的文件历史的数目: > + let g:ctrlp_mruf_max = 250 +< + + *'g:ctrlp_mruf_exclude'* +你不希望CtrlP记录的文件。使用正则表达式来指定模式: > + let g:ctrlp_mruf_exclude = '' +< +例子: > + let g:ctrlp_mruf_exclude = '/tmp/.*\|/temp/.*' " MacOSX/Linux + let g:ctrlp_mruf_exclude = '^C:\\dev\\tmp\\.*' " Windows +< + + *'g:ctrlp_mruf_include'* +如果你想让CtrlP只记录某些文件,在这里指定: > + let g:ctrlp_mruf_include = '' +< +例子: > + let g:ctrlp_mruf_include = '\.py$\|\.rb$' +< + *'g:ctrlp_tilde_homedir'* +将这个选项设置为1来把所有的 MRU 文件路径中 $HOME 目录下的 $HOME/$filepath 保存 +为 ~/$filepath ,而不是 $HOME/$filepath : > + let g:ctrlp_tilde_homedir = 0 +< +注意: 对所有通过 :CtrlPBookmarkDirAdd! 保存的也有效 + + *'g:ctrlp_mruf_relative'* +设置该选项为1将只显示在当前工作目录内的最近最多使用文件: > + let g:ctrlp_mruf_relative = 0 +< +注意: 你可以在提示符面板使用自定义的按键绑定切换这个特性: > + let g:ctrlp_prompt_mappings = { 'ToggleMRURelative()': [''] } +< + + *'g:ctrlp_mruf_default_order'* +设置该选项为1将在最近最多使用模式搜索时禁用排序: > + let g:ctrlp_mruf_default_order = 0 +< + + *'g:ctrlp_mruf_case_sensitive'* +将该选项和你的文件系统大小写敏感性保持一致来避免重复的最近最多使用条目: > + let g:ctrlp_mruf_case_sensitive = 1 +< + + *'g:ctrlp_mruf_save_on_update'* +设置该选项为 0 禁止 CtrlP 每当有一个新条目增加就把最近最多使用列表保存到磁盘 +文件,而是在退出Vim时才保存: > + let g:ctrlp_mruf_save_on_update = 1 +< + *'g:ctrlp_bufname_mod'* +根据修饰符修改文件名部分。参见 |filename-modifiers| 。 > + let g:ctrlp_bufname_mod = ':t' +< + *'g:ctrlp_bufpath_mod'* +根据修饰符修改文件路径部分。参见 |filename-modifiers| 。 > + let g:ctrlp_bufpath_mod = ':~:.:h' +< +---------------------------------------- +高级选项:~ + + *'g:ctrlp_open_func'* +使用一个自定义函数来打开选定的文件: > + let g:ctrlp_open_func = {} +< +例子: > + let g:ctrlp_open_func = { + \ 'files' : 'Function_Name_1', + \ 'buffers' : 'Function_Name_2', + \ 'mru files' : 'Function_Name_3', + \ } +< +函数结构: > + function! Function_Name(action, line) + " 参数: + " | + " +- a:action : 打开的动作: + " | + 'e' : 用户按下 (默认) + " | + 'h' : 用户按下 (默认) + " | + 'v' : 用户按下 (默认) + " | + 't' : 用户按下 (默认) + " | + 'x' : 用户使用 终端对话框 (默认) 选择"e[x]ternal"。 + " | + " +- a:line : 选择的文件。 + + endfunction +< +注意: 当使用打开多个文件时无效。 + +例子: 当 被按下时在默认浏览器中打开HTML文件,否则在Vim中打开 > + function! HTMLOpenFunc(action, line) + if a:action =~ '^[tx]$' && fnamemodify(a:line, ':e') =~? '^html\?$' + + " 获取文件名 + let filename = fnameescape(fnamemodify(a:line, ':p')) + + " 关闭CtrlP + call ctrlp#exit() + + " 打开文件 + silent! execute '!xdg-open' filename + + elseif a:action == 'x' && fnamemodify(a:line, ':e') !~? '^html\?$' + + " 不是HTML文件,再次模拟 按键并且等待新的输入 + call feedkeys("\") + + else + + " 使用CtrlP的默认的打开文件的函数 + call call('ctrlp#acceptfile', [a:action, a:line]) + + endif + endfunction + + let g:ctrlp_open_func = { 'files': 'HTMLOpenFunc' } +< + + *'g:ctrlp_status_func'* +为CtrlP窗口使用自定义的状态栏: > + let g:ctrlp_status_func = {} +< +例子: > + let g:ctrlp_status_func = { + \ 'main': 'Function_Name_1', + \ 'prog': 'Function_Name_2', + \ } +< +函数结构: > + " 主状态栏 + function! Function_Name_1(focus, byfname, regex, prev, item, next, marked) + " 参数: + " | + " +- a:focus : 提示符面板的焦点: "prt" 或者 "win"。 + " | + " +- a:byfname : 在文件名模式还是全路径模式: "file" 或者 "path"。 + " | + " +- a:regex : 是否在正则表达式模式: 1 or 0。 + " | + " +- a:prev : 前一个搜索模式。 + " | + " +- a:item : 当前的搜索模式。 + " | + " +- a:next : 下一个搜索模式。 + " | + " +- a:marked : 被标记文件的数目,或者一个逗号分隔的被标记的文件名列表。 + + return full_statusline + endfunction + + " 状态栏进度条 + function! Function_Name_2(str) + " a:str : 一个当前已扫描的文件数,或者一个当前扫描目录和用户命令的字符串。 + + return full_statusline + endfunction +< +一个可用的例子,参见 https://gist.github.com/1610859 。 + + *'g:ctrlp_buffer_func'* +指定一个会在启动或者退出CtrlP缓冲区时被调用的函数: > + let g:ctrlp_buffer_func = {} +< +例子: > + let g:ctrlp_buffer_func = { + \ 'enter': 'Function_Name_1', + \ 'exit': 'Function_Name_2', + \ } +< + + *'g:ctrlp_match_func'* +为CtrlP设置一个额外的模糊匹配函数: > + let g:ctrlp_match_func = {} +< +例子: > + let g:ctrlp_match_func = { 'match': 'Function_Name' } +< +函数结构: > + function! Function_Name(items, str, limit, mmode, ispath, crfile, regex) + " 参数: + " | + " +- a:items : 搜索条目的全列表。 + " | + " +- a:str : 用户输入的字符串。 + " | + " +- a:limit : 匹配窗口的最大高度。可以用来限制返回的条目数量。 + " | + " +- a:mmode : 在匹配模式。可以是下列字符串之一: + " | + "full-line": 匹配整行。 + " | + "filename-only": 只匹配文件名。 + " | + "first-non-tab": 匹配到第一个制表符。 + " | + "until-last-tab": 匹配到最后一个制表符。 + " | + " +- a:ispath : 搜索文件,缓冲区,最近最多使用,混合,目录和rtscript模. + " | 式时为1。其它为0。 + " | + " +- a:crfile : 当前窗口中的文件。当a:ispath为1时应该被搜索结果排除在外 + " | + " +- a:regex : 是否在正则表达式模式: 1 or 0. + + return list_of_matched_items + endfunction +< + +注意: 你可以通过 { 'arg_type': 'dict' } 扩展上面的任何选项,这样就可以通过 +一个字典类型的参数来传递所有的函数参数。使用参数名作为字典的键值。 + +例子: > + let g:ctrlp_status_func = { + \ 'arg_type' : 'dict', + \ 'enter': 'Function_Name_1', + \ 'exit': 'Function_Name_2', + \ } + + function! Function_Name_1(dict) + " where dict == { + " \ 'focus': value, + " \ 'byfname': value, + " \ 'regex': value, + " \ ... + " } + endfunction +< + *'g:ctrlp_brief_prompt'* +当设置为 1 时, 提示符后为空时按 会退出 CtrlP 。 + + *ctrlp-default-value* +另外,你可以使用下面的方式来改变默认值。 +例子: > + let g:ctrlp_path_nolim = 1 + +这样可以让无限制模式匹配“路径”类型。 +=============================================================================== +命令 *ctrlp-commands* + + *:CtrlP* +:CtrlP [起始目录] + 用文件搜索模式打开CtrlP。 + + 如果没有给定参数,|g:ctrlp_working_path_mode| 会被用来决定起始目录。 + + 在输入时你可以使用 自动补全[起始目录]。 + + *:CtrlPBuffer* +:CtrlPBuffer + 用缓冲区搜索模式打开CtrlP。 + + *:CtrlPMRU* +:CtrlPMRU + 用最近最多使用模式打开CtrlP。 + + *:CtrlPLastMode* +:CtrlPLastMode [--dir] + 用上一次使用的模式打开CtrlP。当提供了"--dir"参数,也重用上一次的工作目录。 + + *:CtrlPRoot* +:CtrlPRoot + 行为类似使用了 |g:ctrlp_working_path_mode| = 'r' 并且忽略了该变量的当前值的 + |:CtrlP| 命令。 + + *:CtrlPClearCache* +:CtrlPClearCache + 清除当前工作目录的缓存。和在CtrlP内按 效果一样。 + 使用 |g:ctrlp_use_caching| 来启用或禁用缓存。 + + *:CtrlPClearAllCaches* +:CtrlPClearAllCaches + 删除在 |g:ctrlp_cache_dir| 中定义的缓存目录中的所有缓存文件。 + +------------------------------------------------------------------------------- +由扩展提供的命令参见 |ctrlp-extensions| 。 + +=============================================================================== +按键绑定 *ctrlp-mappings* + + *'ctrlp-'* + + 普通模式 |Normal| 下默认以文件搜索模式打开CtrlP提示符面板。 + +---------------------------------------- +已经在提示符面板中:~ + + + 在全路径搜索和文件名搜索间切换。 + 注意: 在文件名搜索模式,提示符面板的提示符是'>d>',而不是'>>>' + + *'ctrlp-fullregexp'* + 在字符串搜索模式和正则表达式模式之间切换。 + 注意: 在全正则表达式模式,提示符面板的提示符是'r>>',而不是'>>>' + + 详细参见: |input-formats| (指引)和 |g:ctrlp_regexp_search| 选项。 + + , 'forward' 前进 + + 切换到序列里面的 'next' 后一个搜索模式。 + + , 'backward' 后退 + + 切换到序列里面的 'previous' 前一个搜索模式。 + + *'ctrlp-autocompletion'* + 自动补全在提示符面板的当前工作路径中的目录名。 + + + 在匹配窗口和提示符面板之间切换焦点。 + + , + + 退出CtrlP。 + +移动:~ + + , + + 向下移动。 + + , + + 向上移动。 + + + 移动光标到提示符面板的 'start' 开头。 + + + 移动光标到提示符面板的 'end' 末尾。 + + , + , + + 向左 'left' 移动一个字符。 + + , + + 向右 'right' 移动一个字符。 + +编辑:~ + + , + + 删除前一个字符。 + + + 删除当前字符。 + + + 删除前一个单词。 + + + 清除输入。 + +浏览输入历史:~ + + + 提示符面板历史里的下一个字符串。 + + + 提示符面板历史里的上一个字符串。 + +打开/创建文件:~ + + + 如果可能的话在 'current' 当前窗口打开选择的文件。 + + + 在 'tab' 新标签打开选择的文件。 + Open the selected file in a new 'tab'. + + + 在 'vertical' 竖直分割窗口打开选择的文件。 + + , + , + + 在 'horizontal' 水平分割窗口打开选择的文件。 + + + 创建一个新文件和它的父目录。 + +打开多个文件:~ + + + - 标记/取消标记一个被 打开的文件。 + - 标记/取消标记一个被 在它的目录被创建的文件。 + + + - 打开被 标记的文件。 + - 当没有文件被 标记时,使用下列选项打开一个终端对话框: + + 打开被选择的文件: + t - 在新标签页中打开。 + v - 在一个竖直分割窗口中。 + h - 在一个水平分割窗口中。 + r - 在当前窗口中打开。 + i - 在隐藏的缓冲区中。 + x - (可选的)使用 |g:ctrlp_open_func| 中定义的函数。 + + 其它选项 (未显示): + a - 标记匹配窗口中的所有文件。 + d - 改变CtrlP的工作目录到被选择的文件的目录并切换到文件搜索模式。 + +功能按键绑定:~ + + + - 刷新匹配窗口并且清除当前目录的缓存。 + - 从最近最多使用中移除被删除的文件。 + + + 最近最多使用模式: + - 清除最近最多使用列表。 + - 删除被 标记的最近最多使用条目。 + 缓冲区模式: + - 删除光标下的条目或者删除被 标记的多个条目。 + +粘贴:~ + + , *'ctrlp-pasting'* + + 将剪贴板中的文本粘贴到提示符窗口中。 + + + 打开一个终端对话框来粘贴 ,搜索寄存器的文本,上一次可视 + 化模式的选择,剪贴板或者任何寄存器到提示符面板中。 + +使用 |g:ctrlp_prompt_mappings| 选择你自己的绑定。 + +---------------------------------------- +当焦点在匹配窗口中时(使用 来切换):~ + + a-z + 0-9 + ~^-=;`',.+!@#$%&_(){}[] + 在匹配第一个字符的行中循环。 + +=============================================================================== +输入格式 *ctrlp-input-formats* + +提示符面板的输入格式:~ + +a) 字符串。 + + 例如: 'abc' 被内部理解为 'a[^a]\{-}b[^b]\{-}c' + +b) 在正则表达式模式,输入字符串被按照Vim的正则表达式模式 |pattern| 来对待,不 + 进行任何修改。 + + 例如: 'abc\d*efg' 会被解读为 'abc\d*efg'。 + + 如何启用正则表达式模式参见 |ctrlp-fullregexp| (按键绑定)和 + |g:ctrlp_regexp_search| (选项)。 + +c) 字符串末尾使用一个冒号':'跟随一个Vim命令来在打开那个文件后执行该命令。如果 + 你需要使用':'的字面意思,使用反斜杠转义'\:'。但打开多个文件时,命令会在每 + 个打开文件上执行。 + + 例如: 使用':45'跳转到第45行。 + + 使用':/any\:string'跳转到'any:string'第一次出现的地方。 + + 使用':+setf\ myfiletype|50'来设置文件类型为 'myfiletype',然后跳转 + 到第50行。 + + 使用':diffthis'当打开多个文件时在前四个文件上调用 |:diffthis| 。 + + 参见: Vim的 |++opt| 和 |+cmd|. + +d) 提交两个点号 '..' 来进入上级目录。如果想进入向上多级目录,每多一级使用一个 + 额外的点号: +> + 输入 解释为 + .. ../ + ... ../../ + .... ../../../ +< + 注意: 如果父目录很大并且没有被缓存,可能会很慢。 + + 你可以使用'@cd path/'来改变CtrlP的工作目录为path/。使用'@cd %:h'来改变为当 + 前文件的目录。 + +e) 类似的,提交'/'或者'\'来查找或者跳转到项目的根目录。 + + 如果项目很大,使用版本控制系统的列出命令来寻找文件可能会加速初始化扫描。( + 更多细节参见 |g:ctrlp_user_command| )。 + + 注意: d) 和 e) 只在文件,目录和混合模式生效。 + +f) 输入一个不存在的文件名并且按下 来创建文件。如果使用 标记了一个 + 文件,将会在被标记的文件的目录下创建这个新文件。 + + 例如: 使用 'newdir/newfile.txt' 会创建一个名为'newdir'的目录和一个名为 + 'newfile.txt'的文件。 + + 如果一个条目'some/old/dirs/oldfile.txt'被 标记,然后 'newdir' + 和'newfile.txt'会在'some/old/dirs'下被创建。最终的路径会像下面这样 + 'some/old/dirs/newdir/newfile.txt'. + + 注意: 在Windows下使用 '\' 代替 '/' (如果 |'shellslash'| 选项没有设置)。 + +g) 在文件名模式(使用 切换)下,你可以使用被逗号分隔的一个主要的模式和 + 一个改善的模式。两个模式在正则表达式模式下像(a)或(b)那样工作。 + +h) 使用?打开帮助文件。 + +=============================================================================== +扩展 *ctrlp-extensions* + +扩展是可选的。把它的名字添加到变量g:ctrlp_extensions中来开启扩展: > + let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript', + \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir'] +< +扩展的名字在变量中出现的顺序会是在使用命令 切换时扩展在状态栏中出 +现的顺序。 + +可用的扩展:~ + + *:CtrlPTag* + * 标记模式:~ + - 名称: 'tag' + - 命令: ":CtrlPTag" + - 在一个生成的标记文件中搜索标签,跳转到标签定义。使用Vim的 |'tags'| 来指定 + 标签文件的位置和名称。 + 例如: set tags+=doc/tags + + *:CtrlPBufTag* + *:CtrlPBufTagAll* + * 缓冲区标签模式:~ + - 名称: 'buffertag' + - 命令: ":CtrlPBufTag [缓冲区]", + ":CtrlPBufTagAll"。 + - 在当前缓冲区或者所有列出的缓冲区中搜索标签并且跳转到定义。需要 + |exuberant_ctags| 或者兼容的程序。 + + *:CtrlPQuickfix* + * 快速修复模式:~ + - 名称: 'quickfix' + - 命令: ":CtrlPQuickfix" + - 在当前的快速修复错误列表中搜索条目并且跳转过去。 + + *:CtrlPDir* + * 目录模式:~ + - 名称: 'dir' + - 命令: ":CtrlPDir [起始muu]" + - 搜索目录并且将其作为工作目录。 + - 按键绑定: + + 为CtrlP修改工作目录并且保持打开状态。 + + 修改全局的工作目录(退出)。 + + 为当前窗口修改工作目录(退出)。 + + 修改全局工作目录为CtrlP的当前工作目录(退出)。 + + *:CtrlPRTS* + * 运行时脚本模式:~ + - 名称: 'rtscript' + - 命令: ":CtrlPRTS" + - 在运行时路径中寻找文件(vimscripts, docs, snippets...)。 + + *:CtrlPUndo* + * 撤销模式:~ + - 名称: 'undo' + - 命令: ":CtrlPUndo" + - 浏览撤销历史。 + + *:CtrlPLine* + * 行模式:~ + - 名称: 'line' + - 命令: ":CtrlPLine [缓冲区]" + - 在所有列出的缓冲区或者在指定的 [buffer] 缓冲区内搜索一行内容。 + + *:CtrlPChange* + *:CtrlPChangeAll* + * 修改列表模式:~ + - 名称: 'changes' + - 命令: ":CtrlPChange [缓冲区]", + ":CtrlPChangeAll". + - 在当前缓冲区或者在所有列出的缓冲区内搜索最近的修改并跳转。 + + *:CtrlPMixed* + * 混合模式:~ + - 名称: 'mixed' + - 命令: ":CtrlPMixed" + - 同时在文件,缓冲区和最近最多修改中搜索。 + + *:CtrlPBookmarkDir* + *:CtrlPBookmarkDirAdd* + * 书签目录模式:~ + - 名称: 'bookmarkdir' + - 命令: ":CtrlPBookmarkDir", + ":CtrlPBookmarkDirAdd [目录] [标题]". + ":CtrlPBookmarkDirAdd! [目录] [标题]". + - 搜索一个被书签标记的目录并将其作为工作目录。 + - 以指定的[标题]添加[目录]到 CtrlPBookmarkDir 中,如果没有给出[标题]或 + 者[目录],会请求用户输入。 + - 以指定的[标题]添加[目录]到 CtrlPBookmarkDir 中,如果没有给出目录,则 + 默认为当前目录( [CWD] ),如果没有给出[标题] ,会请求用户输入。 + + 最新的用来添加所有最近使用过的目录到 CtrlPBookmarkDir 列表中的自动命令 + 如下 + > + augroup CtrlPDirMRU + autocmd! + autocmd FileType * if &modifiable | execute 'silent CtrlPBookmarkDirAdd! %:p:h' | endif + augroup END +< + + - 按键绑定: + + 为CtrlP修改工作目录并且保持打开状态,并且切换到文件搜索模式。 + + 修改全局的工作目录(退出)。 + + 为当前窗口修改工作目录(退出)。 + + + - 清除书签列表。 + - 删除被 标记的书签条目。 + + *ctrlp-autoignore-extension* + * 自动忽略模式:~ + - 名称: 'autoignore' + + - 这个扩展并不会添加新命令。它支持通过项目根目录中的 `.ctrlpignore` 文件为 + 每个项目设置忽略模式 (就像属于单个项目的 |ctrlp_custom_ignore|)。基本 + 上就像 CtrlP 的 `.gitignore` 或者 `.hgignore`。 + + 注意: 当使用 |g:ctrlp_user_command| 自动忽略模式不起作用。 + + 注意: `.ctrlpignore` 会被当做根目录的标识(参见 |g:ctrlp_root_markers|). + + - 忽略文件的语法: + 空行,以 `#` (注释)开头的行会被忽略。 + + 其他行会被当做正则表达式。 匹配模式如何被使用参见 *string-match* 。 + 任意条目,只要匹配到任意匹配模式,就会从 CtrlP 中搜索结果中忽略。 + + 例子: + + \.tmp$ + ^generated/ + local\.cfg + + 注意: 即使在 Windows 上模式也应该使用反斜线。 + + 你也可以像下面那样使用 glob 命令风格的语法: + + syntax:wildignore + *.tar.gz + *.tmp + + 这样会在搜索文件时临时的把每一个匹配模式添加到 |'wildignore'| + 中,结束时移除。 + + 你也可以通过下面的方式切换回默认的正则表达式为基础的模式: + + syntax:regexp + + 你也可以只为某一条目类型(文件、目录...)设置匹配模式: + + dir:build + file:foo\.txt + + 这样只会忽略包含 "build" 的目录和包含 "foo.txt" 的文件。不会忽略带 + 有 "build" 的文件或者反过来。 + + 注意: 如果为了忽略名为 "build" 的目录,而不是『任何』包含 "build" + 的目录,你可以使用下面的正则: ^build$ + + - 常见问题: + 问: 为什么 CtrlP 不能直接支持原生的 `.gitignore` or `.hgignore` ? + + 答: 这些文件初看起来好像已经包含了所有你想从 CtrlP 中排除的文件。但是 + 通常情况下,这些文件和你想在 CtrlP 中的配置会有一些不同。这些配置文件 + 列出了不能被包含到版本控制中的文件。这些不能被包含到版本控制中的文件 + 包括了你想忽略的,但是同时可能也包含了你不想忽略的:本地设置,外部包 + 和依赖,等等。作者觉得支持多种语法与只是简单的复制/粘贴几行忽略规则比 + 起来比较麻烦。如果你不这么觉得可以随时提交补丁 :) + + 问: 我开启了 |ctrlp-autoignore-extension|, 或者编辑了 `.ctrlpignore` + 但是这些新模式并没有起作用。我哪里做错了? + + 答: 可能什么都没做错!CtrlP 可以为了快速的响应缓存搜索结果。你可以按 + 强制刷新。如果 `.ctrlpignore` 改动过,这样也会使用新的匹配模式。 + +---------------------------------------- +缓冲标签模式选项:~ + + *'g:ctrlp_buftag_ctags_bin'* +如果ctags没有在环境变量中配置,使用该选项来指定它的位置: > + let g:ctrlp_buftag_ctags_bin = '' +< + + *'g:ctrlp_buftag_systemenc'* +将该选项与你的操作系统的编码(非Vim的)保持一致。默认值使用Vim的全局 +|'encoding'| 选项: > + let g:ctrlp_buftag_systemenc = &encoding +< + + *'g:ctrlp_buftag_types'* +使用该选项来在ctags, jsctags...中为指定的文件格式设置参数: > + let g:ctrlp_buftag_types = '' +< +例子: > + let g:ctrlp_buftag_types = { + \ 'erlang' : '--language-force=erlang --erlang-types=drmf', + \ 'javascript' : { + \ 'bin': 'jsctags', + \ 'args': '-f -', + \ }, + \ } +< + +=============================================================================== +自定义 *ctrlp-customization* + +高亮:~ + * CtrlP缓冲区的设置: + CtrlPNoEntries : 当没有匹配被发现时的消息(错误)。 + CtrlPMatch : 匹配模式(标识)。 + CtrlPLinePre : 匹配窗口的行前缀'>'。 + CtrlPPrtBase : 提示符窗口的基础(注释)。 + CtrlPPrtText : 提示符窗口的文本 (|hl-Normal|)。 + CtrlPPrtCursor : 提示符窗口的光标在文本上移动时(常量)。 + + * 缓冲区浏览模式: + CtrlPBufferNr : 缓冲区编号 + CtrlPBufferInd : '+', '-', '=' 和 '#' 指示符 (参见 |:buffers|) + CtrlPBufferHid : 隐藏缓冲区 + CtrlPBufferHidMod : 隐藏和被编辑过的缓冲区 + CtrlPBufferVis : 可见的缓冲区 + CtrlPBufferVisMod : 可见的和被编辑过的缓冲区 + CtrlPBufferCur : 当前缓冲区 + CtrlPBufferCurMod : 当前和被编辑过的缓冲区 + CtrlPBufferPath : 缓冲区路径 + + * 在扩展中: + CtrlPTabExtra : 每一行中不匹配的部分(注释)。 + CtrlPBufName : 条目所属的缓冲区名称(|hl-Directory|)。 + CtrlPTagKind : 缓冲区标签模式中标签的类型(|hl-Title|)。 + CtrlPqfLineCol : 快速修复模式中行和列的序号(注释)。 + CtrlPUndoT : 撤销模式的流逝时间(|hl-Directory|)。 + CtrlPUndoBr : 撤销模式的方括号(注释)。 + CtrlPUndoNr : 撤销模式的方括号中的数字(字符串)。 + CtrlPUndoSv : 文件被保存的点(注释)。 + CtrlPUndoPo : 撤销树中的当前位置(|hl-Title|)。 + CtrlPBookmark : 书签的名称(标识)。 + +状态栏:~ + * 高亮组: + CtrlPMode1 : 'file' 或 'path' 或 'line',和当前模式(字符)。 + CtrlPMode2 : 'prt' 或 'win', 'regex',工作目录 |hl-LineNr| 。 + CtrlPStats : 扫描状态(函数)。 + + 重新构建状态栏,参见 |g:ctrlp_status_func| 。 + +=============================================================================== +其它选项 *ctrlp-miscellaneous-configs* + +* 为 |g:ctrlp_user_command| 使用 |wildignore| : +> + function! s:wig2cmd() + " 修改wildignore为空格或者|分隔的组 + " 例如: .aux .out .toc .jpg .bmp .gif + " 或者 .aux$\|.out$\|.toc$\|.jpg$\|.bmp$\|.gif$ + let pats = ['[*\/]*\([?_.0-9A-Za-z]\+\)\([*\/]*\)\(\\\@ 提交) + +* 一个独立的函数,设置项目的根目录为工作目录,如果没有找到根目录的话使用当前文 +* 件的父目录。 +> + function! s:setcwd() + let cph = expand('%:p:h', 1) + if cph =~ '^.\+://' | retu | en + for mkr in ['.git/', '.hg/', '.svn/', '.bzr/', '_darcs/', '.vimprojects'] + let wd = call('find'.(mkr =~ '/$' ? 'dir' : 'file'), [mkr, cph.';']) + if wd != '' | let &acd = 0 | brea | en + endfo + exe 'lc!' fnameescape(wd == '' ? cph : substitute(wd, mkr.'$', '.', '')) + endfunction + + autocmd BufEnter * call s:setcwd() +< +(需要 Vim 7.1.299+) + +* 使用 |count| 来使用同样的按键绑定调用不同的命令: +> + let g:ctrlp_cmd = 'exe "CtrlP".get(["", "Buffer", "MRU"], v:count)' +< + +=============================================================================== +开发人员 *ctrlp-credits* + +最初由 Kien Nguyen 开发。现在由 Github 上 ctrlpvim 组织的成员 +维护(https://github.com/orgs/ctrlpvim/people) 。在Vim的 |license| 下发行。 + +项目主页: http://ctrlpvim.github.com/ctrlp.vim +Git 仓库: https://github.com/ctrlpvim/ctrlp.vim + +------------------------------------------------------------------------------- +感谢所有通过github,bitbucket或电子邮件提供想法,报告bug或者帮助debugging的人。 + +特别感谢:~ + + * Woojong Koh + * Simon Ruderich + * Yasuhiro Matsumoto + * Ken Earley + * Kyo Nagashima + * Zak Johnson + * Diego Viola + * Piet Delport + * Thibault Duplessis + * Kent Sibilev + * Tacahiroy + * Luca Pette + * Seth Fowler + * Lowe Thiderman + * Christopher Fredén + * Zahary Karadjov + * Jo De Boeck + * Rudi Grinberg + * Timothy Mellor + * Sergey Vlasov + +=============================================================================== +更新日志 *ctrlp-changelog* + + + 新的支持高亮的缓冲区浏览模式 (建议 |+conceal|) + + 新选项: |g:ctrlp_bufname_mod|, + |g:ctrlp_bufpath_mod| + + 结合 *g:ctrlp_match_window_bottom* *g:ctrlp_match_window_reversed* 和 + *g:ctrlp_max_height* 到 |g:ctrlp_match_window| 。 + + 新选项: |g:ctrlp_match_window| 。 + +在2012/11/30之前~ + + + 新选项: |g:ctrlp_abbrev|, + |g:ctrlp_key_loop|, + |g:ctrlp_open_func|, + |g:ctrlp_tabpage_position|, + |g:ctrlp_mruf_save_on_update| + + 重命名: + *g:ctrlp_dotfiles* -> |g:ctrlp_show_hidden| 。 + + 修改 |g:ctrlp_switch_buffer| 和 |g:ctrlp_working_path_mode|的类型 + (旧值仍然工作)。 + + 当 |g:ctrlp_user_command| 是一个字典时,为其增加一个新的键: 'ignore'。 + +在2012/06/15之前~ + + + |g:ctrlp_follow_symlinks| 的新值: 2。 + + |g:ctrlp_open_multiple_files| 的新值: 'j'。 + + 允许使用 , , 打开被 标记的文件。 + + 扩展 '..' (|ctrlp-input-formats| (d)) + + 新的输入格式: '@cd' (|ctrlp-input-formats| (d)) + +在2012/04/30之前~ + + + 新选项: |g:ctrlp_mruf_default_order| + + 新特性: 被书签标记的目录的扩展。 + + 新命令: |:CtrlPBookmarkDir| + |:CtrlPBookmarkDirAdd| + +在2012/04/15之前~ + + + 新选项: |g:ctrlp_buffer_func|,CtrlP缓冲区的回调函数。 + + 移除 : g:ctrlp_mruf_last_entered,使其作为最近最多使用的默认行为。 + + 新命令: |:CtrlPLastMode|,以上一次使用的模式打开CtrlP。 + |:CtrlPMixed|,在文件,缓冲区和最近最多使用中搜索。 + +在2012/03/31之前~ + + + 新选项: |g:ctrlp_default_input|, 进入CtrlP后的默认输入。 + |g:ctrlp_match_func|,允许使用自定义的模糊查找工具。 + + 重命名: + *ClearCtrlPCache* -> |CtrlPClearCache| + *ClearAllCtrlPCaches* -> |CtrlPClearAllCaches| + *ResetCtrlP* -> |CtrlPReload| + +在2012/03/02之前~ + + + 重命名: + *g:ctrlp_regexp_search* -> |g:ctrlp_regexp|, + *g:ctrlp_dont_split* -> |g:ctrlp_reuse_window|, + *g:ctrlp_jump_to_buffer* -> |g:ctrlp_switch_buffer|。 + + 重命名和微调: + *g:ctrlp_open_multi* -> |g:ctrlp_open_multiple_files|。 + + 过时 *g:ctrlp_highlight_match* + + 扩展 |g:ctrlp_user_command| 支持多个命令。 + + 新选项: |g:ctrlp_mruf_last_entered| 修改最近最多使用为最近进入。 + +在2012/01/15之前~ + + + 新按键绑定: 交换 . 现在用来补全在当前工作目录内的目 + 录名。 + + 新选项: |g:ctrlp_arg_map| 使 可以接收一个参数。 + |g:ctrlp_status_func| 自定义状态栏。 + |g:ctrlp_mruf_relative| 在当前工作目录内显示最近最多使用。 + + 扩展 g:ctrlp_open_multi 增加新选项值: tr, hr, vr。 + + 扩展 |g:ctrlp_custom_ignore| 指定过滤目录,文件和链接。 + +在2012/01/05之前~ + + + 新特性: 缓冲区标记扩展。 + + 新命令: |:CtrlPBufTag|, |:CtrlPBufTagAll|。 + + 新选项: |g:ctrlp_cmd|, + |g:ctrlp_custom_ignore| + +在2011/11/30之前~ + + + 新特性: 标签,快速修复和目录扩展。 + + 新命令: |:CtrlPTag|, |:CtrlPQuickfix|, |:CtrlPDir|。 + + 新选项: |g:ctrlp_use_migemo|, + |g:ctrlp_lazy_update|, + |g:ctrlp_follow_symlinks| + +在2011/11/13之前~ + + + 新的特殊输入: '/' 和 '\' 查找根目录 (|ctrlp-input-formats| (e)) + + 移除 ctrlp#SetWorkingPath()。 + + 移除 *g:ctrlp_mru_files* ,使最近最多使用模式变为永久的。 + + 扩展 g:ctrlp_open_multi,添加打开文件的新方式。 + + 新选项: g:ctrlp_dont_split, + |g:ctrlp_mruf_case_sensitive| + +在2011/10/30之前~ + + + 新特性: 支持自定义扩展。 + 也会从最近最多使用列表中移除不存在的文件。 + + 新选项: g:ctrlp_jump_to_buffer + +在2011/10/12之前~ + + + 新特性: 打开多个文件。 + 传递Vim的 |++opt| 和 |+cmd| 到新打开的文件 + (|ctrlp-input-formats| (c)) + 为 |:CtrlP| [起始目录]自动补全每个目录 + + 新按键绑定: 标记/取消标记一个被 打开的文件。 + 打开所有被标记的文件。 + + 新选项: g:ctrlp_open_multi + + 移除 *g:ctrlp_persistent_input* *g:ctrlp_live_update* and 。 + +在2011/09/29之前~ + + + 新按键绑定: , 输入历史中的前一个/后一个字符串。 + 创建一个新的文件和它的父目录。 + + 新选项: |g:ctrlp_open_new_file|, + |g:ctrlp_max_history| + + 添加一个新的在横向分割窗口打开的绑定: + +在2011/09/19之前~ + + + 新命令: ResetCtrlP + + 新选项: |g:ctrlp_max_files|, + |g:ctrlp_max_depth|, + g:ctrlp_live_update + + 新按键绑定: + +在2011/09/12之前~ + + + 添加在匹配窗口内循环匹配行的功能。 + + 扩展 g:ctrlp_persistent_input的行为 + + 扩展 |:CtrlP| 的行为 + + 新选项: |g:ctrlp_dotfiles|, + |g:ctrlp_clear_cache_on_exit|, + g:ctrlp_highlight_match, + |g:ctrlp_user_command| + + 新的特殊输入: '..' (|ctrlp-input-formats| (d)) + + 新按键绑定: 。 + + 新命令: |:CtrlPCurWD|, + |:CtrlPCurFile|, + |:CtrlPRoot| + + + 新特性: 在最近最常使用的文件列表中搜索 + + 新按键绑定: 。 + + 扩展 的行为。 + + 新选项: g:ctrlp_mru_files, + |g:ctrlp_mruf_max|, + |g:ctrlp_mruf_exclude|, + |g:ctrlp_mruf_include| + + 新命令: |:CtrlPMRU| + +第一版发布于: 2011/09/06~ + +=============================================================================== +vim:ft=help:et:ts=2:sw=2:sts=2:norl diff --git a/sources_non_forked/ctrlp.vim/doc/ctrlp.txt b/sources_non_forked/ctrlp.vim/doc/ctrlp.txt index e697b937..bd4fc095 100644 --- a/sources_non_forked/ctrlp.vim/doc/ctrlp.txt +++ b/sources_non_forked/ctrlp.vim/doc/ctrlp.txt @@ -63,18 +63,26 @@ Overview:~ |ctrlp_default_input|.........Seed the prompt with an initial string. |ctrlp_abbrev|................Input abbreviations. |ctrlp_key_loop|..............Use input looping for multi-byte input. - |ctrlp_use_migemo|............Use Migemo patterns for Japanese filenames. |ctrlp_prompt_mappings|.......Change the mappings inside the prompt. + |ctrlp_line_prefix|...........Prefix for each line in ctrlp window. + |ctrlp_open_single_match|.....Automatically accept when only one candidate. + |ctrlp_brief_prompt|..........Exit CtrlP on empty prompt by . + |ctrlp_match_current_file|....Include current file in match entries. MRU mode: |ctrlp_mruf_max|..............Max MRU entries to remember. |ctrlp_mruf_exclude|..........Files that shouldn't be remembered. |ctrlp_mruf_include|..........Files to be remembered. |ctrlp_mruf_relative|.........Show only MRU files in the working directory. + |ctrlp_tilde_homedir|....Save MRU file paths in home dir as ~/. |ctrlp_mruf_default_order|....Disable sorting. |ctrlp_mruf_case_sensitive|...MRU files are case sensitive or not. |ctrlp_mruf_save_on_update|...Save to disk whenever a new entry is added. + Buffer mode: + |ctrlp_bufname_mod|...........File name section modificator. + |ctrlp_bufpath_mod|...........File path section modificator. + BufferTag mode: (to enable, see |ctrlp-extensions|) |g:ctrlp_buftag_ctags_bin|....The location of the ctags-compatible binary. |g:ctrlp_buftag_systemenc|....The encoding used for the ctags command. @@ -118,7 +126,7 @@ Set this to 1 to set regexp search as the default: > Can be toggled on/off by pressing inside the prompt. *'g:ctrlp_match_window'* -Change the postion, the listing order of results, the minimum and the maximum +Change the position, the listing order of results, the minimum and the maximum heights of the match window: > let g:ctrlp_match_window = '' < @@ -181,13 +189,12 @@ variable: > let g:ctrlp_working_path_mode = 'ra' < c - the directory of the current file. - a - like "c", but only applies when the current working directory outside of - CtrlP isn't a direct ancestor of the directory of the current file. - r - the nearest ancestor that contains one of these directories or files: + a - the directory of the current file, unless it is a subdirectory of the cwd + r - the nearest ancestor of the current file that contains one of these + directories or files: .git .hg .svn .bzr _darcs - w - begin finding a root from the current working directory outside of CtrlP - instead of from the directory of the current file (default). Only applies - when "r" is also present. + w - modifier to "r": start search from the cwd instead of the current file's + directory 0 or - disable this feature. Note #1: if "a" or "c" is included with "r", use the behavior of "a" or "c" (as @@ -261,6 +268,9 @@ Examples: > let g:ctrlp_custom_ignore = { \ 'file': '\v(\.cpp|\.h|\.hh|\.cxx)@ let g:ctrlp_max_files = 10000 @@ -327,7 +343,7 @@ Some examples: > " Single VCS, listing command lists untracked files (slower): let g:ctrlp_user_command = - \ ['.git', 'cd %s && git ls-files . -co --exclude-standard'] + \ ['.git', 'cd %s && git ls-files -co --exclude-standard'] let g:ctrlp_user_command = \ ['.hg', 'hg --cwd %s status -numac -I . $(hg root)'] " MacOSX/Linux @@ -434,6 +450,17 @@ Instead of 1 or 0, if the value of the option is a string, it'll be used as-is as the default input: > let g:ctrlp_default_input = 'anystring' < +This option works well together with |g:ctrlp_open_single_match| + + + *'g:ctrlp_match_current_file'* +Includes the current file in the match entries: + let g:ctrlp_match_current_file = 1 + +By default, the current file is excluded from the list. + +Note: does not apply when |g:ctrlp_match_func| is used. + *'g:ctrlp_abbrev'* Define input abbreviations that can be expanded (either internally or visibly) @@ -497,12 +524,6 @@ Note #2: you can toggle this feature inside the prompt with a custom mapping: > let g:ctrlp_prompt_mappings = { 'ToggleKeyLoop()': [''] } < - *'g:ctrlp_use_migemo'* -Set this to 1 to use Migemo Pattern for Japanese filenames. Migemo Search only -works in regexp mode. To split the pattern, separate words with space: > - let g:ctrlp_use_migemo = 0 -< - *'g:ctrlp_prompt_mappings'* Use this to customize the mappings inside CtrlP's prompt to your liking. You only need to keep the lines that you've changed the values (inside []): > @@ -549,6 +570,34 @@ default mapping: > let g:ctrlp_prompt_mappings = { 'PrtCurLeft()': ['', ''] } < + *'g:ctrlp_line_prefix'* +This prefix will be prepended to each line in ctrlp's item listing. +default: > + let g:ctrlp_line_prefix = '> ' +< + + *'g:ctrlp_open_single_match'* +List of CtrlP modes for which CtrlP should accept an entry directly, if only +one candidate exists. +Example: > + let g:ctrlp_open_single_match = ['buffer tags', 'buffer'] +< +This is currently only really useful together with |g:ctrlp_default_input| +set before launching, and cleared afterwards, with a function such as +following: > + fu! tagsUnderCursor() + try + let default_input_save = get(g:, 'ctrlp_default_input', '') + let g:ctrlp_default_input = expand('') + CtrlPBufTagAll + finally + if exists('default_input_save') + let g:ctrlp_default_input = default_input_save + endif + endtry + endfu +> +< ---------------------------------------- MRU mode options:~ @@ -574,6 +623,14 @@ Example: > let g:ctrlp_mruf_include = '\.py$\|\.rb$' < + *'g:ctrlp_tilde_homedir'* +Set this to 1 to save every MRU file path $HOME/$filepath in the $HOME dir + as ~/$filepath instead of $HOME/$filepath : > + let g:ctrlp_tilde_homedir = 0 +< +Note: This applies also to all dir paths stored by :CtrlPBookmarkDirAdd! +< + *'g:ctrlp_mruf_relative'* Set this to 1 to show only MRU files in the current working directory: > let g:ctrlp_mruf_relative = 0 @@ -581,7 +638,6 @@ Set this to 1 to show only MRU files in the current working directory: > Note: you can use a custom mapping to toggle this option inside the prompt: > let g:ctrlp_prompt_mappings = { 'ToggleMRURelative()': [''] } < - *'g:ctrlp_mruf_default_order'* Set this to 1 to disable sorting when searching in MRU mode: > let g:ctrlp_mruf_default_order = 0 @@ -598,7 +654,14 @@ Set this to 0 to disable saving of the MRU list to hard drive whenever a new entry is added, saving will then only occur when exiting Vim: > let g:ctrlp_mruf_save_on_update = 1 < - + *'g:ctrlp_bufname_mod'* +Modify file name section according to modificator string. See |filename-modifiers|. > + let g:ctrlp_bufname_mod = ':t' +< + *'g:ctrlp_bufpath_mod'* +Modify file path section according to modificator string. See |filename-modifiers|. > + let g:ctrlp_bufpath_mod = ':~:.:h' +< ---------------------------------------- Advanced options:~ @@ -772,6 +835,15 @@ Example: > " } endfunction < + *'g:ctrlp_brief_prompt'* +When this is set to 1, the on empty prompt exit CtrlP. + + *ctrlp-default-value* +Otherwize, you can use below to change default value. +Example: > + let g:ctrlp_path_nolim = 1 + +This is possible to change no-limit mode for match type "path". =============================================================================== COMMANDS *ctrlp-commands* @@ -953,8 +1025,12 @@ Function keys:~ - Remove deleted files from the MRU list. - - Wipe the MRU list. - - Delete MRU entries marked by . + MRU mode: + - Wipe the list. + - Delete entries marked by . + Buffer mode: + - Delete entry under the cursor or delete multiple entries marked by . + Pasting:~ @@ -1027,7 +1103,7 @@ d) Submit two dots '..' to go upward the directory tree by 1 level. To go up e) Similarly, submit '/' or '\' to find and go to the project's root. If the project is large, using a VCS listing command to look for files - might help speeding up the intial scan (see |g:ctrlp_user_command| for more + might help speeding up the initial scan (see |g:ctrlp_user_command| for more details). Note: d) and e) only work in file, directory and mixed modes. @@ -1138,8 +1214,27 @@ Available extensions:~ * BookmarkDir mode:~ - Name: 'bookmarkdir' - Commands: ":CtrlPBookmarkDir", - ":CtrlPBookmarkDirAdd [directory]". + ":CtrlPBookmarkDirAdd [directory] [TITLE]". + ":CtrlPBookmarkDirAdd! [directory] [TITLE]". + - Search for a bookmarked directory and change the working directory to it. + - Add either the dir [directory], if supplied, or otherwise ask for it, + under the title given by either [TITLE], if supplied, or otherwise ask for + it, to the CtrlPBookmarkDir list. + - Add either the dir [directory], if supplied, or otherwise the current + work dir ( [CWD] ) under the title given by either [TITLE], if supplied, + or otherwise [CWD] to the CtrlPBookmarkDir list. + + The last command can be used to add all recently used work dirs to the + CtrlPBookmarkDir list by an autocommand like + + > + augroup CtrlPDirMRU + autocmd! + autocmd FileType * if &modifiable | execute 'silent CtrlPBookmarkDirAdd! %:p:h' | endif + augroup END +< + - Mappings: + change the local working directory for CtrlP, keep it open and switch to find file mode. @@ -1149,6 +1244,80 @@ Available extensions:~ - Wipe bookmark list. - Delete entries marked by . + *ctrlp-autoignore-extension* + * Autoignore mode:~ + - Name: 'autoignore' + + - This extension doesn't add new commands. It adds support for per-project + ignore patterns (as per |ctrlp_custom_ignore|) via a `.ctrlpignore` file + at the root of the project. It's basically like a `.gitignore` or + `.hgignore` for CtrlP. + + Note: auto-ignore won't work when |g:ctrlp_user_command| is used. + + Note: `.ctrlpignore` will be added to the root markers (see + |g:ctrlp_root_markers|). + + - Ignore file syntax: + Empty lines, and lines starting with `#` (comments) are ignored. + + Other lines are treated like regular expression patterns. See *string-match* + for how patterns are used. Anything that matches any of the patterns will be + ignored from CtrlP's search results. + + Example: + + \.tmp$ + ^generated/ + local\.cfg + + Note: patterns should use forward slashes, even on Windows. + + You can also switch to a glob-like syntax like this: + + syntax:wildignore + *.tar.gz + *.tmp + + This will temporarily add each pattern to |'wildignore'| for the + duration of the file scan, and remove them at the end. + + You can switch back to the default regular-expression-based patterns by + writing: + + syntax:regexp + + You can also specify a match on only a given type of item: + + dir:build + file:foo\.txt + + This will only ignore directories with "build" in them, and files with + "foo.txt" in them. Not files with "build" in them or vice-versa. + + Note: to ignore a root directory "build", and not _any_ directory with + "build" in it, you can root the regex: ^build$ + + - FAQ: + Q: Why can't CtrlP support `.gitignore` or `.hgignore` natively? + + A: Those files look at first like they may contain all the patterns + you'd want to exclude from CtrlP already. However, more often than not, + there are some differences. Those files list patterns that should not be + included in source-control. This includes things you want to ignore, but + also things you may not want to: local settings, external packages and + dependencies, etc. The author felt the trouble of supporting various + syntaxes was too much compared to just copy/pasting a few lines. Feel + free to contribute a patch if you disagree :) + + Q: I enabled |ctrlp-autoignore-extension|, or edited `.ctrlpignore`, but + none of the new patterns are working. What did I do wrong? + + A: Probably nothing! CtrlP can cache search results for faster response + times. You can hit to force it to refresh. This will use the newer + ignore patterns if the `.ctrlpignore` file has changed, too. + + ---------------------------------------- Buffer Tag mode options:~ @@ -1189,6 +1358,17 @@ Highlighting:~ CtrlPPrtText : the prompt's text (|hl-Normal|) CtrlPPrtCursor : the prompt's cursor when moving over the text (Constant) + * Buffer explorer mode: + CtrlPBufferNr : buffer number + CtrlPBufferInd : '+', '-', '=' and '#' indicators (see |:buffers|) + CtrlPBufferHid : hidden buffer + CtrlPBufferHidMod : hidden and modified buffer + CtrlPBufferVis : visible buffer + CtrlPBufferVisMod : visible and modified buffer + CtrlPBufferCur : current buffer + CtrlPBufferCurMod : current and modified buffer + CtrlPBufferPath : buffer path + * In extensions: CtrlPTabExtra : the part of each line that's not matched against (Comment) CtrlPBufName : the buffer name an entry belongs to (|hl-Directory|) @@ -1259,11 +1439,12 @@ MISCELLANEOUS CONFIGS *ctrlp-miscellaneous-configs* =============================================================================== CREDITS *ctrlp-credits* -Developed by Kien Nguyen . Distributed under Vim's |license|. +Originally developed by Kien Nguyen . Now maintained by the +members of the ctrlpvim Github organisation +(https://github.com/orgs/ctrlpvim/people). Distributed under Vim's |license|. -Project's homepage: http://kien.github.com/ctrlp.vim -Git repository: https://github.com/kien/ctrlp.vim -Mercurial repository: https://bitbucket.org/kien/ctrlp.vim +Project's homepage: http://ctrlpvim.github.com/ctrlp.vim +Git repository: https://github.com/ctrlpvim/ctrlp.vim ------------------------------------------------------------------------------- Thanks to everyone that has submitted ideas, bug reports or helped debugging on @@ -1290,10 +1471,14 @@ Special thanks:~ * Jo De Boeck * Rudi Grinberg * Timothy Mellor + * Sergey Vlasov =============================================================================== CHANGELOG *ctrlp-changelog* + + New buffer explorer mode with highlighting (|+conceal| recommended) + + New options: |g:ctrlp_bufname_mod|, + |g:ctrlp_bufpath_mod| + Combine *g:ctrlp_match_window_bottom* *g:ctrlp_match_window_reversed* and *g:ctrlp_max_height* into |g:ctrlp_match_window|. + New option: |g:ctrlp_match_window|. diff --git a/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim b/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim index c7b8fa3f..5f5303f1 100644 --- a/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim +++ b/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim @@ -33,8 +33,10 @@ com! -bar CtrlPCurWD cal ctrlp#init(0, { 'mode': '' }) com! -bar CtrlPCurFile cal ctrlp#init(0, { 'mode': 'c' }) com! -bar CtrlPRoot cal ctrlp#init(0, { 'mode': 'r' }) -if g:ctrlp_map != '' && !hasmapto(':'.g:ctrlp_cmd.'', 'n') - exe 'nn ' g:ctrlp_map ':'.g:ctrlp_cmd.'' +exe 'nn (ctrlp) :'.g:ctrlp_cmd.'' + +if g:ctrlp_map != '' && !hasmapto('(ctrlp)') + exe 'map' g:ctrlp_map '(ctrlp)' en cal ctrlp#mrufiles#init() @@ -62,7 +64,7 @@ com! -bar CtrlPChangeAll cal ctrlp#init(ctrlp#changes#cmd(1)) com! -bar CtrlPMixed cal ctrlp#init(ctrlp#mixed#id()) com! -bar CtrlPBookmarkDir cal ctrlp#init(ctrlp#bookmarkdir#id()) -com! -n=? -com=dir CtrlPBookmarkDirAdd - \ cal ctrlp#call('ctrlp#bookmarkdir#add', ) +com! -n=? -com=dir -bang CtrlPBookmarkDirAdd + \ cal ctrlp#call('ctrlp#bookmarkdir#add', '', ) " vim:ts=2:sw=2:sts=2 diff --git a/sources_non_forked/ctrlp.vim/readme.md b/sources_non_forked/ctrlp.vim/readme.md index d495fffb..66fc9e8c 100644 --- a/sources_non_forked/ctrlp.vim/readme.md +++ b/sources_non_forked/ctrlp.vim/readme.md @@ -1,6 +1,3 @@ -#**This project is unmaintained** -**You should use [this fork](https://github.com/ctrlpvim/ctrlp.vim) instead.** - # ctrlp.vim Full path fuzzy __file__, __buffer__, __mru__, __tag__, __...__ finder for Vim. @@ -35,8 +32,8 @@ Check `:help ctrlp-commands` and `:help ctrlp-extensions` for other commands. Run `:help ctrlp-mappings` or submit `?` in CtrlP for more mapping help. * Submit two or more dots `..` to go up the directory tree by one or multiple levels. -* End the input string with a colon `:` followed by a command to execute it on the opening file(s): -Use `:25` to jump to line 25. +* End the input string with a colon `:` followed by a command to execute it on the opening file(s): +Use `:25` to jump to line 25. Use `:diffthis` when opening multiple files to run `:diffthis` on the first 4 files. ## Basic Options @@ -47,20 +44,27 @@ Use `:diffthis` when opening multiple files to run `:diffthis` on the first 4 fi let g:ctrlp_cmd = 'CtrlP' ``` -* When invoked, unless a starting directory is specified, CtrlP will set its local working directory according to this variable: +* When invoked without an explicit starting directory, CtrlP will set its local working directory according to this variable: ```vim let g:ctrlp_working_path_mode = 'ra' ``` `'c'` - the directory of the current file. - `'r'` - the nearest ancestor that contains one of these directories or files: `.git` `.hg` `.svn` `.bzr` `_darcs` - `'a'` - like c, but only if the current working directory outside of CtrlP is not a direct ancestor of the directory of the current file. + `'a'` - the directory of the current file, unless it is a subdirectory of the cwd + `'r'` - the nearest ancestor of the current file that contains one of these directories or files: `.git` `.hg` `.svn` `.bzr` `_darcs` + `'w'` - modifier to "r": start search from the cwd instead of the current file's directory `0` or `''` (empty string) - disable this feature. - Define additional root markers with the `g:ctrlp_root_markers` option. + If none of the default markers (`.git` `.hg` `.svn` `.bzr` `_darcs`) are present in a project, you can define additional ones with `g:ctrlp_root_markers`: -* Exclude files and directories using Vim's `wildignore` and CtrlP's own `g:ctrlp_custom_ignore`: + ```vim + let g:ctrlp_root_markers = ['pom.xml', '.p4ignore'] + ``` + + If more than one mode is specified, they will be tried in order until a directory is located. + +* Exclude files and directories using Vim's `wildignore` and CtrlP's own `g:ctrlp_custom_ignore`. If a custom listing command is being used, exclusions are ignored: ```vim set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux @@ -81,11 +85,17 @@ Use `:diffthis` when opening multiple files to run `:diffthis` on the first 4 fi let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows ``` +* Ignore files in `.gitignore` + + ```vim + let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] + ``` + Check `:help ctrlp-options` for other options. ## Installation Use your favorite method or check the homepage for a [quick installation guide][3]. -[1]: http://i.imgur.com/yIynr.png -[2]: https://github.com/kien/ctrlp.vim/tree/extensions -[3]: http://kien.github.com/ctrlp.vim#installation +[1]: http://i.imgur.com/aOcwHwt.png +[2]: https://github.com/ctrlpvim/ctrlp.vim/tree/extensions +[3]: http://ctrlpvim.github.com/ctrlp.vim#installation diff --git a/update_plugins.py b/update_plugins.py index 5ea87f24..00058f1c 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -19,7 +19,7 @@ PLUGINS = """ ack.vim https://github.com/mileszs/ack.vim ag.vim https://github.com/rking/ag.vim bufexplorer https://github.com/corntrace/bufexplorer -ctrlp.vim https://github.com/kien/ctrlp.vim +ctrlp.vim https://github.com/ctrlpvim/ctrlp.vim mayansmoke https://github.com/vim-scripts/mayansmoke nerdtree https://github.com/scrooloose/nerdtree nginx-vim-syntax https://github.com/evanmiller/nginx-vim-syntax From 39ffe2d5ef98089006294943856ef3f6cf22d53c Mon Sep 17 00:00:00 2001 From: Nico Ekkart Date: Sat, 30 Apr 2016 00:56:36 +0200 Subject: [PATCH 04/12] Fixed minor typo in basic.vim --- vimrcs/basic.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 8c579772..9f3ae8e7 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -284,7 +284,7 @@ set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ " Remap VIM 0 to first non-blank character map 0 ^ -" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac +" Move a line of text using ALT+[jk] or Command+[jk] on mac nmap mz:m+`z nmap mz:m-2`z vmap :m'>+`mzgv`yo`z From f343b66088369809f73a7c7cad035ae07da77437 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 14 May 2016 12:57:54 +0100 Subject: [PATCH 05/12] Updated plugins --- sources_forked/yankring/doc/yankring.txt | 1412 ---------- sources_forked/yankring/plugin/yankring.vim | 2461 ----------------- sources_non_forked/ack.vim/autoload/ack.vim | 14 + sources_non_forked/ack.vim/doc/ack.txt | 16 + sources_non_forked/ack.vim/plugin/ack.vim | 12 +- sources_non_forked/nerdtree/README.markdown | 7 + sources_non_forked/nerdtree/doc/NERD_tree.txt | 14 + .../nerdtree/lib/nerdtree/creator.vim | 2 +- .../nerdtree/lib/nerdtree/path.vim | 2 +- .../nerdtree/lib/nerdtree/ui.vim | 2 +- .../nerdtree/plugin/NERD_tree.vim | 3 + .../nerdtree/syntax/nerdtree.vim | 4 +- sources_non_forked/syntastic/README.markdown | 9 +- .../syntastic/autoload/syntastic/log.vim | 4 + .../syntastic/autoload/syntastic/util.vim | 12 +- .../syntastic/doc/syntastic.txt | 8 +- .../syntastic/plugin/syntastic.vim | 2 +- .../syntastic/plugin/syntastic/registry.vim | 5 +- .../syntastic/syntax_checkers/ada/gcc.vim | 4 +- .../syntastic/syntax_checkers/cuda/nvcc.vim | 9 +- .../syntastic/syntax_checkers/go/govet.vim | 4 - .../syntax_checkers/haskell/ghc-mod.vim | 8 +- .../syntax_checkers/html/gjslint.vim | 23 + .../syntax_checkers/javascript/gjslint.vim | 3 +- .../syntax_checkers/javascript/jsxhint.vim | 8 +- .../syntastic/syntax_checkers/less/lessc.vim | 11 +- .../syntax_checkers/ocaml/camlp4o.vim | 38 +- .../syntastic/syntax_checkers/perl/perl.vim | 8 +- .../syntax_checkers/python/pylint.vim | 8 +- .../syntax_checkers/rst/rst2pseudoxml.vim | 5 + .../syntax_checkers/scala/scalastyle.vim | 2 +- .../syntax_checkers/sh/shellcheck.vim | 28 +- .../syntastic/syntax_checkers/trig/rapper.vim | 23 + .../syntax_checkers/turtle/rapper.vim | 46 + .../syntastic/syntax_checkers/turtle/ttl.vim | 43 + .../syntastic/syntax_checkers/yang/pyang.vim | 46 + .../vim-airline-themes/.gitignore | 1 + .../autoload/airline/themes/cool.vim | 40 +- .../autoload/airline/themes/dark.vim | 102 - .../autoload/airline/themes/jellybeans.vim | 22 +- .../autoload/airline/themes/solarized.vim | 54 +- .../vim-airline-themes/doc/airline-themes.txt | 128 + .../vim-airline/ISSUE_TEMPLATE.md | 3 + .../vim-airline/autoload/airline/builder.vim | 66 +- .../autoload/airline/extensions.vim | 6 +- .../autoload/airline/extensions/branch.vim | 4 +- .../autoload/airline/extensions/default.vim | 7 +- .../autoload/airline/extensions/quickfix.vim | 7 + .../airline/extensions/tabline/buffers.vim | 20 +- .../airline/extensions/tabline/tabs.vim | 2 +- .../airline/extensions/whitespace.vim | 13 +- .../wordcount/formatters/default.vim | 2 +- .../vim-airline/autoload/airline/init.vim | 10 +- .../vim-airline/autoload/airline/util.vim | 6 + .../vim-airline/doc/airline.txt | 15 + .../vim-airline/plugin/airline.vim | 21 +- .../vim-fugitive/plugin/fugitive.vim | 12 +- sources_non_forked/vim-go/CHANGELOG.md | 83 +- sources_non_forked/vim-go/README.md | 35 +- .../vim-go/autoload/ctrlp/decls.vim | 4 +- .../vim-go/autoload/go/asmfmt.vim | 4 +- sources_non_forked/vim-go/autoload/go/cmd.vim | 6 +- .../vim-go/autoload/go/complete.vim | 40 +- .../vim-go/autoload/go/coverage.vim | 38 +- sources_non_forked/vim-go/autoload/go/def.vim | 404 ++- sources_non_forked/vim-go/autoload/go/doc.vim | 4 +- sources_non_forked/vim-go/autoload/go/fmt.vim | 15 +- .../vim-go/autoload/go/guru.vim | 303 ++ .../vim-go/autoload/go/impl.vim | 124 + .../vim-go/autoload/go/import.vim | 4 +- .../vim-go/autoload/go/lint.vim | 8 +- .../vim-go/autoload/go/oracle.vim | 233 -- .../vim-go/autoload/go/package.vim | 10 +- .../vim-go/autoload/go/path.vim | 26 +- .../vim-go/autoload/go/play.vim | 8 +- .../vim-go/autoload/go/rename.vim | 2 +- .../vim-go/autoload/go/textobj.vim | 8 +- .../vim-go/autoload/go/tool.vim | 12 +- .../vim-go/autoload/go/util.vim | 74 + .../vim-go/autoload/go/vimproc.vim | 21 - sources_non_forked/vim-go/doc/vim-go.txt | 144 +- sources_non_forked/vim-go/ftplugin/go.vim | 10 +- .../vim-go/ftplugin/go/commands.vim | 41 +- .../vim-go/ftplugin/go/mappings.vim | 33 +- .../vim-go/ftplugin/gohtmltmpl.vim | 6 + .../vim-go/gosnippets/UltiSnips/go.snippets | 28 +- .../vim-go/gosnippets/snippets/go.snip | 27 + sources_non_forked/vim-go/plugin/go.vim | 17 +- sources_non_forked/vim-less/README.md | 4 - .../vim-markdown/README.markdown | 4 + .../vim-markdown/syntax/markdown.vim | 5 +- .../UltiSnips/php-laravel.snippets | 14 + .../UltiSnips/php-phpspec.snippets | 38 + .../UltiSnips/php-phpunit.snippets | 8 +- .../UltiSnips/php-symfony2.snippets | 78 +- .../vim-snippets/UltiSnips/php.snippets | 63 +- .../vim-snippets/UltiSnips/python.snippets | 17 + .../vim-snippets/UltiSnips/twig.snippets | 20 +- .../vim-snippets/snippets/cpp.snippets | 13 + .../vim-snippets/snippets/erlang.snippets | 36 +- .../vim-snippets/snippets/make.snippets | 16 +- .../vim-snippets/snippets/php.snippets | 14 +- .../vim-snippets/snippets/twig.snippets | 43 + update_plugins.py | 1 + vimrcs/plugins_config.vim | 9 +- 105 files changed, 2100 insertions(+), 4902 deletions(-) delete mode 100755 sources_forked/yankring/doc/yankring.txt delete mode 100755 sources_forked/yankring/plugin/yankring.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/gjslint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/trig/rapper.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/turtle/rapper.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/turtle/ttl.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/yang/pyang.vim create mode 100644 sources_non_forked/vim-airline-themes/.gitignore delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/dark.vim create mode 100644 sources_non_forked/vim-airline-themes/doc/airline-themes.txt create mode 100644 sources_non_forked/vim-go/autoload/go/guru.vim create mode 100644 sources_non_forked/vim-go/autoload/go/impl.vim delete mode 100644 sources_non_forked/vim-go/autoload/go/oracle.vim delete mode 100644 sources_non_forked/vim-go/autoload/go/vimproc.vim create mode 100644 sources_non_forked/vim-go/ftplugin/gohtmltmpl.vim create mode 100644 sources_non_forked/vim-snippets/UltiSnips/php-phpspec.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/twig.snippets diff --git a/sources_forked/yankring/doc/yankring.txt b/sources_forked/yankring/doc/yankring.txt deleted file mode 100755 index d4c246d3..00000000 --- a/sources_forked/yankring/doc/yankring.txt +++ /dev/null @@ -1,1412 +0,0 @@ -*yankring.txt* For Vim version 7.0. - -Author: David Fishburn August 29, 2009 -Version: 10.0 - -For instructions on installing this file, type - :help add-local-help |add-local-help| inside Vim. - - -============================================================================== -1. Contents *yankring* *yankring-contents* - - 1. Contents...............................: |yankring-contents| - 2. Description............................: |yankring-description| - 3. Configuration..........................: |yankring-configure| - 3.1 Global Variables...................: |yankring-globals| - 3.2 Default Keys.......................: |yankring-mappings| - 3.3 Customizing Maps...................: |yankring-custom-maps| - 4. Using the YankRing Window..............: |yankring-window| - 5. Commands...............................: |yankring-commands| - 5.1 YRToggle..........................: |YRToggle| - 5.2 YRClear...........................: |YRClear| - 5.3 YRShow............................: |YRShow| - 5.5 YRGetElem.........................: |YRGetElem| - 5.6 YRGetMultiple.....................: |YRGetMultiple| - 5.7 YRPush............................: |YRPush| - 5.8 YRPop.............................: |YRPop| - 5.9 YRYankCount.......................: |YRYankCount| - 5.10 YRYankRange.......................: |YRYankRange| - 5.11 YRDeleteRange.....................: |YRDeleteRange| - 5.12 YRPaste...........................: |YRPaste| - 5.13 YRReplace.........................: |YRReplace| - 5.14 YRMapsCreate......................: |YRMapsCreate| - 5.15 YRMapsDelete......................: |YRMapsDelete| - 5.16 YRSearch..........................: |YRSearch| - 5.17 YRRunAfterMaps....................: |yankring-custom-maps| - 6. Tutorial...............................: |yankring-tutorial| - 6.1 YRShow............................: |YRShow-example| - 6.2 YRReplace.........................: |YRReplace-example| - 6.3 YRPush............................: |YRPush-example| - 6.4 YRClear...........................: |YRClear-example| - 6.8 YRPop.............................: |YRPop-example| - 6.9 Visual modes......................: |yankring-visual-example| - 6.10 Using ranges......................: |YRYankRange-example| - 6.11 :global...........................: |global-example| - 6.12 YRSearch..........................: |YRSearch-example| - 7. History................................: |yankring-history| - -============================================================================== -2. Description *yankring-description* - -Vim already maintains a list of numbered registers containing the last 9 -deletes. These previous deletes can be referenced using [register]p, so -"1p will paste the last delete, "2p the 2nd last delete. For more -information see |quote_number|. - -Vim does not provide any mechanism to reference previously yanked text. -In Emacs this feature is called the "kill ring". - -The YankRing plugin allows the user to configure the number of yanked -and deleted text. After text has been pasted, it can be replaced with -a previous value from the yankring. - -As of version 3.0, the yankring's content will persist (by default) -between starting and stopping Vim. - -The plugin can be toggled on and off, and supports: - Ranges - Registers - Counts - All visual modes - All motions - All text-objects - -If you have any suggestions for the improvement of this plugin, see the -yankring.vim file for my email address. Suggestions / bug reports are -always welcome. - -For details on the changes between versions see |yankring-history|. - -============================================================================== -3. Configuration *yankring-configure* - -The YankRing allows the user to choose which keys are to be assigned to -the various commands. By default, the YankRing chose keys identical -with Vim's standard behaviour/keys. - -3.1 Global Variables *yankring-globals* - -You can customize the YankRing by setting various global variables in -your |.vimrc|. -> - yankring_max_history -< Default: 100 - Controls how many elements to save in the yankring. > - let g:yankring_max_history = 100 - yankring_min_element_length -< Default: 1 - If the yanked element has a length less than this value - if will not be added to the YankRing. This can be useful if - you want to bypass single letter deletes by adding the - following to your .vimrc: > - let g:yankring_min_element_length = 2 - yankring_max_element_length -< Default: 1048576 (1M) - Will truncate a new entry to the specified maximum. If - g:yankring_max_element_length is set to 0, there is no limit. > - let g:yankring_max_element_length = 4194304 " 4M - yankring_max_display -< Default: 500 - When the YankRing window is opened, each element is displayed on a - separate line. Since each yank could be very large, the display of - the element is limited to the above default. > - let g:yankring_max_display = 70 - yankring_enabled -< Default: 1 - If you do not want to YankRing enabled by default, set this - variable in your |vimrc|. > - let g:yankring_enabled = 0 " Disables the yankring - yankring_persist -< Default: 1 - If you have enabled the storing of global variables in the |viminfo| - file, the YankRing will be default persist the contents of the ring - between starting and stopping Vim. To disable this feature: > - let g:yankring_persist = 0 - yankring_share_between_instances -< Default: 1 - By default, any instance of Vim will share the same yankring - history file. But if want each instance to have their own history - you can set this option to 0. Setting g:yankring_persist = 0 and - g:yankring_share_between_instances = 0 will ensure no 2 instances - of Vim share the same YankRing history AND the history is not - remembered the next time Vim is started. > - let g:yankring_share_between_instances = 0 - yankring_dot_repeat_yank -< Default: Based on the Vim cpoption setting - By default Vim will not repeat (using '.') yanking of text. This can - be controlled via the |'cpoptions'| setting. The YankRing now respects - the cpoptions setting, if 'y' is included and you press '.', the - previous yank command is repeated and added to the yankring. - You can also add this behaviour by setting this in your |vimrc|: > - let g:yankring_dot_repeat_yank = 1 - yankring_ignore_duplicate -< Default: 1 - Duplicates will not be added to the YankRing by default. If a - duplicate is found, that element will be moved to the top of the - yankring. This can be controlled by setting this in your |vimrc|: > - let g:yankring_ignore_duplicate = 0 - yankring_map_dot -< Default: 1 - If the '.' (repeat) command should be mapped by the yankring. Since - most of the normal commands yy,dd,dw,... are mapped by the yankring, - if g:yankring_map_dot is false the . operator will not repeat these - operations. The YankRing tracks several of the internal Vim registers - and decides whether an action was the result of the YankRing or an - action outside of it. If the previous action was a result of the - yankring, it will be executed again. If it was an action outside of - the yankring, it asks Vim to repeat the command. > - let g:yankring_map_dot = 1 - yankring_paste_using_g -< Default: 1 - By default [p] and [P] are mapped to interact with the yankring. This - option controls whether [gp] and [gP] are also mapped. Setting this - option to 0 will not create these maps. > - let g:yankring_paste_using_g = 1 - yankring_window_use_separate -< Default: 1 - This is a new feature as of the 2.0 release. The YankRing now uses a - separate split buffer to display the yankring. There are many buffer - specific maps that allow you to operate over the various elements from - within the yankring. Setting this option to 0, uses the 1.0 - interface. > - let g:yankring_window_use_separate = 0 - yankring_window_auto_close -< Default: 1 - By default once you choose an option in the YankRing buffer, the - action is performed and the buffer window is closed, returning you to - the original buffer. This option can be toggled from within the - YankRing buffer by pressing [a]. The YankRing buffer status line - visually indicates where auto close is enabled or disabled. There are - many times where you need to paste (or delete) many items from the - yankring. Pressing [a], disables auto close, allows you to paste many - items, and finally you can press [a] to re-enable auto close, followed - by [q] to quit the buffer window. > - let g:yankring_window_auto_close = 1 - yankring_window_use_horiz -< Default: 1 - When the YankRing window is opened, it uses a horizontal split at the - bottom of the Vim window. It can optionally use a vertical split by - setting this option to 0. > - let g:yankring_window_use_horiz = 0 " Use vertical split - yankring_window_height -< Default: 1 - If using a horizontal split, this option controls how high to make - the window. > - let g:yankring_window_height = 8 - yankring_window_width -< Default: 1 - If using a vertical split, this option controls how wide to make the - window. > - let g:yankring_window_width = 30 - yankring_window_use_bottom -< Default: 1 - If using a horizontal split, this option control whether the window is - opened at the top or bottom of the Vim window. Setting this option to - 0 forces the window to open at the top of the Vim window. > - let g:yankring_window_use_bottom = 1 - yankring_window_use_right -< Default: 1 - If using a vertical split, this option control whether the window is - opened on the left or right side of the Vim window. To force the - window to open on the left side, set this option to 0. > - let g:yankring_window_use_right = 1 - yankring_window_increment -< Default: 1 - If using a vertical split the default width of the vertical window may - be too narrow to view enough of the elements. Pressing [] will - increase the size of the window by this number of columns. Pressing - [] again will toggle it back to the original size. > - let g:yankring_window_increment = 50 - yankring_manage_numbered_reg -< Default: 0 - Vim already maintains a list of numbered registers containing the last - yanked item and the previous 9 deletes. These items can be referenced - using [register]p, so "0p will paste the last yank, "1p will paste the - last delete, "2p the 2nd last delete. For more information see - |quote_number|. - If you wish the YankRing to maintain these numbered registers so - the top 10 elements in the YankRing are in the numbered reqisters 0-9 - you can put the following in your |vimrc| > - let g:yankring_manage_numbered_reg = 1 - yankring_ignore_operator -< Default: 'g~ gu gU ! = gq g? > < zf g@' - There are a number of Vim operations which do not change any - registers, and therefore should not be captured by the yankring. - This list is used to ignore the appropriate operators. - You can put the following in your |vimrc| > - let g:yankring_ignore_operator = 'g~ gu gU ! = gq g? > < zf g@' - yankring_history_dir -< Default: $HOME - The YankRing stores the text in a file. This global variable - allows you to customize where the file(s) will be stored. - You can put the following in your |vimrc| > - let g:yankring_history_dir = '$VIM' - yankring_history_file -< Default: 'yankring_history' - The history filename prefix can be controlled by setting this - variable. - You can put the following in your |vimrc| > - let g:yankring_history_file = 'my_yankring_history_file' - yankring_clipboard_monitor -< Default: 1 - When flipping between applications I find I often copy text - and attempt to use it inside of Vim. This is typically easy - by simply using "+p, but there are times when I will repeatedly - want to use the same text later on. By default, the YankRing - will detect when Vim regains focus and check if the clipboard - has changed since it last checked. If so, it will add the contents - of the clipboard to the YankRing. To disable this feature - you can put the following in your |vimrc| > - let g:yankring_clipboard_monitor = 0 - yankring_paste_check_default_buffer -< Default: 1 - If the default register has changed without the YankRing registering - the change the YankRing will paste the top item from the history - rather than what is currently in the default register. - This option allows you to control the behaviour. Plugins can - intentionally change the default buffer which the YankRing has - no way to noticing. To disable this feature you can put the following - in your |vimrc| > - let g:yankring_paste_check_default_buffer = 0 - -< -3.2 Default Keys *yankring-mappings* - -You can choose to override the default keys by creating these global -variables in your |vimrc|. -> - yankring_n_keys -< n - normal mode - Default Vim 7.2: - 'Y D x X' - Default Vim 7.1 and below: - 'x yy dd yw dw ye de yE dE yiw diw yaw daw y$ d$ Y D yG dG ygg dgg' - - With the introduction of some new features in Vim 7.2 it is no longer - necessary to list all cmds which the YankRing will act upon. - The yankring_n_keys only lists actions which an omap cannot be used. - Using the yankring_separator, the above list is parsed and - individual mappings are created. For each of the above normal - commands the YankRing will include the text those commands - acted upon. There are many ways to accomplish the same result - in Vim, if you do not see a common key stroke you regularly use - simply add the following to your |vimrc| with the additional - keys you wished mapped. > - let g:yankring_n_keys = 'Y D x X' - yankring_o_keys -< o - omap mode - Default: - Standard motions: 'b B w W e E d y $ G ;' - Vim text objects: ' iw iW aw aW as is ap ip a] a[ i] i[' - 'a) a( ab i) i( ib a> a< i> i< at it ' - 'a} a{ aB i} i{ iB a" a'' a` i" i'' i`' - - As of Vim 7.2 omaps are used to capture changes to the registers - in Vim. All of the standard motion commands are captured. - New to YankRing 5.0 all default Vim text objects are also - captured. - Using the yankring_separator, the above list is parsed and - individual mappings are created. For each of the above normal - commands the YankRing will include the text those commands - acted upon. There are many ways to accomplish the same result - in Vim, if you do not see a common key stroke you regularly use - simply add the following to your |vimrc| with the additional - keys you wished mapped. > - let g:yankring_o_keys = 'b B w W e E d y $ G ; iw iW aw aW' - yankring_zap_keys -< Default: 'f F t T / ?' - omaps are enough for most operations except for f and t. - These motions prompt the user for a character or string which - they should act upon. These must be treated as a special case - in YankRing. > - let g:yankring_zap_keys = 'f t' - yankring_ignore_operator -< Default: 'g~ gu gU ! = gq g? > < zf g@' - There are certain motions which do not update any registers - in Vim. If the registers are not changed, there is nothing - the YankRing can capture. This list instructs the YankRing - to ignore any action for these keys. > - let g:yankring_ignore_operator = 'g~ gu gU' - yankring_v_key -< v - visual mode - Default: y - Yanks visually select text. > - yankring_del_v_key -< n - normal mode - Default: d - The visually select text is included in the YankRing and deleted. > - yankring_paste_n_bkey -< n - normal mode - b - before - Default: P - The default Vim paste key will retrieve from the yankring. This - will paste the text BEFORE the current position. - There is a special check to see if the text in the default paste - register is the same as what is in the current position of the - yankring. If it is not, we assume the user used some other - mechanism to yank text (ie yt). If this is the case - we paste the text in the default paste buffer. Using the - text can be replaced with the current entry from the yankring. - Since there are many ways to do things in Vim, this provides - the best integration. > - yankring_paste_n_akey -< n - normal mode - a - after - Default: p - The default Vim paste key will retrieve from the yankring. This - will paste the text AFTER the current position. - There is a special check to see if the text in the default paste - register is the same as what is in the current position of the - yankring. If it is not, we assume the user used some other - mechanism to yank text (ie yt). If this is the case - we paste the text in the default paste buffer. Using the - text can be replaced with the current entry from the yankring. - Since there are many ways to do things in Vim, this provides - the best integration. > - yankring_paste_v_key -< n - normal mode - Default: p - This will replace the visually select text with the contents - from the yankring. See yankring_paste_n_akey for additional - details. > - yankring_replace_n_pkey -< n - normal mode - Default: - If you do not want to open the YankRing window to choose your - selection, then you can paste (as usual) then use a YankRing - mapping to cycle through items in the YankRing. This is especially - useful if you know you recently used the text you are looking for. - If you wish to cycle through the yankring, replacing the previously - pasted text with the previous yanked text you can repeatedly press - (or whatever keystroke you choose to map it to). This map - moves backwards through the yankring, so you will retrieve your - most recent yank. - - I prefer not to use since I like using that key to cycle - through all the matches in the QuickFix window. You can add - something similar to this in your |.vimrc| to get similar - functionality. - - On Windows use the ALT-< character to move through the YankRing. - To determine what character # these are go into insert mode - in a new buffer. Press CTRL-V then ALT and the < key. - Leave insert mode, move the cursor onto the character - and press ga. This will display the decimal, hex and octal - representation of the character. In this case it is 172. > - if has('win32') - let g:yankring_replace_n_pkey = '' - let g:yankring_replace_n_nkey = '' - " Instead map these keys to moving through items in the quickfix window. - nnoremap :cp - nnoremap :cn - endif -< Other users have also stated that this will work: > - let g:yankring_replace_n_pkey = '' - let g:yankring_replace_n_nkey = '' - yankring_replace_n_nkey -< n - normal mode - Default: - If you do not want to open the YankRing window to choose your - selection, then you can paste (as usual) then use a YankRing - mapping to cycle through items in the YankRing. This is especially - useful if you know you recently used the text you are looking for. - If you wish to cycle through the yankring, replacing the previously - pasted text with the next yanked text you can repeatedly press - (or whatever keystroke you choose to map it to). This map - moves forwards through the YankRing, so you will retrieve your - most recent yank. - - I prefer not to use since I like using that key to cycle - through all the matches in the QuickFix window. You can add - something similar to this in your |.vimrc| to get similar - functionality. - - On Windows use the ALT-> character to move through the YankRing. - To determine what character # these are go into insert mode - in a new buffer. Press CTRL-V then ALT and the > key. - Leave insert mode, move the cursor onto the character - and press ga. This will display the decimal, hex and octal - representation of the character. In this case it is 174. > - if has('win32') - let g:yankring_replace_n_pkey = '' - let g:yankring_replace_n_nkey = '' - " Instead map these keys to moving through items in the quickfix window. - nnoremap :cp - nnoremap :cn - endif -< Other users have also stated that this will work: > - let g:yankring_replace_n_pkey = '' - let g:yankring_replace_n_nkey = '' - -3.3 Customizing Maps *yankring-custom-maps* - -The YankRing plugin uses the yankring_n_keys global variable to create -a number of defaults maps. The maps are of the form: > - nnoremap Y :YRYankCount 'Y' -< -When capital Y is pressed, the YankRing will execute 'Y' and capture the -output from Vim. But there are cases where you do not want the default -behaviour of Vim, since you have customized some of these maps. - -In this case, I usually map Y to be |y$|, which makes it consistent with -the |D| and |C| operators. The way yankring_n_keys works does not allow -me to customize this behaviour. Since many people may like to customize -the behaviour of these maps the YankRing will check to see if a -function called YRRunAfterMaps() exists. If it does, it will call -this function after it has created the maps. So in my case, I created -the following function in my |vimrc|: > - function! YRRunAfterMaps() - nnoremap Y :YRYankCount 'y$' - endfunction -< -You can do anything you need in this function. > - nnoremap Y :YRYankCount 'y$' -< -This line remaps Y (which the user presses) to the YRYankCount command. The -YRYankCount tells Vim to execute y$ instead. - - -============================================================================== -4. Using the YankRing Window: *yankring-window* - -This is a new feature as of the 2.0 release. The YankRing uses a -separate split buffer to display the yankring. There are many buffer -specific maps that allow you to operate over the various elements from -within the yankring. - -To display the YankRing buffer you can issue the :YRShow command. For -convience you can map a key, , to this command: > - :nnoremap :YRShow - -Status line~ -The first line in the YankRing window is the status line. > - AutoClose=1;ClipboardMonitor=1;Cmds:p,P,d,r,s,a,c,u,q,,;Help=? -< -Help=?, pressing [?] will toggle the display of available commands the -yankring window supports. Pressing [?] again will remove the additional -items. - -AutoClose=1 indicates the window will close when an action is performed -against elements within the yankring. If you wish to perform multiple -yankring operations press [a] to toggle the auto close feature off. Use the -commands below and when finished you can press [a] to toggle auto close on and -press [q] to close the window. The Cmds displayed are simply reminders of -the available keys. - -ClipboardMonitor=1 indicates the YankRing will monitor the clipboard (+) -during Focus change events. If the clipboard has changed since the YankRing -last checked, the contents are added to the YankRing. Pressing [c] allows -you to quickly toggle this setting since it may not be useful at times. - -YankRing window key list~ -The following table lists the description of the keys that can be used -in the YankRing window. - - Key Description~ - p Puts text after the cursor. In visual mode, all elements - selected will be pasted. - P Puts text before the cursor. In visual mode, all elements - selected will be pasted. - gp Just like "p", but leave the cursor just after the new text. - gP Just like "P", but leave the cursor just after the new text. - Just like "p". - Just like "p". - <2-LeftMouse> Just like "p". Normal mode only. - d Removes the element from the yankring. In visual mode all - elements selected will be removed. - r Just like "p", but in visual mode if many lines are selected - it will paste these in reverse order. - s Prompts you for a regex to search the YankRing and display - only matching items. - a Toggles the g:yankring_window_auto_close setting. - u Updates the YankRing window. - q Closes the YankRing window. - Toggles the width of the vertical window by the - g:yankring_window_increment setting. - ? Toggles the display of the help. - - - - -============================================================================== -5. Commands: *yankring-commands* - -The predefined mappings call some specific commands with special parameters. -If you are going to create additional maps, it is important you mirror -the same parameters. Most of these commands have been made obsolete by -the YankRing window, since it incorporates the functionality below, but -through maps against a buffer, instead of commands. This makes it much easier -to use. - - -5.1 YRToggle *YRToggle* - Allows you to enable and disable the YankRing quickly. This - command will remove the default maps and recreate them. - - Examples: > - :YRToggle " Toggles it - :YRToggle 1 " Enables it - :YRToggle 0 " Disables it -< - -5.2 YRClear *YRClear* - Clears all elements from the yankring. - See also |YRClear-example|. - - -5.3 YRShow *YRShow* - Similar to |:register|, will display all the entries in the yankring. - The element at the top will be the next element pasted from the - yankring. - - Examples: > - :YRShow " Shows all entries in the yankring - - --- YankRing --- - Elem Content - 1 five^@ - 2 four^@ - 3 three^@ - 4 two^@ - 5 one^@ -< - -5.5 YRGetElem *YRGetElem* - This command has two modes. If no parameters are provided, it - becomes interactive. It uses YRShow to display the list and - allows you to choose which element to paste. If a parameter - is supplied it will paste that element from the yankring. If the - number specified is outside of the YankRing an error is returned. - You may want to create a separate mapping for this call. > - nnoremap yr :YRGetElem -< See also |YRSearch|. - - Examples: - Assume there are 10 elements in the YankRing and element 6 is - at the top of the ring. > - :YRGetElem " Interactive mode, you choose from a list - :YRGetElem 4 " Will paste element 5. - :YRGetElem 12 " Will paste element 6. - :YRGetElem 99 " Error, invalid choice is reported - :YRGetElem 0 " Error, invalid choice is reported - - -5.6 YRGetMultiple *YRGetMultiple* - Will paste many elements from the YankRing in one command. - If the number specified is 1 or less, it is assumed you want - just the current element pasted. If the number specified is - greater than or equal to the number of elements in the yankring, - it is assumed you want all elements pasted. If a ! is included - as part of the command, paste the items in reverse order. - See the |yankring-tutorial| for more examples. - - Examples: - Assume there are 10 elements in the YankRing. > - :YRGetMultiple 4 " Will paste elements 1,2,3,4 - :YRGetMultiple! 4 " Will paste elements 4,3,2,1 - :YRGetMultiple " Will paste element 1 - :YRGetMultiple 12 " Will paste elements 1,2,...,10 - :YRGetMultiple 99 " Will paste elements 1,2,...,10 - :YRGetMultiple 0 " Will paste element 1 - - -5.7 YRPush *YRPush* - Allows the user to "push" additional entries into the yankring. - If you yanked text via a key mapping which does not use the - YankRing (or there is text on the clipboard) you can use this - command to add the text to the yankring. - - Examples: > - :YRPush " Push the " register's contents - :YRPush '*' " Push the "* register's contents (clipboard) - :YRPush '+' " Push the "+ register's contents (clipboard) - :YRPush 'a' " Push the "a register's contents -< See also |YRPush-example|. - - -5.8 YRPop *YRPop* - Allows you to pop any elements from the yankring. If no parameters - are provided, the 1st element is removed from the yankring. The - command optionally takes a second parameter to specify how many - elements to pop. The default value is 1. - - Examples: > - :YRPop " Removes the highest numbered element from the - yankring - :YRPop 3 " Removes the 3rd element from the yankring - :YRPop 3,5 " Removes 5 elements from the YankRing beginning - at element 3 -< See also |YRPop-example|. - - -5.9 YRYankCount *YRYankCount* - This command has the most mappings created for it. If you are - in normal mode and you are not specifying a range, this command - will add the text to the yankring. - - The goal of this command is to allow the YankRing to be integrated - as seamlessly as possible with Vim. So it supports counts and - registers. If you create a mapping to it, you must pass as a - parameter the action you want Vim to perform. You could do the - following: > - nnoremap \test :YRYankCount 'dd' -< This map is executed when you hit the '\test' keystrokes, but - it will actually delete the current line and add it to the - yankring. - - The following are the default mappings: > - nnoremap yy :YRYankCount 'yy' - nnoremap dd :YRYankCount 'dd' - nnoremap yw :YRYankCount 'yw' - nnoremap dw :YRYankCount 'dw' - nnoremap ye :YRYankCount 'ye' - nnoremap de :YRYankCount 'de' - nnoremap yiw :YRYankCount 'yiw' - nnoremap diw :YRYankCount 'diw' - nnoremap Y :YRYankCount 'Y' - nnoremap D :YRYankCount 'D' - nnoremap y$ :YRYankCount 'y$' - nnoremap d$ :YRYankCount 'd$' - nnoremap yG :YRYankCount 'yG' - nnoremap dG :YRYankCount 'dG' -< - Examples: - yy - Adds the current line to the yankring. - dd - Adds the current line to the YankRing and deletes it. - 5yw - Adds 5 words to the yankring. - "ade - Deletes the word, and puts it into both the yankring - and the "a register. - 10"zyy - Places 10 lines into both the YankRing and the "z - register. - See also |yankring-tutorial|. - - -5.10 YRYankRange *YRYankRange* - This command by default is only called in visual mode. All - visual modes (|characterwise-visual|, |linewise-visual|, - |blockwise-visual|) are supported. Any visually selected text - is added to the yankring. You can also call this command - directly using a range. - - Examples: - Visual mode - ----------- - Press v (to enter visual mode), highlight want you want, - press y (to yank the selected area). - Repeat using V and Control-V. - - Normal mode - ----------- > - :5,20YRYankRange " Will yank lines 5-20 into the yankring - :5,20YRDeleteRange " Will delete lines 5-20 and add them to - the yankring -< See also |YRYankRange-example|. - - -5.11 YRDeleteRange *YRDeleteRange* - This command is identical to YRYankRange, except the range is - also deleted. - - -5.12 YRPaste *YRPaste* - This command will paste elements from the yankring. By default it has - been mapped to p and P to match Vim's native key strokes. The text - pasted is exactly what was yanked, including newline characters and - blockwise-visual mode behaviours. It supports counts and registers. - - Examples: - p " Paste the current element from the YankRing after the cursor - P " Paste the current element from the YankRing before the cursor - 5p " Paste the current element from the YankRing after the cursor - 5 times - "ap " Ignore the YankRing and paste the contents of register "a - 5"ap " Ignore the YankRing and paste the contents of register "a - 5 times - See also |yankring-tutorial|. - - -5.13 YRReplace *YRReplace* - The purpose of the YankRing is to gain access to previously yanked - (or deleted) elements. This command will replace the previously - paste with a different entry from the yankring. - By default, I choose (P for previous) to replace the last paste - while moving backwards through the yankring. (N for next) - replaces the last paste while moving forward through the yankring. - - Examples: - See the |yankring-tutorial| for examples. - - -5.14 YRMapsCreate *YRMapsCreate* - This public function is responsible for creating the maps which - enable the yankring. This function is called by the YRToggle - command. - - -5.15 YRMapsDelete *YRMapsDelete* - This public function removes the YankRing maps and disables - the yankring. This function is called by the YRToggle command. - - -5.16 YRSearch *YRSearch* - This command is similar to |YRGetElem|. The command takes - one parameter which is a regular expression. Similar to - YRGetElem, it will display all items in the YankRing that match - the regular expression. It is also interactive, and will - prompt you to enter which match you wish pasted. - See also |YRSearch-example|. - - -============================================================================== -6. Tutorial *yankring-tutorial* - -To understand how to use the yankring, the following example will -demonstrate the various features. Assume you have created the following -mapping: > - nnoremap :YRShow -< - Assume we have this buffer: > - one - two - three - four - five -< *YRShow-example* - Now yank (yy) each line separately starting at line 1. - Display the contents of the YankRing by executing the command - YRShow, or pressing . The contents of the YankRing is - displayed in a new buffer. The size, location and type of buffer - is configurable via various options. See section 3 for more details. > - :YRShow or F11 - --- YankRing --- - Elem Content - 1 five^@ - 2 four^@ - 3 three^@ - 4 two^@ - 5 one^@ -< Since we yanked the text starting at line 1 and finishing at - line 5, the most current YankRing element is the last one, the - contents of line 5. "five^@" is displayed, the "^@" is a - newline character (since we issued a "yy"). - - *yankring-window-example* - At this point, you have two options. You can choose which element - from the YankRing you wish to paste and press or 'p' or 'P' - and a variety of other options, see |yankring-window|. After pressing - the key, the YankRing window will close (default behaviour). Pressing - '?' will display additional help for the commands that are active within - the YankRing window. Pressing '?' will toggle the help. - - You do not need to interact with the YankRing using the YankRing window. - Using the window makes many tasks must easier, but for speed using some - of the other maps can be preferrable if you know what you have yanked / - deleted recently. It was designed to work with Vim in the usual manner. - You can press, 'p', to paste the last item in yanked or deleted. - - Close the YankRing window by pressing 'q' or F11 (which toggles it). - - *YRReplace-example* - Now, go to the end of the file and press 'p'. The resulting - buffer appears as: > - one - two - three - four - five - five -< - Assume you did not want 'five", but a different entry from within the - yankring. moves backwards through the yankring, it will replace - the previous pasted text with a different item from the yankring. This - allows you to quickly iterate through different elements. is the - default mapping, this can be user defined. See the following options for - more details: > - yankring_replace_n_nkey, yankring_replace_n_pkey -< - After pressing the buffer results in: > - one - two - three - four - five - four -< Now press 2. This would be the same as pressing - two times in a row. This results in: > - one - two - three - four - five - two -< Now press to move forwards through the yankring, - this results in: > - one - two - three - four - five - three -< Display the contents of the yankring. > - :YRShow - --- YankRing --- - Elem Content - 1 five^@ - 2 four^@ - 3 three^@ - 4 two^@ - 5 one^@ -< - Now lets yank some text with a key stroke that has not been - mapped to the yankring. Place your cursor at the start of - line 4. Press 'ytr', yank-to-(to the character r), which yanks - the 'fou' letters (no newline character). Now press p. Here is - the result: > - one - two - three - ffouour - five - three -< This is good, even though the keys 'ytr' has not been mapped - to YRYankCount, the YankRing still pasted the most recently - yanked text. Since the text did not have a newline character - the 'fou' was inserted after the 'f'. - - Now replace that previous paste with the current element from - the YankRing by pressing . This is the result: > - one - two - three - four - one - five - three -< The #1 entry in the YankRing is still the line "five@". When - choosing the next entry, it wraps around to the last entry in - the yankring, element #5. The 'fou' was replaced with 'one^@'. - Since it had a newline character in it (when it was yanked) the - newline is included when it is pasted. - - *YRPush-example* - Assume you need to paste text from the system clipboard, and this - is text you will need routinely. We can simulate this by running - this command (see |quote+|): > - :let @+ = "From the clipboard\n" - :echo @+ - -< With the cursor at the start of the line with the word 'five', press 'p'. - We still have pasted the 'fou' which is in the default paste buffer. > - one - two - three - four - two - ffouive - three -< We have the option of getting the text from the clipboard directly - with the following. > - First undo the previous change - u - Next - "+p -< The line changes since we bypassed the yankring, and specified - which register to get the text from: > - four - five - From the clipboard - three -< replaces this with the #1 entry in the yankring: > - four - five - five - three -< Now add the contents of the clipboard to the yankring: > - :YRPush '+' -< Move the cursor to the last row 'three' and press 'p'. The result is: > - four - five - one - three - From the clipboard -< YRPush '+' adds the value of the register '+' to the yankring, but it - also adds its contents to the default Vim paste buffer. So pressing - 'p' pasted this text. Adding a new value to the YankRing we have - repositioned it which you can see with: > - :YRShow or F11 - --- YankRing --- - Elem Content - 1 From the clipboard^@ - 2 five^@ - 3 four^@ - 4 three^@ - 5 two^@ - 6 one^@ -< *YRClear-example* - Now we will clear the yankring, and begin over again. Delete all lines - from the buffer and replace them with the original rows: > - one - two - three - four - five -< Now run this command to clear the YankRing to start over: > - :YRClear -< - Issue a 'yy' on each of the 5 lines. If you run the YRShow command you - should see the following: > - :YRShow or F11 - --- YankRing --- - Elem Content - 1 five^@ - 2 four^@ - 3 three^@ - 4 two^@ - 5 one^@ -< *any-item-example* - If you need to quickly browse the YankRing to determine which element you - wish to paste you can simply press 'p' or or on any element - displayed in the YankRing window. Press '?' for more detailed description - of the commands available. - - Using the YankRing window can be much faster if you do not want to cycle - through the YankRing using and to find the element. - - *multiple-items-example* - There are times when you need to move through a buffer capturing many - different lines (or snippets of code) and eventually want to switch - buffers and paste these elements. With some advance planning you can do - this without the YankRing by issuing commands of the form: > - "ayy - "Ayy -< When specifying the register using UPPERCASE, Vim appends the yanked text - to register "a, instead of replacing it. Many times you forget the - advance planning (or didn't even know about this great feature) you can - use the YankRing window to do this easily. If this is the current - yankring: > - :YRShow or F11 - --- YankRing --- - Elem Content - 1 five^@ - 2 four^@ - 3 three^@ - 4 two^@ - 5 one^@ -< The YankRing works in |visual-mode|. To demonstrate move the cursor in - the buffer to the line with 'two'. Press 'F11' to display the yankring - window. Move the cursor to element 2, press 'V' to enable - |linewise-visual| mode and then press 'j' twice. This should have - visually highlighted elements 2,3,4. Press 'p' to paste all the - highlighted elements: > - one - two - four - three - two - three - four - five -< You can see here it has pasted four, three, two after the second line of - the buffer. Now press 'u' to undo our last change. Leave the cursor - on the second line 'two'. Press 'F11' to show the YankRing again. - Visually select the same lines, but this time press 'r' instead of 'p'. - 'r' is for reverse, so it will paste the following: > - one - two - two - three - four - three - four - five -< - *YRGetMultiple-example* - The same behaviour listed above (by visually selecting items in the - YankRing window) can be achieved using the YRGetMultiple command. - Assume there are 10 elements in the YankRing. > - :YRGetMultiple 4 " Will paste elements 1,2,3,4 - :YRGetMultiple! 4 " Will paste elements 4,3,2,1 - :YRGetMultiple " Will paste element 1 - :YRGetMultiple 12 " Will paste elements 1,2,...,10 - :YRGetMultiple 99 " Will paste elements 1,2,...,10 - :YRGetMultiple 0 " Will paste element 1 -< - *YRSearch-example* - The default size of the YankRing is 100 elements. It can be - tedious searching through the YankRing to find the element you - need. YRSearch is similar to YRShow except it will limit the - items displayed to only those items matching the regex provided. > - :YRShow - --- YankRing --- - Elem Content - 1 Three Mississippi - 2 Two Mississippi - 3 One Mississippi - 4 @", '\\/.*$^~[]' ) - :YRSearch Mississippi - --- YankRing --- - Elem Content - 1 Three Mississippi - 2 Two Mississippi - 3 One Mississippi -< Consider some items which require escaping the search string: > - :YRSearch @", '\\ - --- YankRing --- - Elem Content - 1 @", '\\/.*$^~[]' ) -< Forward slashes and various other symbols require escapes, in this - case the slash was not escaped enough: > - :YRSearch @", '\\/ - --- YankRing --- - Elem Content -< There are enough escapes this time: > - :YRSearch @", '\\\\/ - --- YankRing --- - Elem Content - 1 @", '\\/.*$^~[]' ) -< Period, star, dollar and so on require one slash: > - :YRSearch @", '\\\\/\.\*\$\^\~\[\] - --- YankRing --- - Elem Content - 1 @", '\\/.*$^~[]' ) - -< *YRPop-example* - You can remove any element from the YankRing by pressing pressing 'd' from - within the YankRing window. Visual mode is also supported to remove more - than one element at a time. > - :YRShow - --- YankRing --- - Elem Content - 1 four^@ - 2 three^@ - 3 two^@ - 4 one^@ -< Visually select elements 2,3. Press 'd', the result is: > - :YRShow - --- YankRing --- - Elem Content - 1 four^@ - 2 one^@ - -< *yankring-visual-example* - There are 3 visual modes and all are supported. Any visually selected - text is added to the yankring. You can try the various modes. Move - the cursor to inside the buffer (not the YankRing window). - - |characterwise-visual| - Go to line 1, press 'v' and move using the cursor keys until you have - highlighted some text. Then press y to yank the visually selected - area. Pressing p with paste the yanked region. - - |linewise-visual| - Go to line 2, press 'V' and move using the cursor keys until you have - highlighted some text. Notice the entire line is selected (including - the carriage returns). Then press y to yank the visually selected - area. Pressing p with paste the yanked region. - - |blockwise-visual| - Go to line 3 column 4, press CTRL-V and move to the right using the - cursor keys until you have highlighted some text. Then press y to - yank the visually selected area. Pressing p with paste the yanked - region. Notice the pasted text retained its blockwise visual - characteristics. - - *YRYankRange-example* - YRYankRange is called during visual modes, but it is also possible to - use this via the command line. > - :1,4YRYankRange - :3,$YRDeleteRange - :YRShow -< - *global-example* - Using Vim's |:global| command can be very useful at times. The example - adds all rows (in a buffer) to the YankRing if they have a certain - phrase: > - :g/addme/YRYankCount 'yy' -< This is the breakdown for the above command: > - :g - for each line in the buffer - /addme - check if the string "addme" is in the line - /YRYankCount 'yy' - Ask the YankRing to execute the 'yy' command - - -============================================================================== -7. History *yankring-history* - - 10.0: January 31, 2010 - NF: Change the buffer name to [YankRing] to resemble other - non-user buffers. - NF: Added g:yankring_min_element_length which can prevent - items from being added to the YankRing if they are too small. - For example, single character deletes (Vedran M). - BF: When shifting focus back to Vim, the YankRing may incorrectly - report: "YR:Failed to change to the yankring buffer, - please contact author". - BF: When entering Vim for the first time and hitting "p" - nothing was pasted (Mark Huiskes). - BF: When entering Vim for the first time and the - yankring_clipboard_monitor = 1, the clipboard entry - was not automatically added to the yankring. - BF: When overriding the default and setting - g:yankring_window_use_bottom = 0, the YankRing would - report the error (Sergey Khorev): - E21: Cannot make changes, 'modifiable' is off - - 9.0: August 29, 2009: - BF: You cannot execute a macro with ":normal @a". It is still - not possible, but you can execute it with ":normal! @a" - (A S Budden). - BF: When g:yankring_persist = 0 the YankRing could go into - an infinite loop (A S Budden). - BF: When replaying a macro which used any of the zap - keys (f,F,t,T,/,?) you were prompted again for the - string to match on (Ovidiu C). - BF: When checking the clipboard for changes - (g:yankring_clipboard_monitor == 1) only add the item - if it is not already in the ring. Previously, the item - was moved to the top of the YankRing each time you flipped - focus. - - 8.0: December 21, 2008: - NF: Changed the implementation of YRGetSearch() (David Liang). - BF: Under some unknown circumstances, the yankring can fail - to change to the correct buffer. Put in code to double - check and abort. - BF: Yanking and pasting a line which ends in a backslash - resulted in the backslash being replaced by "@@@". - BF: When repeating a command (".") which used any of the zap - keys (f,F,t,T,/,?) you were prompted again for the - string to match on (Vasilii Pascal). - - 7.0: November 14, 2008: - NF: Added support for the / and ? motions so that y/search is - supported (Vasilii Pascal). - NF: When the YankRing window is displayed (or updated) an additional - check is made against the default register. If it has changed - since the YankRing recorded it, the value will be added to the - history. - NF: Added support for more motions h, j, k, l, H, M, L, ^, 0, -, +, _. - And a pile of g motions g_, g^, gm, g$, gk, gj, gg, ge, gE. - NF: The YankRing window will display a message it is operating - in a limited mode if not using Vim 7.2 or the correct patch - level. - BF: Correction to some internal code which could lead to an - endless loop (John Beckett). - BF: Opening and closing the YankRing window with "set report=0" - reported "1 line less" messages (Bill McCarthy). - BF: Changed the default value of g:yankring_paste_check_default_buffer - to check if the default paste buffer has changed when pressing - 'p'. For example, if a plugin has changed the default registers - it will be pasted rather than the top item from the YankRing. - BF: YRMapsDelete did not remove all the maps created by the YankRing. - BF: Under particular circumstances, yanking text with embedded @ - characters were not properly stored and retrieved from the - YankRing (Andrew Long). - BF: Changed to use xmaps instead of vmaps so that the maps only work - in visual mode and not select mode (David Liang). - - 6.1: October 31, 2008: - BF: If the g:yankring_history_dir contains spaces (default on - Windows) an error was reported. A simple work around was to - let g:yankring_history_dir = 'c:\Vim' or no spaces (Matt). - - 6.0: October 25, 2008: - NF: The YankRing now maintains the history in a file. This means - if you are running multiple instances of Vim, they all see - the same yankring. - NF: The location and name of the file is configurable by the user. - NF: The g:yankring_separator is no longer used and has been removed. - NF: The g:yankring_max_element_length can be used to limit the size - of an element in the yankring. - NF: The g:yankring_share_between_instances can be used to indicate - whether each instance of Vim running on a machine should share - the history file or whether each should have their own - individual history file. - NF: The g:yankring_clipboard_monitor can be used to indicate - whether changes to the system clipboard should be added to the - YankRing (default is on). - NF: The YankRing window can toggle the clipboard monitor by pressing - 'c'. See the help in the window by pressing ?. - NF: Added some highlighting to the YankRing window (Marty Grenfell). - - 5.0: September 21, 2008: - NF: The YankRing can recognize certain Vim commands which do not - change the contents of a buffer and not attempt to capture it. - NF: The global variables which allow you to customize the behaviour - are now space separated instead of comma separated. This - provides greater flexibility but will require you to modify - your vimrc (if you have customized it). (Andy Wokula) - BF: If using from within insert mode, the YankRing inserted - characters into the buffer instead of capturing the changes, - this was fixed by Andy Wokula (Agathoklis Hatzimanikas). - BF: The YankRing did not properly account for all the different - forms of counts "5yy" worked but "y5y" did not (Edwin Shao). - - 4.1: August 9, 2008: - NF: The YankRing now allows you to override which operators should - be ignored (yankring_ignore_operator). By default this is - set for the standard Vim operators which do not modify any - registers (Examples: = and gu) (Andy Wokula). - NF: The YankRing did not map v_x (Matt Tolton). - BF: The expression register (quote=) was not accounted for correctly - (Agathoklis Hatzimanikas). - BF: Using the v:operator variable must be escaped when used in - a regular expression. - - 4.0: June 24, 2008: - NF: The YankRing by default now captures all |text-objects| and - all motions (|motion.txt|) which Vim supports. Version 3.0 only - supported a subset of the basic motion commands. - NF: Prior to this version only predefined maps triggered the - capture of data into the yankring. These maps only supported - yanks and deletes. The YankRing now also supports - operator-pending mode, which allows a greater range of operations - to be automatically captured and added to the yankring. - Operating pending mode functionality requires Vim 7.2 or Vim 7.1 - with patch #205. If using Vim 7.1 you can determine this with: - echo has("patch205") - NF: Prior to this version only yanks and deletes were registered - in the yankring. Changes are now also captured into the - yankring. - NF: The YankRing will also capture the system cliboard when focus is - returned to the vim window. This is useful if you copy text - between applications. - NF: The YankRing window always opened bottom horizontal. Now it - can be opened top or bottom and horizontal or vertically. - This can be controlled via variables in your .vimrc. - BF: The YankRing has an option to persist between instances - of Vim by storing the values in global variables within - the viminfo. This has led to some unusual ordering of - items in the ring from conflicts between instances. - This option has been turn off by default. - BF: Their was an issue with yanking using y$. - - 3.1: September 10, 2007: - NF: YRClear will now unlet all global variables it uses to store - the data if the persist storage is specified (the default). - Large values in the viminfo file could possibly affect other - applications. - - 3.0: September 7, 2007: - NF: Converted the YankRing to use the new Vim7's List object which - means it is no longer compatible with Vim6. - NF: By default the YankRing will now maintain the yankring's items - persistently by default. It does this via the |viminfo| file. - This means the contents of the YankRing rely on the internal - variables of only 1 Vim instance. - BF: YRToggle was not unmapping 'gp' and 'gP'. - BF: YRSearch prompted the user for a regex even if one was provided - on the command line. - BF: If g:yankring_manage_numbered_reg is enabled, the "." operator - did not correctly repeat the previous action (Pedro DeRose). - - 2.2: November 1, 2005: - NF: Added 'x' to the list of yankring_n_keys. This is very useful - in visual mode since it can delete a lot of characters. - - 2.2: October 19, 2005: - BF: If you pressed '?' to toggle the display of the help in the - YankRing window, the window would close. This also applied to - 'a', which allowed you to toggle the autoclose feature. - - 2.1: October 11, 2005: - NF: Added the ability for the YankRing to override Vim's numbered - registers. Instead of the numbered registers holding the last - yanked value, and the 9 previous deletes, they will now reflect - the top 10 items in the yankring. This allows you to reference - them directly with "5p. - - 2.0: August 20, 2005: - NF: Much improved usability, the YankRing now has a "GUI" to service - the yankring. If YRShow or YRSearch is used, a split buffer is - opened which displays all the elements in the yankring. There - are a number of maps that allow you to interact with the - contents. The window can be positioned vertically or - horizontally as well as being sized all through options - specified in your vimrc. - NF: YRPop can now delete any items from the yankring, rather - that just from the top. - NF: YRSetTop has been removed, it is no longer required as the - internal representation of the YankRing has changed. - BF: If g:yankring_ignore_duplicate is set (which is the default) - you could get some unpredicable results when moving - backwards and forwards ( and ) through the - previous values. - - 1.7: June 10, 2005: - BF: The expression register support added in version 1.6 used - getreg('='), which has the side effect of executing the - expression register. Depending on what was in the register - this could have unusual results. Changed to use histget(). - - 1.6: April 20, 2005: - NF: YRSearch is similar to YRGetElem. Given a regular expression - it will interactively display all the elements in the yankring - that match the regular expression. You can enter the number - of the element to paste it. If you have many elements within - the yankring, this can help you identify them more easily. - NF: Updated the default history size from 30 to 100, which is - partially the reason for the YRSearch command. - NF: By default it supports "gp" and "gP", in addition to "p" and "P". - NF: Added support for the expression register (:h quote=). Here - is an example of how it is used: - "="X"P - - 1.5: March 30, 2005: - NF: The YankRing now respects the cpoptions setting, if 'y' is - included and you press '.', the previous yank command is executed - and added to the yankring. You can also add this behaviour by - setting this in your |vimrc|: > - let g:yankring_dot_repeat_yank = 1 -< NF: Duplicates will not be added to the YankRing by default. If - a duplicate is found, the element will be moved to the top - of the yankring. This can be controlled by setting this in - your |vimrc|: > - let g:yankring_ignore_duplicate = 0 (1 is default) -< BF: Regression from version 1.4, the '.' operator may incorrectly - insert garbage. - - 1.4: March 28, 2005: - NF: YRToggle has been updated. If you toggle the YankRing off - (disable) the maps it creates are removed. Calling YRToggle - again will recreate the maps. This truly disables the yankring, - where the previous version attempted to do this via code. - BF: Using the '.' operator was not correctly replaying operations - that did not move text in some way (g~t_) changed the case - of the text but a '.' did not replay it. - BF: When replacing previously pasted text the YankRing did not - respect what key was used to paste the text originally. - All replaced items were pasted using 'p', even if you had - originally pasted the text with 'P'. - - 1.3: March 16, 2005: - BF: The '.' operator did not handle the <<, >> shift operator. - Pressing '.' would result in the previous YankRing operation - instead of repeating the shift. - - 1.2: March 14, 2005: - NF: Added support for '.' operator to repeat the last change. - NF: Changed YRGetElem to show the contents of the yankring - and allow you to choose which element you want pasted. - It is only interactive if you do not provide a parameter. - NF: Added 'ygg,dgg' default maps by extending the yankring_n_keys - variable. - - 1.1: March 09, 2005: - NF: Added support for the black hole register |quote_|. - NF: Custom Maps allows the user to more finely tune the yankring - maps to perform whatever action they require. This function, - YRRunAfterMaps(), is run automatically after the YankRing - creates it's default mappings. See |yankring-custom-maps|. - NF: Added some more default maps by extending the yankring_n_keys - variable. It now contains: - yy,dd,yw,dw,ye,de,yE,dE,yiw,diw,yaw,daw,y$,d$,Y,D,yG,dG - NOTE: You can easily extend these default mappings by - creating this global variable in your |vimrc|, you do not - have to wait for the plugin to be updated. - NF: Added support for Dr. Chips GetLatestVimScripts plugin. - BF: The check for g:yankring_n_keys was incorrect, so it was not - possible to override the default maps. - - 1.0: March 08, 2005: - NF: Initial release. - -vim: ts=4 ft=help tw=78 diff --git a/sources_forked/yankring/plugin/yankring.vim b/sources_forked/yankring/plugin/yankring.vim deleted file mode 100755 index 769dcd6d..00000000 --- a/sources_forked/yankring/plugin/yankring.vim +++ /dev/null @@ -1,2461 +0,0 @@ -" yankring.vim - Yank / Delete Ring for Vim -" --------------------------------------------------------------- -" Version: 10.0 -" Authors: David Fishburn -" Last Modified: 2010 Jan 24 -" Script: http://www.vim.org/scripts/script.php?script_id=1234 -" Based On: Mocked up version by Yegappan Lakshmanan -" http://groups.yahoo.com/group/vim/post?act=reply&messageNum=34406 -" License: GPL (Gnu Public License) -" GetLatestVimScripts: 1234 1 :AutoInstall: yankring.vim - -if exists('loaded_yankring') || &cp - finish -endif - -if v:version < 700 - echomsg 'yankring: You need at least Vim 7.0' - finish -endif - -let loaded_yankring = 100 - -let s:yr_has_voperator = 0 -if v:version > 701 || ( v:version == 701 && has("patch205") ) - let s:yr_has_voperator = 1 -endif - -if !exists('g:yankring_history_dir') - let g:yankring_history_dir = expand('$HOME') -else - let g:yankring_history_dir = expand(g:yankring_history_dir) -endif - -if !exists('g:yankring_history_file') - let g:yankring_history_file = 'yankring_history' -endif - -" Allow the user to override the # of yanks/deletes recorded -if !exists('g:yankring_max_history') - let g:yankring_max_history = 100 -elseif g:yankring_max_history < 0 - let g:yankring_max_history = 100 -endif - -" Specify the minimum length of 1 entry -if !exists('g:yankring_min_element_length') - let g:yankring_min_element_length = 1 -endif - -" Specify the maximum length of 1 entry (1MB default) -if !exists('g:yankring_max_element_length') - let g:yankring_max_element_length = 1048576 -endif - -" Allow the user to specify if the plugin is enabled or not -if !exists('g:yankring_enabled') - let g:yankring_enabled = 1 -endif - -" Specify max display length for each element for YRShow -if !exists('g:yankring_max_display') - let g:yankring_max_display = 0 -endif - -" Check if yankring should persist between Vim instances -if !exists('g:yankring_persist') - let g:yankring_persist = 1 -endif - -" Check if yankring share 1 file between all instances of Vim -if !exists('g:yankring_share_between_instances') - let g:yankring_share_between_instances = 1 -endif - -" Specify whether the results of the ring should be displayed -" in a separate buffer window instead of the use of echo -if !exists('g:yankring_window_use_separate') - let g:yankring_window_use_separate = 1 -endif - -" Specifies whether the window is closed after an action -" is performed -if !exists('g:yankring_window_auto_close') - let g:yankring_window_auto_close = 1 -endif - -" When displaying the buffer, how many lines should it be -if !exists('g:yankring_window_height') - let g:yankring_window_height = 8 -endif - -" When displaying the buffer, how many lines should it be -if !exists('g:yankring_window_width') - let g:yankring_window_width = 30 -endif - -" When displaying the buffer, where it should be placed -if !exists('g:yankring_window_use_horiz') - let g:yankring_window_use_horiz = 1 -endif - -" When displaying the buffer, where it should be placed -if !exists('g:yankring_window_use_bottom') - let g:yankring_window_use_bottom = 1 -endif - -" When displaying the buffer, where it should be placed -if !exists('g:yankring_window_use_right') - let g:yankring_window_use_right = 1 -endif - -" If the user presses , toggle the width of the window -if !exists('g:yankring_window_increment') - let g:yankring_window_increment = 50 -endif - -" Controls whether the . operator will repeat yank operations -" The default is based on cpoptions: |cpo-y| -" y A yank command can be redone with ".". -if !exists('g:yankring_dot_repeat_yank') - let g:yankring_dot_repeat_yank = (&cpoptions=~'y'?1:0) -endif - -" Only adds unique items to the yankring. -" If the item already exists, that element is set as the -" top of the yankring. -if !exists('g:yankring_ignore_duplicate') - let g:yankring_ignore_duplicate = 1 -endif - -" Vim automatically manages the numbered registers: -" 0 - last yanked text -" 1-9 - last deleted items -" If this option is turned on, the yankring will manage the -" values in them. -if !exists('g:yankring_manage_numbered_reg') - let g:yankring_manage_numbered_reg = 0 -endif - -" Allow the user to specify what characters to use for the mappings. -if !exists('g:yankring_n_keys') - " 7.1.patch205 introduces the v:operator function which was essential - " to gain the omap support. - if s:yr_has_voperator == 1 - " Use omaps for the rest of the functionality - let g:yankring_n_keys = 'Y D x X' - else - let g:yankring_n_keys = 'x yy dd yw dw ye de yE dE yiw diw yaw daw y$ d$ Y D yG dG ygg dgg' - endif -endif - -" Allow the user to specify what operator pending motions to map -if !exists('g:yankring_o_keys') - " o-motions and text objects, without zap-to-char motions - let g:yankring_o_keys = 'b B w W e E d h j k l H M L y G ^ 0 $ , ;' - let g:yankring_o_keys .= ' g_ g^ gm g$ gk gj gg ge gE - + _ ' - let g:yankring_o_keys .= ' iw iW aw aW as is ap ip a] a[ i] i[ a) a( ab i) i( ib a> a< i> i< at it a} a{ aB i} i{ iB a" a'' a` i" i'' i`' -endif - -if !exists('g:yankring_zap_keys') - let g:yankring_zap_keys = 'f F t T / ? @' -endif - -" Allow the user to specify what operator pending motions to map -if !exists('g:yankring_ignore_operator') - let g:yankring_ignore_operator = 'g~ gu gU ! = gq g? > < zf g@' -endif -let g:yankring_ignore_operator = ' '.g:yankring_ignore_operator.' ' - -" Whether we should map the . operator -if !exists('g:yankring_map_dot') - let g:yankring_map_dot = 1 -endif - -" Whether we sould map the "g" paste operators -if !exists('g:yankring_paste_using_g') - let g:yankring_paste_using_g = 1 -endif - -if !exists('g:yankring_v_key') - let g:yankring_v_key = 'y' -endif - -if !exists('g:yankring_del_v_key') - let g:yankring_del_v_key = 'd x' -endif - -if !exists('g:yankring_paste_n_bkey') - let g:yankring_paste_n_bkey = 'P' -endif - -if !exists('g:yankring_paste_n_akey') - let g:yankring_paste_n_akey = 'p' -endif - -if !exists('g:yankring_paste_v_bkey') - let g:yankring_paste_v_bkey = 'P' -endif - -if !exists('g:yankring_paste_v_akey') - let g:yankring_paste_v_akey = 'p' -endif - -if !exists('g:yankring_paste_check_default_buffer') - let g:yankring_paste_check_default_buffer = 1 -endif - -if !exists('g:yankring_replace_n_pkey') - let g:yankring_replace_n_pkey = '' -endif - -if !exists('g:yankring_replace_n_nkey') - let g:yankring_replace_n_nkey = '' -endif - -if !exists('g:yankring_clipboard_monitor') - let g:yankring_clipboard_monitor = (has('clipboard')?1:0) -endif - -if !exists('g:yankring_default_menu_mode') - let g:yankring_default_menu_mode = 3 -endif - -" Script variables for the yankring buffer -let s:yr_buffer_name = '[YankRing]' -let s:yr_buffer_last_winnr = -1 -let s:yr_buffer_last = -1 -let s:yr_buffer_id = -1 -let s:yr_search = '' -let s:yr_remove_omap_dot = 0 -let s:yr_history_version = 'v2' -let s:yr_history_v1_nl = '@@@' -let s:yr_history_v1_nl_pat = '\%(\\\)\@ 0 - let new_state = ((a:1 == 1) ? 1 : 0) - endif - - " YRToggle accepts an integer value to specify the state - if new_state == g:yankring_enabled - return - elseif new_state == 1 - call s:YRMapsCreate() - else - call s:YRMapsDelete() - endif -endfunction - - -" Enables or disables the yankring -function! s:YRDisplayElem(disp_nbr, script_var) - if g:yankring_max_display == 0 - if g:yankring_window_use_separate == 1 - let max_display = 500 - else - let max_display = g:yankring_window_width + - \ g:yankring_window_increment - - \ 12 - endif - else - let max_display = g:yankring_max_display - endif - - let elem = matchstr(a:script_var, '^.*\ze,.*$') - if s:yr_history_version == 'v1' - " v1 - " let elem = substitute(elem, '\%(\\\)\@max_display)? - \ (strpart(elem,0,max_display). - \ '...'): - \ elem - \ ) - \ ) - - return "" -endfunction - - -" Enables or disables the yankring -function! s:YRShow(...) - " If no parameter was provided assume the user wants to - " toggle the display. - let toggle = 1 - if a:0 > 0 - let toggle = matchstr(a:1, '\d\+') - endif - - if toggle == 1 - if bufwinnr(s:yr_buffer_id) > -1 - " If the YankRing window is already open close it - exec bufwinnr(s:yr_buffer_id) . "wincmd w" - hide - - " Switch back to the window which the YankRing - " window was opened from - if bufwinnr(s:yr_buffer_last) != -1 - " If the buffer is visible, switch to it - exec s:yr_buffer_last_winnr . "wincmd w" - endif - - return - endif - endif - - " Reset the search string, since this is automatically called - " if the yankring window is open. A previous search must be - " cleared since we do not want to show new items. The user can - " always run the search again. - let s:yr_search = "" - - " It is possible for registers to be changed outside of the - " maps of the YankRing. Perform this quick check when we - " show the contents (or when it is refreshed). - if g:yankring_paste_check_default_buffer == 1 - let save_reg = 0 - let register = ((&clipboard=='unnamed')?'+':'"') - - if &clipboard == 'unnamed' && getreg('+') != s:yr_prev_clipboard - let save_reg = 1 - endif - if register == '"' && getreg('"') != s:yr_prev_reg_unnamed - let save_reg = 1 - endif - - if save_reg == 1 - " The user has performed a yank / delete operation - " outside of the yankring maps. Add this - " value to the yankring. - call YRRecord(register) - endif - endif - - " List is shown in order of replacement - " assuming using previous yanks - let output = "--- YankRing ---\n" - let output = output . "Elem Content\n" - - call s:YRHistoryRead() - let disp_item_nr = 1 - for elem in s:yr_history_list - let output = output . s:YRDisplayElem(disp_item_nr, elem) . "\n" - let disp_item_nr += 1 - endfor - - if g:yankring_window_use_separate == 1 - call s:YRWindowOpen(output) - else - echo output - endif -endfunction - - -" Used in omaps if a following character is required -" like with motions (f,t) -function! s:YRGetChar() - let msg = "YR:Enter character:" - echomsg msg - let c = getchar() - if c =~ '^\d\+$' - let c = nr2char(c) - echomsg msg.c - endif - return c -endfunction - - -" Used in omaps if a following string is required -" like with motions (/,?) -" function! s:YRGetSearch() -" " let msg = "YR:Enter string:" -" " echomsg msg -" let str = input("YR:Enter string:") -" " let str = '' -" " while 1==1 -" " let c = getchar() -" " if c =~ '^\d\+$' -" " let c = nr2char(c) -" " if c == "\" -" " return c -" " endif -" " if c == "\" -" " break -" " endif -" " let str = str.c -" " echomsg msg.str -" " else -" " break -" " endif -" " endwhile -" return str -" endfunction - - -" Paste a certain item from the yankring -" If no parameter is provided, this function becomes interactive. It will -" display the list (using YRShow) and allow the user to choose an element. -function! s:YRGetElem(...) - if s:yr_count == 0 - call s:YRWarningMsg('YR: yankring is empty') - return -1 - endif - - let default_buffer = ((&clipboard=='unnamed')?'+':'"') - - let direction = 'p' - if a:0 > 1 - " If the user indicated to paste above or below - " let direction = ((a:2 ==# 'P') ? 'P' : 'p') - if a:2 =~ '\(p\|gp\|P\|gP\)' - let direction = a:2 - endif - endif - - " Check to see if a specific value has been provided - let elem = 0 - if a:0 > 0 - " Ensure we get only the numeric value (trim it) - let elem = matchstr(a:1, '\d\+') - let elem = elem - 1 - else - " If no parameter was supplied display the yankring - " and prompt the user to enter the value they want pasted. - call s:YRShow(0) - - if g:yankring_window_use_separate == 1 - " The window buffer is used instead of command line - return - endif - - let elem = input("Enter # to paste:") - - " Ensure we get only the numeric value (trim it) - let elem = matchstr(elem, '\d\+') - - if elem == '' - " They most likely pressed enter without entering a value - return - endif - - let elem = elem - 1 - endif - - if elem < 0 || elem >= s:yr_count - call s:YRWarningMsg("YR: Invalid choice:".elem) - return -1 - endif - - let default_buffer = ((&clipboard=='unnamed')?'+':'"') - call setreg(default_buffer - \ , s:YRGetValElemNbr((elem), 'v') - \ , s:YRGetValElemNbr((elem), 't') - \ ) - exec "normal! ".direction - - " Set the previous action as a paste in case the user - " press . to repeat - call s:YRSetPrevOP('p', '', default_buffer, 'n') - -endfunction - - -" Starting the top of the ring it will paste x items from it -function! s:YRGetMultiple(reverse_order, ...) - if s:yr_count == 0 - call s:YRWarningMsg('YR: yankring is empty') - return - endif - - " If the user provided a range, exit after that many - " have been displayed - let max = 1 - if a:0 == 1 - " If no yank command has been supplied, assume it is - " a full line yank - let max = matchstr(a:1, '\d\+') - endif - if max > s:yr_count - " Default to all items if they specified a very high value - let max = s:yr_count - endif - - " Base the increment on the sort order of the results - let increment = ((a:reverse_order==0)?(1):(-1)) - if a:reverse_order == 0 - let increment = 1 - let elem = 0 - else - let increment = -1 - let elem = (max - 1) - endif - - if a:0 > 1 - let iter = 1 - while iter <= a:0 - let elem = (a:{iter} - 1) - call s:YRGetElem(elem) - let iter = iter + 1 - endwhile - else - while max > 0 - " Paste the first item, and move on to the next. - " digits the element # is - call s:YRGetElem(elem) - let elem = elem + increment - let max = max - 1 - endwhile - endif -endfunction - - -" Given a regular expression, check each element within -" the yankring, display only the matching items and prompt -" the user for which item to paste -function! s:YRSearch(...) - if s:yr_count == 0 - call s:YRWarningMsg('YR: yankring is empty') - return - endif - - let s:yr_search = "" - " If the user provided a range, exit after that many - " have been displayed - if a:0 == 0 || (a:0 == 1 && a:1 == "") - let s:yr_search = input('Enter [optional] regex:') - else - let s:yr_search = a:1 - endif - - if s:yr_search == "" - " Show the entire yankring - call s:YRShow(0) - return - endif - - " List is shown in order of replacement - " assuming using previous yanks - let output = "--- YankRing ---\n" - let output = output . "Elem Content\n" - let valid_choices = [] - - let search_result = filter(copy(s:yr_history_list), "v:val =~ '".s:yr_search."'") - - let disp_item_nr = 1 - - for elem in s:yr_history_list - if elem =~ s:yr_search - let output = output . s:YRDisplayElem(disp_item_nr, elem) . "\n" - call add(valid_choices, disp_item_nr.'') - endif - let disp_item_nr += 1 - endfor - - if len(valid_choices) == 0 - let output = output . "Search for [".s:yr_search."] did not match any items " - endif - - if g:yankring_window_use_separate == 1 - call s:YRWindowOpen(output) - else - if len(valid_choices) > 0 - echo output - let elem = input("Enter # to paste:") - - " Ensure we get only the numeric value (trim it) - let elem = matchstr(elem, '\d\+') - - if elem == '' - " They most likely pressed enter without entering a value - return - endif - - if index(valid_choices, elem) != -1 - exec 'YRGetElem ' . elem - else - " User did not choose one of the elements that were found - " Remove leading , - call s:YRWarningMsg( "YR: Item[" . elem . "] not found, only valid choices are[" . - \ join(valid_choices, ',') . - \ "]" - \ ) - return -1 - endif - - else - call s:YRWarningMsg( "YR: The pattern [" . - \ s:yr_search . - \ "] does not match any items in the yankring" - \ ) - endif - endif - -endfunction - - -" Resets the common script variables for managing the ring. -function! s:YRReset() - let s:yr_history_list = [] - " Update the history file - call s:YRHistorySave() -endfunction - - -" Clears the yankring by simply setting the # of items in it to 0. -" There is no need physically unlet each variable. -function! s:YRInit(...) - let s:yr_next_idx = 0 - let s:yr_last_paste_idx = 0 - let s:yr_count = 0 - let s:yr_history_last_upd = 0 - let s:yr_history_list = [] - let s:yr_paste_dir = 'p' - - " For the . op support - let s:yr_prev_op_code = '' - let s:yr_prev_op_mode = 'n' - let s:yr_prev_count = '' - let s:yr_prev_reg = '' - let s:yr_prev_reg_unnamed = '' - let s:yr_prev_reg_small = '' - let s:yr_prev_reg_insert = '' - let s:yr_prev_reg_expres = '' - let s:yr_prev_clipboard = '' - let s:yr_prev_vis_lstart = 0 - let s:yr_prev_vis_lend = 0 - let s:yr_prev_vis_cstart = 0 - let s:yr_prev_vis_cend = 0 - let s:yr_prev_changenr = 0 - let s:yr_prev_repeating = 0 - - " This is used to determine if the visual selection should be - " reset prior to issuing the YRReplace - let s:yr_prev_vis_mode = 0 - - if a:0 == 0 && g:yankring_persist == 0 - " The user wants the yankring reset each time Vim is started - call s:YRClear() - endif - - call s:YRHistoryRead() -endfunction - - -" Clears the yankring by simply setting the # of items in it to 0. -" There is no need physically unlet each variable. -function! s:YRClear() - call s:YRReset() - call s:YRInit('DoNotClear') - - " If the yankring window is open, refresh it - call s:YRWindowUpdate() -endfunction - - -" Determine which register the user wants to use -" For example the 'a' register: "ayy -function! s:YRRegister() - " v:register can be blank in some (unknown) cases - " so test for this condition and return the - " default register - let user_register = ((v:register=='')?('"'):(v:register)) - if &clipboard == 'unnamed' && user_register == '"' - let user_register = '+' - endif - return user_register -endfunction - - -" Allows you to push a new item on the yankring. Useful if something -" is in the clipboard and you want to add it to the yankring. -" Or if you yank something that is not mapped. -function! s:YRPush(...) - let user_register = s:YRRegister() - - if a:0 > 0 - " If no yank command has been supplied, assume it is - " a full line yank - let user_register = ((a:1 == '') ? user_register : a:1) - endif - - " If we are pushing something on to the yankring, add it to - " the default buffer as well so the next item pasted will - " be the item pushed - let default_buffer = ((&clipboard=='unnamed')?'+':'"') - call setreg(default_buffer, getreg(user_register), - \ getregtype(user_register)) - - call s:YRSetPrevOP('', '', '', 'n') - call YRRecord(user_register) -endfunction - - -" Allows you to pop off any element from the yankring. -" If no parameters are provided the first element is removed. -" If a vcount is provided, that many elements are removed -" from the top. -function! s:YRPop(...) - if s:yr_count == 0 - call s:YRWarningMsg('YR: yankring is empty') - return - endif - - let v_count = 1 - if a:0 > 1 - let v_count = a:2 - endif - - " If the user provided a parameter, remove that element - " from the yankring. - " If no parameter was provided assume the first element. - let elem_index = 0 - if a:0 > 0 - " Get the element # from the parameter - let elem_index = matchstr(a:1, '\d\+') - let elem_index = elem_index - 1 - endif - - " If the user entered a count, then remove that many - " elements from the ring. - while v_count > 0 - call s:YRMRUDel('s:yr_history_list', elem_index) - let v_count = v_count - 1 - endwhile - - " If the yankring window is open, refresh it - call s:YRWindowUpdate() -endfunction - - -" Adds this value to the yankring. -function! YRRecord(...) - - let register = '"' - if a:0 > 0 - " If no yank command has been supplied, assume it is - " a full line yank - let register = ((a:1 == '') ? register : a:1) - endif - - " v:register can be blank in some (unknown) cases - " if v:register == '' || v:register == '_' - if v:register == '_' - " Black hole register, ignore recording the operation - return "" - endif - - let register = ((&clipboard=='unnamed')?'+':register) - - " let s:yr_prev_changenr = changenr() - if register == '"' - " If the change has occurred via an omap, we must delay - " the capture of the default register until this event - " since register updates are not reflected until the - " omap function completes - let s:yr_prev_reg_unnamed = getreg('"') - let s:yr_prev_reg_small = getreg('-') - endif - - " Add item to list - " This will also account for duplicates. - call s:YRMRUAdd( 's:yr_history_list' - \ , getreg(register) - \ , getregtype(register) - \ ) - - if register =~ '[+*]' - let s:yr_prev_clipboard = @+ - endif - - " If the yankring window is open, refresh it - call s:YRWindowUpdate() - - " Manage the numbered registers - if g:yankring_manage_numbered_reg == 1 - call s:YRSetNumberedReg() - endif - - return "" -endfunction - - -" Adds this value to the yankring. -function! YRRecord3() - let register = '"' - - " v:register can be blank in some (unknown) cases - " if v:register == '' || v:register == '_' - if v:register == '_' - " Black hole register, ignore recording the operation - return "" - endif - - let register = ((&clipboard=='unnamed')?'+':register) - - if register == '"' - " If the change has occurred via an omap, we must delay - " the capture of the default register until this event - " since register updates are not reflected until the - " omap function completes - let s:yr_prev_reg_unnamed = getreg('"') - let s:yr_prev_reg_small = getreg('-') - endif - - if s:yr_remove_omap_dot == 1 - call s:YRMapsCreate('add_only_zap_keys') - endif - - " Add item to list - " This will also account for duplicates. - call s:YRMRUAdd( 's:yr_history_list' - \ , getreg(register) - \ , getregtype(register) - \ ) - - if register =~ '[+*]' - let s:yr_prev_clipboard = @+ - endif - - " If the yankring window is open, refresh it - call s:YRWindowUpdate() - - " Manage the numbered registers - if g:yankring_manage_numbered_reg == 1 - call s:YRSetNumberedReg() - endif - - return "" -endfunction - - -" Record the operation for the dot operator -function! s:YRSetPrevOP(op_code, count, reg, mode) - let s:yr_prev_op_code = a:op_code - let s:yr_prev_op_mode = a:mode - let s:yr_prev_count = a:count - let s:yr_prev_changenr = changenr() - let s:yr_prev_reg = a:reg - let s:yr_prev_reg_unnamed = getreg('"') - let s:yr_prev_reg_small = getreg('-') - let s:yr_prev_reg_insert = getreg('.') - let s:yr_prev_vis_lstart = line("'<") - let s:yr_prev_vis_lend = line("'>") - let s:yr_prev_vis_cstart = col("'<") - let s:yr_prev_vis_cend = col("'>") - let s:yr_prev_reg_expres = histget('=', -1) - - if a:mode == 'n' - " In normal mode, the change has already - " occurred, therefore we can mark the - " actual position of the change. - let s:yr_prev_chg_lstart = line("'[") - let s:yr_prev_chg_lend = line("']") - let s:yr_prev_chg_cstart = col("'[") - let s:yr_prev_chg_cend = col("']") - else - " If in operator pending mode, the change - " has not yet occurred. Therefore we cannot - " use the '[ and ]' markers. But we can - " store the current line position. - let s:yr_prev_chg_lstart = line(".") - let s:yr_prev_chg_lend = line(".") - let s:yr_prev_chg_cstart = col(".") - let s:yr_prev_chg_cend = col(".") - endif - - " If storing the last change position (using '[, ']) - " is not good enough, then another option is to: - " Use :redir on the :changes command - " and grab the last item. Store this value - " and compare it is YRDoRepeat. -endfunction - - -" Adds this value to the yankring. -function! s:YRDoRepeat() - let dorepeat = 0 - - if s:yr_has_voperator == 1 - " Let Vim handle the repeat, just capture the updates - " as usual. - return 0 - endif - - if s:yr_prev_op_code =~ '^c' - " You cannot repeat change operations, let Vim's - " standard mechanism handle these, or the user will - " be prompted again, instead of repeating the - " previous change. - return 0 - endif - - if g:yankring_manage_numbered_reg == 1 - " When resetting the numbered register we are - " must ignore the comparision of the " register. - if s:yr_prev_reg_small == getreg('-') && - \ s:yr_prev_reg_insert == getreg('.') && - \ s:yr_prev_reg_expres == histget('=', -1) && - \ s:yr_prev_vis_lstart == line("'<") && - \ s:yr_prev_vis_lend == line("'>") && - \ s:yr_prev_vis_cstart == col("'<") && - \ s:yr_prev_vis_cend == col("'>") && - \ s:yr_prev_chg_lstart == line("'[") && - \ s:yr_prev_chg_lend == line("']") && - \ s:yr_prev_chg_cstart == col("'[") && - \ s:yr_prev_chg_cend == col("']") - let dorepeat = 1 - endif - else - " Check the previously recorded value of the registers - " if they are the same, we need to reissue the previous - " yankring command. - " If any are different, the user performed a command - " command that did not involve the yankring, therefore - " we should just issue the standard "normal! ." to repeat it. - if s:yr_prev_reg_unnamed == getreg('"') && - \ s:yr_prev_reg_small == getreg('-') && - \ s:yr_prev_reg_insert == getreg('.') && - \ s:yr_prev_reg_expres == histget('=', -1) && - \ s:yr_prev_vis_lstart == line("'<") && - \ s:yr_prev_vis_lend == line("'>") && - \ s:yr_prev_vis_cstart == col("'<") && - \ s:yr_prev_vis_cend == col("'>") - let dorepeat = 1 - endif - if dorepeat == 1 && s:yr_prev_op_mode == 'n' - " Hmm, not sure why I was doing this now - " so I will remove it - " let dorepeat = 0 - " if s:yr_prev_chg_lstart == line("'[") && - " \ s:yr_prev_chg_lend == line("']") && - " \ s:yr_prev_chg_cstart == col("'[") && - " \ s:yr_prev_chg_cend == col("']") - " let dorepeat = 1 - " endif - elseif dorepeat == 1 && s:yr_prev_op_mode == 'o' - " Hmm, not sure why I was doing this now - " so I will remove it - " let dorepeat = 0 - " if s:yr_prev_chg_lstart == line("'[") && - " \ s:yr_prev_chg_lend == line("']") && - " \ s:yr_prev_chg_cstart == col("'[") && - " \ s:yr_prev_chg_cend == col("']") - " let dorepeat = 1 - " endif - endif - endif - - " " If another change has happened that was not part of the - " " yankring we cannot replay it (from the yankring). Use - " " the standard ".". - " " If the previous op was a change, do not use the yankring - " " to repeat it. - " " changenr() is buffer specific, so anytime you move to - " " a different buffer you will definitely perform a - " " standard "." - " " Any previous op that was a change, must be replaced using "." - " " since we do not want the user prompted to enter text again. - " if s:yr_prev_changenr == changenr() && s:yr_prev_op_code !~ '^c' - " let dorepeat = 1 - " endif - - " If we are going to repeat check to see if the - " previous command was a yank operation. If so determine - " if yank operations are allowed to be repeated. - if dorepeat == 1 && s:yr_prev_op_code =~ '^y' - " This value be default is set based on cpoptions. - if g:yankring_dot_repeat_yank == 0 - let dorepeat = 0 - endif - endif - return dorepeat -endfunction - - -" Manages the Vim's numbered registers -function! s:YRSetNumberedReg() - - let i = 1 - - while i <= 10 - if i > s:yr_count - break - endif - - call setreg( (i-1) - \ , s:YRGetValElemNbr((i-1),'v') - \ , s:YRGetValElemNbr((i-1),'t') - \ ) - let i += 1 - endwhile -endfunction - - -" This internal function will add and subtract values from a starting -" point and return the correct element number. It takes into account -" the circular nature of the yankring. -function! s:YRGetNextElem(start, iter) - - let needed_elem = a:start + a:iter - - " The yankring is a ring, so if an element is - " requested beyond the number of elements, we - " must wrap around the ring. - if needed_elem > s:yr_count - let needed_elem = needed_elem % s:yr_count - endif - - if needed_elem == 0 - " Can happen at the end or beginning of the ring - if a:iter == -1 - " Wrap to the bottom of the ring - let needed_elem = s:yr_count - else - " Wrap to the top of the ring - let needed_elem = 1 - endif - elseif needed_elem < 1 - " As we step backwards through the ring we could ask for a negative - " value, this will wrap it around to the end - let needed_elem = s:yr_count - endif - - return needed_elem - -endfunction - - -" Lets Vim natively perform the operation and then stores what -" was yanked (or deleted) into the yankring. -" Supports this for example - 5"ayy -" -" This is a legacy function now since the release of Vim 7.2 -" and the use of omaps with YankRing 5.0 and above. -" If Vim 7.1 has patch205, then the new omaps and the v:operator -" variable is used instead. -function! s:YRYankCount(...) range - - let user_register = s:YRRegister() - let v_count = v:count - - " Default yank command to the entire line - let op_code = 'yy' - if a:0 > 0 - " If no yank command has been supplied, assume it is - " a full line yank - let op_code = ((a:1 == '') ? op_code : a:1) - endif - - if op_code == '.' - if s:YRDoRepeat() == 1 - if s:yr_prev_op_code != '' - let op_code = s:yr_prev_op_code - let v_count = s:yr_prev_count - let user_register = s:yr_prev_reg - endif - else - " Set this flag so that YRRecord will - " ignore repeats - let s:yr_prev_repeating = 1 - exec "normal! ." - return - endif - else - let s:yr_prev_repeating = 0 - endif - - " Supports this for example - 5"ayy - " A delete operation will still place the items in the - " default registers as well as the named register - exec "normal! ". - \ ((v_count > 0)?(v_count):''). - \ (user_register=='"'?'':'"'.user_register). - \ op_code - - if user_register == '_' - " Black hole register, ignore recording the operation - return - endif - - call s:YRSetPrevOP(op_code, v_count, user_register, 'n') - - call YRRecord(user_register) -endfunction - - -" Handles ranges. There are visual ranges and command line ranges. -" Visual ranges are easy, since we pass through and let Vim deal -" with those directly. -" Command line ranges means we must yank the entire line, and not -" just a portion of it. -function! s:YRYankRange(do_delete_selection, ...) range - - let user_register = s:YRRegister() - let default_buffer = ((&clipboard=='unnamed')?'+':'"') - - " Default command mode to normal mode 'n' - let cmd_mode = 'n' - if a:0 > 0 - " Change to visual mode, if command executed via - " a visual map - let cmd_mode = ((a:1 == 'v') ? 'v' : 'n') - endif - - if cmd_mode == 'v' - " We are yanking either an entire line, or a range - exec "normal! gv". - \ (user_register==default_buffer?'':'"'.user_register). - \ 'y' - if a:do_delete_selection == 1 - exec "normal! gv". - \ (user_register==default_buffer?'':'"'.user_register). - \ 'd' - endif - else - " In normal mode, always yank the complete line, since this - " command is for a range. YRYankCount is used for parts - " of a single line - if a:do_delete_selection == 1 - exec a:firstline . ',' . a:lastline . 'delete '.user_register - else - exec a:firstline . ',' . a:lastline . 'yank ' . user_register - endif - endif - - if user_register == '_' - " Black hole register, ignore - return - endif - - call s:YRSetPrevOP('', '', user_register, 'n') - call YRRecord(user_register) -endfunction - - -" Paste from either the yankring or from a specified register -" Optionally a count can be provided, so paste the same value 10 times -function! s:YRPaste(replace_last_paste_selection, nextvalue, direction, ...) - " Disabling the yankring removes the default maps. - " But there are some maps the user can create on their own, and - " these would most likely call this function. So place an extra - " check and display a message. - if g:yankring_enabled == 0 - call s:YRWarningMsg( - \ 'YR: The yankring is currently disabled, use YRToggle.' - \ ) - return - endif - - - let user_register = s:YRRegister() - let default_buffer = ((&clipboard == 'unnamed')?'+':'"') - let v_count = v:count - - " Default command mode to normal mode 'n' - let cmd_mode = 'n' - if a:0 > 0 - " Change to visual mode, if command executed via - " a visual map - let cmd_mode = ((a:1 == 'v') ? 'v' : 'n') - endif - - " User has decided to bypass the yankring and specify a specific - " register - if user_register != default_buffer - if a:replace_last_paste_selection == 1 - call s:YRWarningMsg( 'YR: A register cannot be specified in replace mode' ) - return - else - " Check for the expression register, in this special case - " we must copy it's evaluation into the default buffer and paste - if user_register == '=' - " Save the default register since Vim will only - " allow the expression register to be pasted once - " and will revert back to the default buffer - let save_default_reg = @" - call setreg(default_buffer, eval(histget('=', -1)) ) - else - let user_register = '"'.user_register - endif - exec "normal! ". - \ ((cmd_mode=='n') ? "" : "gv"). - \ ((v_count > 0)?(v_count):''). - \ ((user_register=='=')?'':user_register). - \ a:direction - if user_register == '=' - let @" = save_default_reg - endif - " In this case, we have bypassed the yankring - " If the user hits next or previous we want the - " next item pasted to be the top of the yankring. - let s:yr_last_paste_idx = 0 - endif - let s:yr_paste_dir = a:direction - let s:yr_prev_vis_mode = ((cmd_mode=='n') ? 0 : 1) - return - endif - - " Try to second guess the user to make these mappings less intrusive. - " If the user hits paste, compare the contents of the paste register - " to the current entry in the yankring. If they are different, lets - " assume the user wants the contents of the paste register. - " So if they pressed [yt ] (yank to space) and hit paste, the yankring - " would not have the word in it, so assume they want the word pasted. - if a:replace_last_paste_selection != 1 - if s:yr_count > 0 || (default_buffer == '+' && len(@+) == 0) - " Only check the default buffer is the user wants us to. - " This was necessary prior to version 4.0 since we did not - " capture as many items as 4.0 and above does. (A. Budden) - if g:yankring_paste_check_default_buffer == 1 && - \ getreg(default_buffer) != s:yr_prev_reg_unnamed - " The user has performed a yank / delete operation - " outside of the yankring maps. First, add this - " value to the yankring. - call YRRecord(default_buffer) - " Now, use the most recently yanked text, rather than the - " value from the yankring. - exec "normal! ". - \ ((cmd_mode=='n') ? "" : "gv"). - \ ((v_count > 0)?(v_count):''). - \ a:direction - let s:yr_paste_dir = a:direction - let s:yr_prev_vis_mode = ((cmd_mode=='n') ? 0 : 1) - - " In this case, we have bypassed the yankring - " If the user hits next or previous we want the - " next item pasted to be the top of the yankring. - let s:yr_last_paste_idx = 0 - return - endif - else - exec "normal! ". - \ ((cmd_mode=='n') ? "" : "gv"). - \ ((v_count > 0)?(v_count):''). - \ a:direction - let s:yr_paste_dir = a:direction - let s:yr_prev_vis_mode = ((cmd_mode=='n') ? 0 : 1) - return - endif - endif - - if s:yr_count == 0 || (default_buffer == '+' && len(@+) == 0) - " Nothing to paste - return - endif - - if a:replace_last_paste_selection == 1 - " Replacing the previous put - let start = line("'[") - let end = line("']") - - if start != line('.') - call s:YRWarningMsg( 'YR: You must paste text first, before you can replace' ) - return - endif - - if start == 0 || end == 0 - return - endif - - " If a count was provided (ie 5), multiply the - " nextvalue accordingly and position the next paste index - let which_elem = a:nextvalue * ((v_count > 0)?(v_count):1) * -1 - let s:yr_last_paste_idx = s:YRGetNextElem( - \ s:yr_last_paste_idx, which_elem - \ ) - - let save_reg = getreg(default_buffer) - let save_reg_type = getregtype(default_buffer) - call setreg( default_buffer - \ , s:YRGetValElemNbr((s:yr_last_paste_idx-1),'v') - \ , s:YRGetValElemNbr((s:yr_last_paste_idx-1),'t') - \ ) - - " First undo the previous paste - exec "normal! u" - " Check if the visual selection should be reselected - " Next paste the correct item from the ring - " This is done as separate statements since it appeared that if - " there was nothing to undo, the paste never happened. - exec "normal! ". - \ ((s:yr_prev_vis_mode==0) ? "" : "gv"). - \ s:yr_paste_dir - call setreg(default_buffer, save_reg, save_reg_type) - call s:YRSetPrevOP('', '', '', 'n') - else - " User hit p or P - " Supports this for example - 5"ayy - " And restores the current register - let save_reg = getreg(default_buffer) - let save_reg_type = getregtype(default_buffer) - let s:yr_last_paste_idx = 1 - call setreg(default_buffer - \ , s:YRGetValElemNbr(0,'v') - \ , s:YRGetValElemNbr(0,'t') - \ ) - exec "normal! ". - \ ((cmd_mode=='n') ? "" : "gv"). - \ ( - \ ((v_count > 0)?(v_count):''). - \ a:direction - \ ) - call setreg(default_buffer, save_reg, save_reg_type) - call s:YRSetPrevOP( - \ a:direction - \ , v_count - \ , default_buffer - \ , 'n' - \ ) - let s:yr_paste_dir = a:direction - let s:yr_prev_vis_mode = ((cmd_mode=='n') ? 0 : 1) - endif - -endfunction - - -" Handle any omaps -function! YRMapsExpression(sid, motion, ...) - let cmds = a:motion - " echomsg "YRMapsE:".localtime() - " echomsg "YRMapsE 1:".cmds.":".v:operator.":".s:yr_maps_created_zap - - if (a:motion =~ '\.' && s:yr_remove_omap_dot == 1) || a:motion =~ '@' - " If we are repeating a series of commands we must - " unmap the _zap_ keys so that the user is not - " prompted when a command is replayed. - " These maps must be re-instated in YRRecord3() - " after the action of the replay is completed. - call s:YRMapsDelete('remove_only_zap_keys') - endif - - " Check if we are in operator-pending mode - if a:motion =~ '\('.substitute(g:yankring_zap_keys, ' ', '\\|', 'g').'\)' - if a:motion =~ '\(/\|?\)' - let zapto = (a:0==0 ? "" : input("YR:Enter string:")) - if zapto != "" - let zapto = zapto . "\" - else - let zapto = "\" - endif - else - let zapto = (a:0==0 ? "" : s:YRGetChar()) - endif - - if zapto == "\" - " Abort if the user hits Control C - call s:YRWarningMsg( "YR:Aborting command:".v:operator.a:motion ) - return "\" - endif - - let cmds = cmds . zapto - endif - - " There are a variety of commands which do not change the - " registers, so these operators should be ignored when - " determining which operations to record - " Simple example is '=' which simply formats the - " the selected text. - if ' \('.escape(join(split(g:yankring_ignore_operator), '\|'), '/.*~$^[]' ).'\) ' !~ escape(v:operator, '/.*~$^[]') - " Check if we are performing an action that will - " take us into insert mode - if '[cCsS]' !~ escape(v:operator, '/.*~$^[]') && a:motion !~ '@' - " if '[cCsS]' !~ escape(v:operator, '/.*~$^[]') - " If we have not entered insert mode, feed the call - " to record the current change when the function ends. - " This is necessary since omaps do not update registers - " until the function completes. - " The InsertLeave event will handle the motions - " that place us in insert mode and record the - " changes when insert mode ends. - let cmds .= a:sid. "yrrecord" - endif - endif - - " echomsg "YRMapsE 5:".a:motion.":'".cmds."':".s:yr_maps_created_zap - return cmds - -endfunction - - -" Handle any the @ -function! s:YRMapsMacro(bang, ...) range - " If we are repeating a series of commands we must - " unmap the _zap_ keys so that the user is not - " prompted when a command is replayed. - " These maps must be re-instated in YRRecord3() - " after the action of the replay is completed. - call s:YRMapsDelete('remove_only_zap_keys') - - " let zapto = (a:0==0 ? "" : s:YRGetChar()) - let zapto = s:YRGetChar() - - if zapto == "\" - " Abort if the user hits Control C - call s:YRWarningMsg( "YR:Aborting command:".v:operator.a:motion ) - return "" - endif - - let v_count = v:count - " If no count was specified it will have a value of 0 - " so set it to at least 1 - let v_count = ((v_count > 0)?(v_count):'') - - let range = '' - if a:firstline != a:lastline - let rannge = a:firstline.','.a:lastline - endif - - let cmd = range."normal! ".v_count.'@'.zapto - " DEBUG - " echomsg cmd - exec cmd - - call s:YRMapsCreate('add_only_zap_keys') -endfunction - - -" Create the default maps -function! s:YRMapsCreate(...) - " 7.1.patch205 introduces the v:operator function which was - " essential to gain the omap support. - if s:yr_has_voperator == 1 - let s:yr_remove_omap_dot = 1 - for key in split(g:yankring_zap_keys) - try - if key != '@' - exec 'omap ' key 'YRMapsExpression("", "'. key. '", 1)' - endif - catch - endtry - endfor - endif - - silent! nmap @ YRMapsExpression("", "@", "1") - - let s:yr_maps_created_zap = 1 - - if a:0 > 0 - " We have only removed the _zap_ keys temporarily - " so abandon further changes. - return - endif - - " 7.1.patch205 introduces the v:operator function which was essential - " to gain the omap support. - if s:yr_has_voperator == 1 - let s:yr_remove_omap_dot = 1 - " Set option to add and remove _zap_ keys when - " repeating commands - let o_maps = split(g:yankring_o_keys) - " Loop through and prompt the user for all buffer connection parameters. - for key in o_maps - exec 'omap ' key 'YRMapsExpression("", "'. escape(key,'\"'). '")' - endfor - endif - - " Iterate through a space separated list of mappings and create - " calls to the YRYankCount function - let n_maps = split(g:yankring_n_keys) - " Loop through and prompt the user for all buffer connection parameters. - for key in n_maps - " exec 'nnoremap '.key." :YRYankCount '".key."'" - " exec 'nnoremap '.key." :YRYankCount '".key."'" - " Andy Wokula's suggestion - exec 'nmap' key key."yrrecord" - endfor - - if g:yankring_map_dot == 1 - if s:yr_has_voperator == 1 - nmap . YRMapsExpression("", ".") - else - nnoremap . :YRYankCount '.' - endif - endif - - if g:yankring_v_key != '' - exec 'xnoremap '.g:yankring_v_key." :YRYankRange 'v'" - endif - if g:yankring_del_v_key != '' - for v_map in split(g:yankring_del_v_key) - if strlen(v_map) > 0 - try - exec 'xnoremap '.v_map." :YRDeleteRange 'v'" - catch - endtry - endif - endfor - endif - if g:yankring_paste_n_bkey != '' - exec 'nnoremap '.g:yankring_paste_n_bkey." :YRPaste 'P'" - if g:yankring_paste_using_g == 1 - exec 'nnoremap g'.g:yankring_paste_n_bkey." :YRPaste 'gP'" - endif - endif - if g:yankring_paste_n_akey != '' - exec 'nnoremap '.g:yankring_paste_n_akey." :YRPaste 'p'" - if g:yankring_paste_using_g == 1 - exec 'nnoremap g'.g:yankring_paste_n_akey." :YRPaste 'gp'" - endif - endif - if g:yankring_paste_v_bkey != '' - exec 'xnoremap '.g:yankring_paste_v_bkey." :YRPaste 'P', 'v'" - endif - if g:yankring_paste_v_akey != '' - exec 'xnoremap '.g:yankring_paste_v_akey." :YRPaste 'p', 'v'" - endif - if g:yankring_replace_n_pkey != '' - exec 'nnoremap '.g:yankring_replace_n_pkey." :YRReplace '-1', 'P'" - endif - if g:yankring_replace_n_nkey != '' - exec 'nnoremap '.g:yankring_replace_n_nkey." :YRReplace '1', 'p'" - endif - - let g:yankring_enabled = 1 - let s:yr_maps_created = 1 -endfunction - - -" Create the default maps -function! s:YRMapsDelete(...) - - let o_maps = split(g:yankring_zap_keys) - for key in o_maps - try - if key != '@' - silent! exec 'ounmap' key - endif - catch - endtry - endfor - - let s:yr_maps_created_zap = 0 - - if a:0 > 0 - " We have only removed the _zap_ keys temporarily - " so abandon further changes. - return - endif - - " Iterate through a space separated list of mappings and create - " calls to an appropriate YankRing function - let n_maps = split(g:yankring_n_keys) - " Loop through and prompt the user for all buffer connection parameters. - for key in n_maps - try - silent! exec 'nunmap' key - catch - endtry - endfor - - let o_maps = split(g:yankring_o_keys) - for key in o_maps - try - silent! exec 'ounmap' key - catch - endtry - endfor - - if g:yankring_map_dot == 1 - exec "nunmap ." - endif - if g:yankring_v_key != '' - exec 'vunmap '.g:yankring_v_key - endif - if g:yankring_del_v_key != '' - for v_map in split(g:yankring_del_v_key) - if strlen(v_map) > 0 - try - exec 'vunmap '.v_map - catch - endtry - endif - endfor - endif - if g:yankring_paste_n_bkey != '' - exec 'nunmap '.g:yankring_paste_n_bkey - if g:yankring_paste_using_g == 1 - exec 'nunmap g'.g:yankring_paste_n_bkey - endif - endif - if g:yankring_paste_n_akey != '' - exec 'nunmap '.g:yankring_paste_n_akey - if g:yankring_paste_using_g == 1 - exec 'nunmap g'.g:yankring_paste_n_akey - endif - endif - if g:yankring_paste_v_bkey != '' - exec 'vunmap '.g:yankring_paste_v_bkey - endif - if g:yankring_paste_v_akey != '' - exec 'vunmap '.g:yankring_paste_v_akey - endif - if g:yankring_replace_n_pkey != '' - exec 'nunmap '.g:yankring_replace_n_pkey - endif - if g:yankring_replace_n_nkey != '' - exec 'nunmap '.g:yankring_replace_n_nkey - endif - - let g:yankring_enabled = 0 - let s:yr_maps_created = 0 -endfunction - -function! s:YRGetValElemNbr( position, type ) - - let needed_elem = a:position - - " The List which contains the items in the yankring - " history is also ordered, most recent at the top - let elem = s:YRMRUGet('s:yr_history_list', needed_elem) - - if elem >= 0 - if a:type == 't' - return matchstr(elem, '^.*,\zs.*$') - else - let elem = matchstr(elem, '^.*\ze,.*$') - if s:yr_history_version == 'v1' - " Match three @@@ in a row as long as it is not - " preceeded by a @@@ - " v1 - let elem = substitute(elem, s:yr_history_v1_nl_pat, "\n", 'g') - let elem = substitute(elem, '\\@', '@', 'g') - else - let elem = substitute(elem, s:yr_history_v2_nl_pat, "\n", 'g') - endif - return elem - endif - else - return -1 - endif - - return "" -endfunction - -function! s:YRMRUReset( mru_list ) - - let {a:mru_list} = [] - - return 1 -endfunction - -function! s:YRMRUSize( mru_list ) - return len({a:mru_list}) -endfunction - -function! s:YRMRUElemFormat( element, element_type ) - let elem = a:element - if g:yankring_max_element_length != 0 - let elem = strpart(a:element, 0, g:yankring_max_element_length) - endif - if s:yr_history_version == 'v1' - let elem = escape(elem, '@') - let elem = substitute(elem, "\n", s:yr_history_v1_nl, 'g') - else - let elem = substitute(elem, "\n", s:yr_history_v2_nl, 'g') - endif - " Append the regtype to the end so we have it available - let elem = elem.",".a:element_type - - return elem -endfunction - -function! s:YRMRUHas( mru_list, find_str ) - " This function will find a string and return the element # - let find_idx = index({a:mru_list}, a:find_str) - - return find_idx -endfunction - -function! s:YRMRUGet( mru_list, position ) - " This function will return the value of the item at a:position - " Find the value of one element - let value = get({a:mru_list}, a:position, -2) - - return value -endfunction - -function! s:YRMRUAdd( mru_list, element, element_type ) - " Only add new items if they do not already exist in the MRU. - " If the item is found, move it to the start of the MRU. - let found = -1 - " let elem = a:element - " if g:yankring_max_element_length != 0 - " let elem = strpart(a:element, 0, g:yankring_max_element_length) - " endif - " if s:yr_history_version == 'v1' - " let elem = escape(elem, '@') - " let elem = substitute(elem, "\n", s:yr_history_v1_nl, 'g') - " else - " let elem = substitute(elem, "\n", s:yr_history_v2_nl, 'g') - " endif - " " Append the regtype to the end so we have it available - " let elem = elem.",".a:element_type - - if strlen(a:element) < g:yankring_min_element_length - return 1 - endif - - let elem = s:YRMRUElemFormat(a:element, a:element_type) - - " Refresh the List - call s:YRHistoryRead() - - let found = s:YRMRUHas(a:mru_list, elem) - - " Special case for efficiency, if it is first item in the - " List, do nothing - if found != 0 - if found != -1 - " Remove found item since we will add it to the top - call remove({a:mru_list}, found) - endif - call insert({a:mru_list}, elem, 0) - call s:YRHistorySave() - endif - - return 1 -endfunction - -function! s:YRMRUDel( mru_list, elem_nbr ) - - if a:elem_nbr >= 0 && a:elem_nbr < s:yr_count - call remove({a:mru_list}, a:elem_nbr) - call s:YRHistorySave() - endif - - return 1 -endfunction - -function! s:YRHistoryRead() - let refresh_needed = 1 - let yr_history_list = [] - let yr_filename = s:yr_history_file_{s:yr_history_version} - - if filereadable(yr_filename) - let last_upd = getftime(yr_filename) - - if s:yr_history_last_upd != 0 && last_upd <= s:yr_history_last_upd - let refresh_needed = 0 - endif - - if refresh_needed == 1 - let s:yr_history_list = readfile(yr_filename) - let s:yr_history_last_upd = last_upd - let s:yr_count = len(s:yr_history_list) - return - else - return - endif - else - if s:yr_history_version == 'v2' - " Check to see if an upgrade is required - " else, let the empty yr_history_list be returned. - if filereadable(s:yr_history_file_v1) - " Perform upgrade to v2 of the history file - call s:YRHistoryUpgrade('v1') - return - endif - endif - endif - - let s:yr_history_list = yr_history_list - call s:YRHistorySave() - -endfunction - -function! s:YRHistorySave() - if len(s:yr_history_list) > g:yankring_max_history - " Remove items which exceed the max # specified - call remove(s:yr_history_list, g:yankring_max_history) - endif - - let rc = writefile(s:yr_history_list, s:yr_history_file_{s:yr_history_version}) - - if rc == 0 - let s:yr_history_last_upd = getftime(s:yr_history_file_{s:yr_history_version}) - let s:yr_count = len(s:yr_history_list) - else - call s:YRErrorMsg( - \ 'YRHistorySave: Unable to save yankring history file: '. - \ s:yr_history_file_{s:yr_history_version} - \ ) - endif -endfunction - -function! s:YRHistoryUpgrade(version) - if a:version == 'v1' - if filereadable(s:yr_history_file_v1) - let v1_list = readfile(s:yr_history_file_v1) - let v2_list = [] - for elem in v1_list - " Restore from version 1 - let elem = substitute(elem, s:yr_history_v1_nl_pat, "\n", 'g') - let elem = substitute(elem, '\\@', '@', 'g') - " Encode to version 2 - let elem = substitute(elem, "\n", s:yr_history_v2_nl, 'g') - call add(v2_list, elem) - endfor - let s:yr_history_list = v2_list - call s:YRHistorySave() - call s:YRWarningMsg( - \ "YR:History file:". - \ s:yr_history_file_v1. - \ ' has been upgraded.' - \ ) - endif - endif -endfunction - -" YRWindowUpdate -" Checks if the yankring window is already open. -" If it is, it will refresh it. -function! s:YRWindowUpdate() - let orig_win_bufnr = bufwinnr('%') - - " Switch to the yankring buffer - " only if it is already visible - if bufwinnr(s:yr_buffer_id) != -1 - call s:YRShow(0) - " Switch back to the original buffer - exec orig_win_bufnr . "wincmd w" - endif -endfunction - -" YRWindowStatus -" Displays a brief command list and option settings. -" It also will toggle the Help text. -function! s:YRWindowStatus(show_help) - let full_help = 0 - let orig_win_bufnr = bufwinnr('%') - let yr_win_bufnr = bufwinnr(s:yr_buffer_id) - - if yr_win_bufnr == -1 - " Do not update the window status since the - " yankring is not currently displayed. - return "" - endif - " Switch to the yankring buffer - if orig_win_bufnr != yr_win_bufnr - " If the buffer is visible, switch to it - exec yr_win_bufnr . "wincmd w" - endif - - let msg = 'AutoClose='.g:yankring_window_auto_close. - \ ';ClipboardMonitor='.g:yankring_clipboard_monitor. - \ ';Cmds:,[g]p,[g]P,d,r,s,a,c,u,q,;Help=?'. - \ (s:yr_search==""?"":';SearchRegEx='.s:yr_search) - - if s:yr_has_voperator == 0 - let msg = msg . "\nYankRing has limited functionality without Vim 7.2 or higher" - endif - - " Toggle help by checking the first line of the buffer - if a:show_help == 1 && getline(1) !~ 'selection' - let full_help = 1 - let msg = - \ '" : [p]aste selection'."\n". - \ '" double-click : [p]aste selection'."\n". - \ '" [g]p : [g][p]aste selection'."\n". - \ '" [g]P : [g][P]aste selection'."\n". - \ '" r : [p]aste selection in reverse order'."\n". - \ '" s : [s]earch the yankring for text'."\n". - \ '" u : [u]pdate display'."\n". - \ '" a : toggle [a]utoclose setting'."\n". - \ '" c : toggle [c]lipboard monitor setting'."\n". - \ '" q : [q]uit / close the yankring window'."\n". - \ '" ? : Remove help text'."\n". - \ '" : toggles the width of the window'."\n". - \ '" Visual mode is supported for above commands'."\n". - \ msg - endif - - let saveMod = &modifiable - - " Go to the top of the buffer and remove any previous status - " Use the blackhole register so it does not affect the yankring - setlocal modifiable - exec 0 - silent! exec 'norm! "_d/^---'."\n" - call histdel("search", -1) - - silent! 0put =msg - - " Erase it's contents to the blackhole - silent! exec '%g/^\s*$/delete _' - call histdel("search", -1) - - call cursor(1,1) - if full_help == 0 - call search('^\d', 'W') - endif - - let &modifiable = saveMod - - if orig_win_bufnr != s:yr_buffer_id - exec orig_win_bufnr . "wincmd w" - endif -endfunction - -" YRWindowOpen -" Display the Most Recently Used file list in a temporary window. -function! s:YRWindowOpen(results) - - " Setup the cpoptions properly for the maps to work - let old_cpoptions = &cpoptions - set cpoptions&vim - setlocal cpoptions-=a,A - - " Save the current buffer number. The yankring will switch back to - " this buffer when an action is taken. - let s:yr_buffer_last = bufnr('%') - let s:yr_buffer_last_winnr = winnr() - - if bufwinnr(s:yr_buffer_id) == -1 - if g:yankring_window_use_horiz == 1 - if g:yankring_window_use_bottom == 1 - let location = 'botright' - else - let location = 'topleft' - " Creating the new window will offset all other - " window numbers. Account for that so we switch - " back to the correct window. - let s:yr_buffer_last_winnr = s:yr_buffer_last_winnr + 1 - endif - let win_size = g:yankring_window_height - else - " Open a horizontally split window. Increase the window size, if - " needed, to accomodate the new window - if g:yankring_window_width && - \ &columns < (80 + g:yankring_window_width) - " one extra column is needed to include the vertical split - let &columns = &columns + g:yankring_window_width + 1 - let s:yr_winsize_chgd = 1 - else - let s:yr_winsize_chgd = 0 - endif - - if g:yankring_window_use_right == 1 - " Open the window at the rightmost place - let location = 'botright vertical' - else - " Open the window at the leftmost place - let location = 'topleft vertical' - " Creating the new window will offset all other - " window numbers. Account for that so we switch - " back to the correct window. - let s:yr_buffer_last_winnr = s:yr_buffer_last_winnr + 1 - endif - let win_size = g:yankring_window_width - endif - - " Special consideration was involved with these sequence - " of commands. - " First, split the current buffer. - " Second, edit a new file. - " Third record the buffer number. - " If a different sequence is followed when the yankring - " buffer is closed, Vim's alternate buffer is the yanking - " instead of the original buffer before the yankring - " was shown. - let cmd_mod = '' - if v:version >= 700 - let cmd_mod = 'keepalt ' - endif - exec 'silent! ' . cmd_mod . location . ' ' . win_size . 'split ' - - " Using :e and hide prevents the alternate buffer - " from being changed. - exec ":e " . escape(s:yr_buffer_name, ' ') - " Save buffer id - let s:yr_buffer_id = bufnr('%') + 0 - else - " If the buffer is visible, switch to it - exec bufwinnr(s:yr_buffer_id) . "wincmd w" - endif - - " Perform a double check to ensure we have entered the correct - " buffer since we don't want to do the %d_ in the wrong buffer! - if (bufnr('%') + 0) != s:yr_buffer_id - call s:YRWarningMsg( - \ "YR:Failed to change to the yankring buffer, please contact author id:". - \ s:yr_buffer_id. - \ ' last:'.s:yr_buffer_last - \ ) - return -1 - endif - - " Mark the buffer as scratch - setlocal buftype=nofile - setlocal bufhidden=hide - setlocal noswapfile - setlocal nowrap - setlocal nonumber - setlocal nobuflisted - setlocal noreadonly - setlocal modifiable - - " set up syntax highlighting - syn match yankringTitle #^--- YankRing ---$#hs=s+4,he=e-4 - syn match yankringHeaders #^Elem Content$# - syn match yankringItemNumber #^\d\+# - - syn match yankringKey #^AutoClose.*#hs=e-6 - syn match yankringKey #^AutoClose.*\[g\]p#hs=e-3 contains=yankringKey - syn match yankringKey #^AutoClose.*\[p\]P#hs=e-3 contains=yankringKey - syn match yankringKey #^AutoClose.*,d,#hs=e-1,he=e-1 contains=yankringKey - syn match yankringKey #^AutoClose.*,r,#hs=e-1,he=e-1 contains=yankringKey - syn match yankringKey #^AutoClose.*,s,#hs=e-1,he=e-1 contains=yankringKey - syn match yankringKey #^AutoClose.*,a,#hs=e-1,he=e-1 contains=yankringKey - syn match yankringKey #^AutoClose.*,c,#hs=e-1,he=e-1 contains=yankringKey - syn match yankringKey #^AutoClose.*,u,#hs=e-1,he=e-1 contains=yankringKey - syn match yankringKey #^AutoClose.*,q,#hs=e-1,he=e-1 contains=yankringKey - syn match yankringKey #^AutoClose.*#hs=e-6 contains=yankringKey - syn match yankringKey #^AutoClose.*?$#hs=e contains=yankringKey - - syn match yankringKey #^".*:#hs=s+1,he=e-1 - syn match yankringHelp #^".*$# contains=yankringKey - - hi link yankringTitle directory - hi link yankringHeaders keyword - hi link yankringItemNumber constant - hi link yankringKey identifier - hi link yankringHelp string - - " Clear all existing maps for this buffer - " We should do this for all maps, but I am not sure how to do - " this for this buffer/window only without affecting all the - " other buffers. - mapclear - " Create a mapping to act upon the yankring - nnoremap <2-LeftMouse> :call YRWindowActionN('p' ,'n') - nnoremap :call YRWindowActionN('p' ,'n') - xnoremap :call YRWindowAction ('p' ,'v') - nnoremap p :call YRWindowActionN('p' ,'n') - xnoremap p :call YRWindowAction ('p' ,'v') - nnoremap P :call YRWindowActionN('P' ,'n') - xnoremap P :call YRWindowAction ('P' ,'v') - nnoremap gp :call YRWindowActionN('gp','n') - xnoremap gp :call YRWindowAction ('gp','v') - nnoremap gP :call YRWindowActionN('gP','n') - xnoremap gP :call YRWindowAction ('gP','v') - nnoremap d :call YRWindowActionN('d' ,'n') - xnoremap d :call YRWindowAction ('d' ,'v') - xnoremap r :call YRWindowAction ('r' ,'v') - nnoremap s :call YRWindowAction ('s' ,'n') - nnoremap a :call YRWindowAction ('a' ,'n') - nnoremap c :call YRWindowAction ('c' ,'n') - nnoremap ? :call YRWindowAction ('?' ,'n') - nnoremap u :call YRWindowAction ('u' ,'n') - nnoremap q :call YRWindowAction ('q' ,'n') - nnoremap \|:silent exec 'vertical resize '. - \ ( - \ g:yankring_window_use_horiz!=1 && winwidth('.') > g:yankring_window_width - \ ?(g:yankring_window_width) - \ :(winwidth('.') + g:yankring_window_increment) - \ ) - - " Erase it's contents to the blackhole - silent! exec '%delete _' - - " Display the status line / help - call s:YRWindowStatus(0) - exec 'normal! G' - - " Display the contents of the yankring - silent! put =a:results - - if getline('$') == '' - " Erase last blank line - silent! exec '$delete _' - endif - - " Move the cursor to the first line with an element - exec 0 - call search('^\d','W') - - setlocal nomodifiable - " - " Restore the previous cpoptions settings - let &cpoptions = old_cpoptions - -endfunction - -function! s:YRWindowActionN(op, cmd_mode) - let v_count = v:count - " If no count was specified it will have a value of 0 - " so set it to at least 1 - let v_count = ((v_count > 0)?(v_count):1) - - if v_count > 1 - if !exists("b:yankring_show_range_error") - let b:yankring_show_range_error = v_count - else - let b:yankring_show_range_error = b:yankring_show_range_error - 1 - endif - - if b:yankring_show_range_error == 1 - call s:YRWarningMsg("YR:Use visual mode if you need to specify a count") - unlet b:yankring_show_range_error - endif - return - endif - - call s:YRWindowAction(a:op, a:cmd_mode) - let v_count = v_count - 1 - - if g:yankring_window_auto_close == 1 && v_count == 0 && a:op != 'd' - " If autoclose is set close the window unless - " you are removing items from the YankRing - exec 'bdelete '.s:yr_buffer_id - return "" - endif - - return "" -endfunction - -function! s:YRWindowAction(op, cmd_mode) range - let default_buffer = ((&clipboard=='unnamed')?'+':'"') - let opcode = a:op - let lines = [] - let v_count = v:count - let cmd_mode = a:cmd_mode - let firstline = a:firstline - let lastline = a:lastline - - if a:lastline < a:firstline - let firstline = a:lastline - let lastline = a:firstline - endif - - if cmd_mode == 'n' - let v_count = 1 - " If a count was provided (5p), we want to repeat the paste - " 5 times, but this also alters the a:firstline and a:lastline - " ranges, which while in normal mode we do not want - let lastline = firstline - endif - " If no count was specified it will have a value of 0 - " so set it to at least 1 - let v_count = ((v_count > 0)?(v_count):1) - - if '[dr]' =~ opcode - " Reverse the order of the lines to act on - let begin = lastline - while begin >= firstline - call add(lines, getline(begin)) - let begin = begin - 1 - endwhile - else - " Process the selected items in order - let begin = firstline - while begin <= lastline - call add(lines, getline(begin)) - let begin = begin + 1 - endwhile - endif - - if opcode ==# 'q' - " Close the yankring window - if s:yr_winsize_chgd == 1 - " Adjust the Vim window width back to the width - " it was before we showed the yankring window - let &columns= &columns - (g:yankring_window_width) - endif - - " Hide the YankRing window - hide - - if bufwinnr(s:yr_buffer_last) != -1 - " If the buffer is visible, switch to it - exec s:yr_buffer_last_winnr . "wincmd w" - endif - - return - elseif opcode ==# 's' - " Switch back to the original buffer - exec s:yr_buffer_last_winnr . "wincmd w" - - call s:YRSearch() - return - elseif opcode ==# 'u' - " Switch back to the original buffer - exec s:yr_buffer_last_winnr . "wincmd w" - - call s:YRShow(0) - return - elseif opcode ==# 'a' - let l:curr_line = line(".") - " Toggle the auto close setting - let g:yankring_window_auto_close = - \ (g:yankring_window_auto_close == 1?0:1) - " Display the status line / help - call s:YRWindowStatus(0) - call cursor(l:curr_line,0) - return - elseif opcode ==# 'c' - let l:curr_line = line(".") - " Toggle the clipboard monitor setting - let g:yankring_clipboard_monitor = - \ (g:yankring_clipboard_monitor == 1?0:1) - " Display the status line / help - call s:YRWindowStatus(0) - call cursor(l:curr_line,0) - return - elseif opcode ==# '?' - " Display the status line / help - call s:YRWindowStatus(1) - return - endif - - " Switch back to the original buffer - exec s:yr_buffer_last_winnr . "wincmd w" - - " Intentional case insensitive comparision - if opcode =~? 'p' - let cmd = 'YRGetElem ' - let parms = ", '".opcode."' " - elseif opcode ==? 'r' - let opcode = 'p' - let cmd = 'YRGetElem ' - let parms = ", 'p' " - elseif opcode ==# 'd' - let cmd = 'YRPop ' - let parms = "" - endif - - " Only execute this code if we are operating on elements - " within the yankring - if '[auq?]' !~# opcode - while v_count > 0 - " let iter = 0 - " let index = 0 - for line in lines - let elem = matchstr(line, '^\d\+') - if elem > 0 - if elem > 0 && elem <= s:yr_count - " if iter > 0 && opcode =~# 'p' - if opcode =~# 'p' - " Move to the end of the last pasted item - " only if pasting after (not above) - " '] - endif - exec cmd . elem . parms - " let iter += 1 - endif - endif - endfor - let v_count = v_count - 1 - endwhile - - if opcode ==# 'd' - call s:YRShow(0) - return "" - endif - - if g:yankring_window_auto_close == 1 && cmd_mode == 'v' - exec 'bdelete '.s:yr_buffer_id - return "" - endif - - endif - - return "" - -endfunction - -function! s:YRWarningMsg(msg) - echohl WarningMsg - echomsg a:msg - echohl None -endfunction - -function! s:YRErrorMsg(msg) - echohl ErrorMsg - echomsg a:msg - echohl None -endfunction - -function! s:YRWinLeave() - " Track which window we are last in. We will use this information - " to determine where we need to paste any contents, or which - " buffer to return to. - - if s:yr_buffer_id < 0 - " The yankring window has never been activated - return - endif - - if winbufnr(winnr()) == s:yr_buffer_id - " Ignore leaving the yankring window - return - endif - - if bufwinnr(s:yr_buffer_id) != -1 - " YankRing window is visible, so save off the previous buffer ids - let s:yr_buffer_last_winnr = winnr() - let s:yr_buffer_last = winbufnr(s:yr_buffer_last_winnr) - " else - " let s:yr_buffer_last_winnr = -1 - " let s:yr_buffer_last = -1 - endif -endfunction - -function! s:YRFocusGained() - if g:yankring_clipboard_monitor == 1 - " If the clipboard has changed record it inside the yankring - " echomsg "YRFocusGained[".len(@+)."][".@+.']['.s:yr_prev_clipboard.']' - if len(@+) > 0 && @+ != s:yr_prev_clipboard - let elem = s:YRMRUElemFormat( - \ getreg('+') - \ , getregtype('+') - \ ) - let found = s:YRMRUHas('s:yr_history_list', elem) - - " Only add the item to the "top" of the ring if it is - " not in the ring already. - if found == -1 - call YRRecord("+") - " silent! call YRRecord("+") - endif - endif - - " If the yankring window is open, refresh it - call s:YRWindowUpdate() - endif -endfunction - -function! s:YRInsertLeave() - " The YankRing uses omaps to execute the prescribed motion - " and then appends to the motion a call to a YankRing - " function to record the contents of the changed register. - " - " We cannot append a function call to the end of a motion - " that results in Insert mode. For example, any command - " like 'cw' enters insert mode. Appending a function call - " after the w, simply writes out the call as if the user - " typed it. - " - " Using the InsertLeave event, allows us to capture the - " contents of any changed register after it completes. - - call YRRecord(s:YRRegister()) - - " When performing a change (not a yank or delete) - " it is not possible to call yrrecord at the end - " of the command (or it's contents will be inserted - " into the buffer instead of executed). - " So, when using ".", we have to remove the _zap_ - " keys and then re-add them back again after we - " record the updates. - if s:yr_remove_omap_dot == 1 - call s:YRMapsCreate('add_only_zap_keys') - endif - -endfunction - -" Deleting autocommands first is a good idea especially if we want to reload -" the script without restarting vim. -" Call YRFocusGained to check if the clipboard has been updated -augroup YankRing - autocmd! - autocmd VimEnter * :if has('clipboard') | call YRFocusGained() | endif - autocmd WinLeave * :call YRWinLeave() - autocmd FocusGained * :if has('clipboard') | call YRFocusGained() | endif - autocmd InsertLeave * :call YRInsertLeave() -augroup END - - -" copy register -inoremap + {% endjavascripts %} +# twig stylesheets +snippet css + {% stylesheets '${1}' %} + + {% endstylesheets %} +# twig if +snippet if + {% if ${1} %} + ${2} + {% endif %} +# twig if ... else +snippet ife + {% if ${1} %} + ${2} + {% else %} + ${0} + {% endif %} +# twig else +snippet el + {% else %} + ${0} +# twig elseif +snippet eif + {% elseif ${1} %} + ${0} +# twig for +snippet for + {% for ${1} in ${2} %} + ${3} + {% endfor %} +# twig extends +snippet ext + {% extends ${1} %} diff --git a/update_plugins.py b/update_plugins.py index 5ea87f24..cc983b46 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -52,6 +52,7 @@ vim-gitgutter https://github.com/airblade/vim-gitgutter gruvbox https://github.com/morhetz/gruvbox vim-flake8 https://github.com/nvie/vim-flake8 vim-pug https://github.com/digitaltoad/vim-pug +vim-yankstack https://github.com/maxbrunsfeld/vim-yankstack """.strip() GITHUB_ZIP = '%s/archive/master.zip' diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index da48f593..706079c3 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -30,13 +30,10 @@ map f :MRU """""""""""""""""""""""""""""" -" => YankRing +" => YankStack """""""""""""""""""""""""""""" -if has("win16") || has("win32") - " Don't do anything -else - let g:yankring_history_dir = '~/.vim_runtime/temp_dirs/' -endif +nmap yankstack_substitute_older_paste +nmap yankstack_substitute_newer_paste """""""""""""""""""""""""""""" From 347b3bea0e5f5831e739d89909248504d3c9a0d8 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 14 May 2016 13:00:06 +0100 Subject: [PATCH 06/12] Added yankstack, a replacement for YankRing --- sources_non_forked/vim-yankstack/.gitignore | 2 + sources_non_forked/vim-yankstack/Gemfile | 4 + sources_non_forked/vim-yankstack/Gemfile.lock | 25 ++ sources_non_forked/vim-yankstack/README.md | 134 +++++++ .../vim-yankstack/autoload/yankstack.vim | 197 ++++++++++ .../vim-yankstack/doc/yankstack.txt | 124 +++++++ .../vim-yankstack/plugin/yankstack.vim | 1 + .../vim-yankstack/spec/fixtures/repeat.vim | 115 ++++++ .../vim-yankstack/spec/spec_helper.rb | 9 + .../spec/yankstack/yankstack_spec.rb | 343 ++++++++++++++++++ 10 files changed, 954 insertions(+) create mode 100644 sources_non_forked/vim-yankstack/.gitignore create mode 100644 sources_non_forked/vim-yankstack/Gemfile create mode 100644 sources_non_forked/vim-yankstack/Gemfile.lock create mode 100644 sources_non_forked/vim-yankstack/README.md create mode 100644 sources_non_forked/vim-yankstack/autoload/yankstack.vim create mode 100644 sources_non_forked/vim-yankstack/doc/yankstack.txt create mode 100644 sources_non_forked/vim-yankstack/plugin/yankstack.vim create mode 100644 sources_non_forked/vim-yankstack/spec/fixtures/repeat.vim create mode 100644 sources_non_forked/vim-yankstack/spec/spec_helper.rb create mode 100644 sources_non_forked/vim-yankstack/spec/yankstack/yankstack_spec.rb diff --git a/sources_non_forked/vim-yankstack/.gitignore b/sources_non_forked/vim-yankstack/.gitignore new file mode 100644 index 00000000..655a3682 --- /dev/null +++ b/sources_non_forked/vim-yankstack/.gitignore @@ -0,0 +1,2 @@ +.rvmrc +doc/tags diff --git a/sources_non_forked/vim-yankstack/Gemfile b/sources_non_forked/vim-yankstack/Gemfile new file mode 100644 index 00000000..f2e1aba5 --- /dev/null +++ b/sources_non_forked/vim-yankstack/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem "vimbot", :git => "git@github.com:maxbrunsfeld/vimbot.git" +gem "rspec" diff --git a/sources_non_forked/vim-yankstack/Gemfile.lock b/sources_non_forked/vim-yankstack/Gemfile.lock new file mode 100644 index 00000000..c17e2f41 --- /dev/null +++ b/sources_non_forked/vim-yankstack/Gemfile.lock @@ -0,0 +1,25 @@ +GIT + remote: git@github.com:maxbrunsfeld/vimbot.git + revision: 489cb3283a89d3e7891d9d9765188179c764317b + specs: + vimbot (0.0.1) + +GEM + remote: https://rubygems.org/ + specs: + diff-lcs (1.1.3) + rspec (2.8.0) + rspec-core (~> 2.8.0) + rspec-expectations (~> 2.8.0) + rspec-mocks (~> 2.8.0) + rspec-core (2.8.0) + rspec-expectations (2.8.0) + diff-lcs (~> 1.1.2) + rspec-mocks (2.8.0) + +PLATFORMS + ruby + +DEPENDENCIES + rspec + vimbot! diff --git a/sources_non_forked/vim-yankstack/README.md b/sources_non_forked/vim-yankstack/README.md new file mode 100644 index 00000000..2fcfc769 --- /dev/null +++ b/sources_non_forked/vim-yankstack/README.md @@ -0,0 +1,134 @@ +yankstack.vim +============= + +Author: Max Brunsfeld + +[Yankstack.vim](https://github.com/maxbrunsfeld/vim-yankstack) is a +lightweight implementation of the Emacs 'kill ring' for Vim. It allows you to +yank and delete things without worrying about losing the text that you yanked +previously. It effectively turns your default register into a stack, and lets +you cycle through the items in the stack after doing a paste. + +This plugin is intended to be a simpler alternative to the +[yankring](https://github.com/chrismetcalf/vim-yankring) plugin. It has a fairly +complete [test suite](https://github.com/maxbrunsfeld/vim-yankstack/blob/master/spec/yankstack/yankstack_spec.rb) +based on [rspec](https://www.relishapp.com/rspec) +and [vimbot](https://github.com/maxbrunsfeld/vimbot). + +## Installation ## + +I recommend loading your plugins with +[vundle](https://github.com/gmarik/vundle) or +[pathogen](https://github.com/tpope/vim-pathogen). + +## Key Mappings ## + +By default, yankstack adds only 2 key bindings, in normal and visual modes: + +- ```meta-p``` - cycle *backward* through your history of yanks +- ```meta-shift-p``` - cycle *forwards* through your history of yanks + +After pasting some text using ```p``` or ```P```, you can cycle through your +yank history using these commands. Typing either of these keys *without* pasting first +will do a normal paste (the same as typing `p`). This also works in insert mode. + +### the 'meta' key + +If you're using MacVim, and you want to use +this plugin's default key bindings (or any bindings involving the `option` +key), you must ```:set macmeta```. On Linux, you may have issues with the meta key if your terminal is running in 7bit mode. +Instructions for dealing with this can be found on the [wiki](https://github.com/maxbrunsfeld/vim-yankstack/wiki/Linux-terminal-configurations-for-correct-meta-key-handling) + +## Commands ## + +You can see the contents of the yank-stack using the ```:Yanks``` command. +Its output is similar to the ```:registers``` command. + +## Configuration ## + +Yankstack defines two plugin mappings that you can map to keys of your choosing. +The same mappings work in normal and insert modes. + +- ```yankstack_substitute_older_paste``` - cycle backwards through your history of yanks +- ```yankstack_substitute_newer_paste``` - cycle forwards through your history of yanks + +For example, if you wanted to define some mappings based on your 'leader' key, +you could do this: + +``` +nmap p yankstack_substitute_older_paste +nmap P yankstack_substitute_newer_paste +``` + +Also, if you want to load yankstack without the default key mappings, just +``` let g:yankstack_map_keys = 0 ``` +in your .vimrc file. + +## Compatibility ## + +Yankstack works by mapping the yank and paste keys to functions that do some +book-keeping before calling through to the normal yank/paste keys. You may want +to define your own mappings of the yank and paste keys. For example, I like to +map the ```Y``` key to ```y$```, so that it behaves the same as ```D``` and +```C```. The yankstack mappings need to happen **before** you define any such +mappings of your own. To achieve this, just call ```yankstack#setup()``` in +your vimrc, before defining your mappings: + +``` +call yankstack#setup() +nmap Y y$ +" other mappings involving y, d, c, etc +``` + +You can also prevent certain keys from being remapped by setting the `g:yankstack_yank_keys` +to the keys of your choosing. For example, if you only want Yankstack to remap `y` and `d`: + +``` +let g:yankstack_yank_keys = ['y', 'd'] +``` + +## Contributing, Feedback ## + +I'd enjoy hearing anybody's feedback on yankstack, and welcome any contribution. +Check it out on [github](https://github.com/maxbrunsfeld/vim-yankstack)! + +## Changelog ## + + +### 1.0.6 (2014-08-04) + - Allow customization of the list of keys to be remapped. + +### 1.0.5 (2012-07-19) + - Fix bug where on certain versions of vim, the first time you tried + to cycle through your yanks after doing a normal paste, an extra + paste was created. + +### 1.0.4 (2012-07-01) + - Make it so that yankstack-cycling keys cause a normal paste if they are + used without pasting first. Fix stack-cycling in insert-mode. + +### 1.0.3 (2012-05-04): + - Fix bug when overwriting text in select mode. This was causing + problems for snipMate users. + +### 1.0.2 (2012-4-20): + - Add test coverage using rspec and [vimbot](https://github.com/maxbrunsfeld/vimbot)! + - Perfect the behavior of the yankstack when pasting over text in visual + mode + - Fix bug where 's' and 'S' didn't push to the yankstack + +### 1.0.1 (2012-2-11): + - Change default key bindings, update readme, add link to github page. + +### 1.0.1 (2011-12-08): + - Fix bug when displaying empty yanks. + +### 1.0.0 (2011-12-04): + - Remove unnecessary dependency on the undotree() function. Plugin should + now work on any recent version of vim. + +## License ## +Copyright (c) Max Brunsfeld. Distributed under the same terms as Vim itself. +See the vim license. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-yankstack/autoload/yankstack.vim b/sources_non_forked/vim-yankstack/autoload/yankstack.vim new file mode 100644 index 00000000..8feb49e8 --- /dev/null +++ b/sources_non_forked/vim-yankstack/autoload/yankstack.vim @@ -0,0 +1,197 @@ +" yankstack.vim - keep track of your history of yanked/killed text +" +" Maintainer: Max Brunsfeld +" Version: 1.0.6 +" Todo: +" + +let s:yankstack_tail = [] +let g:yankstack_size = 30 +let s:last_paste = { 'changedtick': -1, 'key': '', 'mode': 'n', 'count': 1, 'register': '' } + +if !exists('g:yankstack_yank_keys') + let g:yankstack_yank_keys = ['c', 'C', 'd', 'D', 's', 'S', 'x', 'X', 'y', 'Y'] +endif + +function! s:yank_with_key(key) + call s:before_yank() + return a:key +endfunction + +function! s:paste_with_key(key, mode, register, count) + return s:paste_from_yankstack(a:key, a:mode, a:register, a:count, 1) +endfunction + +function! s:paste_from_yankstack(key, mode, register, count, is_new) + let keys = a:count . a:key + let keys = (a:register == s:default_register()) ? keys : ('"' . a:register . keys) + let s:last_paste = { 'key': a:key, 'mode': a:mode, 'register': a:register, 'count': a:count, 'changedtick': -1 } + call feedkeys("\yankstack_after_paste", "m") + + if a:mode == 'n' + exec 'normal!' keys + elseif a:mode == 'v' + if a:is_new + call s:before_yank() + call feedkeys("\yankstack_substitute_older_paste", "t") + exec 'normal! gv' . keys + else + let head = s:get_yankstack_head() + exec 'normal! gv' . keys + call s:set_yankstack_head(head) + endif + + " In insert mode, this function's return value is used in an + " expression mapping. In other modes, it is called for its + " side effects only. + elseif a:mode == 'i' + return keys + endif + + silent! call repeat#setreg(a:register) + silent! call repeat#set(a:key, a:count) +endfunction + +function! s:substitute_paste(offset, current_mode) + if s:last_change_was_paste() + silent undo + call s:yankstack_rotate(a:offset) + return s:paste_from_yankstack(s:last_paste.key, s:last_paste.mode, s:last_paste.register, s:last_paste.count, 0) + else + return s:paste_from_yankstack(s:default_paste_key(a:current_mode), a:current_mode, v:register, '', 1) + endif +endfunction + +function! s:before_yank() + let head = s:get_yankstack_head() + if !empty(head.text) && (empty(s:yankstack_tail) || (head != s:yankstack_tail[0])) + call insert(s:yankstack_tail, head) + let s:yankstack_tail = s:yankstack_tail[: g:yankstack_size-1] + endif +endfunction + +function! s:yankstack_rotate(offset) + if empty(s:yankstack_tail) | return | endif + let offset_left = a:offset + while offset_left != 0 + let head = s:get_yankstack_head() + if offset_left > 0 + let entry = remove(s:yankstack_tail, 0) + call add(s:yankstack_tail, head) + let offset_left -= 1 + elseif offset_left < 0 + let entry = remove(s:yankstack_tail, -1) + call insert(s:yankstack_tail, head) + let offset_left += 1 + endif + call s:set_yankstack_head(entry) + endwhile +endfunction + +function! s:get_yankstack_head() + let reg = s:default_register() + return { 'text': getreg(reg), 'type': getregtype(reg) } +endfunction + +function! s:set_yankstack_head(entry) + let reg = s:default_register() + call setreg(reg, a:entry.text, a:entry.type) +endfunction + +function! s:after_paste() + let s:last_paste.changedtick = b:changedtick +endfunction + +function! s:last_change_was_paste() + return b:changedtick == s:last_paste.changedtick +endfunction + +function! s:default_register() + let clipboard_flags = split(&clipboard, ',') + if index(clipboard_flags, 'unnamedplus') >= 0 + return "+" + elseif index(clipboard_flags, 'unnamed') >= 0 + return "*" + else + return "\"" + endif +endfunction + +function! s:default_paste_key(mode) + if a:mode == 'i' + return "\u\" . s:default_register() + else + return "p" + endif +endfunction + +function! g:Yankstack() + return [s:get_yankstack_head()] + s:yankstack_tail +endfunction + +command! -nargs=0 Yanks call s:show_yanks() +function! s:show_yanks() + echohl WarningMsg | echo "--- Yanks ---" | echohl None + let i = 0 + for yank in g:Yankstack() + call s:show_yank(yank, i) + let i += 1 + endfor +endfunction + +function! s:show_yank(yank, index) + let index = printf("%-4d", a:index) + let lines = split(a:yank.text, '\n') + let line = empty(lines) ? '' : lines[0] + let line = substitute(line, '\t', repeat(' ', &tabstop), 'g') + if len(line) > 80 || len(lines) > 1 + let line = line[: 80] . '…' + endif + + echohl Directory | echo index + echohl None | echon line + echohl None +endfunction + +function! yankstack#setup() + if exists('g:yankstack_did_setup') | return | endif + let g:yankstack_did_setup = 1 + + let paste_keys = ['p', 'P', 'gp', 'gP'] + let word_characters = split("qwertyuiopasdfghjklzxcvbnm1234567890_", '\zs') + + for key in g:yankstack_yank_keys + exec 'nnoremap ' key 'yank_with_key("' . key . '")' + exec 'xnoremap ' key 'yank_with_key("' . key . '")' + endfor + + for key in paste_keys + exec 'nnoremap ' key ':call paste_with_key("' . key . '", "n", v:register, v:count1)' + exec 'xnoremap ' key ':call paste_with_key("' . key . '", "v", v:register, v:count1)' + endfor + + for key in word_characters + exec 'smap ' key 'yank_with_key("' . key . '")' + endfor +endfunction + +nnoremap yankstack_substitute_older_paste :call substitute_paste(v:count1, 'n') +nnoremap yankstack_substitute_newer_paste :call substitute_paste(-v:count1, 'n') +xnoremap yankstack_substitute_older_paste :call substitute_paste(v:count1, 'v') +xnoremap yankstack_substitute_newer_paste :call substitute_paste(-v:count1, 'v') +inoremap yankstack_substitute_older_paste =substitute_paste(v:count1, 'i') +inoremap yankstack_substitute_newer_paste =substitute_paste(-v:count1, 'i') + +nnoremap yankstack_after_paste :call after_paste() +xnoremap yankstack_after_paste :call after_paste() +inoremap yankstack_after_paste :call after_paste() + +if !exists('g:yankstack_map_keys') || g:yankstack_map_keys + nmap yankstack_substitute_older_paste + xmap yankstack_substitute_older_paste + imap yankstack_substitute_older_paste + nmap yankstack_substitute_newer_paste + xmap yankstack_substitute_newer_paste + imap yankstack_substitute_newer_paste +endif + diff --git a/sources_non_forked/vim-yankstack/doc/yankstack.txt b/sources_non_forked/vim-yankstack/doc/yankstack.txt new file mode 100644 index 00000000..2a7dee5f --- /dev/null +++ b/sources_non_forked/vim-yankstack/doc/yankstack.txt @@ -0,0 +1,124 @@ +*yankstack.txt* Plugin for storing and cycling through yanked text strings. + +Author: Max Brunsfeld + +|yankstack-introduction| Introduction +|yankstack-installation| Installation +|yankstack-initialization| Initialization +|yankstack-commands| Commands +|yankstack-configuration| Configuration +|yankstack-changelog| Changelog + +INTRODUCTION *yankstack-introduction* + +[Yankstack.vim](https://github.com/maxbrunsfeld/vim-yankstack) is a +lightweight implementation of the Emacs 'kill ring' for Vim. It allows you to +yank and delete things without worrying about losing the text that you yanked +previously. It effectively turns your default register into a stack, and lets +you cycle through the items in the stack after doing a paste. + +This plugin is intended to be a simpler alternative to the {Yankring} plugin +(https://github.com/chrismetcalf/vim-yankring). + +INSTALLATION *yankstack-installation* + +I recommend loading your plugins with {Pathogen} +(https://github.com/tpope/vim-pathogen), so you can just clone this repo into +your "bundle" directory. + +KEY MAPPINGS *yankstack-mappings* + +By default, yankstack adds only 2 key mappings, in normal and visual modes: + +Mapping Action ~ +meta-p cycle backward through your history of yanks +meta-shift-p cycle forwards through your history of yanks + +After pasting some text using |p| or |P|, you can cycle through your +yank history using these commands. + +Typing either of these keys without pasting first will do a normal paste +(the same as typing `p`). This also works in insert mode. + +A note about the meta key - if you're using MacVim, and you want to use +this plugin's default key bindings (or any bindings involving the `option` +key), you must :set |macmeta|. + +COMMANDS *yankstack-commands* + +You can see the contents of the yank-stack using the :Yanks command. +Its output is similar to the |registers| command. > + + :Yanks (lists the contents of the yank-stack) + +CONFIGURATION *yankstack-configuration* + +If you want to load yankstack without defining any of the default key +mappings, just add > + + let g:yankstack_map_keys = 0 + +to your |.vimrc| file. + +Yankstack defines three plugin mappings that you can map to keys of your +choosing. The same mappings work in normal and insert modes. + +Mapping Name Action ~ +yankstack_substitute_older_paste cycle BACKWARDs through your history of yanks +yankstack_substitute_newer_paste cycle FORWARDS through your history of yanks + +For example, if you wanted to define some mappings based on your |leader| key, you could do this: > + + nmap p yankstack_substitute_older_paste + nmap P yankstack_substitute_newer_paste + + +COMPATIBILITY *yankstack-compatibility* + +Yankstack works by mapping the yank and paste keys to functions that do some +book-keeping before calling through to the normal yank/paste keys. You may +want to define your own mappings of the yank and paste keys. For example, I +like to map the |Y| key to "y$", so that it behaves the same as |D| and |C|. +The yankstack mappings need to happen **BEFORE** you define any such +mappings of your own. To achieve this, just call 'yankstack#setup()'in your +|vimrc|, before defining your mappings: > + + call yankstack#setup() + nmap Y y$ + +CHANGELOG *yankstack-changelog* + +1.0.5 (2012-07-19) + - Fix bug where on certain versions of vim, the first time you tried + to cycle through your yanks after doing a normal paste, an extra + paste was created. + +1.0.4 (2012-07-01) + - Make it so that yankstack-cycling keys cause a normal paste if they are + used without pasting first. Fix stack-cycling in insert-mode. + +1.0.3 (2012-05-04): + - Fix bug when overwriting text in select mode. This was causing + problems for snipMate users. + +1.0.2 (2012-4-20): + - Add test coverage using rspec and [vimbot](https://github.com/maxbrunsfeld/vimbot)! + - Perfect the behavior of the yankstack when pasting over text in visual + mode + - Fix bug where 's' and 'S' didn't push to the yankstack + +1.0.1 (2012-02-11): + - Change default key bindings, update readme, add link to github page. + +1.0.1 (2011-12-08): + - Fix bug when displaying empty yanks. + +1.0 (2011-12-04): + - Remove unnecessary dependency on the undotree() function. Plugin should + now work on any recent version of vim. + + *yankstack-license* +Copyright (c) Max Brunsfeld. Distributed under the same terms as Vim itself. +See |license|. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-yankstack/plugin/yankstack.vim b/sources_non_forked/vim-yankstack/plugin/yankstack.vim new file mode 100644 index 00000000..a5ad03b7 --- /dev/null +++ b/sources_non_forked/vim-yankstack/plugin/yankstack.vim @@ -0,0 +1 @@ +call yankstack#setup() diff --git a/sources_non_forked/vim-yankstack/spec/fixtures/repeat.vim b/sources_non_forked/vim-yankstack/spec/fixtures/repeat.vim new file mode 100644 index 00000000..e8fe7237 --- /dev/null +++ b/sources_non_forked/vim-yankstack/spec/fixtures/repeat.vim @@ -0,0 +1,115 @@ +" repeat.vim - Let the repeat command repeat plugin maps +" Maintainer: Tim Pope +" Version: 1.1 +" GetLatestVimScripts: 2136 1 :AutoInstall: repeat.vim + +" Installation: +" Place in either ~/.vim/plugin/repeat.vim (to load at start up) or +" ~/.vim/autoload/repeat.vim (to load automatically as needed). +" +" License: +" Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. +" See :help license +" +" Developers: +" Basic usage is as follows: +" +" silent! call repeat#set("\MappingToRepeatCommand",3) +" +" The first argument is the mapping that will be invoked when the |.| key is +" pressed. Typically, it will be the same as the mapping the user invoked. +" This sequence will be stuffed into the input queue literally. Thus you must +" encode special keys by prefixing them with a backslash inside double quotes. +" +" The second argument is the default count. This is the number that will be +" prefixed to the mapping if no explicit numeric argument was given. The +" value of the v:count variable is usually correct and it will be used if the +" second parameter is omitted. If your mapping doesn't accept a numeric +" argument and you never want to receive one, pass a value of -1. +" +" Make sure to call the repeat#set function _after_ making changes to the +" file. +" +" For mappings that use a register and want the same register used on +" repetition, use: +" +" silent! call repeat#setreg("\MappingToRepeatCommand", v:register) +" +" This function can (and probably needs to be) called before making changes to +" the file (as those typically clear v:register). Therefore, the call sequence +" in your mapping will look like this: +" +" nnoremap MyMap +" \ :execute 'silent! call repeat#setreg("\Plug>MyMap", v:register)' +" \ call MyFunction(v:register, ...) +" \ silent! call repeat#set("\Plug>MyMap") + +if exists("g:loaded_repeat") || &cp || v:version < 700 + finish +endif +let g:loaded_repeat = 1 + +let g:repeat_tick = -1 +let g:repeat_reg = ['', ''] + +" Special function to avoid spurious repeats in a related, naturally repeating +" mapping when your repeatable mapping doesn't increase b:changedtick. +function! repeat#invalidate() + let g:repeat_tick = -1 +endfunction + +function! repeat#set(sequence,...) + let g:repeat_sequence = a:sequence + let g:repeat_count = a:0 ? a:1 : v:count + let g:repeat_tick = b:changedtick +endfunction + +function! repeat#setreg(sequence,register) + let g:repeat_reg = [a:sequence, a:register] +endfunction + +function! repeat#run(count) + if g:repeat_tick == b:changedtick + let r = '' + if g:repeat_reg[0] ==# g:repeat_sequence && !empty(g:repeat_reg[1]) + if g:repeat_reg[1] ==# '=' + " This causes a re-evaluation of the expression on repeat, which + " is what we want. + let r = '"=' . getreg('=', 1) . "\" + else + let r = '"' . g:repeat_reg[1] + endif + endif + + let c = g:repeat_count + let s = g:repeat_sequence + let cnt = c == -1 ? "" : (a:count ? a:count : (c ? c : '')) + call feedkeys(r . cnt, 'n') + call feedkeys(s) + else + call feedkeys((a:count ? a:count : '') . '.', 'n') + endif +endfunction + +function! repeat#wrap(command,count) + let preserve = (g:repeat_tick == b:changedtick) + exe 'norm! '.(a:count ? a:count : '').a:command . (&foldopen =~# 'undo' ? 'zv' : '') + if preserve + let g:repeat_tick = b:changedtick + endif +endfunction + +nnoremap . :call repeat#run(v:count) +nnoremap u :call repeat#wrap('u',v:count) +if maparg('U','n') ==# '' + nnoremap U :call repeat#wrap('U',v:count) +endif +nnoremap :call repeat#wrap("\C-R>",v:count) + +augroup repeatPlugin + autocmd! + autocmd BufLeave,BufWritePre,BufReadPre * let g:repeat_tick = (g:repeat_tick == b:changedtick || g:repeat_tick == 0) ? 0 : -1 + autocmd BufEnter,BufWritePost * if g:repeat_tick == 0|let g:repeat_tick = b:changedtick|endif +augroup END + +" vim:set ft=vim et sw=4 sts=4: diff --git a/sources_non_forked/vim-yankstack/spec/spec_helper.rb b/sources_non_forked/vim-yankstack/spec/spec_helper.rb new file mode 100644 index 00000000..8fa4b47f --- /dev/null +++ b/sources_non_forked/vim-yankstack/spec/spec_helper.rb @@ -0,0 +1,9 @@ +require "vimbot" + +PLUGIN_ROOT = File.expand_path("../..", __FILE__) +VIM_REPEAT_PATH = File.expand_path("spec/fixtures/repeat.vim", PLUGIN_ROOT) + +RSpec.configure do |c| + c.alias_it_should_behave_like_to :it_has_behavior, 'has behavior:' +end + diff --git a/sources_non_forked/vim-yankstack/spec/yankstack/yankstack_spec.rb b/sources_non_forked/vim-yankstack/spec/yankstack/yankstack_spec.rb new file mode 100644 index 00000000..327fb5fc --- /dev/null +++ b/sources_non_forked/vim-yankstack/spec/yankstack/yankstack_spec.rb @@ -0,0 +1,343 @@ +require "spec_helper" + +describe "Yankstack" do + let(:vim) { Vimbot::Driver.new } + + before(:all) do + vim.start + + vim.set "visualbell" + vim.set "noerrorbells" + vim.set "macmeta" + + vim.set "runtimepath+=#{PLUGIN_ROOT}" + vim.runtime "plugin/yankstack.vim" + + vim.source VIM_REPEAT_PATH + end + + after(:all) { vim.stop } + before(:each) { vim.clear_buffer } + + shared_examples "yanking and pasting" do + let(:yank_keys) { "yw" } + + before do + vim.insert "first_line", "second_line", "third_line", "fourth_line" + vim.normal "gg" + vim.normal yank_keys, 'j', yank_keys, 'j', yank_keys, 'j', yank_keys + end + + it "pushes every yanked string to the :Yanks stack" do + yank_entries[0].should match /0\s+fourth_line/ + yank_entries[1].should match /1\s+third_line/ + yank_entries[2].should match /2\s+second_line/ + yank_entries[3].should match /3\s+first_line/ + end + + describe "yanking with different keys" do + before do + vim.normal "A", "", "line to delete", "", "^" + end + + keys_that_change_register = [ + 'cc', 'C', + 'dd', 'D', + 's', 'S', + 'x', 'X', + 'yy', 'Y' + ] + + keys_that_change_register.each do |key| + it "pushes to the stack when deleting text with '#{key}'" do + vim.normal key + yank_entries[1].should match /1\s+fourth_line/ + end + end + + it "pushes to the stack when overwriting text in select mode" do + vim.type "V" + vim.type "", "this overwrites the last line" + yank_entries[0].should include "line to delete" + yank_entries[1].should include "fourth_line" + end + end + + context "in normal mode" do + before { vim.normal "o", "" } + + describe "pasting a string with 'p'" do + before { vim.normal "p" } + + it "pastes the most recently yanked string" do + vim.line_number.should == 5 + vim.line.should == "fourth_line" + end + + describe "pressing the repeat key with '.'" do + it "pastes again" do + pending unless File.exists?(VIM_REPEAT_PATH) + + vim.type "." + vim.line.should == "fourth_linefourth_line" + end + end + + describe "typing the 'cycle paste' key" do + before { vim.normal "" } + + it "replaces the pasted string with the previously yanked text" do + vim.line.should == "third_line" + end + + it "rotates the previously yanked text to the top of the yank stack" do + yank_entries[0].should include 'third_line' + yank_entries[1].should include 'second_line' + yank_entries[2].should include 'first_line' + yank_entries[-1].should include 'fourth_line' + end + + it "rotates through the yanks when pressed multiple times" do + vim.normal "" + vim.line.should == "second_line" + vim.normal "" + vim.line.should == "first_line" + + vim.normal "" + vim.line.should == "second_line" + vim.normal "" + vim.line.should == "third_line" + vim.normal "" + vim.line.should == "fourth_line" + end + end + end + + describe "typing the `substitute_older_paste` key without pasting first" do + before { vim.type "" } + + it "pastes the most recently yanked string" do + vim.line_number.should == 5 + vim.line.should == "fourth_line" + end + + describe "typing the 'cycle paste' key" do + before { vim.normal "" } + + it "replaces the pasted text with the previously yanked text" do + vim.line.should == "third_line" + end + end + end + + describe "typing the `substitute_newer_paste` key without pasting first" do + before { vim.type "" } + + it "pastes the most recently yanked string" do + vim.line_number.should == 5 + vim.line.should == "fourth_line" + end + + describe "typing the 'cycle paste' key" do + before { vim.normal "" } + + it "replaces the pasted text with the previously yanked text" do + vim.line.should == "third_line" + end + end + end + + it "allows pasting from a non-default register" do + reg = 'a' + vim.normal "gg" + vim.normal %("#{reg}y$) + vim.normal "G" + + vim.normal %("#{reg}p) + vim.line.should == "first_line" + end + + it "allows pasting with a count" do + vim.normal "3p" + vim.line_number.should == 5 + vim.line.should == "fourth_line" * 3 + end + end + + context "in visual mode, with text highlighted" do + before do + vim.normal "A", "line to overwrite" + vim.normal "V" + end + + describe "pasting a string with 'p'" do + before do + vim.type "p" + end + + it "overwrites the selection with the most recently yanked string" do + vim.line.should == "fourth_line" + end + + it "moves the the overwritten text to the bottom of the stack" do + yank_entries[0].should include "fourth_line" + yank_entries[1].should include "third_line" + yank_entries[2].should include "second_line" + yank_entries[-1].should include "line to overwrite" + end + + describe "typing the 'cycle older paste' key" do + before { vim.normal "" } + + it "replaces the pasted text with the previously yanked text" do + vim.line.should == "third_line" + end + + it "moves the previously yanked text to the top of the stack" do + yank_entries[0].should include "third_line" + yank_entries[1].should include "second_line" + yank_entries[2].should include "first_line" + yank_entries[-2].should include "line to overwrite" + yank_entries[-1].should include "fourth_line" + end + + describe "typing the 'cycle newer paste' key" do + before { vim.normal "" } + + it "replaces the pasted text with the previously yanked text" do + vim.line.should == "fourth_line" + end + + it "moves the previously yanked text to the top of the stack" do + yank_entries[0].should include "fourth_line" + yank_entries[1].should include "third_line" + yank_entries[2].should include "second_line" + yank_entries[3].should include "first_line" + yank_entries[-1].should include "line to overwrite" + end + end + end + end + + describe "typing the `substitute_older_paste` key without pasting first" do + before { vim.type "" } + + it "overwrites the selection with the most recently yanked string" do + vim.line_number.should == 5 + vim.line.should == "fourth_line" + end + end + + describe "typing the `substitute_newer_paste` key without pasting first" do + before { vim.type "" } + + it "overwrites the selection with the most recently yanked string" do + vim.line_number.should == 5 + vim.line.should == "fourth_line" + end + end + + it "allows pasting with a count" do + vim.type "3p" + + vim.line_number.should == 5 + vim.line.should == "fourth_line" + + vim.normal 'j' + vim.line_number.should == 6 + vim.line.should == "fourth_line" + + vim.normal 'j' + vim.line_number.should == 7 + vim.line.should == "fourth_line" + end + end + + context "in insert mode" do + before do + vim.normal "A", "()", "" + vim.type "" + end + + describe "typing the `substitute_older_paste` after a character-wise yank" do + it "pastes the most recently yanked text after the cursor" do + vim.line_number.should == 5 + vim.line.should == "(fourth_line)" + end + + it "stays in insert mode, with the cursor at the end of the pasted text" do + vim.should be_in_insert_mode + vim.column_number.should == "(fourth_line".length + 1 + end + + describe "typing the `substitute_older_paste` key again" do + before { vim.type "" } + + it "replaces the pasted text with the previously yanked text" do + vim.line_number.should == 5 + vim.line.should == "(third_line)" + end + + it "stays in insert mode, with the cursor at the end of the pasted text" do + vim.should be_in_insert_mode + vim.column_number.should == "(third_line".length+1 + end + + it "rotates the previously yanked text to the top of the yank stack" do + yank_entries[0].should include 'third_line' + yank_entries[1].should include 'second_line' + yank_entries[2].should include 'first_line' + yank_entries[-1].should include 'fourth_line' + end + + it "rotates through the yanks when pressed multiple times" do + vim.type "" + vim.line_number.should == 5 + vim.line.should == "(second_line)" + + vim.type "" + vim.line_number.should == 5 + vim.line.should == "(first_line)" + + vim.type "" + vim.line_number.should == 5 + vim.line.should == "(second_line)" + + vim.type "" + vim.line_number.should == 5 + vim.line.should == "(third_line)" + + vim.type "" + vim.line_number.should == 5 + vim.line.should == "(fourth_line)" + end + end + end + + describe "typing `substitute_older_paste` after a line-wise yank" do + let(:yank_keys) { "yy" } + + xit "pastes and puts the cursor after the pasted text" do + vim.line_number.should == 6 + vim.line.should == ")" + vim.type "" + vim.line.should == "(fourth_line" + end + end + end + end + + describe "when using the normal default register" do + it_has_behavior "yanking and pasting" + end + + describe "when using the system clipboard as the default register" do + before { vim.set "clipboard", "unnamed" } + it_has_behavior "yanking and pasting" + end + + def yank_entries + @yank_entries ||= vim.command("Yanks").split("\n")[1..-1] + end +end + From ebcf17bcf504dd824bfe97c95f77621fbc48d969 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 14 May 2016 13:00:48 +0100 Subject: [PATCH 07/12] Updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41e9fc19..ff08a1f1 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,6 @@ Distraction free mode using [goyo.vim](https://github.com/junegunn/goyo.vim) and I recommend reading the docs of these plugins to understand them better. Each of them provide a much better Vim experience! * [pathogen.vim](https://github.com/tpope/vim-pathogen): Manages the runtime path of the plugins -* [YankRing](https://github.com/vim-scripts/YankRing.vim): Maintains a history of previous yanks, changes and deletes * [snipMate.vim](https://github.com/garbas/vim-snipmate): snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim * [bufexplorer.zip](https://github.com/vim-scripts/bufexplorer.zip): Buffer Explorer / Browser. This plugin can be opened with `` * [NERD Tree](https://github.com/scrooloose/nerdtree): A tree explorer plugin for vim @@ -80,6 +79,7 @@ I recommend reading the docs of these plugins to understand them better. Each of Remove all clutter and focus only on the essential. Similar to iA Writer or Write Room [Read more here](http://amix.dk/blog/post/19744) * [vim-commentary](https://github.com/tpope/vim-commentary): Comment stuff out. Use `gcc` to comment out a line (takes a count), `gc` to comment out the target of a motion. `gcu` uncomments a set of adjacent commented lines. * [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks for vim +* [vim-yankstack](https://github.com/maxbrunsfeld/vim-yankstack): Maintains a history of previous yanks, changes and deletes ## Included color schemes From e6d8d5bd9ef6dcafaa505e9b4dd389ed9feb15eb Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 14 May 2016 13:22:04 +0100 Subject: [PATCH 08/12] Improved peaksea for terminal usage --- sources_forked/peaksea/colors/peaksea.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources_forked/peaksea/colors/peaksea.vim b/sources_forked/peaksea/colors/peaksea.vim index 78481e0f..06924bc1 100644 --- a/sources_forked/peaksea/colors/peaksea.vim +++ b/sources_forked/peaksea/colors/peaksea.vim @@ -77,7 +77,7 @@ if &background=='light' hi WarningMsg guifg=#b02000 guibg=NONE gui=NONE hi WildMenu guifg=fg guibg=#d0d090 gui=NONE hi Folded guifg=NONE guibg=#b0e0b0 gui=NONE - hi FoldColumn guifg=fg guibg=#90e090 gui=NONE + hi FoldColumn guifg=fg guibg=NONE gui=NONE hi DiffAdd guifg=NONE guibg=#b0b0e0 gui=NONE hi DiffChange guifg=NONE guibg=#e0b0e0 gui=NONE hi DiffDelete guifg=#002090 guibg=#d0d0d0 gui=NONE @@ -190,7 +190,7 @@ if &background=='light' hi WarningMsg ctermfg=124 ctermbg=NONE cterm=NONE hi WildMenu ctermfg=fg ctermbg=186 cterm=NONE hi Folded ctermfg=NONE ctermbg=151 cterm=NONE - hi FoldColumn ctermfg=fg ctermbg=114 cterm=NONE + hi FoldColumn ctermfg=fg ctermbg=NONE cterm=NONE hi DiffAdd ctermfg=NONE ctermbg=146 cterm=NONE hi DiffChange ctermfg=NONE ctermbg=182 cterm=NONE hi DiffDelete ctermfg=18 ctermbg=252 cterm=NONE @@ -289,7 +289,7 @@ elseif &background=='dark' hi WarningMsg guifg=#f08060 guibg=NONE gui=NONE hi WildMenu guifg=#000000 guibg=#d0d090 gui=NONE hi Folded guifg=#aaaaaa guibg=#333333 gui=NONE - hi FoldColumn guifg=#202020 guibg=#202020 gui=NONE + hi FoldColumn guifg=#202020 guibg=NONE gui=NONE hi DiffAdd guifg=NONE guibg=#000080 gui=NONE hi DiffChange guifg=NONE guibg=#800080 gui=NONE hi DiffDelete guifg=#6080f0 guibg=#202020 gui=NONE @@ -370,7 +370,7 @@ elseif &background=='dark' hi Question ctermfg=Black ctermbg=DarkYellow hi Todo ctermfg=DarkRed ctermbg=DarkYellow hi Folded ctermfg=DarkGrey ctermbg=DarkGrey - hi FoldColumn ctermfg=DarkGrey ctermbg=DarkGrey + hi FoldColumn ctermfg=DarkGrey ctermbg=NONE hi ModeMsg ctermfg=Grey ctermbg=DarkBlue hi VisualNOS ctermfg=Grey ctermbg=DarkBlue hi ErrorMsg ctermfg=DarkYellow ctermbg=DarkRed @@ -525,7 +525,7 @@ elseif &background=='dark' hi WarningMsg ctermfg=209 ctermbg=NONE cterm=NONE hi WildMenu ctermfg=16 ctermbg=186 cterm=NONE hi Folded ctermfg=NONE ctermbg=DarkGrey cterm=NONE - hi FoldColumn ctermfg=DarkGrey ctermbg=DarkGrey cterm=NONE + hi FoldColumn ctermfg=DarkGrey ctermbg=NONE cterm=NONE hi DiffAdd ctermfg=NONE ctermbg=18 cterm=NONE hi DiffChange ctermfg=NONE ctermbg=90 cterm=NONE hi DiffDelete ctermfg=69 ctermbg=234 cterm=NONE From b17bde0bae677cf81f64b0a72a2bad8e72d8aead Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 14 May 2016 13:22:32 +0100 Subject: [PATCH 09/12] Set peaksea as the default theme everywhere --- vimrcs/extended.vim | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/vimrcs/extended.vim b/vimrcs/extended.vim index b0c0d35b..649ed083 100644 --- a/vimrcs/extended.vim +++ b/vimrcs/extended.vim @@ -34,13 +34,8 @@ set guioptions-=l set guioptions-=L " Colorscheme -if has("gui_running") - set background=dark - colorscheme peaksea -else - colorscheme desert - let g:colors_name="desert" -endif +set background=dark +colorscheme peaksea """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" From 31d077d82a8ae71c7a5ae676220d2b7bf2da772e Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 14 May 2016 13:22:57 +0100 Subject: [PATCH 10/12] Replace airline with lightline (much better perfomance) --- README.md | 2 +- sources_non_forked/lightline.vim/.gitignore | 1 + sources_non_forked/lightline.vim/.travis.yml | 22 + sources_non_forked/lightline.vim/LICENSE | 21 + sources_non_forked/lightline.vim/README.md | 788 ++++++++++ .../lightline.vim/autoload/lightline.vim | 485 +++++++ .../autoload/lightline/colorscheme.vim | 228 +++ .../lightline/colorscheme/16color.vim | 46 + .../lightline/colorscheme/PaperColor.vim | 12 + .../lightline/colorscheme/PaperColor_dark.vim | 60 + .../colorscheme/PaperColor_light.vim | 55 + .../lightline/colorscheme/Tomorrow.vim | 41 + .../lightline/colorscheme/Tomorrow_Night.vim | 41 + .../colorscheme/Tomorrow_Night_Blue.vim | 43 + .../colorscheme/Tomorrow_Night_Bright.vim | 42 + .../colorscheme/Tomorrow_Night_Eighties.vim | 42 + .../lightline/colorscheme/default.vim | 8 + .../lightline/colorscheme/jellybeans.vim | 40 + .../lightline/colorscheme/landscape.vim | 25 + .../lightline/colorscheme/powerline.vim | 28 + .../lightline/colorscheme/seoul256.vim | 42 + .../lightline/colorscheme/solarized.vim | 11 + .../lightline/colorscheme/solarized_dark.vim | 73 + .../lightline/colorscheme/solarized_light.vim | 80 ++ .../autoload/lightline/colorscheme/wombat.vim | 40 + .../autoload/lightline/colortable.vim | 42 + .../lightline.vim/autoload/lightline/tab.vim | 33 + .../lightline.vim/doc/lightline.txt | 1277 +++++++++++++++++ .../lightline.vim/plugin/lightline.vim | 24 + .../lightline.vim/test/.themisrc | 20 + .../lightline.vim/test/concatenate.vim | 90 ++ .../lightline.vim/test/error.vim | 15 + .../lightline.vim/test/expand.vim | 612 ++++++++ .../lightline.vim/test/highlight.vim | 141 ++ .../lightline.vim/test/link.vim | 131 ++ .../lightline.vim/test/mode.vim | 14 + .../lightline.vim/test/onetab.vim | 98 ++ .../lightline.vim/test/subseparator.vim | 302 ++++ .../lightline.vim/test/tabline.vim | 67 + .../lightline.vim/test/tabs.vim | 99 ++ .../lightline.vim/test/toggle.vim | 37 + .../lightline.vim/test/uniq.vim | 46 + .../vim-airline-themes/.gitignore | 1 - sources_non_forked/vim-airline-themes/LICENSE | 21 - .../vim-airline-themes/README.md | 51 - .../autoload/airline/themes/badwolf.vim | 52 - .../autoload/airline/themes/base16.vim | 164 --- .../autoload/airline/themes/base16_3024.vim | 73 - .../autoload/airline/themes/base16_apathy.vim | 73 - .../autoload/airline/themes/base16_ashes.vim | 73 - .../airline/themes/base16_atelierdune.vim | 73 - .../airline/themes/base16_atelierforest.vim | 73 - .../airline/themes/base16_atelierheath.vim | 73 - .../airline/themes/base16_atelierlakeside.vim | 73 - .../airline/themes/base16_atelierseaside.vim | 73 - .../autoload/airline/themes/base16_bespin.vim | 73 - .../autoload/airline/themes/base16_brewer.vim | 73 - .../autoload/airline/themes/base16_bright.vim | 73 - .../autoload/airline/themes/base16_chalk.vim | 73 - .../airline/themes/base16_codeschool.vim | 73 - .../autoload/airline/themes/base16_colors.vim | 73 - .../airline/themes/base16_default.vim | 73 - .../airline/themes/base16_eighties.vim | 73 - .../autoload/airline/themes/base16_embers.vim | 73 - .../autoload/airline/themes/base16_flat.vim | 73 - .../autoload/airline/themes/base16_google.vim | 73 - .../airline/themes/base16_grayscale.vim | 73 - .../airline/themes/base16_greenscreen.vim | 73 - .../airline/themes/base16_harmonic16.vim | 73 - .../airline/themes/base16_hopscotch.vim | 73 - .../airline/themes/base16_isotope.vim | 73 - .../airline/themes/base16_londontube.vim | 73 - .../airline/themes/base16_marrakesh.vim | 73 - .../autoload/airline/themes/base16_mocha.vim | 73 - .../airline/themes/base16_monokai.vim | 73 - .../autoload/airline/themes/base16_ocean.vim | 73 - .../airline/themes/base16_paraiso.vim | 73 - .../autoload/airline/themes/base16_pop.vim | 73 - .../airline/themes/base16_railscasts.vim | 73 - .../airline/themes/base16_shapeshifter.vim | 73 - .../airline/themes/base16_solarized.vim | 73 - .../airline/themes/base16_summerfruit.vim | 73 - .../airline/themes/base16_tomorrow.vim | 73 - .../airline/themes/base16_twilight.vim | 73 - .../autoload/airline/themes/base16color.vim | 77 - .../autoload/airline/themes/behelit.vim | 58 - .../autoload/airline/themes/bubblegum.vim | 70 - .../autoload/airline/themes/cool.vim | 65 - .../autoload/airline/themes/distinguished.vim | 59 - .../autoload/airline/themes/durant.vim | 62 - .../autoload/airline/themes/hybrid.vim | 58 - .../autoload/airline/themes/hybridline.vim | 34 - .../autoload/airline/themes/jellybeans.vim | 88 -- .../autoload/airline/themes/kalisi.vim | 70 - .../autoload/airline/themes/kolor.vim | 59 - .../autoload/airline/themes/laederon.vim | 62 - .../autoload/airline/themes/light.vim | 45 - .../autoload/airline/themes/lucius.vim | 62 - .../autoload/airline/themes/luna.vim | 92 -- .../autoload/airline/themes/molokai.vim | 65 - .../autoload/airline/themes/monochrome.vim | 15 - .../autoload/airline/themes/murmur.vim | 82 -- .../autoload/airline/themes/papercolor.vim | 65 - .../autoload/airline/themes/powerlineish.vim | 46 - .../autoload/airline/themes/raven.vim | 85 -- .../autoload/airline/themes/serene.vim | 41 - .../autoload/airline/themes/silver.vim | 85 -- .../autoload/airline/themes/simple.vim | 46 - .../autoload/airline/themes/sol.vim | 90 -- .../autoload/airline/themes/solarized.vim | 198 --- .../autoload/airline/themes/term.vim | 92 -- .../autoload/airline/themes/tomorrow.vim | 44 - .../autoload/airline/themes/ubaryd.vim | 64 - .../autoload/airline/themes/understated.vim | 43 - .../autoload/airline/themes/wombat.vim | 90 -- .../autoload/airline/themes/xtermlight.vim | 45 - .../autoload/airline/themes/zenburn.vim | 44 - .../vim-airline-themes/doc/airline-themes.txt | 128 -- .../plugin/airline-themes.vim | 7 - sources_non_forked/vim-airline/.gitignore | 3 - sources_non_forked/vim-airline/.travis.yml | 8 - sources_non_forked/vim-airline/CHANGELOG.md | 120 -- .../vim-airline/CONTRIBUTING.md | 32 - sources_non_forked/vim-airline/Gemfile | 2 - .../vim-airline/ISSUE_TEMPLATE.md | 17 - sources_non_forked/vim-airline/LICENSE | 21 - sources_non_forked/vim-airline/README.md | 246 ---- sources_non_forked/vim-airline/Rakefile | 14 - .../vim-airline/autoload/airline.vim | 195 --- .../vim-airline/autoload/airline/builder.vim | 192 --- .../vim-airline/autoload/airline/debug.vim | 50 - .../autoload/airline/extensions.vim | 273 ---- .../autoload/airline/extensions/branch.vim | 215 --- .../airline/extensions/bufferline.vim | 23 - .../autoload/airline/extensions/capslock.vim | 14 - .../autoload/airline/extensions/commandt.vim | 16 - .../autoload/airline/extensions/csv.vim | 31 - .../autoload/airline/extensions/ctrlp.vim | 80 -- .../autoload/airline/extensions/ctrlspace.vim | 17 - .../autoload/airline/extensions/default.vim | 98 -- .../autoload/airline/extensions/eclim.vim | 53 - .../autoload/airline/extensions/example.vim | 54 - .../autoload/airline/extensions/hunks.vim | 83 -- .../autoload/airline/extensions/netrw.vim | 32 - .../autoload/airline/extensions/nrrwrgn.vim | 55 - .../autoload/airline/extensions/po.vim | 36 - .../airline/extensions/promptline.vim | 33 - .../autoload/airline/extensions/quickfix.vim | 44 - .../autoload/airline/extensions/syntastic.vim | 19 - .../autoload/airline/extensions/tabline.vim | 186 --- .../airline/extensions/tabline/autoshow.vim | 53 - .../airline/extensions/tabline/buffers.vim | 213 --- .../airline/extensions/tabline/buflist.vim | 42 - .../airline/extensions/tabline/ctrlspace.vim | 149 -- .../extensions/tabline/formatters/default.vim | 39 - .../tabline/formatters/unique_tail.vim | 32 - .../formatters/unique_tail_improved.vim | 91 -- .../airline/extensions/tabline/tabs.vim | 110 -- .../autoload/airline/extensions/tagbar.vim | 45 - .../autoload/airline/extensions/tmuxline.vim | 26 - .../autoload/airline/extensions/undotree.vim | 27 - .../autoload/airline/extensions/unicode.vim | 22 - .../autoload/airline/extensions/unite.vim | 23 - .../airline/extensions/virtualenv.vim | 29 - .../airline/extensions/whitespace.vim | 148 -- .../airline/extensions/windowswap.vim | 27 - .../autoload/airline/extensions/wordcount.vim | 36 - .../wordcount/formatters/default.vim | 58 - .../autoload/airline/extensions/ycm.vim | 36 - .../autoload/airline/highlighter.vim | 178 --- .../vim-airline/autoload/airline/init.vim | 143 -- .../vim-airline/autoload/airline/msdos.vim | 57 - .../vim-airline/autoload/airline/parts.vim | 91 -- .../vim-airline/autoload/airline/section.vim | 73 - .../vim-airline/autoload/airline/themes.vim | 70 - .../autoload/airline/themes/dark.vim | 102 -- .../vim-airline/autoload/airline/util.vim | 70 - .../vim-airline/doc/airline.txt | 1017 ------------- .../vim-airline/plugin/airline.vim | 137 -- sources_non_forked/vim-airline/t/airline.vim | 87 -- sources_non_forked/vim-airline/t/builder.vim | 106 -- sources_non_forked/vim-airline/t/commands.vim | 35 - .../vim-airline/t/extensions_default.vim | 31 - .../vim-airline/t/highlighter.vim | 21 - sources_non_forked/vim-airline/t/init.vim | 78 - sources_non_forked/vim-airline/t/parts.vim | 39 - sources_non_forked/vim-airline/t/section.vim | 76 - sources_non_forked/vim-airline/t/themes.vim | 68 - sources_non_forked/vim-airline/t/util.vim | 54 - update_plugins.py | 3 +- vimrcs/plugins_config.vim | 29 +- 191 files changed, 5349 insertions(+), 11334 deletions(-) create mode 100644 sources_non_forked/lightline.vim/.gitignore create mode 100644 sources_non_forked/lightline.vim/.travis.yml create mode 100644 sources_non_forked/lightline.vim/LICENSE create mode 100644 sources_non_forked/lightline.vim/README.md create mode 100644 sources_non_forked/lightline.vim/autoload/lightline.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/16color.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor_dark.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor_light.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Blue.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Bright.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Eighties.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/default.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/jellybeans.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/landscape.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/powerline.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/seoul256.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized_dark.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized_light.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/wombat.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colortable.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/tab.vim create mode 100644 sources_non_forked/lightline.vim/doc/lightline.txt create mode 100644 sources_non_forked/lightline.vim/plugin/lightline.vim create mode 100644 sources_non_forked/lightline.vim/test/.themisrc create mode 100644 sources_non_forked/lightline.vim/test/concatenate.vim create mode 100644 sources_non_forked/lightline.vim/test/error.vim create mode 100644 sources_non_forked/lightline.vim/test/expand.vim create mode 100644 sources_non_forked/lightline.vim/test/highlight.vim create mode 100644 sources_non_forked/lightline.vim/test/link.vim create mode 100644 sources_non_forked/lightline.vim/test/mode.vim create mode 100644 sources_non_forked/lightline.vim/test/onetab.vim create mode 100644 sources_non_forked/lightline.vim/test/subseparator.vim create mode 100644 sources_non_forked/lightline.vim/test/tabline.vim create mode 100644 sources_non_forked/lightline.vim/test/tabs.vim create mode 100644 sources_non_forked/lightline.vim/test/toggle.vim create mode 100644 sources_non_forked/lightline.vim/test/uniq.vim delete mode 100644 sources_non_forked/vim-airline-themes/.gitignore delete mode 100644 sources_non_forked/vim-airline-themes/LICENSE delete mode 100644 sources_non_forked/vim-airline-themes/README.md delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/badwolf.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_3024.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_apathy.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ashes.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bespin.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_brewer.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bright.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_chalk.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_colors.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_default.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_eighties.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_embers.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_flat.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_google.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_isotope.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_londontube.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_mocha.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_monokai.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ocean.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_pop.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_solarized.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_twilight.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/base16color.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/behelit.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/bubblegum.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/cool.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/distinguished.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/durant.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/hybrid.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/hybridline.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/jellybeans.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/kalisi.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/kolor.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/laederon.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/light.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/lucius.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/luna.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/molokai.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/monochrome.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/murmur.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/papercolor.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/powerlineish.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/raven.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/serene.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/silver.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/simple.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/sol.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/solarized.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/term.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/tomorrow.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/ubaryd.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/understated.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/wombat.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/xtermlight.vim delete mode 100644 sources_non_forked/vim-airline-themes/autoload/airline/themes/zenburn.vim delete mode 100644 sources_non_forked/vim-airline-themes/doc/airline-themes.txt delete mode 100644 sources_non_forked/vim-airline-themes/plugin/airline-themes.vim delete mode 100644 sources_non_forked/vim-airline/.gitignore delete mode 100644 sources_non_forked/vim-airline/.travis.yml delete mode 100644 sources_non_forked/vim-airline/CHANGELOG.md delete mode 100644 sources_non_forked/vim-airline/CONTRIBUTING.md delete mode 100644 sources_non_forked/vim-airline/Gemfile delete mode 100644 sources_non_forked/vim-airline/ISSUE_TEMPLATE.md delete mode 100644 sources_non_forked/vim-airline/LICENSE delete mode 100644 sources_non_forked/vim-airline/README.md delete mode 100644 sources_non_forked/vim-airline/Rakefile delete mode 100644 sources_non_forked/vim-airline/autoload/airline.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/builder.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/debug.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/branch.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/bufferline.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/capslock.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/commandt.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/csv.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/ctrlp.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/ctrlspace.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/default.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/eclim.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/example.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/hunks.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/netrw.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/nrrwrgn.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/po.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/promptline.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/quickfix.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/syntastic.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/autoshow.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buffers.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buflist.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tabline/tabs.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tagbar.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/tmuxline.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/undotree.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/unicode.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/unite.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/virtualenv.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/whitespace.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/windowswap.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/wordcount.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/extensions/ycm.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/highlighter.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/init.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/msdos.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/parts.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/section.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/themes.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/themes/dark.vim delete mode 100644 sources_non_forked/vim-airline/autoload/airline/util.vim delete mode 100644 sources_non_forked/vim-airline/doc/airline.txt delete mode 100644 sources_non_forked/vim-airline/plugin/airline.vim delete mode 100644 sources_non_forked/vim-airline/t/airline.vim delete mode 100644 sources_non_forked/vim-airline/t/builder.vim delete mode 100644 sources_non_forked/vim-airline/t/commands.vim delete mode 100644 sources_non_forked/vim-airline/t/extensions_default.vim delete mode 100644 sources_non_forked/vim-airline/t/highlighter.vim delete mode 100644 sources_non_forked/vim-airline/t/init.vim delete mode 100644 sources_non_forked/vim-airline/t/parts.vim delete mode 100644 sources_non_forked/vim-airline/t/section.vim delete mode 100644 sources_non_forked/vim-airline/t/themes.vim delete mode 100644 sources_non_forked/vim-airline/t/util.vim diff --git a/README.md b/README.md index ff08a1f1..0615d3bb 100644 --- a/README.md +++ b/README.md @@ -73,13 +73,13 @@ I recommend reading the docs of these plugins to understand them better. Each of * [vim-indent-object](https://github.com/michaeljsmith/vim-indent-object): Defines a new text object representing lines of code at the same indent level. Useful for python/vim scripts * [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors): Sublime Text style multiple selections for Vim, CTRL+N is remapped to CTRL+S (due to YankRing) * [vim-expand-region](https://github.com/terryma/vim-expand-region): Allows you to visually select increasingly larger regions of text using the same key combination. -* [vim-airline](https://github.com/bling/vim-airline): Lean & mean status/tabline for vim that's light as air (replacing powerline) * [vim-fugitive](https://github.com/tpope/vim-fugitive): A Git wrapper so awesome, it should be illegal * [goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2): Remove all clutter and focus only on the essential. Similar to iA Writer or Write Room [Read more here](http://amix.dk/blog/post/19744) * [vim-commentary](https://github.com/tpope/vim-commentary): Comment stuff out. Use `gcc` to comment out a line (takes a count), `gc` to comment out the target of a motion. `gcu` uncomments a set of adjacent commented lines. * [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks for vim * [vim-yankstack](https://github.com/maxbrunsfeld/vim-yankstack): Maintains a history of previous yanks, changes and deletes +* [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim ## Included color schemes diff --git a/sources_non_forked/lightline.vim/.gitignore b/sources_non_forked/lightline.vim/.gitignore new file mode 100644 index 00000000..0a56e3fc --- /dev/null +++ b/sources_non_forked/lightline.vim/.gitignore @@ -0,0 +1 @@ +/doc/tags diff --git a/sources_non_forked/lightline.vim/.travis.yml b/sources_non_forked/lightline.vim/.travis.yml new file mode 100644 index 00000000..ae4b73fb --- /dev/null +++ b/sources_non_forked/lightline.vim/.travis.yml @@ -0,0 +1,22 @@ +language: generic + +sudo: false + +install: + - git clone --depth=1 https://github.com/thinca/vim-themis /tmp/themis + - git clone https://github.com/vim/vim $HOME/vim + - (if ! test -d $HOME/vim-7.4/bin; then cd $HOME/vim && git checkout . && git checkout v7.4 && ./configure --prefix=$HOME/vim-7.4 && make && make install; fi) + - (if ! test -d $HOME/vim-7.3/bin; then cd $HOME/vim && git checkout . && git checkout v7.3 && ./configure --prefix=$HOME/vim-7.3 && make && make install; fi) + - (if ! test -d $HOME/vim-7.2.051/bin; then cd $HOME/vim && git checkout . && git checkout v7.2.051 && ./configure --prefix=$HOME/vim-7.2.051 && make && make install; fi) + +cache: + directories: + - $HOME/vim-7.4 + - $HOME/vim-7.3 + - $HOME/vim-7.2.051 + +script: + - /tmp/themis/bin/themis --reporter spec + - PATH=$HOME/vim-7.4/bin/:$PATH /tmp/themis/bin/themis --reporter spec + - PATH=$HOME/vim-7.3/bin/:$PATH /tmp/themis/bin/themis --reporter spec + - PATH=$HOME/vim-7.2.051/bin/:$PATH /tmp/themis/bin/themis --reporter spec diff --git a/sources_non_forked/lightline.vim/LICENSE b/sources_non_forked/lightline.vim/LICENSE new file mode 100644 index 00000000..3000b844 --- /dev/null +++ b/sources_non_forked/lightline.vim/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2016 itchyny + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sources_non_forked/lightline.vim/README.md b/sources_non_forked/lightline.vim/README.md new file mode 100644 index 00000000..4b0a2b42 --- /dev/null +++ b/sources_non_forked/lightline.vim/README.md @@ -0,0 +1,788 @@ +# lightline.vim +A light and configurable statusline/tabline for Vim + +https://github.com/itchyny/lightline.vim + +### powerline theme (default) + +![lightline.vim - powerline](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/powerline/0.png) + +### wombat (with the patched font) + +![lightline.vim - wombat](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/wombat/0.png) + +### jellybeans (with the patched font) + +![lightline.vim - jellybeans](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/jellybeans/0.png) + +### solarized theme (dark) + +![lightline.vim - solarized_dark](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/solarized_dark/0.png) + +### solarized theme (light) + +![lightline.vim - solarized_light](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/solarized_light/0.png) + +### PaperColor theme (light) + +![lightline.vim - PaperColor](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/PaperColor/0.png) + +### seoul256 theme + +![lightline.vim - seoul256](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/seoul256/0.png) + +### landscape theme (with the patched font) + +![lightline.vim - landscape](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/landscape/0.png) + +With branch name, read-only mark and modified mark. +![lightline.vim - landscape - fugitive](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/landscape/5.png) + +landscape is my colorscheme, which is a high-contrast cui-supported colorscheme, available at https://github.com/itchyny/landscape.vim + +## Why yet another clone of powerline? ++ [vim-powerline](https://github.com/Lokaltog/vim-powerline) is a nice plugin, but deprecated. ++ [powerline](https://github.com/Lokaltog/powerline) is a nice plugin, but difficult to configure. ++ [vim-airline](https://github.com/bling/vim-airline) is a nice plugin, but it uses too much functions of other plugins, which should be done by users in `.vimrc`. + +## Spirit of this plugin ++ Minimalism. The core script is very small. ++ Configurability. You can create your own component and easily add to the statusline/tabline. ++ Orthogonality. Any plugin should not change the settings of another plugin. Such plugin-crossing settings should be written by users in `.vimrc`. + +## Author +itchyny (https://github.com/itchyny) + +## License +This software is released under the MIT License, see LICENSE. + +## Installation +### Manually +1. Put all files under $VIM. + +### Pathogen +1. Install with the following command. + + git clone https://github.com/itchyny/lightline.vim ~/.vim/bundle/lightline.vim + +### Vundle (https://github.com/gmarik/Vundle.vim) +1. Add the following configuration to your `.vimrc`. + + Plugin 'itchyny/lightline.vim' + +2. Install with `:PluginInstall`. + +### NeoBundle (https://github.com/Shougo/neobundle.vim) +1. Add the following configuration to your `.vimrc`. + + NeoBundle 'itchyny/lightline.vim' + +2. Install with `:NeoBundleInstall`. + +### vim-plug (https://github.com/junegunn/vim-plug) +1. Add the following configuration to your `.vimrc`. + + Plug 'itchyny/lightline.vim' + +2. Install with `:PlugInstall`. + +## Configuration tutorial +By default, the statusline looks like: +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/1.png) + +If you use the wombat colorscheme, add the following settings to your `.vimrc` (or \_vimrc on Windows): +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ } +``` +to get: + +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/2.png) + + +If your statusline looks like +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/21.png) + +and the cool statuslines appear only on `:vsp`, add +```vim +set laststatus=2 +``` +to your `.vimrc`. + + +If you have problem like +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/20.png) + +then add +```sh +export TERM=xterm-256color +``` +to your `.*shrc` and add +```vim +if !has('gui_running') + set t_Co=256 +endif +``` +to your `.vimrc`. + + +If the colors of the statusline do not change from the default colors, move the settings of `g:lightline` before setting the colorscheme. + +If you are reloading your `.vimrc` via `autocmd` and get this problem + +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/20.png) + +when saving it you need to add the nested flag to your `autocmd` like so + +```vim +augroup reload_vimrc + autocmd! + autocmd bufwritepost $MYVIMRC nested source $MYVIMRC +augroup END +``` + + +Colors appear correctly? Now let's see how to change the appearance. + + +You may think that the default read-only mark is not so cool: +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/3.png) + +Then edit the read-only component. +The lightline components are stored in `g:lightline.component`. +So you add the settings of `g:lightline.component.readonly` in your `.vimrc`. (the following settings are effective with the patched font for vim-powerline): +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'component': { + \ 'readonly': '%{&readonly?"⭤":""}', + \ } + \ } +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/4.png) + +How nice! + +But the boundaries are quadrilateral. You may miss the powerline. +You have installed a cool font for powerlines, so you can use it. +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'component': { + \ 'readonly': '%{&readonly?"⭤":""}', + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/5.png) + +Hurrah! Cool! + + +If your statusline looks like: +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/16.png) + +the patched font is not installed. + +There are two kinds of patched fonts: + ++ The patched fonts for [vim-powerline](https://github.com/Lokaltog/vim-powerline): see https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher ++ The patched fonts for [powerline](https://github.com/Lokaltog/powerline): see https://github.com/Lokaltog/powerline-fonts + +Create or download a font and install it. +And add the `guifont` setting to your `.vimrc` (see `:help 'guifont'` for more detail). +If you are using the vim in a terminal, the font cannot be controlled in `.vimrc`. +Open the setting of the terminal and select the patched font. + +This tutorial is based on the former, the font for vim-powerline (Inconsolata for Powerline). +If you have installed the patched font for powerline, use the following settings instead. +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'component': { + \ 'readonly': '%{&readonly?"":""}', + \ }, + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '', 'right': '' } + \ } +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/19.png) + +If you have installed the font for powerline and your statusline looks like +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/18.png) + +remove +```vim +set ambiwidth=double +``` +from your `.vimrc`. If you want to keep this setting, use the patched font for vim-powerline. ++ https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher + + +If you will not install a patched font, use ascii characters like: +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'component': { + \ 'readonly': '%{&readonly?"x":""}', + \ }, + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '|', 'right': '|' } + \ } +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/17.png) + + + +If the triangles do not appear (but you get some spaces or weird characters like <bf> or ¿), firstly try adding +```vim +set encoding=utf-8 +scriptencoding utf-8 +``` +to the head of your `.vimrc`. +Still you have weird characters, use the unicode numbers. For powerline font +users: +```vim + \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, + \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" } +``` +For vim-powerline font users: +```vim + \ 'separator': { 'left': "\u2b80", 'right': "\u2b82" }, + \ 'subseparator': { 'left': "\u2b81", 'right': "\u2b83" } +``` + + +Almost all of things go well with the patched font but if the triangle looks weird: +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/22.png) + +If you are using iTerm2, change the following settings of iTerm2: ++ set `Profiles>Colors>Minimum contrast` to the Lowest. ++ set `Profiles>Window>Transparency` to the Opaquest. + +For other terminals, this weird-triangle problem will be resolved by disabling transparency or contrast adjustment. + + +If you want to get rid of the extraneous default vim mode information that is now provided by lightline: +![lightline.vim - showmode](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/showmode.png) +```vim +set noshowmode +``` + + +Now, let us get back to the tutorial (with the patched font for vim-powerline). +You look into a help file to find the marks annoying. + +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/6.png) + +Help files are read-only and no-modifiable? We know that! +OK, so you again edit the components. +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'component': { + \ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}', + \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}' + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/7.png) + +Huh? Weird! +The components do not collapse even if they have no information! +In order to avoid this situation, you set expressions to `g:lightline.component_visible_condition`, which should become 1 only when the corresponding components have information. +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'component': { + \ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}', + \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}' + \ }, + \ 'component_visible_condition': { + \ 'readonly': '(&filetype!="help"&& &readonly)', + \ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))' + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/8.png) + +Okay. It works nice. + + + +How does lightline decide the components to show in the statusline? +It's very simple. +The variables to select components are `g:lightline.active.left` and `g:lightline.active.right`. +For example, you add the `g:lightline.active.left` in `.vimrc`. +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'readonly', 'filename', 'modified' ] ] + \ }, + \ 'component': { + \ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}', + \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}' + \ }, + \ 'component_visible_condition': { + \ 'readonly': '(&filetype!="help"&& &readonly)', + \ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))' + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } +``` +If the plugin arranges all the components (in a situation you `set paste` and the file `.vimrc` is read-only, try to modify): +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/9.png) + +The mode component, the paste component, read-only component, filename component and modified component in a row. +Normally, the paste component does not show up. +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/10.png) + +If the file is not read-only (more common cases), the read-only component does not show up. +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/11.png) + + +Again look into `g:lightline.active.left`. +```vim +let g:lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'readonly', 'filename', 'modified' ] ] ... +``` +And the screen shot of all the components. +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/9.png) + +The mode and paste component are displayed in the same group. +The read-only, filename and modified component are in the second group. +It corresponds to the structure of `g:lightline.active.left`. +You can configure the components in the statusline by the following four variables: ++ `g:lightline.active.left` ++ `g:lightline.active.right` ++ `g:lightline.inactive.left` ++ `g:lightline.inactive.right` + +Of course, your settings in `.vimrc` have priority over the default settings in lightline. + + + +GitHub branch is important for us. +And it is a default component in [powerline](https://github.com/Lokaltog/powerline) and [vim-powerline](https://github.com/Lokaltog/vim-powerline). +However, lightline does not provide the branch feature by default. + +In order to show the branch in the statusline, you firstly install the [vim-fugitive](https://github.com/tpope/vim-fugitive) plugin. +Then edit the `g:lightline` in your `.vimrc`. ++ Add your fugitive component to `g:lightline.component`. ++ Add the condition when the fugitive component has information to `g:lightline.component_visible_condition`. ++ Add the component by inserting `'fugitive'` to `g:lightline.active.left`. + +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'fugitive', 'readonly', 'filename', 'modified' ] ] + \ }, + \ 'component': { + \ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}', + \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', + \ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' + \ }, + \ 'component_visible_condition': { + \ 'readonly': '(&filetype!="help"&& &readonly)', + \ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', + \ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())' + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/12.png) + +Okay, the branch component is added! + + + +Now, you might get tired of setting both `'component'` and `'component_visible_condition'`. +Or if you want to do something more complicated? + + +In fact, the components can be created using functions. +Add your function names for components to `g:lightline.component_function`. +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'fugitive', 'readonly', 'filename', 'modified' ] ] + \ }, + \ 'component_function': { + \ 'fugitive': 'LightLineFugitive', + \ 'readonly': 'LightLineReadonly', + \ 'modified': 'LightLineModified' + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } + +function! LightLineModified() + if &filetype == "help" + return "" + elseif &modified + return "+" + elseif &modifiable + return "" + else + return "" + endif +endfunction + +function! LightLineReadonly() + if &filetype == "help" + return "" + elseif &readonly + return "⭤" + else + return "" + endif +endfunction + +function! LightLineFugitive() + return exists('*fugitive#head') ? fugitive#head() : '' +endfunction +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/13.png) + +Fine and readable! + + +Finally, you come up with concatenating the three components: the read-only mark, the filename and the modified mark. +Now you may know what to do. +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'fugitive', 'filename' ] ] + \ }, + \ 'component_function': { + \ 'fugitive': 'LightLineFugitive', + \ 'readonly': 'LightLineReadonly', + \ 'modified': 'LightLineModified', + \ 'filename': 'LightLineFilename' + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } + +function! LightLineModified() + if &filetype == "help" + return "" + elseif &modified + return "+" + elseif &modifiable + return "" + else + return "" + endif +endfunction + +function! LightLineReadonly() + if &filetype == "help" + return "" + elseif &readonly + return "⭤" + else + return "" + endif +endfunction + +function! LightLineFugitive() + return exists('*fugitive#head') ? fugitive#head() : '' +endfunction + +function! LightLineFilename() + return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . + \ ('' != expand('%:t') ? expand('%:t') : '[No Name]') . + \ ('' != LightLineModified() ? ' ' . LightLineModified() : '') +endfunction +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/14.png) + +Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline) +```vim +function! LightLineFugitive() + if exists("*fugitive#head") + let _ = fugitive#head() + return _ !=# '' ? '⭠ '._ : '' + endif + return '' +endfunction +``` +![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/15.png) + +How cool!!! + +Of course, you can name your component as you wish. +```vim +let g:lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'my_component' ] ] }, + \ 'component_function': { + \ 'my_component': 'LightLineComponent', ... +``` + +This is the end of the tutorial. For more information, see `:help lightline`. Good luck with your nice statuslines. + +### Cool characters for the patched fonts + +Symbol | Default | powerline | vim-powerline +------------------ | ------- | ------------- | ------------- +separator.left | '' | '' (\ue0b0) | '⮀' (\u2b80) +separator.right | '' | '' (\ue0b2) | '⮂' (\u2b82) +subseparator.left | '\|' | '' (\ue0b1) | '⮁' (\u2b81) +subseparator.right | '\|' | '' (\ue0b3) | '⮃' (\u2b83) +branch symbol | -- | '' (\ue0a0) | '⭠' (\u2b60) +readonly symbol | -- | '' (\ue0a2) | '⭤' (\u2b64) +linecolumn symbol | -- | '' (\ue0a1) | '⭡' (\u2b81) + +### My settings +I show my settings. I use the patched font for vim-powerline. +```vim +let g:lightline = { + \ 'colorscheme': 'landscape', + \ 'mode_map': { 'c': 'NORMAL' }, + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ] + \ }, + \ 'component_function': { + \ 'modified': 'LightLineModified', + \ 'readonly': 'LightLineReadonly', + \ 'fugitive': 'LightLineFugitive', + \ 'filename': 'LightLineFilename', + \ 'fileformat': 'LightLineFileformat', + \ 'filetype': 'LightLineFiletype', + \ 'fileencoding': 'LightLineFileencoding', + \ 'mode': 'LightLineMode', + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } + +function! LightLineModified() + return &ft =~ 'help\|vimfiler\|gundo' ? '' : &modified ? '+' : &modifiable ? '' : '-' +endfunction + +function! LightLineReadonly() + return &ft !~? 'help\|vimfiler\|gundo' && &readonly ? '⭤' : '' +endfunction + +function! LightLineFilename() + return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . + \ (&ft == 'vimfiler' ? vimfiler#get_status_string() : + \ &ft == 'unite' ? unite#get_status_string() : + \ &ft == 'vimshell' ? vimshell#get_status_string() : + \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . + \ ('' != LightLineModified() ? ' ' . LightLineModified() : '') +endfunction + +function! LightLineFugitive() + if &ft !~? 'vimfiler\|gundo' && exists("*fugitive#head") + let _ = fugitive#head() + return _ !=# '' ? '⭠ '._ : '' + endif + return '' +endfunction + +function! LightLineFileformat() + return winwidth(0) > 70 ? &fileformat : '' +endfunction + +function! LightLineFiletype() + return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : '' +endfunction + +function! LightLineFileencoding() + return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : '' +endfunction + +function! LightLineMode() + return winwidth(0) > 60 ? lightline#mode() : '' +endfunction +``` +When the current window width is narrow, the mode component and the file information component collapse. +For example, the [gundo](https://github.com/sjl/gundo.vim) buffer is narrow. + +Before: +![lightline.vim - gundo](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/gundo0.png) + +After: +![lightline.vim - gundo](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/gundo1.png) + +Nice looking, isn't it? + +### For power users +For users who uses following plugins. + +- [CtrlP](https://github.com/kien/ctrlp.vim) +- [Tagbar](https://github.com/majutsushi/tagbar) +- [Gundo](http://github.com/sjl/gundo.vim) +- [NERDtree](http://github.com/scrooloose/nerdtree) +- [Syntastic](https://github.com/scrooloose/syntastic) +- [unite.vim](https://github.com/Shougo/unite.vim) +- [vimfiler.vim](https://github.com/Shougo/vimfiler.vim) +- [vimshell.vim](https://github.com/Shougo/vimshell.vim) + +```vim +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], + \ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ }, + \ 'component_function': { + \ 'fugitive': 'LightLineFugitive', + \ 'filename': 'LightLineFilename', + \ 'fileformat': 'LightLineFileformat', + \ 'filetype': 'LightLineFiletype', + \ 'fileencoding': 'LightLineFileencoding', + \ 'mode': 'LightLineMode', + \ 'ctrlpmark': 'CtrlPMark', + \ }, + \ 'component_expand': { + \ 'syntastic': 'SyntasticStatuslineFlag', + \ }, + \ 'component_type': { + \ 'syntastic': 'error', + \ }, + \ 'subseparator': { 'left': '|', 'right': '|' } + \ } + +function! LightLineModified() + return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' +endfunction + +function! LightLineReadonly() + return &ft !~? 'help' && &readonly ? 'RO' : '' +endfunction + +function! LightLineFilename() + let fname = expand('%:t') + return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item : + \ fname == '__Tagbar__' ? g:lightline.fname : + \ fname =~ '__Gundo\|NERD_tree' ? '' : + \ &ft == 'vimfiler' ? vimfiler#get_status_string() : + \ &ft == 'unite' ? unite#get_status_string() : + \ &ft == 'vimshell' ? vimshell#get_status_string() : + \ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . + \ ('' != fname ? fname : '[No Name]') . + \ ('' != LightLineModified() ? ' ' . LightLineModified() : '') +endfunction + +function! LightLineFugitive() + try + if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') + let mark = '' " edit here for cool mark + let _ = fugitive#head() + return _ !=# '' ? mark._ : '' + endif + catch + endtry + return '' +endfunction + +function! LightLineFileformat() + return winwidth(0) > 70 ? &fileformat : '' +endfunction + +function! LightLineFiletype() + return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : '' +endfunction + +function! LightLineFileencoding() + return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : '' +endfunction + +function! LightLineMode() + let fname = expand('%:t') + return fname == '__Tagbar__' ? 'Tagbar' : + \ fname == 'ControlP' ? 'CtrlP' : + \ fname == '__Gundo__' ? 'Gundo' : + \ fname == '__Gundo_Preview__' ? 'Gundo Preview' : + \ fname =~ 'NERD_tree' ? 'NERDTree' : + \ &ft == 'unite' ? 'Unite' : + \ &ft == 'vimfiler' ? 'VimFiler' : + \ &ft == 'vimshell' ? 'VimShell' : + \ winwidth(0) > 60 ? lightline#mode() : '' +endfunction + +function! CtrlPMark() + if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item') + call lightline#link('iR'[g:lightline.ctrlp_regex]) + return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item + \ , g:lightline.ctrlp_next], 0) + else + return '' + endif +endfunction + +let g:ctrlp_status_func = { + \ 'main': 'CtrlPStatusFunc_1', + \ 'prog': 'CtrlPStatusFunc_2', + \ } + +function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked) + let g:lightline.ctrlp_regex = a:regex + let g:lightline.ctrlp_prev = a:prev + let g:lightline.ctrlp_item = a:item + let g:lightline.ctrlp_next = a:next + return lightline#statusline(0) +endfunction + +function! CtrlPStatusFunc_2(str) + return lightline#statusline(0) +endfunction + +let g:tagbar_status_func = 'TagbarStatusFunc' + +function! TagbarStatusFunc(current, sort, fname, ...) abort + let g:lightline.fname = a:fname + return lightline#statusline(0) +endfunction + +augroup AutoSyntastic + autocmd! + autocmd BufWritePost *.c,*.cpp call s:syntastic() +augroup END +function! s:syntastic() + SyntasticCheck + call lightline#update() +endfunction + +let g:unite_force_overwrite_statusline = 0 +let g:vimfiler_force_overwrite_statusline = 0 +let g:vimshell_force_overwrite_statusline = 0 +``` + +### Note for developers of other plugins +Appearance consistency matters. + +The statusline is an important space for Vim users. +Overwriting the statusline forcibly in your plugin is not a good idea. +It is not hospitality, but just an annoying feature. +If your plugin has such a feature, add an option to be modest. + +A good design is the following. +Firstly, give the users a clue to judge which buffer is the one your plugin creates. +The filename is a manner and the filetype is another. +Then, export a function which is useful to be shown in the statusline. +Lastly, for advanced users, set important information in buffer variables. +So that the users can obtain the condition of the plugin easily. diff --git a/sources_non_forked/lightline.vim/autoload/lightline.vim b/sources_non_forked/lightline.vim/autoload/lightline.vim new file mode 100644 index 00000000..5fbc5b5f --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline.vim @@ -0,0 +1,485 @@ +" ============================================================================= +" Filename: autoload/lightline.vim +" Author: itchyny +" License: MIT License +" Last Change: 2016/05/14 13:20:45. +" ============================================================================= + +let s:save_cpo = &cpo +set cpo&vim + +let s:_ = 1 + +function! lightline#update() abort + if s:_ + call lightline#init() + call lightline#colorscheme() + endif + if !s:lightline.enable.statusline + return + endif + let w = winnr() + let s = winnr('$') == 1 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)] + for n in range(1, winnr('$')) + call setwinvar(n, '&statusline', s[n!=w]) + call setwinvar(n, 'lightline', n!=w) + endfor +endfunction + +function! lightline#update_once() abort + if !exists('w:lightline') || w:lightline + call lightline#update() + endif +endfunction + +function! lightline#update_disable() abort + if !s:lightline.enable.statusline + return + endif + call setwinvar(0, '&statusline', '') +endfunction + +function! lightline#enable() abort + call lightline#colorscheme() + call lightline#update() + if s:lightline.enable.tabline + set tabline=%!lightline#tabline() + endif + augroup lightline + autocmd! + autocmd WinEnter,BufWinEnter,FileType,ColorScheme,SessionLoadPost * call lightline#update() + autocmd ColorScheme,SessionLoadPost * call lightline#highlight() + autocmd CursorMoved,BufUnload * call lightline#update_once() + augroup END + augroup lightline-disable + autocmd! + augroup END + augroup! lightline-disable +endfunction + +function! lightline#disable() abort + let [&statusline, &tabline] = [get(s:, '_statusline', ''), get(s:, '_tabline', '')] + for t in range(1, tabpagenr('$')) + for n in range(1, tabpagewinnr(t, '$')) + call settabwinvar(t, n, '&statusline', '') + endfor + endfor + augroup lightline + autocmd! + augroup END + augroup! lightline + augroup lightline-disable + autocmd! + autocmd WinEnter * call lightline#update_disable() + augroup END +endfunction + +function! lightline#toggle() abort + if exists('#lightline') + call lightline#disable() + else + call lightline#enable() + endif +endfunction + +let s:_lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'filename', 'modified' ] ], + \ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ }, + \ 'inactive': { + \ 'left': [ [ 'filename' ] ], + \ 'right': [ [ 'lineinfo' ], [ 'percent' ] ] + \ }, + \ 'tabline': { + \ 'left': [ [ 'tabs' ] ], + \ 'right': [ [ 'close' ] ] + \ }, + \ 'tab': { + \ 'active': [ 'tabnum', 'filename', 'modified' ], + \ 'inactive': [ 'tabnum', 'filename', 'modified' ] + \ }, + \ 'component': { + \ 'mode': '%{lightline#mode()}', + \ 'absolutepath': '%F', 'relativepath': '%f', 'filename': '%t', 'modified': '%M', 'bufnum': '%n', + \ 'paste': '%{&paste?"PASTE":""}', 'readonly': '%R', 'charvalue': '%b', 'charvaluehex': '%B', + \ 'spell': '%{&spell?&spelllang:""}', 'fileencoding': '%{&fenc!=#""?&fenc:&enc}', 'fileformat': '%{&ff}', + \ 'filetype': '%{&ft!=#""?&ft:"no ft"}', 'percent': '%3p%%', 'percentwin': '%P', + \ 'lineinfo': '%3l:%-2v', 'line': '%l', 'column': '%c', 'close': '%999X X ' + \ }, + \ 'component_visible_condition': { + \ 'modified': '&modified||!&modifiable', 'readonly': '&readonly', 'paste': '&paste', 'spell': '&spell' + \ }, + \ 'component_function': {}, + \ 'component_expand': { + \ 'tabs': 'lightline#tabs' + \ }, + \ 'component_type': { + \ 'tabs': 'tabsel', 'close': 'raw' + \ }, + \ 'tab_component': {}, + \ 'tab_component_function': { + \ 'filename': 'lightline#tab#filename', 'modified': 'lightline#tab#modified', + \ 'readonly': 'lightline#tab#readonly', 'tabnum': 'lightline#tab#tabnum' + \ }, + \ 'colorscheme': 'default', + \ 'mode_map': { + \ 'n': 'NORMAL', 'i': 'INSERT', 'R': 'REPLACE', 'v': 'VISUAL', 'V': 'V-LINE', "\": 'V-BLOCK', + \ 'c': 'COMMAND', 's': 'SELECT', 'S': 'S-LINE', "\": 'S-BLOCK', 't': 'TERMINAL' + \ }, + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '|', 'right': '|' }, + \ 'tabline_separator': {}, + \ 'tabline_subseparator': {}, + \ 'enable': { 'statusline': 1, 'tabline': 1 }, + \ '_mode_': { + \ 'n': 'normal', 'i': 'insert', 'R': 'replace', 'v': 'visual', 'V': 'visual', "\": 'visual', + \ 'c': 'command', 's': 'select', 'S': 'select', "\": 'select', 't': 'terminal' + \ }, + \ 'mode_fallback': { 'replace': 'insert', 'terminal': 'insert', 'select': 'visual' }, + \ 'palette': {}, + \ 'winwidth': winwidth(0), + \ } +function! lightline#init() abort + let s:lightline = deepcopy(get(g:, 'lightline', {})) + for [key, value] in items(s:_lightline) + if type(value) == 4 + if !has_key(s:lightline, key) + let s:lightline[key] = {} + endif + call extend(s:lightline[key], value, 'keep') + elseif !has_key(s:lightline, key) + let s:lightline[key] = value + endif + unlet value + endfor + call extend(s:lightline.tabline_separator, s:lightline.separator, 'keep') + call extend(s:lightline.tabline_subseparator, s:lightline.subseparator, 'keep') + let s:lightline.tabline_configured = 0 + for components in deepcopy(s:lightline.tabline.left + s:lightline.tabline.right) + if len(filter(components, 'v:val !=# "tabs" && v:val !=# "close"')) > 0 + let s:lightline.tabline_configured = 1 + break + endif + endfor + if !exists('s:_statusline') + let s:_statusline = &statusline + endif + if !exists('s:_tabline') + let s:_tabline = &tabline + endif + if s:lightline.enable.tabline + set tabline=%!lightline#tabline() + else + let &tabline = get(s:, '_tabline', '') + endif + for f in values(s:lightline.component_function) + silent! call call(f, []) + endfor + for f in values(s:lightline.tab_component_function) + silent! call call(f, [1]) + endfor + let s:mode = '' +endfunction + +function! lightline#colorscheme() abort + try + let s:lightline.palette = g:lightline#colorscheme#{s:lightline.colorscheme}#palette + catch + call lightline#error('Could not load colorscheme ' . s:lightline.colorscheme . '.') + let s:lightline.colorscheme = 'default' + let s:lightline.palette = g:lightline#colorscheme#{s:lightline.colorscheme}#palette + finally + let s:highlight = {} + call lightline#highlight('normal') + call lightline#link() + let s:_ = 0 + if has('win32') && !has('gui_running') && &t_Co < 256 + for u in values(s:lightline.palette) + for v in values(u) + for _ in v + let [_[2], _[3]] = [lightline#colortable#gui2cui(_[0], _[2]), lightline#colortable#gui2cui(_[1], _[3])] + endfor + endfor + endfor + endif + endtry +endfunction + +function! lightline#palette() abort + return s:lightline.palette +endfunction + +function! lightline#mode() abort + return get(s:lightline.mode_map, mode(), '') +endfunction + +let s:mode = '' +function! lightline#link(...) abort + let mode = get(s:lightline._mode_, a:0 ? a:1 : mode(), 'normal') + if s:mode == mode + return '' + endif + let s:mode = mode + if !has_key(s:highlight, mode) + call lightline#highlight(mode) + endif + let types = map(s:uniq(sort(filter(values(s:lightline.component_type), 'v:val !=# "raw"'))), '[v:val, 1]') + for [p, l] in [['Left', len(s:lightline.active.left)], ['Right', len(s:lightline.active.right)]] + for [i, t] in map(range(0, l), '[v:val, 0]') + types + if i != l + exec printf('hi link LightLine%s_active_%s LightLine%s_%s_%s', p, i, p, mode, i) + endif + for [j, s] in map(range(0, l), '[v:val, 0]') + types + if i + 1 == j || t || s && i != l + exec printf('hi link LightLine%s_active_%s_%s LightLine%s_%s_%s_%s', p, i, j, p, mode, i, j) + endif + endfor + endfor + endfor + exec printf('hi link LightLineMiddle_active LightLineMiddle_%s', mode) + return '' +endfunction + +function! s:term(p) abort + return get(a:p, 4) !=# '' ? 'term='.a:p[4].' cterm='.a:p[4].' gui='.a:p[4] : '' +endfunction + +if exists('*uniq') + let s:uniq = function('uniq') +else + function! s:uniq(xs) abort + let i = len(a:xs) - 1 + while i > 0 + if a:xs[i] ==# a:xs[i - 1] + call remove(a:xs, i) + endif + let i -= 1 + endwhile + return a:xs + endfunction +endif + +function! lightline#highlight(...) abort + let [c, f] = [s:lightline.palette, s:lightline.mode_fallback] + let [s:lightline.llen, s:lightline.rlen] = [len(c.normal.left), len(c.normal.right)] + let [s:lightline.tab_llen, s:lightline.tab_rlen] = [len(has_key(get(c, 'tabline', {}), 'left') ? c.tabline.left : c.normal.left), len(has_key(get(c, 'tabline', {}), 'right') ? c.tabline.right : c.normal.right)] + let types = map(s:uniq(sort(filter(values(s:lightline.component_type), 'v:val !=# "raw"'))), '[v:val, 1]') + let modes = a:0 ? [a:1] : extend(['normal', 'insert', 'replace', 'visual', 'inactive', 'command', 'select', 'tabline'], has('nvim') ? ['terminal'] : []) + for mode in modes + let s:highlight[mode] = 1 + let d = has_key(c, mode) ? mode : has_key(f, mode) && has_key(c, f[mode]) ? f[mode] : 'normal' + let left = d ==# 'tabline' ? s:lightline.tabline.left : d ==# 'inactive' ? s:lightline.inactive.left : s:lightline.active.left + let right = d ==# 'tabline' ? s:lightline.tabline.right : d ==# 'inactive' ? s:lightline.inactive.right : s:lightline.active.right + let ls = has_key(get(c, d, {}), 'left') ? c[d].left : has_key(f, d) && has_key(get(c, f[d], {}), 'left') ? c[f[d]].left : c.normal.left + let ms = has_key(get(c, d, {}), 'middle') ? c[d].middle[0] : has_key(f, d) && has_key(get(c, f[d], {}), 'middle') ? c[f[d]].middle[0] : c.normal.middle[0] + let rs = has_key(get(c, d, {}), 'right') ? c[d].right : has_key(f, d) && has_key(get(c, f[d], {}), 'right') ? c[f[d]].right : c.normal.right + for [p, l, zs] in [['Left', len(left), ls], ['Right', len(right), rs]] + for [i, t] in map(range(0, l), '[v:val, 0]') + types + if i != l + let r = t ? (has_key(get(c, d, []), i) ? c[d][i][0] : has_key(get(c, 'tabline', {}), i) ? c.tabline[i][0] : get(c.normal, i, zs)[0]) : get(zs, i, ms) + exec printf('hi LightLine%s_%s_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s %s', p, mode, i, r[0], r[1], r[2], r[3], s:term(r)) + endif + for [j, s] in map(range(0, l), '[v:val, 0]') + types + if i + 1 == j || t || s && i != l + let q = s ? (has_key(get(c, d, []), j) ? c[d][j][0] : has_key(get(c, 'tabline', {}), j) ? c.tabline[j][0] : get(c.normal, j, zs)[0]) : (j != l ? get(zs, j, ms) :ms) + exec printf('hi LightLine%s_%s_%s_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s', p, mode, i, j, r[1], q[1], r[3], q[3]) + endif + endfor + endfor + endfor + exec printf('hi LightLineMiddle_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s %s', mode, ms[0], ms[1], ms[2], ms[3], s:term(ms)) + endfor +endfunction + +function! s:subseparator(components, subseparator, expanded) abort + let [a, c, f, v] = [ a:components, s:lightline.component, s:lightline.component_function, s:lightline.component_visible_condition ] + let xs = map(range(len(a:components)), 'a:expanded[v:val] ? "1" : + \ has_key(f, a[v:val]) ? (exists("*".f[a[v:val]]) ? "" : "exists(\"*".f[a[v:val]]."\")&&").f[a[v:val]]."()!=#\"\"" : + \ has_key(v, a[v:val]) ? "(" . v[a[v:val]] . ")" : has_key(c, a[v:val]) ? "1" : "0"') + return '%{' . (xs[0] ==# '1' ? '' : xs[0] . '&&(') . join(xs[1:], '||') . (xs[0] ==# '1' ? '' : ')') . '?"' . a:subseparator . '":""}' +endfunction + +function! lightline#concatenate(xs, right) abort + let separator = a:right ? s:lightline.subseparator.right : s:lightline.subseparator.left + return join(filter(copy(a:xs), 'v:val !=# ""'), ' ' . separator . ' ') +endfunction + +function! lightline#statusline(inactive) abort + if a:inactive && !has_key(s:highlight, 'inactive') + call lightline#highlight('inactive') + endif + return s:line(0, a:inactive) +endfunction + +function! s:normalize(result) abort + if type(a:result) == 3 + return map(a:result, 'type(v:val) == 1 ? v:val : string(v:val)') + elseif type(a:result) == 1 + return [a:result] + else + return [string(a:result)] + endif +endfunction + +function! s:evaluate_expand(component) abort + try + let result = call(a:component, []) + if type(result) == 1 && result ==# '' + return [] + endif + catch + return [] + endtry + return map(type(result) == 3 ? (result + [[], [], []])[:2] : [[], [result], []], 'filter(s:normalize(v:val), "v:val !=# ''''")') +endfunction + +function! s:convert(name, index) abort + if has_key(s:lightline.component_expand, a:name) + let type = get(s:lightline.component_type, a:name, a:index) + return filter(s:map(s:evaluate_expand(s:lightline.component_expand[a:name]), '[v:val, 1, v:key == 1 ? "' . type . '" : "' . a:index . '"]'), 'v:val[0] != []') + else + return [[[a:name], 0, a:index]] + endif +endfunction + +function! s:flatten_twice(xss) abort + let ys = [] + for xs in a:xss + for x in xs + let ys += x + endfor + endfor + return ys +endfunction + +if v:version > 702 || v:version == 702 && has('patch295') + let s:map = function('map') +else + function! s:map(xs, f) abort + let ys = [] + for i in range(len(a:xs)) + call extend(ys, map(a:xs[(i):(i)], substitute(a:f, 'v:key', i, 'g'))) + endfor + return ys + endfunction +endif + +function! s:expand(components) abort + let components = [] + let expanded = [] + let indices = [] + let previndex = -1 + let xs = s:flatten_twice(s:map(deepcopy(a:components), 'map(v:val, "s:convert(v:val, ''" . v:key . "'')")')) + for [component, expand, index] in xs + if previndex != index + call add(indices, index) + call add(components, []) + call add(expanded, []) + endif + call extend(components[-1], component) + call extend(expanded[-1], repeat([expand], len(component))) + let previndex = index + endfor + call add(indices, string(len(a:components))) + return [components, expanded, indices] +endfunction + +function! s:line(tabline, inactive) abort + let _ = a:tabline ? '' : '%{lightline#link()}' + if s:lightline.palette == {} + call lightline#colorscheme() + endif + let [l, r] = a:tabline ? [s:lightline.tab_llen, s:lightline.tab_rlen] : [s:lightline.llen, s:lightline.rlen] + let [p, s] = a:tabline ? [s:lightline.tabline_separator, s:lightline.tabline_subseparator] : [s:lightline.separator, s:lightline.subseparator] + let [c, f, t] = [s:lightline.component, s:lightline.component_function, s:lightline.component_type] + let mode = a:tabline ? 'tabline' : a:inactive ? 'inactive' : 'active' + let l_ = has_key(s:lightline, mode) ? s:lightline[mode].left : s:lightline.active.left + let [lt, lc, ll] = s:expand(copy(l_)) + let r_ = has_key(s:lightline, mode) ? s:lightline[mode].right : s:lightline.active.right + let [rt, rc, rl] = s:expand(copy(r_)) + for i in range(len(lt)) + let _ .= '%#LightLineLeft_' . mode . '_' . ll[i] . '#' + for j in range(len(lt[i])) + let x = lc[i][j] ? lt[i][j] : has_key(f, lt[i][j]) ? (exists('*' . f[lt[i][j]]) ? '%{' . f[lt[i][j]] . '()}' : '%{exists("*' . f[lt[i][j]] . '")?' . f[lt[i][j]] . '():""}') : get(c, lt[i][j], '') + let _ .= has_key(t, lt[i][j]) && t[lt[i][j]] ==# 'raw' || x ==# '' ? x : '%( ' . x . ' %)' + if j < len(lt[i]) - 1 && s.left !=# '' + let _ .= s:subseparator(lt[i][(j):], s.left, lc[i][(j):]) + endif + endfor + let _ .= '%#LightLineLeft_' . mode . '_' . ll[i] . '_' . ll[i + 1] . '#' + let _ .= i < l + len(lt) - len(l_) && ll[i] < l || ll[i] != ll[i + 1] ? p.left : len(lt[i]) ? s.left : '' + endfor + let _ .= '%#LightLineMiddle_' . mode . '#%=' + for i in reverse(range(len(rt))) + let _ .= '%#LightLineRight_' . mode . '_' . rl[i] . '_' . rl[i + 1] . '#' + let _ .= i < r + len(rt) - len(r_) && rl[i] < r || rl[i] != rl[i + 1] ? p.right : len(rt[i]) ? s.right : '' + let _ .= '%#LightLineRight_' . mode . '_' . rl[i] . '#' + for j in range(len(rt[i])) + let x = rc[i][j] ? rt[i][j] : has_key(f, rt[i][j]) ? (exists('*' . f[rt[i][j]]) ? '%{' . f[rt[i][j]] . '()}' : '%{exists("*' . f[rt[i][j]] . '")?' . f[rt[i][j]] . '():""}') : get(c, rt[i][j], '') + let _ .= has_key(t, rt[i][j]) && t[rt[i][j]] ==# 'raw' || x ==# '' ? x : '%( ' . x . ' %)' + if j < len(rt[i]) - 1 && s.right !=# '' + let _ .= s:subseparator(rt[i][(j):], s.right, rc[i][(j):]) + endif + endfor + endfor + return _ +endfunction + +let s:tabnr = -1 +let s:tabcnt = -1 +let s:tabline = '' +function! lightline#tabline() abort + if !has_key(s:highlight, 'tabline') + call lightline#highlight('tabline') + endif + if s:lightline.tabline_configured || s:tabnr != tabpagenr() || s:tabcnt != tabpagenr('$') + let s:tabnr = tabpagenr() + let s:tabcnt = tabpagenr('$') + let s:tabline = s:line(1, 0) + endif + return s:tabline +endfunction + +function! lightline#tabs() abort + let [x, y, z] = [[], [], []] + let nr = tabpagenr() + let cnt = tabpagenr('$') + for i in range(1, cnt) + call add(i < nr ? x : i == nr ? y : z, '%'. i . 'T%{lightline#onetab(' . i . ',' . (i == nr) . ')}' . (i == cnt ? '%T' : '')) + endfor + let abbr = '...' + let n = min([max([s:lightline.winwidth / 40, 2]), 8]) + if len(x) > n && len(z) > n + let x = extend(add(x[:n/2-1], abbr), x[-(n+1)/2:]) + let z = extend(add(z[:(n+1)/2-1], abbr), z[-n/2:]) + elseif len(x) + len(z) > 2 * n + if len(x) > n + let x = extend(add(x[:(2*n-len(z))/2-1], abbr), x[-(2*n-len(z)+1)/2:]) + elseif len(z) > n + let z = extend(add(z[:(2*n-len(x)+1)/2-1], abbr), z[-(2*n-len(x))/2:]) + endif + endif + return [x, y, z] +endfunction + +function! lightline#onetab(n, active) abort + let _ = [] + for name in a:active ? s:lightline.tab.active : s:lightline.tab.inactive + if has_key(s:lightline.tab_component_function, name) + call add(_, call(s:lightline.tab_component_function[name], [a:n])) + else + call add(_, get(s:lightline.tab_component, name, '')) + endif + endfor + return join(filter(_, 'v:val !=# ""'), ' ') +endfunction + +function! lightline#error(msg) abort + echohl ErrorMsg + echomsg 'lightline.vim: '.a:msg + echohl None +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme.vim new file mode 100644 index 00000000..de23eb5f --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme.vim @@ -0,0 +1,228 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme.vim +" Author: itchyny +" License: MIT License +" Last Change: 2015/03/18 08:37:17. +" ============================================================================= + +let s:save_cpo = &cpo +set cpo&vim + +let s:cuicolor = { + \ 'black' : 16, + \ 'white' : 231, + \ + \ 'darkestgreen' : 22, + \ 'darkgreen' : 28, + \ 'mediumgreen' : 70, + \ 'brightgreen' : 148, + \ + \ 'darkestcyan' : 23, + \ 'mediumcyan' : 117, + \ + \ 'darkestblue' : 24, + \ 'darkblue' : 31, + \ + \ 'darkestred' : 52, + \ 'darkred' : 88, + \ 'mediumred' : 124, + \ 'brightred' : 160, + \ 'brightestred' : 196, + \ + \ 'darkestpurple' : 55, + \ 'mediumpurple' : 98, + \ 'brightpurple' : 189, + \ + \ 'brightorange' : 208, + \ 'brightestorange': 214, + \ + \ 'gray0' : 233, + \ 'gray1' : 235, + \ 'gray2' : 236, + \ 'gray3' : 239, + \ 'gray4' : 240, + \ 'gray5' : 241, + \ 'gray6' : 244, + \ 'gray7' : 245, + \ 'gray8' : 247, + \ 'gray9' : 250, + \ 'gray10' : 252, + \ + \ 'yellow' : 136, + \ 'orange' : 166, + \ 'red' : 160, + \ 'magenta' : 125, + \ 'violet' : 61, + \ 'blue' : 33, + \ 'cyan' : 37, + \ 'green' : 64, + \ } + +let s:guicolor = { + \ 'black' : '#000000', + \ 'white' : '#ffffff', + \ + \ 'darkestgreen' : '#005f00', + \ 'darkgreen' : '#008700', + \ 'mediumgreen' : '#5faf00', + \ 'brightgreen' : '#afdf00', + \ + \ 'darkestcyan' : '#005f5f', + \ 'mediumcyan' : '#87dfff', + \ + \ 'darkestblue' : '#005f87', + \ 'darkblue' : '#0087af', + \ + \ 'darkestred' : '#5f0000', + \ 'darkred' : '#870000', + \ 'mediumred' : '#af0000', + \ 'brightred' : '#df0000', + \ 'brightestred' : '#ff0000', + \ + \ 'darkestpurple' : '#5f00af', + \ 'mediumpurple' : '#875fdf', + \ 'brightpurple' : '#dfdfff', + \ + \ 'brightorange' : '#ff8700', + \ 'brightestorange': '#ffaf00', + \ + \ 'gray0' : '#121212', + \ 'gray1' : '#262626', + \ 'gray2' : '#303030', + \ 'gray3' : '#4e4e4e', + \ 'gray4' : '#585858', + \ 'gray5' : '#606060', + \ 'gray6' : '#808080', + \ 'gray7' : '#8a8a8a', + \ 'gray8' : '#9e9e9e', + \ 'gray9' : '#bcbcbc', + \ 'gray10' : '#d0d0d0', + \ + \ 'yellow' : '#b58900', + \ 'orange' : '#cb4b16', + \ 'red' : '#dc322f', + \ 'magenta' : '#d33682', + \ 'violet' : '#6c71c4', + \ 'blue' : '#268bd2', + \ 'cyan' : '#2aa198', + \ 'green' : '#859900', + \ } + +function! s:convert(rgb) abort + let rgb = map(matchlist(a:rgb, '#\(..\)\(..\)\(..\)')[1:3], '0 + ("0x".v:val)') + if len(rgb) == 0 + return 0 + endif + if rgb[0] == 0xc0 && rgb[1] == 0xc0 && rgb[2] == 0xc0 + return 7 + elseif rgb[0] == 0x80 && rgb[1] == 0x80 && rgb[2] == 0x80 + return 8 + elseif (rgb[0] == 0x80 || rgb[0] == 0x00) && (rgb[1] == 0x80 || rgb[1] == 0x00) && (rgb[2] == 0x80 || rgb[2] == 0x00) + return (rgb[0] / 0x80) + (rgb[1] / 0x80) * 2 + (rgb[1] / 0x80) * 4 + elseif abs(rgb[0]-rgb[1]) < 3 && abs(rgb[1]-rgb[2]) < 3 && abs(rgb[2]-rgb[0]) < 3 + return s:black((rgb[0] + rgb[1] + rgb[2]) / 3) + else + return 16 + ((s:nr(rgb[0]) * 6) + s:nr(rgb[1])) * 6 + s:nr(rgb[2]) + endif +endfunction + +function! s:black(x) abort + if a:x < 0x04 + return 16 + elseif a:x > 0xf4 + return 231 + elseif index([0x00, 0x5f, 0x87, 0xaf, 0xdf, 0xff], a:x) >= 0 + let l = a:x / 0x30 + return ((l * 6) + l) * 6 + l + 16 + else + return 232 + (a:x < 8 ? 0 : a:x < 0x60 ? (a:x-8)/10 : a:x < 0x76 ? (a:x-0x60)/6+9 : (a:x-8)/10) + endif +endfunction + +function! s:nr(x) abort + return a:x < 0x2f ? 0 : a:x < 0x73 ? 1 : a:x < 0x9b ? 2 : a:x < 0xc7 ? 3 : a:x < 0xef ? 4 : 5 +endfunction + +function! s:rgb(r, g, b) abort + return printf('#%02x%02x%02x', a:r, a:g, a:b) +endfunction + +function! s:upconvert(nr) abort + let x = a:nr * 1 + if x < 7 + let [b, rg] = [x / 4, x % 4] + let [g, r] = [rg / 2, rg % 2] + return s:rgb(r * 0x80, g * 0x80, b * 0x80) + elseif x == 7 + return s:rgb(0xc0, 0xc0, 0xc0) + elseif x == 8 + return s:rgb(0x80, 0x80, 0x80) + elseif x < 16 + let y = x - 8 + let [b, rg] = [y / 4, y % 4] + let [g, r] = [rg / 2, rg % 2] + return s:rgb(r * 0xff, g * 0xff, b * 0xff) + elseif x < 232 + let y = x - 16 + let [rg, b] = [y / 6, y % 6] + let [r, g] = [rg / 6, rg % 6] + let l = [0x00, 0x5f, 0x87, 0xaf, 0xdf, 0xff] + return s:rgb(l[r], l[g], l[b]) + elseif x < 241 + let k = (x - 232) * 10 + 8 + return s:rgb(k, k, k) + elseif x < 243 + let k = (x - 241) * 6 + 0x60 + return s:rgb(k, k, k) + else + let k = (x - 232) * 10 + 8 + return s:rgb(k, k, k) + endif +endfunction + +function! lightline#colorscheme#fill(p) abort + for k in values(a:p) + for l in values(k) + for m in l + if len(m) < 4 + if type(m[0]) == 1 && type(m[1]) == 1 + if m[0] =~# '^\d\+$' && m[1] =~# '^\d\+$' + call insert(m, s:upconvert(m[1]), 0) + call insert(m, s:upconvert(m[1]), 0) + else + call insert(m, get(s:cuicolor, m[0], s:convert(m[0])), 2) + call insert(m, get(s:cuicolor, m[1], s:convert(m[1])), 3) + let m[0] = get(s:guicolor, m[0], m[0]) + let m[1] = get(s:guicolor, m[1], m[1]) + endif + elseif type(m[0]) == 0 && type(m[1]) == 0 + call insert(m, s:upconvert(m[1]), 0) + call insert(m, s:upconvert(m[1]), 0) + endif + endif + endfor + endfor + endfor + return a:p +endfunction + +function! lightline#colorscheme#flatten(p) abort + for k in values(a:p) + for l in values(k) + for m in range(len(l)) + let attr = '' + if len(l[m]) == 3 && type(l[m][2]) == 1 + let attr = l[m][2] + endif + let l[m] = [l[m][0][0], l[m][1][0], l[m][0][1], l[m][1][1]] + if !empty(attr) + call add(l[m], attr) + endif + endfor + endfor + endfor + return a:p +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/16color.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/16color.vim new file mode 100644 index 00000000..170aa93e --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/16color.vim @@ -0,0 +1,46 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/16color.vim +" Author: itchyny +" License: MIT License +" Last Change: 2014/01/02 10:04:03. +" ============================================================================= +let s:base03 = [ '#808080', 8 ] +let s:base02 = [ '#000000', 0 ] +let s:base01 = [ '#00ff00', 10 ] +let s:base00 = [ '#ffff00', 11 ] +let s:base0 = [ '#0000ff', 12 ] +let s:base1 = [ '#00ffff', 14 ] +let s:base2 = [ '#c0c0c0', 7 ] +let s:base3 = [ '#ffffff', 15 ] +let s:yellow = [ '#808000', 3 ] +let s:orange = [ '#ff0000', 9 ] +let s:red = [ '#800000', 1 ] +let s:magenta = [ '#800080', 5 ] +let s:violet = [ '#ff00ff', 13 ] +let s:blue = [ '#000080', 4 ] +let s:cyan = [ '#008080', 6 ] +let s:green = [ '#008000', 2 ] +if &background ==# 'light' + let [s:base03, s:base3] = [s:base3, s:base03] + let [s:base02, s:base2] = [s:base2, s:base02] + let [s:base01, s:base1] = [s:base1, s:base01] + let [s:base00, s:base0] = [s:base0, s:base00] +endif +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base3, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base00, s:base02 ] ] +let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ] +let s:p.insert.left = [ [ s:base3, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base3, s:red ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base3, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base1, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base0, s:base02 ] ] +let s:p.tabline.left = [ [ s:base2, s:base01 ] ] +let s:p.tabline.tabsel = [ [ s:base2, s:base02 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base2 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:base2, s:red ] ] +let s:p.normal.warning = [ [ s:base02, s:yellow ] ] + +let g:lightline#colorscheme#16color#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor.vim new file mode 100644 index 00000000..429439d8 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor.vim @@ -0,0 +1,12 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/PaperColor.vim +" Author: TKNGUE +" License: MIT License +" Last Change: 2015/07/28 07:35:00. +" ============================================================================= + +if &background ==# 'light' + let g:lightline#colorscheme#PaperColor#palette = g:lightline#colorscheme#PaperColor_light#palette +else + let g:lightline#colorscheme#PaperColor#palette = g:lightline#colorscheme#PaperColor_dark#palette +endif diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor_dark.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor_dark.vim new file mode 100644 index 00000000..0a70b348 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor_dark.vim @@ -0,0 +1,60 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/PaperColor_dark.vim +" Author: TKNGUE +" License: MIT License +" Last Change: 2015-07-27 06:01 +" ============================================================================= + +let s:red = '#df0000' +let s:green = '#008700' +let s:blue = '#00afaf' + +let s:pink = '#afdf00' +let s:olive = '#dfaf5f' +let s:navy = '#df875f' + +let s:orange = '#d75f00' +let s:purple = '#8959a8' +let s:aqua = '#3e999f' + +" Basics: +let s:foreground = '#d0d0d0' +let s:background = '#444444' +let s:window = '#efefef' +let s:status = '#c6c6c6' +let s:error = '#5f0000' + +" Tabline: +let s:tabline_bg = '#3a3a3a' +let s:tabline_active_fg = '#1c1c1c' +let s:tabline_active_bg = '#00afaf' +let s:tabline_inactive_fg = '#c6c6c6' +let s:tabline_inactive_bg = '#585858' + +" Statusline: +let s:statusline_active_fg = '#1c1c1c' +let s:statusline_active_bg = '#5f8787' +let s:statusline_inactive_fg = '#c6c6c6' +let s:statusline_inactive_bg = '#444444' + +" Visual: +let s:visual_fg = '#000000' +let s:visual_bg = '#8787af' + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:foreground, s:background ], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.normal.right = [ [ s:foreground, s:background ], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.normal.middle = [ [ s:statusline_active_fg, s:statusline_active_bg ]] +let s:p.inactive.right = [ [ s:foreground, s:background ], [ s:foreground, s:background ] ] +let s:p.inactive.left = [ [ s:foreground, s:background ], [ s:foreground, s:background ] ] +let s:p.inactive.middle = [ [ s:foreground, s:background ], ] +let s:p.insert.left = [ [ s:background, s:blue], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.replace.left = [ [ s:background, s:pink ], [s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.visual.left = [ [ s:visual_fg, s:visual_bg ], [s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.tabline.left = [ [s:tabline_inactive_fg, s:tabline_inactive_bg ]] +let s:p.tabline.tabsel = [ [s:tabline_active_fg, s:tabline_active_bg ] ] +let s:p.tabline.middle = [ [s:tabline_bg, s:tabline_bg]] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:background, s:error ] ] + +let g:lightline#colorscheme#PaperColor_dark#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor_light.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor_light.vim new file mode 100644 index 00000000..aef0b865 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/PaperColor_light.vim @@ -0,0 +1,55 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/PaperColor_light.vim +" Author: TKNGUE +" License: MIT License +" Last Change: 2015/07/28 07:46:40. +" ============================================================================= + +let s:red = '#df0000' +let s:green = '#008700' +let s:blue = '#4271ae' +let s:pink = '#d7005f' +let s:olive = '#718c00' +let s:navy = '#005f87' +let s:orange = '#d75f00' +let s:purple = '#8959a8' +let s:aqua = '#3e999f' + +" Basics: +let s:foreground = '#4d4d4c' +let s:background = '#F5F5F5' +let s:window = '#efefef' +let s:status = s:aqua +let s:error = '#ffafdf' + +" Tabline: +let s:tabline_bg = s:navy +let s:tabline_active_fg = s:foreground +let s:tabline_active_bg = s:window +let s:tabline_inactive_fg = s:background +let s:tabline_inactive_bg = s:aqua + +" Statusline: +let s:statusline_active_fg = s:window +let s:statusline_active_bg = s:navy +let s:statusline_inactive_fg = s:foreground +let s:statusline_inactive_bg = '#dadada' + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:foreground, s:background ], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.normal.right = [ [ s:foreground, s:background ], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.normal.middle = [ [ s:statusline_active_fg, s:statusline_active_bg ]] +let s:p.inactive.right = [ [ s:foreground, s:background ], [ s:foreground, s:background ] ] +let s:p.inactive.left = [ [ s:foreground, s:background ], [ s:foreground, s:background ] ] +let s:p.inactive.middle = [ [ s:foreground, s:background ], ] +let s:p.insert.left = [ [ s:blue, s:background ], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.replace.left = [ [ s:background, s:pink ], [s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.visual.left = [ [ s:background, s:orange ], [s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ] +let s:p.tabline.left = [ [s:tabline_inactive_fg, s:tabline_inactive_bg ]] +let s:p.tabline.tabsel = [ [s:tabline_active_fg, s:tabline_active_bg ] ] +let s:p.tabline.middle = [ [s:tabline_bg, s:tabline_bg]] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:background, s:error ] ] +let s:p.normal.warning = [ [ s:background, s:olive ] ] + +let g:lightline#colorscheme#PaperColor_light#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow.vim new file mode 100644 index 00000000..82559669 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow.vim @@ -0,0 +1,41 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/Tomorrow.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/09/07 12:22:37. +" ============================================================================= +let s:base03 = '#fafafa' +let s:base023 = '#dfdfdf' +let s:base02 = '#c8c8c8' +let s:base01 = '#b4b4b4' +let s:base00 = '#808080' +let s:base0 = '#666666' +let s:base1 = '#555555' +let s:base2 = '#4f4f4f' +let s:base3 = '#4d4d4c' +let s:red = '#c82829' +let s:orange = '#f5871f' +let s:yellow = '#eab700' +let s:green = '#718c00' +let s:cyan = '#3e999f' +let s:blue = '#4271ae' +let s:magenta = '#8959a8' + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base00, s:base02 ] ] +let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ] +let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base02, s:orange ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base1, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base0, s:base02 ] ] +let s:p.tabline.left = [ [ s:base2, s:base01 ] ] +let s:p.tabline.tabsel = [ [ s:base2, s:base023 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base00 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:red, s:base01 ] ] +let s:p.normal.warning = [ [ s:yellow, s:base0 ] ] + +let g:lightline#colorscheme#Tomorrow#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night.vim new file mode 100644 index 00000000..89031802 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night.vim @@ -0,0 +1,41 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/Tomorrow_Night.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/09/07 12:23:38. +" ============================================================================= +let s:base3 = '#c5c8c6' +let s:base2 = '#bababa' +let s:base1 = '#a0a0a0' +let s:base0 = '#909090' +let s:base00 = '#666666' +let s:base01 = '#555555' +let s:base02 = '#434343' +let s:base023 = '#303030' +let s:base03 = '#1d1f21' +let s:red = '#cc6666' +let s:orange = '#de935f' +let s:yellow = '#f0c674' +let s:green = '#b5bd68' +let s:cyan = '#8abeb7' +let s:blue = '#81a2be' +let s:magenta = '#b294bb' + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base00, s:base02 ] ] +let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ] +let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base02, s:orange ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base1, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base0, s:base02 ] ] +let s:p.tabline.left = [ [ s:base2, s:base01 ] ] +let s:p.tabline.tabsel = [ [ s:base2, s:base023 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base0 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:red, s:base023 ] ] +let s:p.normal.warning = [ [ s:yellow, s:base02 ] ] + +let g:lightline#colorscheme#Tomorrow_Night#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Blue.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Blue.vim new file mode 100644 index 00000000..31c27f35 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Blue.vim @@ -0,0 +1,43 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/Tomorrow_Night_Blue.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/09/07 14:13:21. +" ============================================================================= +let s:base3 = '#ffffff' +let s:base23 = '#ffffff' +let s:base2 = '#ffffff' +let s:base1 = '#ffffff' +let s:base0 = '#ffffff' +let s:base00 = '#6060df' +let s:base01 = '#6060af' +let s:base02 = '#606087' +let s:base023 = '#202087' +let s:base03 = '#002451' +let s:red = '#ff9da4' +let s:orange = '#ffc58f' +let s:yellow = '#ffeead' +let s:green = '#d1f1a9' +let s:cyan = '#99ffff' +let s:blue = '#bbdaff' +let s:magenta = '#ebbbff' + + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base023, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.left = [ [ s:base02, s:base0 ], [ s:base00, s:base03 ] ] +let s:p.insert.left = [ [ s:base023, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base023, s:orange ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base023, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base1, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base0, s:base02 ] ] +let s:p.tabline.left = [ [ s:base2, s:base01 ] ] +let s:p.tabline.tabsel = [ [ s:base2, s:base03 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base1 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:base023, s:red ] ] +let s:p.normal.warning = [ [ s:base023, s:yellow ] ] + +let g:lightline#colorscheme#Tomorrow_Night_Blue#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Bright.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Bright.vim new file mode 100644 index 00000000..5b81a316 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Bright.vim @@ -0,0 +1,42 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/Tomorrow_Night_Bright.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/09/07 14:13:26. +" ============================================================================= +let s:base3 = '#eaeaea' +let s:base23 = '#d0d0d0' +let s:base2 = '#c6c6c6' +let s:base1 = '#b2b2b2' +let s:base0 = '#949494' +let s:base00 = '#767676' +let s:base01 = '#606060' +let s:base02 = '#4e4e4e' +let s:base023 = '#262626' +let s:base03 = '#12124c' +let s:red = '#d54e53' +let s:orange = '#e78c45' +let s:yellow = '#e7c547' +let s:green = '#b9ca4a' +let s:cyan = '#70c0b1' +let s:blue = '#7aa6da' +let s:magenta = '#c397d8' + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base023, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.left = [ [ s:base02, s:base0 ], [ s:base00, s:base03 ] ] +let s:p.insert.left = [ [ s:base023, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base023, s:orange ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base023, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base1, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base0, s:base02 ] ] +let s:p.tabline.left = [ [ s:base2, s:base01 ] ] +let s:p.tabline.tabsel = [ [ s:base2, s:base023 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base1 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:red, s:base023 ] ] +let s:p.normal.warning = [ [ s:yellow, s:base02 ] ] + +let g:lightline#colorscheme#Tomorrow_Night_Bright#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Eighties.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Eighties.vim new file mode 100644 index 00000000..5124eccb --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night_Eighties.vim @@ -0,0 +1,42 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/Tomorrow_Night_Eighties.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/09/07 14:14:14. +" ============================================================================= +let s:base3 = '#cccccc' +let s:base23 = '#bbbbbb' +let s:base2 = '#aaaaaa' +let s:base1 = '#999999' +let s:base0 = '#777777' +let s:base00 = '#666666' +let s:base01 = '#555555' +let s:base02 = '#444444' +let s:base023 = '#333333' +let s:base03 = '#2d2d2d' +let s:red = '#f2777a' +let s:orange = '#f99157' +let s:yellow = '#ffcc66' +let s:green = '#99cc99' +let s:cyan = '#009999' +let s:blue = '#99cccc' +let s:magenta = '#cc99cc' + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base023, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.left = [ [ s:base02, s:base0 ], [ s:base00, s:base03 ] ] +let s:p.insert.left = [ [ s:base023, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base023, s:orange ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base023, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base1, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base0, s:base02 ] ] +let s:p.tabline.left = [ [ s:base2, s:base01 ] ] +let s:p.tabline.tabsel = [ [ s:base2, s:base03 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base1 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:base023, s:red ] ] +let s:p.normal.warning = [ [ s:base023, s:yellow ] ] + +let g:lightline#colorscheme#Tomorrow_Night_Eighties#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/default.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/default.vim new file mode 100644 index 00000000..ee9835c8 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/default.vim @@ -0,0 +1,8 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/default.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/08/22 06:05:52. +" ============================================================================= + +let g:lightline#colorscheme#default#palette = g:lightline#colorscheme#powerline#palette diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/jellybeans.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/jellybeans.vim new file mode 100644 index 00000000..15b2b35b --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/jellybeans.vim @@ -0,0 +1,40 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/jellybeans.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/09/07 12:21:04. +" ============================================================================= +let s:base03 = [ '#151513', 233 ] +let s:base02 = [ '#30302c ', 236 ] +let s:base01 = [ '#4e4e43', 239 ] +let s:base00 = [ '#666656', 242 ] +let s:base0 = [ '#808070', 244 ] +let s:base1 = [ '#949484', 246 ] +let s:base2 = [ '#a8a897', 248 ] +let s:base3 = [ '#e8e8d3', 253 ] +let s:yellow = [ '#ffb964', 215 ] +let s:orange = [ '#fad07a', 222 ] +let s:red = [ '#cf6a4c', 167 ] +let s:magenta = [ '#f0a0c0', 217 ] +let s:blue = [ '#8197bf', 103 ] +let s:cyan = [ '#8fbfdc', 110 ] +let s:green = [ '#99ad6a', 107 ] + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base0, s:base02 ] ] +let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ] +let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base02, s:red ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base0, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base00, s:base02 ] ] +let s:p.tabline.left = [ [ s:base3, s:base00 ] ] +let s:p.tabline.tabsel = [ [ s:base3, s:base02 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base1 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:red, s:base02 ] ] +let s:p.normal.warning = [ [ s:yellow, s:base01 ] ] + +let g:lightline#colorscheme#jellybeans#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/landscape.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/landscape.vim new file mode 100644 index 00000000..68d09209 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/landscape.vim @@ -0,0 +1,25 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/landscape.vim +" Author: itchyny +" License: MIT License +" Last Change: 2015/11/26 21:49:44. +" ============================================================================= + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ ['#0000ff', '#ffffff', 21, 231, 'bold' ], [ '#ffffff', '#0000ff', 231, 21 ] ] +let s:p.normal.right = [ [ '#303030', '#d0d0d0', 236, 252 ], [ '#303030', '#8a8a8a', 236, 245 ], [ '#bcbcbc', '#585858', 250, 240 ] ] +let s:p.inactive.right = [ [ '#121212', '#606060', 233, 241 ], [ '#121212', '#3a3a3a', 233, 237 ], [ '#121212', '#262626', 233, 235 ] ] +let s:p.inactive.left = s:p.inactive.right[1:] +let s:p.insert.left = [ ['#005f00', '#ffffff', 22, 231, 'bold' ], [ '#ffffff', '#005f00', 231, 22 ] ] +let s:p.replace.left = [ [ '#af0000', '#ffffff', 124, 231, 'bold' ], [ '#ffffff', '#af0000', 231, 124 ] ] +let s:p.visual.left = [ [ '#5f00ff', '#ffffff', 57, 231, 'bold' ], [ '#ffffff', '#5f00ff', 231, 57 ] ] +let s:p.normal.middle = [ [ '#8a8a8a', '#303030', 245, 236 ] ] +let s:p.inactive.middle = [ [ '#303030', '#121212', 236, 233 ] ] +let s:p.tabline.left = [ [ '#d0d0d0', '#666666', 252, 242 ] ] +let s:p.tabline.tabsel = [ [ '#dadada', '#121212', 253, 233 ] ] +let s:p.tabline.middle = [ [ '#8a8a8a', '#3a3a3a', 245, 237 ] ] +let s:p.tabline.right = [ [ '#d0d0d0', '#666666', 252, 242 ] ] +let s:p.normal.error = [ [ '#d0d0d0', '#ff0000', 252, 196 ] ] +let s:p.normal.warning = [ [ '#262626', '#ffff00', 235, 226 ] ] + +let g:lightline#colorscheme#landscape#palette = s:p diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/powerline.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/powerline.vim new file mode 100644 index 00000000..40e48d43 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/powerline.vim @@ -0,0 +1,28 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/powerline.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/09/07 15:54:41. +" ============================================================================= + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ ['darkestgreen', 'brightgreen', 'bold'], ['white', 'gray4'] ] +let s:p.normal.right = [ ['gray5', 'gray10'], ['gray9', 'gray4'], ['gray8', 'gray2'] ] +let s:p.inactive.right = [ ['gray1', 'gray5'], ['gray4', 'gray1'], ['gray4', 'gray0'] ] +let s:p.inactive.left = s:p.inactive.right[1:] +let s:p.insert.left = [ ['darkestcyan', 'white', 'bold'], ['white', 'darkblue'] ] +let s:p.insert.right = [ [ 'darkestcyan', 'mediumcyan' ], [ 'mediumcyan', 'darkblue' ], [ 'mediumcyan', 'darkestblue' ] ] +let s:p.replace.left = [ ['white', 'brightred', 'bold'], ['white', 'gray4'] ] +let s:p.visual.left = [ ['darkred', 'brightorange', 'bold'], ['white', 'gray4'] ] +let s:p.normal.middle = [ [ 'gray7', 'gray2' ] ] +let s:p.insert.middle = [ [ 'mediumcyan', 'darkestblue' ] ] +let s:p.replace.middle = s:p.normal.middle +let s:p.replace.right = s:p.normal.right +let s:p.tabline.left = [ [ 'gray9', 'gray4' ] ] +let s:p.tabline.tabsel = [ [ 'gray9', 'gray1' ] ] +let s:p.tabline.middle = [ [ 'gray2', 'gray8' ] ] +let s:p.tabline.right = [ [ 'gray9', 'gray3' ] ] +let s:p.normal.error = [ [ 'gray9', 'brightestred' ] ] +let s:p.normal.warning = [ [ 'gray1', 'yellow' ] ] + +let g:lightline#colorscheme#powerline#palette = lightline#colorscheme#fill(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/seoul256.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/seoul256.vim new file mode 100644 index 00000000..ca2d5a09 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/seoul256.vim @@ -0,0 +1,42 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/seoul256.vim +" Author: atweiden +" License: MIT License +" Last Change: 2015/11/02 08:23:27. +" ============================================================================= +let s:base03 = [ '#151513', 233 ] +let s:base02 = [ '#30302c ', 236 ] +let s:base01 = [ '#4e4e43', 239 ] +let s:base00 = [ '#666656', 242 ] +let s:base0 = [ '#808070', 244 ] +let s:base1 = [ '#949484', 246 ] +let s:base2 = [ '#a8a897', 248 ] +let s:base3 = [ '#e8e8d3', 253 ] +let s:yellow = [ '#d8af5f', 3 ] +let s:orange = [ '#d7875f', 216 ] +let s:red = [ '#d68787', 131 ] +let s:magenta = [ '#df5f87', 168 ] +let s:peach = [ '#d7afaf', 181 ] +let s:blue = [ '#87afaf', 109 ] +let s:cyan = [ '#87d7d7', 23 ] +let s:green = [ '#87af87', 108 ] +let s:white = [ '#d0d0d0', 252 ] + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base0, s:base02 ] ] +let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ] +let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base02, s:peach ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base0, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base00, s:base02 ] ] +let s:p.tabline.left = [ [ s:base3, s:base00 ] ] +let s:p.tabline.tabsel = [ [ s:base3, s:base02 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base1 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:red, s:base02 ] ] +let s:p.normal.warning = [ [ s:yellow, s:base01 ] ] + +let g:lightline#colorscheme#seoul256#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized.vim new file mode 100644 index 00000000..2695c357 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized.vim @@ -0,0 +1,11 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/solarized.vim +" Author: itchyny +" License: MIT License +" Last Change: 2013/08/27 10:24:28. +" ============================================================================= +if &background ==# 'light' + let g:lightline#colorscheme#solarized#palette = g:lightline#colorscheme#solarized_light#palette +else + let g:lightline#colorscheme#solarized#palette = g:lightline#colorscheme#solarized_dark#palette +endif diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized_dark.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized_dark.vim new file mode 100644 index 00000000..37a3dc7e --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized_dark.vim @@ -0,0 +1,73 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/solarized_dark.vim +" Author: itchyny +" License: MIT License +" Last Change: 2014/05/31 01:04:15. +" ============================================================================= + +let s:cuicolors = { + \ 'base03': [ '8', '234', 'DarkGray' ], + \ 'base02': [ '0', '235', 'Black' ], + \ 'base01': [ '10', '239', 'LightGreen' ], + \ 'base00': [ '11', '240', 'LightYellow' ], + \ 'base0': [ '12', '244', 'LightBlue' ], + \ 'base1': [ '14', '245', 'LightCyan' ], + \ 'base2': [ '7', '187', 'LightGray' ], + \ 'base3': [ '15', '230', 'White' ], + \ 'yellow': [ '3', '136', 'DarkYellow' ], + \ 'orange': [ '9', '166', 'LightRed' ], + \ 'red': [ '1', '124', 'DarkRed' ], + \ 'magenta': [ '5', '125', 'DarkMagenta' ], + \ 'violet': [ '13', '61', 'LightMagenta' ], + \ 'blue': [ '4', '33', 'DarkBlue' ], + \ 'cyan': [ '6', '37', 'DarkCyan' ], + \ 'green': [ '2', '64', 'DarkGreen' ], + \ } + +" The following condition only applies for the console and is the same +" condition vim-colors-solarized uses to determine which set of colors +" to use. +let s:solarized_termcolors = get(g:, 'solarized_termcolors', 256) +if s:solarized_termcolors != 256 && &t_Co >= 16 + let s:cuiindex = 0 +elseif s:solarized_termcolors == 256 + let s:cuiindex = 1 +else + let s:cuiindex = 2 +endif + +let s:base03 = [ '#002b36', s:cuicolors.base03[s:cuiindex] ] +let s:base02 = [ '#073642', s:cuicolors.base02[s:cuiindex] ] +let s:base01 = [ '#586e75', s:cuicolors.base01[s:cuiindex] ] +let s:base00 = [ '#657b83', s:cuicolors.base00[s:cuiindex] ] +let s:base0 = [ '#839496', s:cuicolors.base0[s:cuiindex] ] +let s:base1 = [ '#93a1a1', s:cuicolors.base1[s:cuiindex] ] +let s:base2 = [ '#eee8d5', s:cuicolors.base2[s:cuiindex] ] +let s:base3 = [ '#fdf6e3', s:cuicolors.base3[s:cuiindex] ] +let s:yellow = [ '#b58900', s:cuicolors.yellow[s:cuiindex] ] +let s:orange = [ '#cb4b16', s:cuicolors.orange[s:cuiindex] ] +let s:red = [ '#dc322f', s:cuicolors.red[s:cuiindex] ] +let s:magenta = [ '#d33682', s:cuicolors.magenta[s:cuiindex] ] +let s:violet = [ '#6c71c4', s:cuicolors.violet[s:cuiindex] ] +let s:blue = [ '#268bd2', s:cuicolors.blue[s:cuiindex] ] +let s:cyan = [ '#2aa198', s:cuicolors.cyan[s:cuiindex] ] +let s:green = [ '#859900', s:cuicolors.green[s:cuiindex] ] + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base3, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base00, s:base02 ] ] +let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ] +let s:p.insert.left = [ [ s:base3, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base3, s:red ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base3, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base1, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base0, s:base02 ] ] +let s:p.tabline.left = [ [ s:base1, s:base00 ] ] +let s:p.tabline.tabsel = [ [ s:base3, s:base0 ] ] +let s:p.tabline.middle = [ [ s:base01, s:base02 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:base2, s:red ] ] +let s:p.normal.warning = [ [ s:base02, s:yellow ] ] + +let g:lightline#colorscheme#solarized_dark#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized_light.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized_light.vim new file mode 100644 index 00000000..99046afb --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/solarized_light.vim @@ -0,0 +1,80 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/solarized_light.vim +" Author: itchyny +" License: MIT License +" Last Change: 2014/05/31 01:04:21. +" ============================================================================= + +let s:cuicolors = { + \ 'base03': [ '8', '234', 'DarkGray' ], + \ 'base02': [ '0', '235', 'Black' ], + \ 'base01': [ '10', '239', 'LightGreen' ], + \ 'base00': [ '11', '240', 'LightYellow' ], + \ 'base0': [ '12', '244', 'LightBlue' ], + \ 'base1': [ '14', '245', 'LightCyan' ], + \ 'base2': [ '7', '187', 'LightGray' ], + \ 'base3': [ '15', '230', 'White' ], + \ 'yellow': [ '3', '136', 'DarkYellow' ], + \ 'orange': [ '9', '166', 'LightRed' ], + \ 'red': [ '1', '124', 'DarkRed' ], + \ 'magenta': [ '5', '125', 'DarkMagenta' ], + \ 'violet': [ '13', '61', 'LightMagenta' ], + \ 'blue': [ '4', '33', 'DarkBlue' ], + \ 'cyan': [ '6', '37', 'DarkCyan' ], + \ 'green': [ '2', '64', 'DarkGreen' ], + \ } + +" The following condition only applies for the console and is the same +" condition vim-colors-solarized uses to determine which set of colors +" to use. +let s:solarized_termcolors = get(g:, 'solarized_termcolors', 256) +if s:solarized_termcolors != 256 && &t_Co >= 16 + let s:cuiindex = 0 +elseif s:solarized_termcolors == 256 + let s:cuiindex = 1 +else + let s:cuiindex = 2 +endif + +let s:base03 = [ '#002b36', s:cuicolors.base03[s:cuiindex] ] +let s:base02 = [ '#073642', s:cuicolors.base02[s:cuiindex] ] +let s:base01 = [ '#586e75', s:cuicolors.base01[s:cuiindex] ] +let s:base00 = [ '#657b83', s:cuicolors.base00[s:cuiindex] ] +let s:base0 = [ '#839496', s:cuicolors.base0[s:cuiindex] ] +let s:base1 = [ '#93a1a1', s:cuicolors.base1[s:cuiindex] ] +let s:base2 = [ '#eee8d5', s:cuicolors.base2[s:cuiindex] ] +let s:base3 = [ '#fdf6e3', s:cuicolors.base3[s:cuiindex] ] +let s:yellow = [ '#b58900', s:cuicolors.yellow[s:cuiindex] ] +let s:orange = [ '#cb4b16', s:cuicolors.orange[s:cuiindex] ] +let s:red = [ '#dc322f', s:cuicolors.red[s:cuiindex] ] +let s:magenta = [ '#d33682', s:cuicolors.magenta[s:cuiindex] ] +let s:violet = [ '#6c71c4', s:cuicolors.violet[s:cuiindex] ] +let s:blue = [ '#268bd2', s:cuicolors.blue[s:cuiindex] ] +let s:cyan = [ '#2aa198', s:cuicolors.cyan[s:cuiindex] ] +let s:green = [ '#859900', s:cuicolors.green[s:cuiindex] ] + +let [s:base03, s:base3] = [s:base3, s:base03] +let [s:base02, s:base2] = [s:base2, s:base02] +let [s:base01, s:base1] = [s:base1, s:base01] +let [s:base00, s:base0] = [s:base0, s:base00] + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base3, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base00, s:base02 ] ] +let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ] +let s:p.insert.left = [ [ s:base3, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base3, s:red ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base3, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base1, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base0, s:base02 ] ] +let s:p.tabline.left = [ [ s:base2, s:base01 ] ] +let s:p.tabline.tabsel = [ [ s:base2, s:base03 ] ] +let s:p.tabline.middle = [ [ s:base1, s:base02 ] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.normal.error = [ [ s:red, s:base01 ] ] +let s:p.normal.warning = [ [ s:yellow, s:base01 ] ] +let s:p.normal.error = [ [ s:base02, s:red ] ] +let s:p.normal.warning = [ [ s:base2, s:yellow ] ] + +let g:lightline#colorscheme#solarized_light#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/wombat.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/wombat.vim new file mode 100644 index 00000000..96192476 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/wombat.vim @@ -0,0 +1,40 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/wombat.vim +" Author: itchyny +" License: MIT License +" Last Change: 2015/11/30 08:37:43. +" ============================================================================= +let s:base03 = [ '#242424', 235 ] +let s:base023 = [ '#353535 ', 236 ] +let s:base02 = [ '#444444 ', 238 ] +let s:base01 = [ '#585858', 240 ] +let s:base00 = [ '#666666', 242 ] +let s:base0 = [ '#808080', 244 ] +let s:base1 = [ '#969696', 247 ] +let s:base2 = [ '#a8a8a8', 248 ] +let s:base3 = [ '#d0d0d0', 252 ] +let s:yellow = [ '#cae682', 180 ] +let s:orange = [ '#e5786d', 173 ] +let s:red = [ '#e5786d', 203 ] +let s:magenta = [ '#f2c68a', 216 ] +let s:blue = [ '#8ac6f2', 117 ] +let s:cyan = s:blue +let s:green = [ '#95e454', 119 ] +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] +let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] +let s:p.inactive.right = [ [ s:base023, s:base01 ], [ s:base00, s:base02 ] ] +let s:p.inactive.left = [ [ s:base1, s:base02 ], [ s:base00, s:base023 ] ] +let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] +let s:p.replace.left = [ [ s:base023, s:red ], [ s:base3, s:base01 ] ] +let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] +let s:p.normal.middle = [ [ s:base2, s:base02 ] ] +let s:p.inactive.middle = [ [ s:base1, s:base023 ] ] +let s:p.tabline.left = [ [ s:base3, s:base00 ] ] +let s:p.tabline.tabsel = [ [ s:base3, s:base03 ] ] +let s:p.tabline.middle = [ [ s:base2, s:base02 ] ] +let s:p.tabline.right = [ [ s:base2, s:base00 ] ] +let s:p.normal.error = [ [ s:base03, s:red ] ] +let s:p.normal.warning = [ [ s:base023, s:yellow ] ] + +let g:lightline#colorscheme#wombat#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colortable.vim b/sources_non_forked/lightline.vim/autoload/lightline/colortable.vim new file mode 100644 index 00000000..82617b20 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colortable.vim @@ -0,0 +1,42 @@ +" ============================================================================= +" Filename: autoload/lightline/colortable.vim +" Author: itchyny +" License: MIT License +" Last Change: 2015/03/29 06:21:39. +" ============================================================================= + +let s:save_cpo = &cpo +set cpo&vim + +function! s:load() abort + let rgbfile = $VIMRUNTIME . '/rgb.txt' + let table = {} + if filereadable(rgbfile) + for _ in map(filter(readfile(rgbfile), 'v:val !~# "^!"'), 'matchlist(v:val, "^\\s*\\(\\d\\+\\)\\s\\+\\(\\d\\+\\)\\s\\+\\(\\d\\+\\)\\s\\+\\(.*\\)")[1:4]') + let table[tolower(_[3])] = _[0:2] + endfor + endif + return table +endfunction + +let s:table = s:load() + +function! lightline#colortable#name_to_rgb(name) abort + let name = tolower(a:name) + return has_key(s:table, name) ? s:table[name] : [] +endfunction + +function! lightline#colortable#gui2cui(rgb, fallback) abort + let rgb = map(matchlist(a:rgb, '#\(..\)\(..\)\(..\)')[1:3], '0 + ("0x".v:val)') + if len(rgb) == 0 + let rgb = lightline#colortable#name_to_rgb(a:rgb) + if len(rgb) == 0 + return a:fallback % 128 + endif + endif + let rgb = [rgb[0] > 127 ? 4 : 0, rgb[1] > 127 ? 2 : 0, rgb[2] > 127 ? 1 : 0] + return rgb[0] + rgb[1] + rgb[2] +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/sources_non_forked/lightline.vim/autoload/lightline/tab.vim b/sources_non_forked/lightline.vim/autoload/lightline/tab.vim new file mode 100644 index 00000000..f2accc11 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/tab.vim @@ -0,0 +1,33 @@ +" ============================================================================= +" Filename: autoload/lightline/tab.vim +" Author: itchyny +" License: MIT License +" Last Change: 2016/05/07 22:31:02. +" ============================================================================= + +let s:save_cpo = &cpo +set cpo&vim + +function! lightline#tab#filename(n) abort + let buflist = tabpagebuflist(a:n) + let winnr = tabpagewinnr(a:n) + let _ = expand('#'.buflist[winnr - 1].':t') + return _ !=# '' ? _ : '[No Name]' +endfunction + +function! lightline#tab#modified(n) abort + let winnr = tabpagewinnr(a:n) + return gettabwinvar(a:n, winnr, '&modified') ? '+' : gettabwinvar(a:n, winnr, '&modifiable') ? '' : '-' +endfunction + +function! lightline#tab#readonly(n) abort + let winnr = tabpagewinnr(a:n) + return gettabwinvar(a:n, winnr, '&readonly') ? 'RO' : '' +endfunction + +function! lightline#tab#tabnum(n) abort + return a:n +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/sources_non_forked/lightline.vim/doc/lightline.txt b/sources_non_forked/lightline.vim/doc/lightline.txt new file mode 100644 index 00000000..541e23c3 --- /dev/null +++ b/sources_non_forked/lightline.vim/doc/lightline.txt @@ -0,0 +1,1277 @@ +*lightline.txt* A light and configurable statusline/tabline for Vim + +Version: 0.0 +Author: itchyny (https://github.com/itchyny) +License: MIT License +Repository: https://github.com/itchyny/lightline.vim +Last Change: 2016/05/08 13:56:19. + +CONTENTS *lightline-contents* + +Introduction |lightline-introduction| +Spirit |lightline-spirit| +Option |lightline-option| +Font |lightline-font| +Function |lightline-function| +Component Expansion |lightline-component-expansion| +Colorscheme |lightline-colorscheme| +Examples |lightline-examples| +Nice Examples |lightline-nice-examples| +Powerful Example |lightline-powerful-example| +Troubleshooting |lightline-troubleshooting| +Changelog |lightline-changelog| + +============================================================================== +INTRODUCTION *lightline-introduction* + +The *lightline* plugin is a light and configurable statusline/tabline for Vim. + +------------------------------------------------------------------------------ +SPIRIT *lightline-spirit* + + Minimalism + The core script is very small. + + Configurability + You can create your own component and easily add to the + statusline/tabline. + + Orthogonality + Any plugin should not change the settings of another plugin. + Such plugin-crossing settings should be written by users in + .vimrc. + + You might find this plugin is not so useful by default. This plugin + does not provide the branch information, which is a very basic + component in existing plugins. The reason is that branch component is + one of plugin-crossing settings so users should write the settings + using the APIs of the both plugins. Hospitality makes a plugin messy. + Good APIs keep a plugin clean. + +------------------------------------------------------------------------------ +OPTIONS *lightline-option* + + g:lightline *g:lightline* + All the options are stored into this global variable. + + g:lightline.active *g:lightline.active* + g:lightline.inactive *g:lightline.inactive* + g:lightline.tabline *g:lightline.tabline* + Dictionaries to specify the statusline/tabline components. + The components are gathered from either |g:lightline.component|, + |g:lightline.component_function| or + |g:lightline.component_expand|. + Note that right groups of components are stored from right to + left. The default values are: +> + let g:lightline.active = { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'readonly', 'filename', 'modified' ] ], + \ 'right': [ [ 'lineinfo' ], + \ [ 'percent' ], + \ [ 'fileformat', 'fileencoding', 'filetype' ] ] } + let g:lightline.inactive = { + \ 'left': [ [ 'filename' ] ], + \ 'right': [ [ 'lineinfo' ], + \ [ 'percent' ] ] } + let g:lightline.tabline = { + \ 'left': [ [ 'tabs' ] ], + \ 'right': [ [ 'close' ] ] } +< + g:lightline.tab *g:lightline.tab* + Dictionaries to specify the components in each tabs. + The components are gathered from either + |g:lightline.tab_component| or + |g:lightline.tab_component_function|. + The default values are: +> + let g:lightline.tab = { + \ 'active': [ 'tabnum', 'filename', 'modified' ], + \ 'inactive': [ 'tabnum', 'filename', 'modified' ] } +< + g:lightline.component *g:lightline.component* + Dictionary for statusline/tabline components. + The default value is: +> + let g:lightline.component = { + \ 'mode': '%{lightline#mode()}', + \ 'absolutepath': '%F', + \ 'relativepath': '%f', + \ 'filename': '%t', + \ 'modified': '%M', + \ 'bufnum': '%n', + \ 'paste': '%{&paste?"PASTE":""}', + \ 'readonly': '%R', + \ 'charvalue': '%b', + \ 'charvaluehex': '%B', + \ 'fileencoding': '%{&fenc!=#""?&fenc:&enc}', + \ 'fileformat': '%{&ff}', + \ 'filetype': '%{&ft!=#""?&ft:"no ft"}', + \ 'percent': '%3p%%', + \ 'percentwin': '%P', + \ 'spell': '%{&spell?&spelllang:""}', + \ 'lineinfo': '%3l:%-2v', + \ 'line': '%l', + \ 'column': '%c' + \ 'close': '%999X X ' } +< + g:lightline.component_visible_condition *g:lightline.component_visible_condition* + Dictionary of boolean expressions for the components. + Each expression should correspond to the condition each + component have non-zero length. + The default value is: +> + let g:lightline.component_visible_condition = { + \ 'modified': '&modified||!&modifiable', + \ 'readonly': '&readonly', + \ 'paste': '&paste', + \ 'spell': '&spell' } +< + Users are recommended to set this option together with the + component itself. + + g:lightline.component_function *g:lightline.component_function* + Another dictionary for components. This is more convenient + because the user does not have to set both component and + component_visible_condition. If a component set to both component and + component_function, the setting of component_function has priority. + For example, if you want a component for read-only mark, which + disappears in help windows: +> + let g:lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'myreadonly', 'filename', 'modified' ] ], + \ }, + \ 'component_function': { + \ 'myreadonly': 'LightLineReadonly' + \ }, + \ } + function! LightLineReadonly() + return &ft !~? 'help' && &readonly ? 'RO' : '' + endfunction +< + g:lightline.component_expand *g:lightline.component_expand* + Another dictionary for components. You can create a component + which has a special color. For example, error components or + warning components. The functions should return one of: + + a string + + an array of three elements: + [[ left ], [ middle ], [ right ]] + The component in this dictionary has priority over + |g:lightline.component| and |g:lightline.component_function|. + Note that the return string is appended to the statusline + string without any conversion. So you should replace all the + % signs with %%. Otherwise, lightline will be disabled in case + the text has a % sign. + (example: return substitute(text, '%', '%%', 'g')). + See |lightline-component-expansion| for more detail. +> + let g:lightline.component_expand = { + \ 'tabs': 'lightline#tabs' } +< + g:lightline.component_type *g:lightline.component_type* + A dictionary to specify the types for components in + |g:lightline.component_expand|. The types are used to specify + the color. Specifically, the type raw is used to specify a + component which should not be wrapped by item group: %(...%). +> + let g:lightline.component_type = { + \ 'tabs': 'tabsel', + \ 'close': 'raw' } +< + g:lightline.tab_component *g:lightline.tab_component* + A dictionary for components in one tab. + + g:lightline.tab_component_function *g:lightline.tab_component_function* + Another dictionary for components in one tab. + A function specified as a tab component takes one argument: + the tab [count]. + The default value is: +> + let g:lightline.tab_component_function = { + \ 'filename': 'lightline#tab#filename', + \ 'modified': 'lightline#tab#modified', + \ 'readonly': 'lightline#tab#readonly', + \ 'tabnum': 'lightline#tab#tabnum' } +< + g:lightline.colorscheme *g:lightline.colorscheme* + The colorscheme for lightline.vim. + Currently, wombat, solarized, powerline, jellybeans, Tomorrow, + Tomorrow_Night, Tomorrow_Night_Blue, Tomorrow_Night_Eighties, + PaperColor, seoul256, landscape and 16color are available. + The default value is: +> + let g:lightline.colorscheme = 'default' +< + Note that the default colorscheme is exactly the same as the + powerline theme. + + g:lightline.mode_map *g:lightline.mode_map* + A dictionary of names for the modes. The keys are the return + values of |mode()|. + The default value is: +> + let g:lightline.mode_map = { + \ 'n' : 'NORMAL', + \ 'i' : 'INSERT', + \ 'R' : 'REPLACE', + \ 'v' : 'VISUAL', + \ 'V' : 'V-LINE', + \ "\": 'V-BLOCK', + \ 'c' : 'COMMAND', + \ 's' : 'SELECT', + \ 'S' : 'S-LINE', + \ "\": 'S-BLOCK', + \ 't': 'TERMINAL', + \ } +< + When you search a word, you get into the command mode. But if + you want to keep the mode indicator as 'NORMAL', add > + let g:lightline = { 'mode_map': { 'c': 'NORMAL' } } +< to your .vimrc. + + g:lightline.separator *g:lightline.separator* + g:lightline.subseparator *g:lightline.subseparator* + Dictionaries to store separators. + The default value is +> + let g:lightline.separator = { 'left': '', 'right': '' } + let g:lightline.subseparator = { 'left': '|', 'right': '|' } +< + g:lightline.tabline_separator *g:lightline.tabline_separator* + g:lightline.tabline_subseparator *g:lightline.tabline_subseparator* + Dictionaries to store separators for the tabline. + The default value is +> + let g:lightline.tabline_separator = g:lightline.separator + let g:lightline.tabline_subseparator = g:lightline.subseparator +< + g:lightline.enable *g:lightline.enable* + A dictionary to specify which feature is turned on. + The default value is +> + let g:lightline.enable = { + \ 'statusline': 1, + \ 'tabline': 1 + \ } +< + +============================================================================== +FONT *lightline-font* +You can use the patched font you used for |vim-powerline| and |powerline|. + +The patched fonts for |powerline| are available at +https://github.com/Lokaltog/powerline-fonts + +A tutorial to create a patched font for |vim-powerline| is available at +https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher + +If you have installed the patched font for |powerline|, following settings look +nice. +> + let g:lightline = { + \ 'component': { + \ 'lineinfo': ' %3l:%-2v', + \ }, + \ 'component_function': { + \ 'readonly': 'LightLineReadonly', + \ 'fugitive': 'LightLineFugitive' + \ }, + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '', 'right': '' } + \ } + function! LightLineReadonly() + return &readonly ? '' : '' + endfunction + function! LightLineFugitive() + if exists('*fugitive#head') + let _ = fugitive#head() + return _ !=# '' ? ''._ : '' + endif + return '' + endfunction +< +If you have installed the patched font for |vim-powerline|, following settings +look nice. +> + let g:lightline = { + \ 'component': { + \ 'lineinfo': '⭡ %3l:%-2v', + \ }, + \ 'component_function': { + \ 'readonly': 'LightLineReadonly', + \ 'fugitive': 'LightLineFugitive' + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } + function! LightLineReadonly() + return &readonly ? '⭤' : '' + endfunction + function! LightLineFugitive() + if exists('*fugitive#head') + let _ = fugitive#head() + return _ !=# '' ? '⭠ '._ : '' + endif + return '' + endfunction +< +If the statusline does not correctly show the special characters, use the +unicode numbers. For |powerline| font users: +> + \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, + \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" } +< +For |vim-powerline| font users: +> + \ 'separator': { 'left': "\u2b80", 'right': "\u2b82" }, + \ 'subseparator': { 'left': "\u2b81", 'right': "\u2b83" } +< +See |lightline-problem-9| for more detail. +============================================================================== +FUNCTION *lightline-function* +Exposed functions for lightline.vim. + + lightline#mode() *lightline#mode()* + Returns the mode of the Vim using |g:lightline.mode_map|. + + lightline#init() *lightline#init()* + Initializes the variable |g:lightline|. + + lightline#colorscheme() *lightline#colorscheme()* + Initializes the colorscheme and the highlight groups. + + lightline#update() *lightline#update()* + Updates all the statuslines of existing windows. + + lightline#update_once() *lightline#update_once()* + Updates the statuslines only once. + + lightline#enable() *lightline#enable()* + Enables |lightline|. + + lightline#disable() *lightline#disable()* + Disables |lightline|. + + lightline#toggle() *lightline#toggle()* + Toggles |lightline|. + + lightline#link([mode]) *lightline#link()* + Creates links of the highlight groups for the active window. + This function accepts an optional argument. It should be one + of the return value of |mode()|. + + lightline#highlight() *lightline#highlight()* + Set the highlight groups. + + lightline#statusline({inactive}) *lightline#statusline()* + Returns |statusline| strings. If the argument is 0, it returns + the statusline for active window, and the statusline for + inactive window otherwise. + + lightline#tabline() *lightline#tabline()* + Returns the tabline string. + + lightline#concatenate({list}, {num}) *lightline#concatenate()* + A string concatenation function. Concatenating all the strings + in {list} using the sub-separator of lightline. If {num} is 0, + then the left sub-separator is used. Otherwise, the right + sub-separator is used. + + lightline#palette() *lightline#palette()* + Returns the palette data. + +============================================================================== +COMPONENT EXPANSION *lightline-component-expansion* +You can create components, which have specific colors. This section gives an +example using |syntastic|. + +If you want to add the |syntastic| flag to the statusline, an easy example is: +> + " Example A + let g:lightline = { + \ 'active': { + \ 'right': [ [ 'lineinfo', 'syntastic' ], + \ [ 'percent' ], + \ [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ }, + \ 'component_function': { + \ 'syntastic': 'SyntasticStatuslineFlag', + \ } + \ } + let g:syntastic_mode_map = { 'mode': 'passive', + \ 'active_filetypes': ['c', 'cpp'] } +< +However, the color of the syntastic component is the same as the lineinfo +component. + +In order to change the syntastic component more outstanding, you have to use +|g:lightline.component_expand|. See the following example: +> + " Example B + let g:lightline = { + \ 'active': { + \ 'right': [ [ 'syntastic', 'lineinfo' ], + \ [ 'percent' ], + \ [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ }, + \ 'component_expand': { + \ 'syntastic': 'SyntasticStatuslineFlag', + \ }, + \ 'component_type': { + \ 'syntastic': 'error', + \ } + \ } + let g:syntastic_mode_map = { 'mode': 'passive' } + augroup AutoSyntastic + autocmd! + autocmd BufWritePost *.c,*.cpp call s:syntastic() + augroup END + function! s:syntastic() + SyntasticCheck + call lightline#update() + endfunction +< +In order to understand the above codes, you firstly should know how the +colorschemes work in lightline.vim. Open the following file. + autoload/lightline/colorscheme/powerline.vim +The colorscheme is created by one dictionary: s:p (abbreviation for palette). +See the value of s:p.normal.right. +> + let s:p.normal.right = [ ['gray5', 'gray10'], + \ ['gray9', 'gray4'], + \ ['gray8', 'gray2'] ] +< +This array corresponds to the structure of g:lightline.active.right. Recall +the example A. +> + " Example A + let g:lightline.active.right = [ [ 'lineinfo', 'syntastic' ], + \ [ 'percent' ], + \ [ 'fileformat', 'fileencoding', 'filetype' ] ] +< +The colors are ([fgcolor, bgcolor): +> + (0) [ 'lineinfo', 'syntastic' ] --- s:p.normal.right[0] = ['gray5', 'gray10'] + (1) [ 'percent' ] --- s:p.normal.right[1] = ['gray9', 'gray4'] + (2) [ 'fileformat', 'fileencoding', 'filetype' ] --- s:p.normal.right[2] = ['gray8', 'gray2'] +< +Recall the example B. +> + " Example B + let g:lightline.active.right = [ [ 'syntastic', 'lineinfo' ], + \ [ 'percent' ], + \ [ 'fileformat', 'fileencoding', 'filetype' ] ] +< +If a component is specified in |g:lightline.component_expand|, lightline.vim +expands the components before setting to statusline/tabline. In this example, +the syntastic component is expanded using the |SyntasticStatuslineFlag| function. +This function returns a {string}. Let us call it `syntastic_flag`. +> + let syntastic_flag = SyntasticStatuslineFlag() +< +The syntastic component is now expanded, so it go up to one component group. +The type of the syntastic component is error, and the palette has error +colors, the result is: +> + " Expanded result of Example B + (error) [ syntastic_flag ] --- s:p.normal.error[0] = ['gray9', 'brightestred'] + (0) [ 'lineinfo' ] --- s:p.normal.right[0] = ['gray5', 'gray10'] + (1) [ 'percent' ] --- s:p.normal.right[1] = ['gray9', 'gray4'] + (2) [ 'fileformat', 'fileencoding', 'filetype' ] --- s:p.normal.right[2] = ['gray8', 'gray2'] +< +Thus the syntastic component has the red color. + + +Another example for |g:lightline.component_expand| is the tabs component. +Actually, the expand feature is created for the tabs component. +> + let g:lightline.tabline.left = [ [ 'tabs' ] ] + let g:lightline.component_expand = { + \ 'tabs': 'lightline#tabs' } +< +Create three tabs and select the middle tab. Then execute +> + echo lightline#tabs() + " [['%1T%{lightline#onetab(1,0)}'], + " ['%2T%{lightline#onetab(2,1)}'], + " ['%3T%{lightline#onetab(3,0)}%T']] +< +It returns an array of three elements. The expanded result is: +> + " Expanded result of tabline + (0) ['%1T%{lightline#onetab(1,0)}'] --- s:p.tabline.left[0] = ['gray9', 'gray4'] + (tabsel) ['%2T%{lightline#onetab(2,1)}'] --- s:p.tabline.tabsel[0] = ['gray9', 'gray1'] + (0) ['%3T%{lightline#onetab(3,0)}%T'] --- s:p.tabline.left[0] = ['gray9', 'gray4'] +< +If the tabline components are +> + let g:lightline.tabline.left = [ [ 'A', 'B', 'tabs', 'C', 'D' ] ] +< +then the expanded result is: +> + (0) ['A', 'B', '%1T%{lightline#onetab(1,0)}'] --- s:p.tabline.left[0] + (tabsel) ['%2T%{lightline#onetab(2,1)}'] --- s:p.tabline.tabsel[0] + (0) ['%3T%{lightline#onetab(3,0)}%T', 'C', 'D'] --- s:p.tabline.left[0] +< +In summary, when a function in |g:lightline.component_expand| returns an +array of three elements, the first element and the last element remains as a +part of existing component group. And the middle element goes up to new +component group. +------------------------------------------------------------------------------ +COLORSCHEME *lightline-colorscheme* +You can configure the colorscheme of lightline. For example, +> + let g:lightline = { + \ 'colorscheme': 'wombat', + \ } +< +The colorscheme files are found in the directory + + lightline.vim/autoload/lightline/colorscheme/ + +In each file, one global variable is defined. For example, in the landscape.vim +file, you see +> + let g:lightline#colorscheme#landscape#palette = s:p +< +In the file, the colors for the landscape colorscheme are defined. For example, +> + let s:p.normal.left = [ ['#0000ff', '#ffffff', 21, 231, 'bold' ], [ '#ffffff', '#0000ff', 231, 21 ] ] +< +defines the colors for the components on the left hand side, in normal mode. +> + let s:p.tabline.tabsel = [ [ '#dadada', '#121212', 253, 233 ] ] +< +defines the colors for the selected tab in tabline. In general, each palette +follows the following style: +> + let s:p.{mode}.{where} = [ [ {guifg}, {guibg}, {cuifg}, {cuibg} ], ... ] +< + + +Now, you can create your own colorscheme for lightline. Create a +yourcolorscheme.vim at + + {one of the paths in &rtp}/autoload/lightline/colorscheme/yourcolorscheme.vim + +The following code gives the minimal palette definition for lightline. +> + let s:p = {'normal': {}} + let s:p.normal.left = [ [ ... ] ] + let s:p.normal.right = [ [ ... ] ] + let s:p.normal.middle = [ [ ... ] ] + let g:lightline#colorscheme#yourcolorscheme#palette = s:p +< +And if you add the colorscheme configuration to your .vimrc(_vimrc), +> + let g:lightline = { + \ 'colorscheme': 'yourcolorscheme', + \ } +< +you find it possible to change the lightline colors as you wish. + +Moreover, if you want to change the colors based on the mode of vim, write +something like this: +> + let s:p.insert.left = [ [ ... ] ] + let s:p.insert.right = [ [ ... ] ] + let s:p.replace.left = [ [ ... ] ] + let s:p.replace.right = [ [ ... ] ] + ... + ... +< +For expanded components, you are recommended to define the following two +colors. +> + let s:p.normal.error = [ [ ... ] ] + let s:p.normal.warning = [ [ ... ] ] +< +For the complete list of components the color of which you should define in +your colorscheme, see the colorscheme files in lightline. + +It is sometimes painful to write all the colors for both gui and cui. +Actually, lightline has some useful functions for writing colorschemes. For +example, see + lightline.vim/autoload/lightline/colorscheme/Tomorrow_Night.vim +this colorscheme is defined using only gui color numbers. And convert to the +normal colorscheme form using: +> + let g:lightline#colorscheme#Tomorrow_Night#palette = lightline#colorscheme#fill(s:p) +< +This function fills the cui colors for a palette which has only gui colors, or +vice versa. However, note that using the convenient function sources an +additional Vim script file (autoload/lightline/colorscheme.vim), which causes +a little slow down. If you want to avoid this situation, write all the colors +as done in autoload/lightline/colorscheme/landscape.vim; firstly create the +colorscheme using the fill function, and see the result, in a sense, the +compiled version of your colorscheme. +> + echo g:lightline#colorscheme#yourcolorscheme#palette +< +Then copy and paste the result to the colorscheme file. + +============================================================================== +EXAMPLES *lightline-examples* +You can configure the appearance of statusline. +Write the following examples in you .vimrc(_vimrc). + +In order to change the colorscheme: +> + let g:lightline = { + \ 'colorscheme': 'wombat', + \ } +< + +In order to define your own component: +> + let g:lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'myfilename' ] ] + \ }, + \ 'component_function': { + \ 'myfilename': 'LightLineFilename', + \ 'myreadonly': 'LightLineReadonly', + \ 'mymodified': 'LightLineModified', + \ } + \ } + function! LightLineFilename() + return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . + \ (&ft == 'vimfiler' ? vimfiler#get_status_string() : + \ &ft == 'unite' ? unite#get_status_string() : + \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . + \ ('' != LightLineModified() ? ' ' . LightLineModified() : '') + endfunction + function! LightLineReadonly() + return &ft !~? 'help' && &readonly ? 'RO' : '' + endfunction + function! LightLineModified() + return &modifiable && &modified ? '+' : '' + endfunction +< + +Separators settings: +> + let g:lightline = { + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '|', 'right': '|' } + \ } +< + +For |powerline| font users: +> + let g:lightline = { + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '', 'right': '' } + \ } +< + +For |vim-powerline| font users: +> + let g:lightline = { + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } +< + +------------------------------------------------------------------------------ +NICE EXAMPLES *lightline-nice-examples* + +A nice example for non-patched font users. +> + let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ] + \ }, + \ 'component_function': { + \ 'fugitive': 'LightLineFugitive', + \ 'filename': 'LightLineFilename' + \ } + \ } + function! LightLineModified() + return &ft =~ 'help\|vimfiler' ? '' : &modified ? '+' : &modifiable ? '' : '-' + endfunction + function! LightLineReadonly() + return &ft !~? 'help\|vimfiler' && &readonly ? 'RO' : '' + endfunction + function! LightLineFilename() + return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . + \ (&ft == 'vimfiler' ? vimfiler#get_status_string() : + \ &ft == 'unite' ? unite#get_status_string() : + \ &ft == 'vimshell' ? vimshell#get_status_string() : + \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . + \ ('' != LightLineModified() ? ' ' . LightLineModified() : '') + endfunction + function! LightLineFugitive() + if &ft !~? 'vimfiler' && exists('*fugitive#head') + return fugitive#head() + endif + return '' + endfunction +< +A nice example for |vim-powerline| font users: +> + let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ] + \ }, + \ 'component_function': { + \ 'fugitive': 'LightLineFugitive', + \ 'filename': 'LightLineFilename' + \ }, + \ 'separator': { 'left': '⮀', 'right': '⮂' }, + \ 'subseparator': { 'left': '⮁', 'right': '⮃' } + \ } + function! LightLineModified() + return &ft =~ 'help\|vimfiler' ? '' : &modified ? '+' : &modifiable ? '' : '-' + endfunction + function! LightLineReadonly() + return &ft !~? 'help\|vimfiler' && &readonly ? '⭤' : '' + endfunction + function! LightLineFilename() + return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . + \ (&ft == 'vimfiler' ? vimfiler#get_status_string() : + \ &ft == 'unite' ? unite#get_status_string() : + \ &ft == 'vimshell' ? vimshell#get_status_string() : + \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . + \ ('' != LightLineModified() ? ' ' . LightLineModified() : '') + endfunction + function! LightLineFugitive() + if &ft !~? 'vimfiler' && exists('*fugitive#head') + let _ = fugitive#head() + return _ !=# '' ? '⭠ '._ : '' + endif + return '' + endfunction +< + +------------------------------------------------------------------------------ +POWERFUL EXAMPLE *lightline-powerful-example* + +For users who uses lots of plugins: +> + let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], + \ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ }, + \ 'component_function': { + \ 'fugitive': 'LightLineFugitive', + \ 'filename': 'LightLineFilename', + \ 'fileformat': 'LightLineFileformat', + \ 'filetype': 'LightLineFiletype', + \ 'fileencoding': 'LightLineFileencoding', + \ 'mode': 'LightLineMode', + \ 'ctrlpmark': 'CtrlPMark', + \ }, + \ 'component_expand': { + \ 'syntastic': 'SyntasticStatuslineFlag', + \ }, + \ 'component_type': { + \ 'syntastic': 'error', + \ }, + \ 'subseparator': { 'left': '|', 'right': '|' } + \ } + + function! LightLineModified() + return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' + endfunction + + function! LightLineReadonly() + return &ft !~? 'help' && &readonly ? 'RO' : '' + endfunction + + function! LightLineFilename() + let fname = expand('%:t') + return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item : + \ fname == '__Tagbar__' ? g:lightline.fname : + \ fname =~ '__Gundo\|NERD_tree' ? '' : + \ &ft == 'vimfiler' ? vimfiler#get_status_string() : + \ &ft == 'unite' ? unite#get_status_string() : + \ &ft == 'vimshell' ? vimshell#get_status_string() : + \ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . + \ ('' != fname ? fname : '[No Name]') . + \ ('' != LightLineModified() ? ' ' . LightLineModified() : '') + endfunction + + function! LightLineFugitive() + try + if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') + let mark = '' " edit here for cool mark + let _ = fugitive#head() + return _ !=# '' ? mark._ : '' + endif + catch + endtry + return '' + endfunction + + function! LightLineFileformat() + return winwidth(0) > 70 ? &fileformat : '' + endfunction + + function! LightLineFiletype() + return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : '' + endfunction + + function! LightLineFileencoding() + return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : '' + endfunction + + function! LightLineMode() + let fname = expand('%:t') + return fname == '__Tagbar__' ? 'Tagbar' : + \ fname == 'ControlP' ? 'CtrlP' : + \ fname == '__Gundo__' ? 'Gundo' : + \ fname == '__Gundo_Preview__' ? 'Gundo Preview' : + \ fname =~ 'NERD_tree' ? 'NERDTree' : + \ &ft == 'unite' ? 'Unite' : + \ &ft == 'vimfiler' ? 'VimFiler' : + \ &ft == 'vimshell' ? 'VimShell' : + \ winwidth(0) > 60 ? lightline#mode() : '' + endfunction + + function! CtrlPMark() + if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item') + call lightline#link('iR'[g:lightline.ctrlp_regex]) + return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item + \ , g:lightline.ctrlp_next], 0) + else + return '' + endif + endfunction + + let g:ctrlp_status_func = { + \ 'main': 'CtrlPStatusFunc_1', + \ 'prog': 'CtrlPStatusFunc_2', + \ } + + function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked) + let g:lightline.ctrlp_regex = a:regex + let g:lightline.ctrlp_prev = a:prev + let g:lightline.ctrlp_item = a:item + let g:lightline.ctrlp_next = a:next + return lightline#statusline(0) + endfunction + + function! CtrlPStatusFunc_2(str) + return lightline#statusline(0) + endfunction + + let g:tagbar_status_func = 'TagbarStatusFunc' + + function! TagbarStatusFunc(current, sort, fname, ...) abort + let g:lightline.fname = a:fname + return lightline#statusline(0) + endfunction + + augroup AutoSyntastic + autocmd! + autocmd BufWritePost *.c,*.cpp call s:syntastic() + augroup END + function! s:syntastic() + SyntasticCheck + call lightline#update() + endfunction + + let g:unite_force_overwrite_statusline = 0 + let g:vimfiler_force_overwrite_statusline = 0 + let g:vimshell_force_overwrite_statusline = 0 +< +------------------------------------------------------------------------------ +TROUBLESHOOTING *lightline-troubleshooting* + +Problem 1: |lightline-problem-1| + How to install this plugin. + +Problem 2: |lightline-problem-2| + How to update this plugin. + +Problem 3: |lightline-problem-3| + How to uninstall this plugin. + +Problem 4: |lightline-problem-4| + Cool statuslines appear only on |:vsp|. + +Problem 5: |lightline-problem-5| + The statusline does not seem to be correctly colored. + +Problem 6: |lightline-problem-6| + How to install a patched font. + +Problem 7: |lightline-problem-7| + Right triangles do not stick to the right components with the + patched font. + +Problem 8: |lightline-problem-8| + Triangles do not appear. Triangles look weird. + +Problem 9: |lightline-problem-9| + Where can I find the list of all the cool characters for patched fonts? + +Problem 10: |lightline-problem-10| + Cool statusline disappears in |unite|, |vimfiler| and |vimshell| + buffers. + +Problem 11: |lightline-problem-11| + Cool statusline disappears in |CtrlP|, |Tagbar| buffers. + +Problem 12: |lightline-problem-12| + How to make the plus sign red like |powerline|? + +Problem 13: |lightline-problem-13| + How to change the lightline colorscheme on the fly. + +Problem 14: |lightline-problem-14| + The 'E541' warning appears on the right hand side. + Many components disable the statusline of lightline. + +Problem 15: |lightline-problem-15| + Do not deal with the tabline. + Do not use the fancy separators in the tabline. + +Problem 16: |lightline-problem-16| + When changed the component to a function component to an expanding + component, the statusline of lightline is sometimes disabled. + +Problem 17: |lightline-problem-17| + Found a bug of this plugin. + Got many errors while using this plugin. + Vim hangs while using this plugin. + Want this plugin to be more configurable. + This troubleshooting is not helpful. + +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Problem 1: *lightline-problem-1* + How to install this plugin. + + If you are to install this plugin manually: + + 1. Put all the files under $VIM. + + If you are using |vim-pathogen|, install this plugin with the + following command. +> + git clone https://github.com/itchyny/lightline.vim \ + ~/.vim/bundle/lightline.vim +< + If you are to install this plugin using |Vundle|: + + 1. Add the following configuration to your + .vimrc(_vimrc). +> + Plugin 'itchyny/lightline.vim' +< + 2. Install with |:PluginInstall|. + + If you are to install this plugin using |NeoBundle|: + + 1. Add the following configuration to your + .vimrc(_vimrc). +> + NeoBundle 'itchyny/lightline.vim' +< + 2. Install with |:NeoBundleInstall|. + + If you are to install this plugin using |vim-plug|: + + 1. Add the following configuration to your + .vimrc(_vimrc). +> + Plug 'itchyny/lightline.vim' +< + 2. Install with |:PlugInstall|. + +Problem 2: *lightline-problem-2* + How to update this plugin. + + If you have installed this plugin manually: + + 1. Access https://github.com/itchyny/lightline.vim . + 2. Download the latest scripts. + 3. Place the scripts as written in Problem 1. + + If you have installed this plugin using Vundle: + + 1. Execute |:PluginUpdate|. + + If you have installed this plugin using NeoBundle: + + 1. Execute |:NeoBundleUpdate|. + + If you have installed this plugin using vim-plug: + + 1. Execute |:PlugUpdate|. + +Problem 3: *lightline-problem-3* + How to uninstall this plugin. + + If you have installed this plugin manually: + + 1. Remove all the lightline.*s under $VIM. + + If you have installed this plugin using Vundle: + + 1. Remove the :Plugin 'itchyny/lightline.vim' + configuration from your .vimrc(_vimrc). + 2. Update with |:PluginClean|. + + If you have installed this plugin using NeoBundle: + + 1. Remove the :NeoBundle 'itchyny/lightline.vim' + configuration from your .vimrc(_vimrc). + 2. Update with |:NeoBundleClean|. + + If you have installed this plugin using vim-plug: + + 1. Remove the :Plug 'itchyny/lightline.vim' + configuration from your .vimrc(_vimrc). + 2. Update with |:PlugClean|. + +Problem 4: *lightline-problem-4* + Cool statuslines appear only on |:vsp|. + + Add the following setting to your .vimrc(_vimrc). +> + set laststatus=2 +< +Problem 5: *lightline-problem-5* + The statusline does not seem to be correctly colored. + + Add +> + export TERM=xterm-256color +< + to your .*shrc and add +> + if !has('gui_running') + set t_Co=256 + endif +< + to your .vimrc(_vimrc). + +Problem 6: *lightline-problem-6* + How to install a patched font. + + There are two kinds of patched fonts: + + + The patched fonts for |vim-powerline| + (https://github.com/Lokaltog/vim-powerline): + follow the guide https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher + + The patched fonts for |powerline| + (https://github.com/Lokaltog/powerline): + download from https://github.com/Lokaltog/powerline-fonts + +Problem 7: *lightline-problem-7* + Right triangles do not stick to the right components with patched + font. + + Remove the following setting from your .vimrc(_vimrc). +> + set ambiwidth=double +< + If you want to keep this setting, try the patched font for + |vim-powerline|. + +Problem 8: *lightline-problem-8* + Triangles do not appear. Triangles look weird. + + If the triangles do not appear (but you get some spaces or + weird characters like or ¿), firstly try adding +> + scriptencoding utf-8 + set encoding=utf-8 +< + to the head of your .vimrc(_vimrc). Still you have weird + characters, use the unicode numbers. For |powerline| font + users: +> + \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, + \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" } +< + For |vim-powerline| font users: +> + \ 'separator': { 'left': "\u2b80", 'right': "\u2b82" }, + \ 'subseparator': { 'left': "\u2b81", 'right': "\u2b83" } +< + The full list of unicode numbers for fancy characters is shown + in |lightline-problem-9|. + + If the triangles are shown in appropriate characters but the + colors do not look correctly, see the following. + If you are using iTerm2, change the following settings. + + + set Profiles>Colors>Minimum contrast to the Lowest. + + set Profiles>Window>Transparency to the Opaquest. + + For other terminals, this weird-triangle problem will be + resolved by disabling transparency or contrast adjustment. + +Problem 9: *lightline-problem-9* + Where can I find the list of all the cool characters for patched fonts? + + Default powerline vim-powerline + separator.left '' '' (\ue0b0) '⮀' (\u2b80) + separator.right '' '' (\ue0b2) '⮂' (\u2b82) + subseparator.left '|' '' (\ue0b1) '⮁' (\u2b81) + subseparator.right '|' '' (\ue0b3) '⮃' (\u2b83) + branch symbol -- '' (\ue0a0) '⭠' (\u2b60) + readonly symbol -- '' (\ue0a2) '⭤' (\u2b64) + linecolumn symbol -- '' (\ue0a1) '⭡' (\u2b81) + +Problem 10: *lightline-problem-10* + Cool statusline disappears on |unite|, |vimfiler| and |vimshell| + buffers. + + Add the following settings to your .vimrc(_vimrc). +> + let g:unite_force_overwrite_statusline = 0 + let g:vimfiler_force_overwrite_statusline = 0 + let g:vimshell_force_overwrite_statusline = 0 +< +Problem 11: *lightline-problem-11* + Cool statusline disappears in |CtrlP|, |Tagbar| buffers. + + Add the following settings to your .vimrc(_vimrc). +> + let g:ctrlp_status_func = { + \ 'main': 'CtrlPStatusFunc_1', + \ 'prog': 'CtrlPStatusFunc_2', + \ } + function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked) + return lightline#statusline(0) + endfunction + function! CtrlPStatusFunc_2(str) + return lightline#statusline(0) + endfunction + + let g:tagbar_status_func = 'TagbarStatusFunc' + function! TagbarStatusFunc(current, sort, fname, ...) abort + return lightline#statusline(0) + endfunction +< + See |lightline-powerful-example| for more cool settings for + these plugins. + +Problem 12: *lightline-problem-12* + How to make the plus sign red like |powerline|? + + Use the following setings. +> + let g:lightline = { + \ 'component': { + \ 'modified': '%#ModifiedColor#%{LightLineModified()}', + \ } + \ } + function! LightLineModified() + let map = { 'V': 'n', "\": 'n', 's': 'n', 'v': 'n', "\": 'n', 'c': 'n', 'R': 'n'} + let mode = get(map, mode()[0], mode()[0]) + let bgcolor = {'n': [240, '#585858'], 'i': [31, '#0087af']} + let color = get(bgcolor, mode, bgcolor.n) + exe printf('hi ModifiedColor ctermfg=196 ctermbg=%d guifg=#ff0000 guibg=%s term=bold cterm=bold', + \ color[0], color[1]) + return &modified ? '+' : &modifiable ? '' : '-' + endfunction +< + It's surely complicated. There's no easy API to do a thing + like this. But it means that your request does not match + the spirit of lightline. + +Problem 13: *lightline-problem-13* + How to change the lightline colorscheme on the fly. + + Add the following settings to your .vimrc(_vimrc). +> + augroup LightLineColorscheme + autocmd! + autocmd ColorScheme * call s:lightline_update() + augroup END + function! s:lightline_update() + if !exists('g:loaded_lightline') + return + endif + try + if g:colors_name =~# 'wombat\|solarized\|landscape\|jellybeans\|seoul256\|Tomorrow' + let g:lightline.colorscheme = + \ substitute(substitute(g:colors_name, '-', '_', 'g'), '256.*', '', '') . + \ (g:colors_name ==# 'solarized' ? '_' . &background : '') + call lightline#init() + call lightline#colorscheme() + call lightline#update() + endif + catch + endtry + endfunction +< +Problem 14: *lightline-problem-14* + The 'E541' warning appears on the right hand side. + Many components disable the statusline of lightline. + + The number of items in statusline/tabline is limited to 80 + (see |E541|). You cannot register too much components. + +Problem 15: *lightline-problem-15* + Do not deal with the tabline. + Do not use the fancy separators in the tabline. + + You can disable the tabline feature of lightline.vim using: +> + let g:lightline = { + \ 'enable': { 'tabline': 0 }, + \ } +< + If you don't like the separators in the tabline, use: +> + let g:lightline = { + \ 'tabline_separator': { 'left': "", 'right': "" }, + \ 'tabline_subseparator': { 'left': "", 'right': "" }, + \ } +< +Problem 16: *lightline-problem-16* + When changed the component to a function component to an expanding + component, the statusline of lightline is sometimes disabled. + + When you changed from +> + \ 'component_function': { + \ 'my': 'My', + \ } +< + to +> + \ 'component_expand': { + \ 'my': 'My', + \ } +< + the statusline of lightline is disabled unexpectedly. + In such a case, the text returned by 'My' function may include + the '%' character. Replace all the '%' signs with '%%'. +> + function My() + ... + return substitute(text, '%', '%%', 'g') + endfunction +< +Problem 17: *lightline-problem-17* + Found a bug of this plugin. + Got many errors while using this plugin. + Vim hangs while using this plugin. + Want this plugin to be more configurable. + This troubleshooting is not helpful. + + Report/Request the issue/feature at + https://github.com/itchyny/lightline.vim/issues. + +============================================================================== +CHANGELOG *lightline-changelog* + +0.0 2013-08-21, ... + - Initial commit and implementation + +============================================================================== +vim:tw=78:sw=4:ts=8:ft=help:norl:noet: diff --git a/sources_non_forked/lightline.vim/plugin/lightline.vim b/sources_non_forked/lightline.vim/plugin/lightline.vim new file mode 100644 index 00000000..f396010b --- /dev/null +++ b/sources_non_forked/lightline.vim/plugin/lightline.vim @@ -0,0 +1,24 @@ +" ============================================================================= +" Filename: plugin/lightline.vim +" Author: itchyny +" License: MIT License +" Last Change: 2016/03/14 03:31:58. +" ============================================================================= + +if exists('g:loaded_lightline') || v:version < 700 + finish +endif +let g:loaded_lightline = 1 + +let s:save_cpo = &cpo +set cpo&vim + +augroup lightline + autocmd! + autocmd WinEnter,BufWinEnter,FileType,ColorScheme,SessionLoadPost * call lightline#update() + autocmd ColorScheme,SessionLoadPost * call lightline#highlight() + autocmd CursorMoved,BufUnload * call lightline#update_once() +augroup END + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/sources_non_forked/lightline.vim/test/.themisrc b/sources_non_forked/lightline.vim/test/.themisrc new file mode 100644 index 00000000..c226c089 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/.themisrc @@ -0,0 +1,20 @@ +let s:sids = {} +function! s:sid(path) abort + if has_key(s:sids, a:path) + return s:sids[a:path] + endif + redir => scriptnames + silent! scriptnames + redir END + for line in split(scriptnames, '\n') + if line =~# a:path + let sid = matchstr(line, '\v^\s*\zs\d+\ze') + let s:sids[a:path] = sid + return sid + endif + endfor +endfunction + +function! SID(name) abort + return function(printf("\%d_%s", s:sid('autoload/lightline.vim'), a:name)) +endfunction diff --git a/sources_non_forked/lightline.vim/test/concatenate.vim b/sources_non_forked/lightline.vim/test/concatenate.vim new file mode 100644 index 00000000..6fd2723a --- /dev/null +++ b/sources_non_forked/lightline.vim/test/concatenate.vim @@ -0,0 +1,90 @@ +let s:suite = themis#suite('concatenate') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + let g:lightline = { 'subseparator': { 'left': '>', 'right': '<' } } + call lightline#init() +endfunction + +function! s:suite.nil() + call s:assert.equals(lightline#concatenate([], 0), '') + call s:assert.equals(lightline#concatenate([], 1), '') +endfunction + +function! s:suite.one() + call s:assert.equals(lightline#concatenate(['foo'], 0), 'foo') + call s:assert.equals(lightline#concatenate(['foo'], 1), 'foo') +endfunction + +function! s:suite.two() + call s:assert.equals(lightline#concatenate(['foo', 'bar'], 0), 'foo > bar') + call s:assert.equals(lightline#concatenate(['foo', 'bar'], 1), 'foo < bar') +endfunction + +function! s:suite.three() + call s:assert.equals(lightline#concatenate(['foo', 'bar', 'baz'], 0), 'foo > bar > baz') + call s:assert.equals(lightline#concatenate(['foo', 'bar', 'baz'], 1), 'foo < bar < baz') +endfunction + +function! s:suite.one_empty() + call s:assert.equals(lightline#concatenate([''], 0), '') + call s:assert.equals(lightline#concatenate([''], 1), '') +endfunction + +function! s:suite.two_empty_left() + call s:assert.equals(lightline#concatenate(['', 'bar'], 0), 'bar') + call s:assert.equals(lightline#concatenate(['', 'bar'], 1), 'bar') +endfunction + +function! s:suite.two_empty_right() + call s:assert.equals(lightline#concatenate(['foo', ''], 0), 'foo') + call s:assert.equals(lightline#concatenate(['foo', ''], 1), 'foo') +endfunction + +function! s:suite.two_empty_both() + call s:assert.equals(lightline#concatenate(['', ''], 0), '') + call s:assert.equals(lightline#concatenate(['', ''], 1), '') +endfunction + +function! s:suite.three_empty_left() + call s:assert.equals(lightline#concatenate(['', 'bar', 'baz'], 0), 'bar > baz') + call s:assert.equals(lightline#concatenate(['', 'bar', 'baz'], 1), 'bar < baz') +endfunction + +function! s:suite.three_empty_middle() + call s:assert.equals(lightline#concatenate(['foo', '', 'baz'], 0), 'foo > baz') + call s:assert.equals(lightline#concatenate(['foo', '', 'baz'], 1), 'foo < baz') +endfunction + +function! s:suite.three_empty_right() + call s:assert.equals(lightline#concatenate(['foo', 'bar', ''], 0), 'foo > bar') + call s:assert.equals(lightline#concatenate(['foo', 'bar', ''], 1), 'foo < bar') +endfunction + +function! s:suite.three_empty_middle_right() + call s:assert.equals(lightline#concatenate(['foo', '', ''], 0), 'foo') + call s:assert.equals(lightline#concatenate(['foo', '', ''], 1), 'foo') +endfunction + +function! s:suite.three_empty_left_right() + call s:assert.equals(lightline#concatenate(['', 'bar', ''], 0), 'bar') + call s:assert.equals(lightline#concatenate(['', 'bar', ''], 1), 'bar') +endfunction + +function! s:suite.three_empty_left_middle() + call s:assert.equals(lightline#concatenate(['', '', 'baz'], 0), 'baz') + call s:assert.equals(lightline#concatenate(['', '', 'baz'], 1), 'baz') +endfunction + +function! s:suite.three_empty_all() + call s:assert.equals(lightline#concatenate(['', '', ''], 0), '') + call s:assert.equals(lightline#concatenate(['', '', ''], 1), '') +endfunction + +function! s:suite.keep_original() + let xs = ['', 'bar', ''] + call s:assert.equals(lightline#concatenate(xs, 0), 'bar') + call s:assert.equals(xs, ['', 'bar', '']) + call s:assert.equals(lightline#concatenate(xs, 1), 'bar') + call s:assert.equals(xs, ['', 'bar', '']) +endfunction diff --git a/sources_non_forked/lightline.vim/test/error.vim b/sources_non_forked/lightline.vim/test/error.vim new file mode 100644 index 00000000..8fdabf46 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/error.vim @@ -0,0 +1,15 @@ +let s:suite = themis#suite('error') +let s:assert = themis#helper('assert') + +function! s:message() abort + redir => messages + silent! messages + redir END + return split(messages, '\n')[-1] +endfunction + +function! s:suite.error() + let message = 'An error occurred.' + call lightline#error(message) + call s:assert.equals(s:message(), 'lightline.vim: ' . message) +endfunction diff --git a/sources_non_forked/lightline.vim/test/expand.vim b/sources_non_forked/lightline.vim/test/expand.vim new file mode 100644 index 00000000..c2fc0ab9 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/expand.vim @@ -0,0 +1,612 @@ +let s:suite = themis#suite('expand') +let s:assert = themis#helper('assert') + +function! s:expand(...) + return call(SID('expand'), a:000) +endfunction + +function! s:suite.expand() + let g:lightline = {} + call lightline#init() + call s:assert.equals(s:expand([]), + \ [[], [], ['0']]) +endfunction + +function! s:suite.default() + let g:lightline = {} + call lightline#init() + call s:assert.equals(s:expand([['mode', 'paste'], ['readonly', 'filename', 'modified']]), + \ [[['mode', 'paste'], ['readonly', 'filename', 'modified']], [[0, 0], [0, 0, 0]], ['0', '1', '2']]) +endfunction + +function! s:suite.custom() + function! Custom() + return [ ['left'], ['middle'], ['right'] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left', 'middle', 'right'], ['modified']], [[0, 0], [1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left', 'middle', 'right', 'modified']], [[0, 0, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type() + function! Custom() + return [ ['left'], ['middle'], ['right'] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left'], ['middle'], ['right'], ['modified']], [[0, 0], [1], [1], [1], [0]], ['0', '1', 'custom', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left'], ['middle'], ['right', 'modified']], [[0, 0, 1], [1], [1, 0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.multiple() + function! Custom() + return [ ['x0', 'x1', 'x2'], ['y0', 'y1', 'y2'], ['z0', 'z1', 'z2'] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['x0', 'x1', 'x2', 'y0', 'y1', 'y2', 'z0', 'z1', 'z2'], ['modified']], [[0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'x0', 'x1', 'x2', 'y0', 'y1', 'y2', 'z0', 'z1', 'z2', 'modified']], [[0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.multiple_type() + function! Custom() + return [ ['x0', 'x1', 'x2'], ['y0', 'y1', 'y2'], ['z0', 'z1', 'z2'] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['x0', 'x1', 'x2'], ['y0', 'y1', 'y2'], ['z0', 'z1', 'z2'], ['modified']], [[0, 0], [1, 1, 1], [1, 1, 1], [1, 1, 1], [0]], ['0', '1', 'custom', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'x0', 'x1', 'x2'], ['y0', 'y1', 'y2'], ['z0', 'z1', 'z2', 'modified']], [[0, 0, 1, 1, 1], [1, 1, 1], [1, 1, 1, 0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.flatten() + function! Custom() + return [ 'left', 'middle', 'right' ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left', 'middle', 'right'], ['modified']], [[0, 0], [1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left', 'middle', 'right', 'modified']], [[0, 0, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_flatten() + function! Custom() + return [ 'left', 'middle', 'right' ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left'], ['middle'], ['right'], ['modified']], [[0, 0], [1], [1], [1], [0]], ['0', '1', 'custom', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left'], ['middle'], ['right', 'modified']], [[0, 0, 1], [1], [1, 0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_string() + function! Custom() + return 'custom' + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'custom', 'modified']], [[0, 0, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_string() + function! Custom() + return 'custom' + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', 'custom', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_void_string() + function! Custom() + return '' + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_void_string() + function! Custom() + return '' + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_number() + function! Custom() + return 24 + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['24'], ['modified']], [[0, 0], [1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', '24', 'modified']], [[0, 0, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_number() + function! Custom() + return 24 + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['24'], ['modified']], [[0, 0], [1], [0]], ['0', 'custom', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename'], ['24'], ['modified']], [[0, 0], [1], [0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_void_string_array() + function! Custom() + return ['', '', ''] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_void_string_array() + function! Custom() + return ['', '', ''] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_void_string_array_2() + function! Custom() + return [[''], [''], ['']] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_void_string_array_2() + function! Custom() + return [[''], [''], ['']] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_void_string_array_3() + function! Custom() + return ['', 'custom', ''] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'custom', 'modified']], [[0, 0, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_void_string_array_3() + function! Custom() + return ['', 'custom', ''] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', 'custom', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_void_string_array_4() + function! Custom() + return [[''], ['custom'], ['']] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'custom', 'modified']], [[0, 0, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_void_string_array_4() + function! Custom() + return [[''], ['custom'], ['']] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', 'custom', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename'], ['custom'], ['modified']], [[0, 0], [1], [0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_left_nil() + function! Custom() + return [ [], ['y0', 'y1'], ['z0', 'z1'] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom'], ['modified']]), + \ [[['filename'], ['y0', 'y1', 'z0', 'z1'], ['modified']], [[0], [1, 1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'modified']]), + \ [[['filename', 'y0', 'y1', 'z0', 'z1', 'modified']], [[0, 1, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_left_nil() + function! Custom() + return [ [], ['y0', 'y1'], ['z0', 'z1'] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom'], ['modified']]), + \ [[['filename'], ['y0', 'y1'], ['z0', 'z1'], ['modified']], [[0], [1, 1], [1, 1], [0]], ['0', 'custom', '1', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'modified']]), + \ [[['filename'], ['y0', 'y1'], ['z0', 'z1', 'modified']], [[0], [1, 1], [1, 1, 0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_right_nil() + function! Custom() + return [ ['x0', 'x1'], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom'], ['modified']]), + \ [[['filename'], ['x0', 'x1', 'y0', 'y1'], ['modified']], [[0], [1, 1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'modified']]), + \ [[['filename', 'x0', 'x1', 'y0', 'y1', 'modified']], [[0, 1, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_right_nil() + function! Custom() + return [ ['x0', 'x1'], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom'], ['modified']]), + \ [[['filename'], ['x0', 'x1'], ['y0', 'y1'], ['modified']], [[0], [1, 1], [1, 1], [0]], ['0', '1', 'custom', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'modified']]), + \ [[['filename', 'x0', 'x1'], ['y0', 'y1'], ['modified']], [[0, 1, 1], [1, 1], [0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_one() + function! Custom() + return [ 'left' ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left'], ['modified']], [[0, 0], [1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left', 'modified']], [[0, 0, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_one() + function! Custom() + return [ 'left' ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left'], ['modified']], [[0, 0], [1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left', 'modified']], [[0, 0, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_two() + function! Custom() + return [ 'left', 'middle'] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left', 'middle'], ['modified']], [[0, 0], [1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left', 'middle', 'modified']], [[0, 0, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_two() + function! Custom() + return [ 'left', 'middle' ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left'], ['middle'], ['modified']], [[0, 0], [1], [1], [0]], ['0', '1', 'custom', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left'], ['middle'], ['modified']], [[0, 0, 1], [1], [0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_mixed() + function! Custom() + return ['left', { 'custom': 24 }, [function('tr')]] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left', '{''custom'': 24}', 'function(''tr'')'], ['modified']], [[0, 0], [1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left', '{''custom'': 24}', 'function(''tr'')', 'modified']], [[0, 0, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_mixed() + function! Custom() + return ['left', { 'custom': 24 }, [function('tr')]] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left'], ['{''custom'': 24}'], ['function(''tr'')'], ['modified']], [[0, 0], [1], [1], [1], [0]], ['0', '1', 'custom', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left'], ['{''custom'': 24}'], ['function(''tr'')', 'modified']], [[0, 0, 1], [1], [1, 0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_mixed_2() + function! Custom() + return [['left', ''], ['', { 'custom': 24 }, ''], [[function('tr')], '']] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left', '{''custom'': 24}', '[function(''tr'')]'], ['modified']], [[0, 0], [1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left', '{''custom'': 24}', '[function(''tr'')]', 'modified']], [[0, 0, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_mixed_2() + function! Custom() + return [['left', ''], ['', { 'custom': 24 }, ''], [[function('tr')], '']] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['left'], ['{''custom'': 24}'], ['[function(''tr'')]'], ['modified']], [[0, 0], [1], [1], [1], [0]], ['0', '1', 'custom', '1', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'left'], ['{''custom'': 24}'], ['[function(''tr'')]', 'modified']], [[0, 0, 1], [1], [1, 0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_error() + function! Custom() + throw 'error' + return 'custom' + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.custom_type_error() + function! Custom() + throw 'error' + return 'custom' + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.notfound() + let g:lightline = { 'component_expand': { 'custom': 'NotFound' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) +endfunction + +function! s:suite.custom_type_notfound() + let g:lightline = { 'component_expand': { 'custom': 'NotFound' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['readonly', 'filename'], ['custom'], ['modified']]), + \ [[['readonly', 'filename'], ['modified']], [[0, 0], [0]], ['0', '2', '3']]) + call s:assert.equals(s:expand([['readonly', 'filename', 'custom', 'modified']]), + \ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']]) +endfunction + +function! s:suite.duplicated_left_nil() + function! Custom() + return [ [], ['y0', 'y1'], ['z0', 'z1'] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom', 'custom'], ['modified']]), + \ [[['filename'], ['y0', 'y1', 'z0', 'z1', 'y0', 'y1', 'z0', 'z1'], ['modified']], [[0], [1, 1, 1, 1, 1, 1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'custom', 'modified']]), + \ [[['filename', 'y0', 'y1', 'z0', 'z1', 'y0', 'y1', 'z0', 'z1', 'modified']], [[0, 1, 1, 1, 1, 1, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_type_left_nil() + function! Custom() + return [ [], ['y0', 'y1'], ['z0', 'z1'] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom', 'custom'], ['modified']]), + \ [[['filename'], ['y0', 'y1'], ['z0', 'z1'], ['y0', 'y1'], ['z0', 'z1'], ['modified']], [[0], [1, 1], [1, 1], [1, 1], [1, 1], [0]], ['0', 'custom', '1', 'custom', '1', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'custom', 'modified']]), + \ [[['filename'], ['y0', 'y1'], ['z0', 'z1'], ['y0', 'y1'], ['z0', 'z1', 'modified']], [[0], [1, 1], [1, 1], [1, 1], [1, 1, 0]], ['0', 'custom', '0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_right_nil() + function! Custom() + return [ ['x0', 'x1'], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom', 'custom'], ['modified']]), + \ [[['filename'], ['x0', 'x1', 'y0', 'y1', 'x0', 'x1', 'y0', 'y1'], ['modified']], [[0], [1, 1, 1, 1, 1, 1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'custom', 'modified']]), + \ [[['filename', 'x0', 'x1', 'y0', 'y1', 'x0', 'x1', 'y0', 'y1', 'modified']], [[0, 1, 1, 1, 1, 1, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_type_right_nil() + function! Custom() + return [ ['x0', 'x1'], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom', 'custom'], ['modified']]), + \ [[['filename'], ['x0', 'x1'], ['y0', 'y1'], ['x0', 'x1'], ['y0', 'y1'], ['modified']], [[0], [1, 1], [1, 1], [1, 1], [1, 1], [0]], ['0', '1', 'custom', '1', 'custom', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'custom', 'modified']]), + \ [[['filename', 'x0', 'x1'], ['y0', 'y1'], ['x0', 'x1'], ['y0', 'y1'], ['modified']], [[0, 1, 1], [1, 1], [1, 1], [1, 1], [0]], ['0', 'custom', '0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_both_nil() + function! Custom() + return [ [], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom', 'custom'], ['modified']]), + \ [[['filename'], ['y0', 'y1', 'y0', 'y1'], ['modified']], [[0], [1, 1, 1, 1], [0]], ['0', '1', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'custom', 'modified']]), + \ [[['filename', 'y0', 'y1', 'y0', 'y1', 'modified']], [[0, 1, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_type_both_nil() + function! Custom() + return [ [], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom', 'custom'], ['modified']]), + \ [[['filename'], ['y0', 'y1', 'y0', 'y1'], ['modified']], [[0], [1, 1, 1, 1], [0]], ['0', 'custom', '2', '3']]) + call s:assert.equals(s:expand([['filename', 'custom', 'custom', 'modified']]), + \ [[['filename'], ['y0', 'y1', 'y0', 'y1'], ['modified']], [[0], [1, 1, 1, 1], [0]], ['0', 'custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_both_nil_left_most() + function! Custom() + return [ [], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['custom', 'custom'], ['modified']]), + \ [[['y0', 'y1', 'y0', 'y1'], ['modified']], [[1, 1, 1, 1], [0]], ['0', '1', '2']]) + call s:assert.equals(s:expand([['custom', 'custom', 'modified']]), + \ [[['y0', 'y1', 'y0', 'y1', 'modified']], [[1, 1, 1, 1, 0]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_type_both_nil_left_most() + function! Custom() + return [ [], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['custom', 'custom'], ['modified']]), + \ [[['y0', 'y1', 'y0', 'y1'], ['modified']], [[1, 1, 1, 1], [0]], ['custom', '1', '2']]) + call s:assert.equals(s:expand([['custom', 'custom', 'modified']]), + \ [[['y0', 'y1', 'y0', 'y1'], ['modified']], [[1, 1, 1, 1], [0]], ['custom', '0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_both_nil_right_most() + function! Custom() + return [ [], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom', 'custom']]), + \ [[['filename'], ['y0', 'y1', 'y0', 'y1']], [[0], [1, 1, 1, 1]], ['0', '1', '2']]) + call s:assert.equals(s:expand([['filename', 'custom', 'custom']]), + \ [[['filename', 'y0', 'y1', 'y0', 'y1']], [[0, 1, 1, 1, 1]], ['0', '1']]) + delfunction Custom +endfunction + +function! s:suite.duplicated_type_both_nil_right_most() + function! Custom() + return [ [], ['y0', 'y1'], [] ] + endfunction + let g:lightline = { 'component_expand': { 'custom': 'Custom' }, 'component_type': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(s:expand([['filename'], ['custom', 'custom']]), + \ [[['filename'], ['y0', 'y1', 'y0', 'y1']], [[0], [1, 1, 1, 1]], ['0', 'custom', '2']]) + call s:assert.equals(s:expand([['filename', 'custom', 'custom']]), + \ [[['filename'], ['y0', 'y1', 'y0', 'y1']], [[0], [1, 1, 1, 1]], ['0', 'custom', '1']]) + delfunction Custom +endfunction diff --git a/sources_non_forked/lightline.vim/test/highlight.vim b/sources_non_forked/lightline.vim/test/highlight.vim new file mode 100644 index 00000000..a72ed1eb --- /dev/null +++ b/sources_non_forked/lightline.vim/test/highlight.vim @@ -0,0 +1,141 @@ +let s:suite = themis#suite('highlight') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + hi clear + let g:lightline = {} + call lightline#init() + call lightline#colorscheme() +endfunction + +function! s:hi(name) + redir => hi + silent! exec 'hi' a:name + redir END + return substitute(join(split(hi, "\n"), ''), ' \+', ' ', 'g') +endfunction + +function! s:pattern(xs, ...) abort + let ys = a:0 ? a:xs[1:] : a:xs + let zs = get(a:000, 0, a:xs) + return 'ctermfg=' . ys[2] . ' ctermbg=' . zs[3] . '.*guifg=' . ys[0] . ' guibg=' . zs[1] +endfunction + +function! s:suite.highlight() + let palette = lightline#palette() + call s:assert.match(s:hi('LightLineLeft_normal_0'), s:pattern(palette.normal.left[0])) + call s:assert.match(s:hi('LightLineLeft_normal_1'), s:pattern(palette.normal.left[1])) + call s:assert.match(s:hi('LightLineLeft_normal_2'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineRight_normal_0'), s:pattern(palette.normal.right[0])) + call s:assert.match(s:hi('LightLineRight_normal_1'), s:pattern(palette.normal.right[1])) + call s:assert.match(s:hi('LightLineRight_normal_2'), s:pattern(palette.normal.right[2])) + call s:assert.match(s:hi('LightLineRight_normal_3'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) +endfunction + +function! s:suite.insert() + call lightline#highlight('insert') + let palette = lightline#palette() + call s:assert.match(s:hi('LightLineLeft_insert_0'), s:pattern(palette.insert.left[0])) + call s:assert.match(s:hi('LightLineLeft_insert_1'), s:pattern(palette.insert.left[1])) + call s:assert.match(s:hi('LightLineLeft_insert_2'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineRight_insert_0'), s:pattern(palette.insert.right[0])) + call s:assert.match(s:hi('LightLineRight_insert_1'), s:pattern(palette.insert.right[1])) + call s:assert.match(s:hi('LightLineRight_insert_2'), s:pattern(palette.insert.right[2])) + call s:assert.match(s:hi('LightLineRight_insert_3'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineMiddle_insert'), s:pattern(palette.insert.middle[0])) +endfunction + + +function! s:suite.visual() + call lightline#highlight('visual') + let palette = lightline#palette() + call s:assert.match(s:hi('LightLineLeft_visual_0'), s:pattern(palette.visual.left[0])) + call s:assert.match(s:hi('LightLineLeft_visual_1'), s:pattern(palette.visual.left[1])) + call s:assert.match(s:hi('LightLineLeft_visual_2'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineRight_visual_0'), s:pattern(palette.normal.right[0])) + call s:assert.match(s:hi('LightLineRight_visual_1'), s:pattern(palette.normal.right[1])) + call s:assert.match(s:hi('LightLineRight_visual_2'), s:pattern(palette.normal.right[2])) + call s:assert.match(s:hi('LightLineRight_visual_3'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) +endfunction + +function! s:suite.replace() + call lightline#highlight('replace') + let palette = lightline#palette() + call s:assert.match(s:hi('LightLineLeft_replace_0'), s:pattern(palette.replace.left[0])) + call s:assert.match(s:hi('LightLineLeft_replace_1'), s:pattern(palette.replace.left[1])) + call s:assert.match(s:hi('LightLineLeft_replace_2'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineRight_replace_0'), s:pattern(palette.replace.right[0])) + call s:assert.match(s:hi('LightLineRight_replace_1'), s:pattern(palette.replace.right[1])) + call s:assert.match(s:hi('LightLineRight_replace_2'), s:pattern(palette.replace.right[2])) + call s:assert.match(s:hi('LightLineRight_replace_3'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineMiddle_replace'), s:pattern(palette.replace.middle[0])) +endfunction + +function! s:suite.left_right() + let g:lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'readonly' ], [ 'filename' ], [ 'modified' ] ], + \ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat' ], [ 'fileencoding' ], [ 'filetype' ] ] + \ }, + \ } + call lightline#init() + call lightline#colorscheme() + let palette = lightline#palette() + call s:assert.match(s:hi('LightLineLeft_normal_0'), s:pattern(palette.normal.left[0])) + call s:assert.match(s:hi('LightLineLeft_normal_1'), s:pattern(palette.normal.left[1])) + call s:assert.match(s:hi('LightLineLeft_normal_2'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightLineLeft_normal_3'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightLineLeft_normal_4'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineRight_normal_0'), s:pattern(palette.normal.right[0])) + call s:assert.match(s:hi('LightLineRight_normal_1'), s:pattern(palette.normal.right[1])) + call s:assert.match(s:hi('LightLineRight_normal_2'), s:pattern(palette.normal.right[2])) + call s:assert.match(s:hi('LightLineRight_normal_3'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightLineRight_normal_4'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightLineRight_normal_5'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) +endfunction + +function! s:suite.subseparator() + let g:lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'readonly' ], [ 'filename' ], [ 'modified' ] ], + \ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat' ], [ 'fileencoding' ], [ 'filetype' ] ] + \ }, + \ } + call lightline#init() + call lightline#colorscheme() + let palette = lightline#palette() + for i in range(4) + for j in range(5) + if i + 1 == j + call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', i, j)), s:pattern(get(palette.normal.left, i, palette.normal.middle[0]), get(palette.normal.left, j, palette.normal.middle[0]))) + else + call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', i, j)), 'E411: highlight group not found\|cleared') + endif + endfor + endfor +endfunction + +function! s:suite.component_type() + let g:lightline = { 'component_type': { 'error': 'error', 'warning': 'warning' } } + call lightline#init() + call lightline#colorscheme() + let palette = lightline#palette() + for type in ['error', 'warning'] + call s:assert.match(s:hi(printf('LightLineLeft_normal_%s', type)), s:pattern(palette.normal[type][0])) + call s:assert.match(s:hi(printf('LightLineLeft_normal_0_%s', type)), s:pattern(palette.normal.left[0], palette.normal[type][0])) + call s:assert.match(s:hi(printf('LightLineLeft_normal_1_%s', type)), s:pattern(palette.normal.left[1], palette.normal[type][0])) + call s:assert.match(s:hi(printf('LightLineLeft_normal_2_%s', type)), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_0', type)), s:pattern(palette.normal[type][0], palette.normal.left[0])) + call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_1', type)), s:pattern(palette.normal[type][0], palette.normal.left[1])) + call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_2', type)), s:pattern(palette.normal[type][0], palette.normal.middle[0])) + call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_3', type)), 'E411: highlight group not found\|cleared') + endfor + for type1 in ['error', 'warning'] + for type2 in ['error', 'warning'] + call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', type1, type2)), s:pattern(palette.normal[type1][0], palette.normal[type2][0])) + endfor + endfor +endfunction diff --git a/sources_non_forked/lightline.vim/test/link.vim b/sources_non_forked/lightline.vim/test/link.vim new file mode 100644 index 00000000..ca867536 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/link.vim @@ -0,0 +1,131 @@ +let s:suite = themis#suite('link') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + hi clear + let g:lightline = {} + call lightline#init() + call lightline#colorscheme() +endfunction + +function! s:hi(name) + redir => hi + silent! exec 'hi' a:name + redir END + return substitute(join(split(hi, "\n"), ''), ' \+', ' ', 'g') +endfunction + +function! s:suite.link() + call lightline#link() + call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_normal_0') + call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_normal_1') + call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_normal_0') + call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_normal_1') + call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_normal_2') + call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_normal') +endfunction + +function! s:suite.insert() + call lightline#link('i') + call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_insert_0') + call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_insert_1') + call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_insert_0') + call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_insert_1') + call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_insert_2') + call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_insert') +endfunction + +function! s:suite.visual() + call lightline#link('v') + call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_visual_0') + call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_visual_1') + call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_visual_0') + call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_visual_1') + call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_visual_2') + call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_visual') +endfunction + +function! s:suite.replace() + call lightline#link('R') + call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_replace_0') + call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_replace_1') + call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_replace_0') + call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_replace_1') + call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_replace_2') + call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_replace') +endfunction + +function! s:suite.left_right() + let g:lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'readonly' ], [ 'filename' ], [ 'modified' ] ], + \ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat' ], [ 'fileencoding' ], [ 'filetype' ] ] + \ }, + \ } + call lightline#init() + call lightline#colorscheme() + call lightline#link() + call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_normal_0') + call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_normal_1') + call s:assert.match(s:hi('LightLineLeft_active_2'), 'LightLineLeft_normal_2') + call s:assert.match(s:hi('LightLineLeft_active_3'), 'LightLineLeft_normal_3') + call s:assert.match(s:hi('LightLineLeft_active_4'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_normal_0') + call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_normal_1') + call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_normal_2') + call s:assert.match(s:hi('LightLineRight_active_3'), 'LightLineRight_normal_3') + call s:assert.match(s:hi('LightLineRight_active_4'), 'LightLineRight_normal_4') + call s:assert.match(s:hi('LightLineRight_active_5'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_normal') +endfunction + +function! s:suite.subseparator() + let g:lightline = { + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'readonly' ], [ 'filename' ], [ 'modified' ] ], + \ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat' ], [ 'fileencoding' ], [ 'filetype' ] ] + \ }, + \ } + call lightline#init() + call lightline#colorscheme() + call lightline#link() + for i in range(4) + for j in range(5) + if i + 1 == j + call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', i, j)), printf('LightLineLeft_normal_%s_%s', i, j)) + else + call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', i, j)), 'E411: highlight group not found') + endif + endfor + endfor +endfunction + +function! s:suite.component_type() + let g:lightline = { 'component_type': { 'error': 'error', 'warning': 'warning' } } + call lightline#init() + call lightline#colorscheme() + call lightline#link() + for type in ['error', 'warning'] + call s:assert.match(s:hi(printf('LightLineLeft_active_%s', type)), printf('LightLineLeft_normal_%s', type)) + call s:assert.match(s:hi(printf('LightLineLeft_active_0_%s', type)), printf('LightLineLeft_normal_0_%s', type)) + call s:assert.match(s:hi(printf('LightLineLeft_active_1_%s', type)), printf('LightLineLeft_normal_1_%s', type)) + call s:assert.match(s:hi(printf('LightLineLeft_active_2_%s', type)), 'E411: highlight group not found') + call s:assert.match(s:hi(printf('LightLineLeft_active_%s_0', type)), printf('LightLineLeft_normal_%s_0', type)) + call s:assert.match(s:hi(printf('LightLineLeft_active_%s_1', type)), printf('LightLineLeft_normal_%s_1', type)) + call s:assert.match(s:hi(printf('LightLineLeft_active_%s_2', type)), printf('LightLineLeft_normal_%s_2', type)) + call s:assert.match(s:hi(printf('LightLineLeft_active_%s_3', type)), 'E411: highlight group not found') + endfor + for type1 in ['error', 'warning'] + for type2 in ['error', 'warning'] + call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', type1, type2)), printf('LightLineLeft_normal_%s_%s', type1, type2)) + endfor + endfor +endfunction diff --git a/sources_non_forked/lightline.vim/test/mode.vim b/sources_non_forked/lightline.vim/test/mode.vim new file mode 100644 index 00000000..53280f51 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/mode.vim @@ -0,0 +1,14 @@ +let s:suite = themis#suite('mode') +let s:assert = themis#helper('assert') + +function! s:suite.mode() + let g:lightline = {} + call lightline#init() + call s:assert.equals(lightline#mode(), 'NORMAL') +endfunction + +function! s:suite.mode_map() + let g:lightline = { 'mode_map': { 'n': 'N' } } + call lightline#init() + call s:assert.equals(lightline#mode(), 'N') +endfunction diff --git a/sources_non_forked/lightline.vim/test/onetab.vim b/sources_non_forked/lightline.vim/test/onetab.vim new file mode 100644 index 00000000..529d8332 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/onetab.vim @@ -0,0 +1,98 @@ +let s:suite = themis#suite('onetab') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + let g:lightline = {} + call lightline#init() + tabnew + tabonly +endfunction + +function! s:suite.onetab() + call s:assert.equals(lightline#onetab(1, 1), '1 [No Name]') +endfunction + +function! s:suite.tabnew() + tabnew + call s:assert.equals(lightline#onetab(1, 0), '1 [No Name]') + call s:assert.equals(lightline#onetab(2, 1), '2 [No Name]') +endfunction + +function! s:suite.tabnew_tabnew() + tabnew + tabnew + call s:assert.equals(lightline#onetab(1, 0), '1 [No Name]') + call s:assert.equals(lightline#onetab(2, 0), '2 [No Name]') + call s:assert.equals(lightline#onetab(3, 1), '3 [No Name]') +endfunction + +function! s:suite.modified() + call append(0, '') + call s:assert.equals(lightline#onetab(1, 1), '1 [No Name] +') + undo +endfunction + +function! s:suite.filename() + edit test + call s:assert.equals(lightline#onetab(1, 1), '1 test') + tabnew + bunload test +endfunction + +function! s:suite.filename_modified() + edit test + call append(0, '') + call s:assert.equals(lightline#onetab(1, 1), '1 test +') + tabnew + bunload! test +endfunction + +function! s:suite.active_inactive() + let g:lightline = { 'tab': { 'active': [ 'tabnum', 'filename' ], 'inactive': [ 'filename' ] } } + call lightline#init() + edit test + call append(0, '') + call s:assert.equals(lightline#onetab(1, 1), '1 test') + call s:assert.equals(lightline#onetab(1, 0), 'test') + tabnew + bunload! test +endfunction + +function! s:suite.tab_component() + let g:lightline = { 'tab': { 'active': [ 'custom' ] }, 'tab_component': { 'custom': 'custom' } } + call lightline#init() + call s:assert.equals(lightline#onetab(1, 1), 'custom') + call s:assert.equals(lightline#onetab(2, 1), 'custom') +endfunction + +function! s:suite.tab_component_function() + function! Custom(n) + return 'custom: ' . a:n + endfunction + let g:lightline = { 'tab': { 'active': [ 'custom' ] }, 'tab_component_function': { 'custom': 'Custom' } } + call lightline#init() + call s:assert.equals(lightline#onetab(1, 1), 'custom: 1') + call s:assert.equals(lightline#onetab(2, 1), 'custom: 2') + delfunction Custom +endfunction + +function! s:suite.tab_component_empty_middle() + let g:lightline = { 'tab': { 'active': [ 'tabnum', 'custom', 'filename' ], 'inactive': [ 'tabnum', 'custom', 'custom', 'filename' ] }, 'tab_component': { 'custom': '' } } + call lightline#init() + call s:assert.equals(lightline#onetab(1, 1), '1 [No Name]') + call s:assert.equals(lightline#onetab(2, 1), '2 [No Name]') +endfunction + +function! s:suite.tab_component_empty_left() + let g:lightline = { 'tab': { 'active': [ 'custom', 'filename' ], 'inactive': [ 'custom', 'custom', 'filename' ] }, 'tab_component': { 'custom': '' } } + call lightline#init() + call s:assert.equals(lightline#onetab(1, 1), '[No Name]') + call s:assert.equals(lightline#onetab(2, 1), '[No Name]') +endfunction + +function! s:suite.tab_component_empty_middle() + let g:lightline = { 'tab': { 'active': [ 'tabnum', 'custom' ], 'inactive': [ 'tabnum', 'custom', 'custom' ] }, 'tab_component': { 'custom': '' } } + call lightline#init() + call s:assert.equals(lightline#onetab(1, 1), '1') + call s:assert.equals(lightline#onetab(2, 1), '2') +endfunction diff --git a/sources_non_forked/lightline.vim/test/subseparator.vim b/sources_non_forked/lightline.vim/test/subseparator.vim new file mode 100644 index 00000000..02cac4cc --- /dev/null +++ b/sources_non_forked/lightline.vim/test/subseparator.vim @@ -0,0 +1,302 @@ +let s:suite = themis#suite('subseparator') +let s:assert = themis#helper('assert') + +function! s:subseparator(...) + return eval(substitute(call(SID('subseparator'), a:000), '^%{\|}$', '', 'g')) +endfunction + +function! s:suite.subseparator_component() + let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '|') +endfunction + +function! s:suite.subseparator_component_visible_condition_1() + let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '1', 'custom2': '1', 'custom3': '1' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '|') +endfunction + +function! s:suite.subseparator_component_visible_condition_2() + let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '0', 'custom2': '1', 'custom3': '1' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') +endfunction + +function! s:suite.subseparator_component_visible_condition_3() + let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '1', 'custom2': '0', 'custom3': '1' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '|') +endfunction + +function! s:suite.subseparator_component_visible_condition_4() + let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '1', 'custom2': '0', 'custom3': '0' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') +endfunction + +function! s:suite.subseparator_component_visible_condition_5() + let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '0', 'custom2': '0', 'custom3': '0' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') +endfunction + +function! s:suite.subseparator_component_visible_condition_6() + let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '1||0', 'custom2': '0', 'custom3': '0' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') +endfunction + +function! s:suite.subseparator_component_visible_condition_7() + let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '1||1', 'custom2': '0', 'custom3': '0' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') +endfunction + +function! s:suite.subseparator_component_function() + function! Custom1() + return 'custom1' + endfunction + function! Custom2() + return 'custom2' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '|') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_function_1() + function! Custom1() + return 'custom1' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') + delfunction Custom1 +endfunction + +function! s:suite.subseparator_component_function_2() + function! Custom1() + return 'custom1' + endfunction + function! Custom2() + return 'custom2' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '|') + delfunction Custom1 + delfunction Custom2 +endfunction + +function! s:suite.subseparator_component_function_3() + function! Custom1() + return 'custom1' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '|') + delfunction Custom1 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_function_4() + function! Custom2() + return 'custom2' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_function_5() + function! Custom1() + return '' + endfunction + function! Custom2() + return 'custom2' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_function_6() + function! Custom1() + return '' + endfunction + function! Custom2() + return '' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_function_7() + function! Custom1() + return 'custom1' + endfunction + function! Custom2() + return '' + endfunction + function! Custom3() + return '' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_expand() + function! Custom1() + return 'custom1' + endfunction + function! Custom2() + return 'custom2' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_expand': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [1, 1, 1]), '|') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_expand() + function! Custom1() + return 'custom1' + endfunction + function! Custom2() + return 'custom2' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_expand': { 'custom1': 'Custom1', 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [1, 1, 1]), '|') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_expand_1() + function! Custom1() + return 'custom1' + endfunction + function! Custom2() + return 'custom2' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_expand': { 'custom1': 'Custom1' }, 'component_function': { 'custom2': 'Custom2', 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [1, 0, 0]), '|') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_expand_2() + function! Custom1() + return 'custom1' + endfunction + function! Custom2() + return 'custom2' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_expand': { 'custom1': 'Custom1', 'custom2': 'Custom2' }, 'component_function': { 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [1, 1, 0]), '|') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_expand_3() + function! Custom1() + return '' + endfunction + function! Custom2() + return 'custom2' + endfunction + function! Custom3() + return 'custom3' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2' }, 'component_expand': { 'custom3': 'Custom3' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 1]), '') + delfunction Custom1 + delfunction Custom2 + delfunction Custom3 +endfunction + +function! s:suite.subseparator_component_not_found() + function! Custom1() + return 'custom1' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') + delfunction Custom1 +endfunction + +function! s:suite.subseparator_component_not_found_1() + function! Custom2() + return 'custom2' + endfunction + let g:lightline = { 'component_function': { 'custom2': 'Custom2' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') + delfunction Custom2 +endfunction + +function! s:suite.subseparator_component_not_found_2() + function! Custom1() + return 'custom1' + endfunction + function! Custom2() + return 'custom2' + endfunction + let g:lightline = { 'component_function': { 'custom1': 'Custom1', 'custom2': 'Custom2' } } + call lightline#init() + call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '|') + delfunction Custom1 + delfunction Custom2 +endfunction diff --git a/sources_non_forked/lightline.vim/test/tabline.vim b/sources_non_forked/lightline.vim/test/tabline.vim new file mode 100644 index 00000000..0a9879f6 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/tabline.vim @@ -0,0 +1,67 @@ +let s:suite = themis#suite('tabline') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + let g:lightline = {} + call lightline#init() + tabnew + tabonly +endfunction + +function! s:suite.tabline() + call s:assert.equals(&tabline, '%!lightline#tabline()') +endfunction + +function! s:suite.enabled() + let g:lightline = { 'enable': { 'tabline': 1 } } + call lightline#init() + call s:assert.equals(&tabline, '%!lightline#tabline()') +endfunction + +function! s:suite.disabled() + let g:lightline = { 'enable': { 'tabline': 0 } } + call lightline#init() + call s:assert.equals(&tabline, '') +endfunction + +function! s:suite.tabnew() + let tabline = lightline#tabline() + tabnew + call s:assert.not_equals(lightline#tabline(), tabline) +endfunction + +function! s:suite.tabnew_first() + let tabline = lightline#tabline() + 0tabnew + call s:assert.not_equals(lightline#tabline(), tabline) +endfunction + +function! s:suite.tabnext() + tabnew + let tabline = lightline#tabline() + tabnext + call s:assert.not_equals(lightline#tabline(), tabline) +endfunction + +function! s:suite.tabonly() + tabnew + tabfirst + let tabline = lightline#tabline() + tabonly + call s:assert.not_equals(lightline#tabline(), tabline) +endfunction + +function! s:suite.tabclose() + tabnew + let tabline = lightline#tabline() + tabclose + call s:assert.not_equals(lightline#tabline(), tabline) +endfunction + +function! s:suite.tabclose_last() + tabnew + tabfirst + let tabline = lightline#tabline() + $tabclose + call s:assert.not_equals(lightline#tabline(), tabline) +endfunction diff --git a/sources_non_forked/lightline.vim/test/tabs.vim b/sources_non_forked/lightline.vim/test/tabs.vim new file mode 100644 index 00000000..92c2c08f --- /dev/null +++ b/sources_non_forked/lightline.vim/test/tabs.vim @@ -0,0 +1,99 @@ +let s:suite = themis#suite('tabs') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + let g:lightline = { 'winwidth': 180 } + call lightline#init() + tabnew + tabonly +endfunction + +function! s:tab(number, ...) abort + let active = get(a:000, 0, 0) + let last = get(a:000, 1, 0) + return '%' . a:number . 'T%{lightline#onetab(' . a:number . ',' . active . ')}' . (last ? '%T' : '') +endfunction + +function! s:suite.tabs() + call s:assert.equals(lightline#tabs(), [[], [s:tab(1, 1, 1)], []]) +endfunction + +function! s:suite.tabnew() + tabnew + call s:assert.equals(lightline#tabs(), [[s:tab(1)], [s:tab(2, 1, 1)], []]) +endfunction + +function! s:suite.tabnew_tabnew() + tabnew + tabnew + call s:assert.equals(lightline#tabs(), [[s:tab(1), s:tab(2)], [s:tab(3, 1, 1)], []]) +endfunction + +function! s:suite.tabnew_tabfirst() + tabnew + tabfirst + call s:assert.equals(lightline#tabs(), [[], [s:tab(1, 1)], [s:tab(2, 0, 1)]]) +endfunction + +function! s:suite.tabnew_tabnew_tabfirst() + tabnew + tabnew + tabfirst + call s:assert.equals(lightline#tabs(), [[], [s:tab(1, 1)], [s:tab(2), s:tab(3, 0, 1)]]) +endfunction + +function! s:suite.tabnew_tabnew_tabprevious() + tabnew + tabnew + tabprevious + call s:assert.equals(lightline#tabs(), [[s:tab(1)], [s:tab(2, 1)], [s:tab(3, 0, 1)]]) +endfunction + +function! s:suite.tabnew_20() + for i in range(19) + tabnew + endfor + call s:assert.equals(lightline#tabs(), [[s:tab(1), s:tab(2), s:tab(3), s:tab(4), '...', s:tab(16), s:tab(17), s:tab(18), s:tab(19)], [s:tab(20, 1, 1)], []]) +endfunction + +function! s:suite.tabnew_20_tabfirst() + for i in range(19) + tabnew + endfor + tabfirst + call s:assert.equals(lightline#tabs(), [[], [s:tab(1, 1)], [s:tab(2), s:tab(3), s:tab(4), s:tab(5), '...', s:tab(17), s:tab(18), s:tab(19), s:tab(20, 0, 1)]]) +endfunction + +function! s:suite.tabnew_20_tabfirst_tabnext() + for i in range(19) + tabnew + endfor + tabfirst + tabnext + call s:assert.equals(lightline#tabs(), [[s:tab(1)], [s:tab(2, 1)], [s:tab(3), s:tab(4), s:tab(5), s:tab(6), '...', s:tab(18), s:tab(19), s:tab(20, 0, 1)]]) +endfunction + +function! s:suite.tabnew_20_tabnext_10() + for i in range(19) + tabnew + endfor + tabnext 10 + call s:assert.equals(lightline#tabs(), [[s:tab(1), s:tab(2), '...', s:tab(8), s:tab(9)], [s:tab(10, 1)], [s:tab(11), s:tab(12), '...', s:tab(19), s:tab(20, 0, 1)]]) +endfunction + +function! s:suite.tabnew_20_tabprevious() + for i in range(19) + tabnew + endfor + tabprevious + call s:assert.equals(lightline#tabs(), [[s:tab(1), s:tab(2), s:tab(3), '...', s:tab(15), s:tab(16), s:tab(17), s:tab(18)], [s:tab(19, 1)], [s:tab(20, 0, 1)]]) +endfunction + +function! s:suite.tabnew_20_tabprevious_tabprevious() + for i in range(19) + tabnew + endfor + tabprevious + tabprevious + call s:assert.equals(lightline#tabs(), [[s:tab(1), s:tab(2), s:tab(3), '...', s:tab(15), s:tab(16), s:tab(17)], [s:tab(18, 1)], [s:tab(19), s:tab(20, 0, 1)]]) +endfunction diff --git a/sources_non_forked/lightline.vim/test/toggle.vim b/sources_non_forked/lightline.vim/test/toggle.vim new file mode 100644 index 00000000..c6042a86 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/toggle.vim @@ -0,0 +1,37 @@ +let s:suite = themis#suite('toggle') +let s:assert = themis#helper('assert') + +function! s:suite.before_each() + let g:lightline = {} + call lightline#init() + tabnew + tabonly +endfunction + +function! s:suite.default() + call s:assert.equals(exists('#lightline'), 1) + call s:assert.equals(exists('#lightline-disable'), 0) + call s:assert.not_equals(&tabline, '') +endfunction + +function! s:suite.disable_enable() + call lightline#disable() + call s:assert.equals(exists('#lightline'), 0) + call s:assert.equals(exists('#lightline-disable'), 1) + call s:assert.equals(&tabline, '') + call lightline#enable() + call s:assert.equals(exists('#lightline'), 1) + call s:assert.equals(exists('#lightline-disable'), 0) + call s:assert.not_equals(&tabline, '') +endfunction + +function! s:suite.toggle() + call lightline#toggle() + call s:assert.equals(exists('#lightline'), 0) + call s:assert.equals(exists('#lightline-disable'), 1) + call s:assert.equals(&tabline, '') + call lightline#toggle() + call s:assert.equals(exists('#lightline'), 1) + call s:assert.equals(exists('#lightline-disable'), 0) + call s:assert.not_equals(&tabline, '') +endfunction diff --git a/sources_non_forked/lightline.vim/test/uniq.vim b/sources_non_forked/lightline.vim/test/uniq.vim new file mode 100644 index 00000000..cdfaec09 --- /dev/null +++ b/sources_non_forked/lightline.vim/test/uniq.vim @@ -0,0 +1,46 @@ +let s:suite = themis#suite('uniq') +let s:assert = themis#helper('assert') + +function! s:uniq(...) + try + return call(SID('uniq'), a:000) + catch + return call(function('uniq'), a:000) + endtry +endfunction + +function! s:suite.nil() + call s:assert.equals(s:uniq([]), []) +endfunction + +function! s:suite.one() + call s:assert.equals(s:uniq(['foo']), ['foo']) +endfunction + +function! s:suite.two() + call s:assert.equals(s:uniq(['foo', 'bar']), ['foo', 'bar']) +endfunction + +function! s:suite.three() + call s:assert.equals(s:uniq(['foo', 'bar', 'baz']), ['foo', 'bar', 'baz']) +endfunction + +function! s:suite.two_duplicated() + call s:assert.equals(s:uniq(['foo', 'foo']), ['foo']) +endfunction + +function! s:suite.three_duplicated() + call s:assert.equals(s:uniq(['foo', 'bar', 'foo']), ['foo', 'bar', 'foo']) +endfunction + +function! s:suite.many1() + call s:assert.equals(s:uniq(['foo', 'foo', 'bar', 'baz', 'baz', 'qux', 'foo']), ['foo', 'bar', 'baz', 'qux', 'foo']) +endfunction + +function! s:suite.many2() + call s:assert.equals(s:uniq(['foo', 'foo', 'foo', 'foo', 'bar', 'bar', 'bar']), ['foo', 'bar']) +endfunction + +function! s:suite.many3() + call s:assert.equals(s:uniq(['foo', 'foo', 'bar', 'bar', 'bar', 'foo', 'foo', 'foo']), ['foo', 'bar', 'foo']) +endfunction diff --git a/sources_non_forked/vim-airline-themes/.gitignore b/sources_non_forked/vim-airline-themes/.gitignore deleted file mode 100644 index 926ccaaf..00000000 --- a/sources_non_forked/vim-airline-themes/.gitignore +++ /dev/null @@ -1 +0,0 @@ -doc/tags diff --git a/sources_non_forked/vim-airline-themes/LICENSE b/sources_non_forked/vim-airline-themes/LICENSE deleted file mode 100644 index b8f4e6bc..00000000 --- a/sources_non_forked/vim-airline-themes/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2013-2016 Bailey Ling & Contributors. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/sources_non_forked/vim-airline-themes/README.md b/sources_non_forked/vim-airline-themes/README.md deleted file mode 100644 index 28bef60f..00000000 --- a/sources_non_forked/vim-airline-themes/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# vim-airline-themes - -This is the official theme repository for [vim-airline](https://github.com/vim-airline/vim-airline). - -# Installation - -This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers: - -* [Pathogen][4] - * `git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/bundle/vim-airline-themes` - * Remember to run `:Helptags` to generate help tags -* [NeoBundle][5] - * `NeoBundle 'vim-airline/vim-airline-themes'` -* [Vundle][6] - * `Plugin 'vim-airline/vim-airline-themes'` -* [Plug][7] - * `Plug 'vim-airline/vim-airline-themes'` -* manual - * copy all of the files into your `~/.vim` directory - - -# Contribution Guidelines - -## New themes - -* Pull requests for new themes are welcome. Please be sure to include a screenshot. You can paste an image into issue [#1](https://github.com/vim-airline/vim-airline-themes/issues/1), and then editing the post to reveal the uploaded image URL. - -## Modifications to existing themes - -* Themes are subjective, so if you are going to make modifications to an existing theme, please expose a configurable variable to allow users to choose how the theme will react. - -# Screenshots - -Screenshots are in the process of being migrated here. In the meantime you can find screenshots in the existing repository's [Wiki](https://github.com/vim-airline/vim-airline/wiki/Screenshots). - -# Maintenance - -If you are interested in becoming the official maintainer of this project, please contact [**@bling**][1], [**@chrisbra**][2], or [**@mhartington**][3]. - -# License - -MIT License. Copyright (c) 2013-2016 Bailey Ling & Contributors. - - -[1]: https://github.com/bling -[2]: https://github.com/chrisbra -[3]: https://github.com/mhartington -[4]: https://github.com/tpope/vim-pathogen -[5]: https://github.com/Shougo/neobundle.vim -[6]: https://github.com/gmarik/vundle -[7]: https://github.com/junegunn/vim-plug diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/badwolf.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/badwolf.vim deleted file mode 100644 index e2b90063..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/badwolf.vim +++ /dev/null @@ -1,52 +0,0 @@ -let s:N1 = [ '#141413' , '#aeee00' , 232 , 154 ] " blackestgravel & lime -let s:N2 = [ '#f4cf86' , '#45413b' , 222 , 238 ] " dirtyblonde & deepgravel -let s:N3 = [ '#8cffba' , '#242321' , 121 , 235 ] " saltwatertaffy & darkgravel -let s:N4 = [ '#666462' , 241 ] " mediumgravel - -let s:I1 = [ '#141413' , '#0a9dff' , 232 , 39 ] " blackestgravel & tardis -let s:I2 = [ '#f4cf86' , '#005fff' , 222 , 27 ] " dirtyblonde & facebook -let s:I3 = [ '#0a9dff' , '#242321' , 39 , 235 ] " tardis & darkgravel - -let s:V1 = [ '#141413' , '#ffa724' , 232 , 214 ] " blackestgravel & orange -let s:V2 = [ '#000000' , '#fade3e' , 16 , 221 ] " coal & dalespale -let s:V3 = [ '#000000' , '#b88853' , 16 , 137 ] " coal & toffee -let s:V4 = [ '#c7915b' , 173 ] " coffee - -let s:PA = [ '#f4cf86' , 222 ] " dirtyblonde -let s:RE = [ '#ff9eb8' , 211 ] " dress - -let s:IA = [ s:N3[1] , s:N2[1] , s:N3[3] , s:N2[3] , '' ] - -let g:airline#themes#badwolf#palette = {} - -let g:airline#themes#badwolf#palette.accents = { - \ 'red': [ '#ff2c4b' , '' , 196 , '' , '' ] - \ } - -let g:airline#themes#badwolf#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#badwolf#palette.normal_modified = { - \ 'airline_b': [ s:N2[0] , s:N4[0] , s:N2[2] , s:N4[1] , '' ] , - \ 'airline_c': [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } - - -let g:airline#themes#badwolf#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#badwolf#palette.insert_modified = { - \ 'airline_c': [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } -let g:airline#themes#badwolf#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] } - - -let g:airline#themes#badwolf#palette.replace = copy(airline#themes#badwolf#palette.insert) -let g:airline#themes#badwolf#palette.replace.airline_a = [ s:I1[0] , s:RE[0] , s:I1[2] , s:RE[1] , '' ] -let g:airline#themes#badwolf#palette.replace_modified = g:airline#themes#badwolf#palette.insert_modified - - -let g:airline#themes#badwolf#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#badwolf#palette.visual_modified = { - \ 'airline_c': [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } - - -let g:airline#themes#badwolf#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#badwolf#palette.inactive_modified = { - \ 'airline_c': [ s:V1[1] , '' , s:V1[3] , '' , '' ] } - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16.vim deleted file mode 100644 index 88188ada..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16.vim +++ /dev/null @@ -1,164 +0,0 @@ -if get(g:, 'airline#themes#base16#constant', 0) - let g:airline#themes#base16#palette = {} - - " Color palette - let s:gui_dark_gray = '#202020' - let s:cterm_dark_gray = 234 - let s:gui_med_gray_hi = '#303030' - let s:cterm_med_gray_hi = 236 - let s:gui_med_gray_lo = '#3a3a3a' - let s:cterm_med_gray_lo = 237 - let s:gui_light_gray = '#505050' - let s:cterm_light_gray = 239 - let s:gui_green = '#99cc99' - let s:cterm_green = 151 - let s:gui_blue = '#6a9fb5' - let s:cterm_blue = 67 - let s:gui_purple = '#aa759f' - let s:cterm_purple = 139 - let s:gui_orange = '#d28445' - let s:cterm_orange = 173 - let s:gui_red = '#ac4142' - let s:cterm_red = 131 - let s:gui_pink = '#d7afd7' - let s:cterm_pink = 182 - - " Normal mode - let s:N1 = [s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green] - let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] - let s:N3 = [s:gui_green, s:gui_med_gray_hi, s:cterm_green, s:cterm_med_gray_hi] - let g:airline#themes#base16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - let g:airline#themes#base16#palette.normal_modified = { - \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, ''], - \ } - - " Insert mode - let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] - let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] - let g:airline#themes#base16#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) - let g:airline#themes#base16#palette.insert_modified = copy(g:airline#themes#base16#palette.normal_modified) - let g:airline#themes#base16#palette.insert_paste = { - \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], - \ } - - " Replace mode - let g:airline#themes#base16#palette.replace = { - \ 'airline_a': [s:gui_dark_gray, s:gui_red, s:cterm_dark_gray, s:cterm_red, ''], - \ 'airline_c': [s:gui_red, s:gui_med_gray_hi, s:cterm_red, s:cterm_med_gray_hi, ''], - \ } - let g:airline#themes#base16#palette.replace_modified = copy(g:airline#themes#base16#palette.insert_modified) - - " Visual mode - let s:V1 = [s:gui_dark_gray, s:gui_pink, s:cterm_dark_gray, s:cterm_pink] - let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:cterm_pink, s:cterm_med_gray_hi] - let g:airline#themes#base16#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) - let g:airline#themes#base16#palette.visual_modified = copy(g:airline#themes#base16#palette.insert_modified) - - " Inactive window - let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:cterm_dark_gray, s:cterm_med_gray_hi, ''] - let g:airline#themes#base16#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) - let g:airline#themes#base16#palette.inactive_modified = { - \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], - \ } -else - function! airline#themes#base16#refresh() - let g:airline#themes#base16#palette = {} - - let g:airline#themes#base16#palette.accents = { - \ 'red': airline#themes#get_highlight('Constant'), - \ } - - let s:N1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['DiffText', 'fg'], 'bold') - let s:N2 = airline#themes#get_highlight2(['Visual', 'fg'], ['Visual', 'bg']) - let s:N3 = airline#themes#get_highlight('CursorLine') - let g:airline#themes#base16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - - let group = airline#themes#get_highlight('vimCommand') - let g:airline#themes#base16#palette.normal_modified = { - \ 'statusline': [ group[0], '', group[2], '', '' ] - \ } - - let s:I1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['DiffAdded', 'fg'], 'bold') - let s:I2 = airline#themes#get_highlight2(['DiffAdded', 'fg'], ['Normal', 'bg']) - let s:I3 = s:N3 - let g:airline#themes#base16#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - let g:airline#themes#base16#palette.insert_modified = g:airline#themes#base16#palette.normal_modified - - let s:R1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['WarningMsg', 'fg'], 'bold') - let s:R2 = s:N2 - let s:R3 = s:N3 - let g:airline#themes#base16#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - let g:airline#themes#base16#palette.replace_modified = g:airline#themes#base16#palette.normal_modified - - let s:V1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['Constant', 'fg'], 'bold') - let s:V2 = airline#themes#get_highlight2(['Constant', 'fg'], ['Normal', 'bg']) - let s:V3 = s:N3 - let g:airline#themes#base16#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - let g:airline#themes#base16#palette.visual_modified = g:airline#themes#base16#palette.normal_modified - - " Use VertSplit's bg and default fg (reversed) for inactive statusline. - let s:VS = airline#themes#get_highlight('VertSplit') - let s:IA = [ s:VS[1], 'NONE', s:VS[2], 'NONE', 'reverse'] - let g:airline#themes#base16#palette.inactive = - \ airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:IA, s:IA, s:IA) - let s:IM = [ s:VS[1], 'NONE', s:VS[2], 'NONE', 'reverse,italic'] - let g:airline#themes#base16#palette.inactive_modified = - \ airline#themes#generate_color_map(s:IM, s:IM, s:IM, s:IM, s:IM, s:IM) - - " Warnings - let s:WI = airline#themes#get_highlight2(['WarningMsg', 'bg'], ['WarningMsg', 'fg'], 'bold') - let g:airline#themes#base16#palette.normal.airline_warning = [ - \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] - \ ] - - let g:airline#themes#base16#palette.normal_modified.airline_warning = - \ g:airline#themes#base16#palette.normal.airline_warning - - let g:airline#themes#base16#palette.insert.airline_warning = - \ g:airline#themes#base16#palette.normal.airline_warning - - let g:airline#themes#base16#palette.insert_modified.airline_warning = - \ g:airline#themes#base16#palette.normal.airline_warning - - let g:airline#themes#base16#palette.visual.airline_warning = - \ g:airline#themes#base16#palette.normal.airline_warning - - let g:airline#themes#base16#palette.visual_modified.airline_warning = - \ g:airline#themes#base16#palette.normal.airline_warning - - let g:airline#themes#base16#palette.replace.airline_warning = - \ g:airline#themes#base16#palette.normal.airline_warning - - let g:airline#themes#base16#palette.replace_modified.airline_warning = - \ g:airline#themes#base16#palette.normal.airline_warning - - " Errors - let s:ER = airline#themes#get_highlight2(['ErrorMsg', 'bg'], ['ErrorMsg', 'fg'], 'bold') - let g:airline#themes#base16#palette.normal.airline_error = [ - \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] - \ ] - - let g:airline#themes#base16#palette.normal_modified.airline_error = - \ g:airline#themes#base16#palette.normal.airline_error - - let g:airline#themes#base16#palette.insert.airline_error = - \ g:airline#themes#base16#palette.normal.airline_error - - let g:airline#themes#base16#palette.insert_modified.airline_error = - \ g:airline#themes#base16#palette.normal.airline_error - - let g:airline#themes#base16#palette.visual.airline_error = - \ g:airline#themes#base16#palette.normal.airline_error - - let g:airline#themes#base16#palette.visual_modified.airline_error = - \ g:airline#themes#base16#palette.normal.airline_error - - let g:airline#themes#base16#palette.replace.airline_error = - \ g:airline#themes#base16#palette.normal.airline_error - - let g:airline#themes#base16#palette.replace_modified.airline_error = - \ g:airline#themes#base16#palette.normal.airline_error - - endfunction - call airline#themes#base16#refresh() -endif diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_3024.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_3024.vim deleted file mode 100644 index f4e318af..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_3024.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 3024 Scheme by Jan T. Sott (http://github.com/idleberg) -let g:airline#themes#base16_3024#palette = {} -let s:gui00 = "#090300" -let s:gui01 = "#3a3432" -let s:gui02 = "#4a4543" -let s:gui03 = "#5c5855" -let s:gui04 = "#807d7c" -let s:gui05 = "#a5a2a2" -let s:gui06 = "#d6d5d4" -let s:gui07 = "#f7f7f7" -let s:gui08 = "#db2d20" -let s:gui09 = "#e8bbd0" -let s:gui0A = "#fded02" -let s:gui0B = "#01a252" -let s:gui0C = "#b5e4f4" -let s:gui0D = "#01a0e4" -let s:gui0E = "#a16a94" -let s:gui0F = "#cdab53" - -let s:cterm00 = 0 -let s:cterm01 = 59 -let s:cterm02 = 59 -let s:cterm03 = 59 -let s:cterm04 = 102 -let s:cterm05 = 145 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 1 -let s:cterm09 = 182 -let s:cterm0A = 11 -let s:cterm0B = 35 -let s:cterm0C = 153 -let s:cterm0D = 38 -let s:cterm0E = 132 -let s:cterm0F = 179 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_3024#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_3024#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_3024#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_3024#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_3024#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_3024#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_apathy.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_apathy.vim deleted file mode 100644 index 85a95841..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_apathy.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Apathy Scheme by Jannik Siebert (https://github.com/janniks) -let g:airline#themes#base16_apathy#palette = {} -let s:gui00 = "#031A16" -let s:gui01 = "#0B342D" -let s:gui02 = "#184E45" -let s:gui03 = "#2B685E" -let s:gui04 = "#5F9C92" -let s:gui05 = "#81B5AC" -let s:gui06 = "#A7CEC8" -let s:gui07 = "#D2E7E4" -let s:gui08 = "#3E9688" -let s:gui09 = "#3E7996" -let s:gui0A = "#3E4C96" -let s:gui0B = "#883E96" -let s:gui0C = "#963E4C" -let s:gui0D = "#96883E" -let s:gui0E = "#4C963E" -let s:gui0F = "#3E965B" - -let s:cterm00 = 0 -let s:cterm01 = 22 -let s:cterm02 = 23 -let s:cterm03 = 23 -let s:cterm04 = 72 -let s:cterm05 = 109 -let s:cterm06 = 152 -let s:cterm07 = 188 -let s:cterm08 = 66 -let s:cterm09 = 66 -let s:cterm0A = 60 -let s:cterm0B = 96 -let s:cterm0C = 95 -let s:cterm0D = 101 -let s:cterm0E = 65 -let s:cterm0F = 65 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_apathy#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_apathy#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_apathy#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_apathy#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_apathy#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_apathy#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ashes.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ashes.vim deleted file mode 100644 index a162c67c..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ashes.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Ashes Scheme by Jannik Siebert (https://github.com/janniks) -let g:airline#themes#base16_ashes#palette = {} -let s:gui00 = "#1C2023" -let s:gui01 = "#393F45" -let s:gui02 = "#565E65" -let s:gui03 = "#747C84" -let s:gui04 = "#ADB3BA" -let s:gui05 = "#C7CCD1" -let s:gui06 = "#DFE2E5" -let s:gui07 = "#F3F4F5" -let s:gui08 = "#C7AE95" -let s:gui09 = "#C7C795" -let s:gui0A = "#AEC795" -let s:gui0B = "#95C7AE" -let s:gui0C = "#95AEC7" -let s:gui0D = "#AE95C7" -let s:gui0E = "#C795AE" -let s:gui0F = "#C79595" - -let s:cterm00 = 0 -let s:cterm01 = 59 -let s:cterm02 = 59 -let s:cterm03 = 102 -let s:cterm04 = 145 -let s:cterm05 = 188 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 180 -let s:cterm09 = 186 -let s:cterm0A = 150 -let s:cterm0B = 115 -let s:cterm0C = 110 -let s:cterm0D = 140 -let s:cterm0E = 175 -let s:cterm0F = 174 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_ashes#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_ashes#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_ashes#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_ashes#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_ashes#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_ashes#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim deleted file mode 100644 index 94cfacd3..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Atelier Dune Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) -let g:airline#themes#base16_atelierdune#palette = {} -let s:gui00 = "#20201d" -let s:gui01 = "#292824" -let s:gui02 = "#6e6b5e" -let s:gui03 = "#7d7a68" -let s:gui04 = "#999580" -let s:gui05 = "#a6a28c" -let s:gui06 = "#e8e4cf" -let s:gui07 = "#fefbec" -let s:gui08 = "#d73737" -let s:gui09 = "#b65611" -let s:gui0A = "#cfb017" -let s:gui0B = "#60ac39" -let s:gui0C = "#1fad83" -let s:gui0D = "#6684e1" -let s:gui0E = "#b854d4" -let s:gui0F = "#d43552" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 59 -let s:cterm03 = 101 -let s:cterm04 = 102 -let s:cterm05 = 144 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 167 -let s:cterm09 = 130 -let s:cterm0A = 178 -let s:cterm0B = 71 -let s:cterm0C = 36 -let s:cterm0D = 68 -let s:cterm0E = 134 -let s:cterm0F = 167 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierdune#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierdune#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierdune#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierdune#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_atelierdune#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_atelierdune#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim deleted file mode 100644 index 70c23de5..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Atelier Forest Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) -let g:airline#themes#base16_atelierforest#palette = {} -let s:gui00 = "#1b1918" -let s:gui01 = "#2c2421" -let s:gui02 = "#68615e" -let s:gui03 = "#766e6b" -let s:gui04 = "#9c9491" -let s:gui05 = "#a8a19f" -let s:gui06 = "#e6e2e0" -let s:gui07 = "#f1efee" -let s:gui08 = "#f22c40" -let s:gui09 = "#df5320" -let s:gui0A = "#d5911a" -let s:gui0B = "#5ab738" -let s:gui0C = "#00ad9c" -let s:gui0D = "#407ee7" -let s:gui0E = "#6666ea" -let s:gui0F = "#c33ff3" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 59 -let s:cterm03 = 95 -let s:cterm04 = 138 -let s:cterm05 = 145 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 197 -let s:cterm09 = 166 -let s:cterm0A = 172 -let s:cterm0B = 71 -let s:cterm0C = 37 -let s:cterm0D = 68 -let s:cterm0E = 62 -let s:cterm0F = 135 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierforest#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierforest#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierforest#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierforest#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_atelierforest#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_atelierforest#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim deleted file mode 100644 index 20179c78..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Atelier Heath Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) -let g:airline#themes#base16_atelierheath#palette = {} -let s:gui00 = "#1b181b" -let s:gui01 = "#292329" -let s:gui02 = "#695d69" -let s:gui03 = "#776977" -let s:gui04 = "#9e8f9e" -let s:gui05 = "#ab9bab" -let s:gui06 = "#d8cad8" -let s:gui07 = "#f7f3f7" -let s:gui08 = "#ca402b" -let s:gui09 = "#a65926" -let s:gui0A = "#bb8a35" -let s:gui0B = "#379a37" -let s:gui0C = "#159393" -let s:gui0D = "#516aec" -let s:gui0E = "#7b59c0" -let s:gui0F = "#cc33cc" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 59 -let s:cterm03 = 96 -let s:cterm04 = 139 -let s:cterm05 = 139 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 166 -let s:cterm09 = 130 -let s:cterm0A = 137 -let s:cterm0B = 65 -let s:cterm0C = 30 -let s:cterm0D = 12 -let s:cterm0E = 97 -let s:cterm0F = 170 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierheath#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierheath#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierheath#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierheath#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_atelierheath#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_atelierheath#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim deleted file mode 100644 index 0d1e758e..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Atelier Lakeside Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) -let g:airline#themes#base16_atelierlakeside#palette = {} -let s:gui00 = "#161b1d" -let s:gui01 = "#1f292e" -let s:gui02 = "#516d7b" -let s:gui03 = "#5a7b8c" -let s:gui04 = "#7195a8" -let s:gui05 = "#7ea2b4" -let s:gui06 = "#c1e4f6" -let s:gui07 = "#ebf8ff" -let s:gui08 = "#d22d72" -let s:gui09 = "#935c25" -let s:gui0A = "#8a8a0f" -let s:gui0B = "#568c3b" -let s:gui0C = "#2d8f6f" -let s:gui0D = "#257fad" -let s:gui0E = "#5d5db1" -let s:gui0F = "#b72dd2" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 60 -let s:cterm03 = 66 -let s:cterm04 = 67 -let s:cterm05 = 109 -let s:cterm06 = 153 -let s:cterm07 = 195 -let s:cterm08 = 161 -let s:cterm09 = 94 -let s:cterm0A = 100 -let s:cterm0B = 65 -let s:cterm0C = 29 -let s:cterm0D = 31 -let s:cterm0E = 61 -let s:cterm0F = 5 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierlakeside#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierlakeside#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierlakeside#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierlakeside#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_atelierlakeside#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_atelierlakeside#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim deleted file mode 100644 index 0314ea28..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Atelier Seaside Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) -let g:airline#themes#base16_atelierseaside#palette = {} -let s:gui00 = "#131513" -let s:gui01 = "#242924" -let s:gui02 = "#5e6e5e" -let s:gui03 = "#687d68" -let s:gui04 = "#809980" -let s:gui05 = "#8ca68c" -let s:gui06 = "#cfe8cf" -let s:gui07 = "#f0fff0" -let s:gui08 = "#e6193c" -let s:gui09 = "#87711d" -let s:gui0A = "#c3c322" -let s:gui0B = "#29a329" -let s:gui0C = "#1999b3" -let s:gui0D = "#3d62f5" -let s:gui0E = "#ad2bee" -let s:gui0F = "#e619c3" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 59 -let s:cterm03 = 65 -let s:cterm04 = 102 -let s:cterm05 = 108 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 161 -let s:cterm09 = 94 -let s:cterm0A = 3 -let s:cterm0B = 2 -let s:cterm0C = 31 -let s:cterm0D = 12 -let s:cterm0E = 129 -let s:cterm0F = 5 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierseaside#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierseaside#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierseaside#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_atelierseaside#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_atelierseaside#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_atelierseaside#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bespin.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bespin.vim deleted file mode 100644 index b4f35231..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bespin.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Bespin Scheme by Jan T. Sott -let g:airline#themes#base16_bespin#palette = {} -let s:gui00 = "#28211c" -let s:gui01 = "#36312e" -let s:gui02 = "#5e5d5c" -let s:gui03 = "#666666" -let s:gui04 = "#797977" -let s:gui05 = "#8a8986" -let s:gui06 = "#9d9b97" -let s:gui07 = "#baae9e" -let s:gui08 = "#cf6a4c" -let s:gui09 = "#cf7d34" -let s:gui0A = "#f9ee98" -let s:gui0B = "#54be0d" -let s:gui0C = "#afc4db" -let s:gui0D = "#5ea6ea" -let s:gui0E = "#9b859d" -let s:gui0F = "#937121" - -let s:cterm00 = 0 -let s:cterm01 = 58 -let s:cterm02 = 59 -let s:cterm03 = 241 -let s:cterm04 = 102 -let s:cterm05 = 102 -let s:cterm06 = 138 -let s:cterm07 = 145 -let s:cterm08 = 167 -let s:cterm09 = 173 -let s:cterm0A = 228 -let s:cterm0B = 70 -let s:cterm0C = 152 -let s:cterm0D = 74 -let s:cterm0E = 103 -let s:cterm0F = 94 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_bespin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_bespin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_bespin#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_bespin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_bespin#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_bespin#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_brewer.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_brewer.vim deleted file mode 100644 index 01646770..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_brewer.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Brewer Scheme by Timothée Poisot (http://github.com/tpoisot) -let g:airline#themes#base16_brewer#palette = {} -let s:gui00 = "#0c0d0e" -let s:gui01 = "#2e2f30" -let s:gui02 = "#515253" -let s:gui03 = "#737475" -let s:gui04 = "#959697" -let s:gui05 = "#b7b8b9" -let s:gui06 = "#dadbdc" -let s:gui07 = "#fcfdfe" -let s:gui08 = "#e31a1c" -let s:gui09 = "#e6550d" -let s:gui0A = "#dca060" -let s:gui0B = "#31a354" -let s:gui0C = "#80b1d3" -let s:gui0D = "#3182bd" -let s:gui0E = "#756bb1" -let s:gui0F = "#b15928" - -let s:cterm00 = 0 -let s:cterm01 = 17 -let s:cterm02 = 59 -let s:cterm03 = 66 -let s:cterm04 = 102 -let s:cterm05 = 145 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 1 -let s:cterm09 = 166 -let s:cterm0A = 179 -let s:cterm0B = 71 -let s:cterm0C = 110 -let s:cterm0D = 67 -let s:cterm0E = 97 -let s:cterm0F = 130 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_brewer#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_brewer#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_brewer#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_brewer#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_brewer#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_brewer#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bright.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bright.vim deleted file mode 100644 index 23c74325..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_bright.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Bright Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_bright#palette = {} -let s:gui00 = "#000000" -let s:gui01 = "#303030" -let s:gui02 = "#505050" -let s:gui03 = "#b0b0b0" -let s:gui04 = "#d0d0d0" -let s:gui05 = "#e0e0e0" -let s:gui06 = "#f5f5f5" -let s:gui07 = "#ffffff" -let s:gui08 = "#fb0120" -let s:gui09 = "#fc6d24" -let s:gui0A = "#fda331" -let s:gui0B = "#a1c659" -let s:gui0C = "#76c7b7" -let s:gui0D = "#6fb3d2" -let s:gui0E = "#d381c3" -let s:gui0F = "#be643c" - -let s:cterm00 = 0 -let s:cterm01 = 236 -let s:cterm02 = 239 -let s:cterm03 = 249 -let s:cterm04 = 252 -let s:cterm05 = 253 -let s:cterm06 = 15 -let s:cterm07 = 15 -let s:cterm08 = 9 -let s:cterm09 = 202 -let s:cterm0A = 215 -let s:cterm0B = 149 -let s:cterm0C = 115 -let s:cterm0D = 74 -let s:cterm0E = 175 -let s:cterm0F = 131 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_bright#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_bright#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_bright#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_bright#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_bright#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_bright#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_chalk.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_chalk.vim deleted file mode 100644 index d0345a96..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_chalk.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Chalk Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_chalk#palette = {} -let s:gui00 = "#151515" -let s:gui01 = "#202020" -let s:gui02 = "#303030" -let s:gui03 = "#505050" -let s:gui04 = "#b0b0b0" -let s:gui05 = "#d0d0d0" -let s:gui06 = "#e0e0e0" -let s:gui07 = "#f5f5f5" -let s:gui08 = "#fb9fb1" -let s:gui09 = "#eda987" -let s:gui0A = "#ddb26f" -let s:gui0B = "#acc267" -let s:gui0C = "#12cfc0" -let s:gui0D = "#6fc2ef" -let s:gui0E = "#e1a3ee" -let s:gui0F = "#deaf8f" - -let s:cterm00 = 233 -let s:cterm01 = 234 -let s:cterm02 = 236 -let s:cterm03 = 239 -let s:cterm04 = 249 -let s:cterm05 = 252 -let s:cterm06 = 253 -let s:cterm07 = 15 -let s:cterm08 = 217 -let s:cterm09 = 216 -let s:cterm0A = 179 -let s:cterm0B = 143 -let s:cterm0C = 6 -let s:cterm0D = 75 -let s:cterm0E = 183 -let s:cterm0F = 180 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_chalk#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_chalk#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_chalk#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_chalk#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_chalk#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_chalk#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim deleted file mode 100644 index f9cf9563..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Codeschool Scheme by brettof86 -let g:airline#themes#base16_codeschool#palette = {} -let s:gui00 = "#232c31" -let s:gui01 = "#1c3657" -let s:gui02 = "#2a343a" -let s:gui03 = "#3f4944" -let s:gui04 = "#84898c" -let s:gui05 = "#9ea7a6" -let s:gui06 = "#a7cfa3" -let s:gui07 = "#b5d8f6" -let s:gui08 = "#2a5491" -let s:gui09 = "#43820d" -let s:gui0A = "#a03b1e" -let s:gui0B = "#237986" -let s:gui0C = "#b02f30" -let s:gui0D = "#484d79" -let s:gui0E = "#c59820" -let s:gui0F = "#c98344" - -let s:cterm00 = 17 -let s:cterm01 = 23 -let s:cterm02 = 23 -let s:cterm03 = 59 -let s:cterm04 = 102 -let s:cterm05 = 145 -let s:cterm06 = 151 -let s:cterm07 = 153 -let s:cterm08 = 24 -let s:cterm09 = 64 -let s:cterm0A = 130 -let s:cterm0B = 30 -let s:cterm0C = 125 -let s:cterm0D = 60 -let s:cterm0E = 172 -let s:cterm0F = 173 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_codeschool#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_codeschool#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_codeschool#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_codeschool#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_codeschool#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_codeschool#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_colors.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_colors.vim deleted file mode 100644 index d65442d4..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_colors.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Colors Scheme by mrmrs (http://clrs.cc) -let g:airline#themes#base16_colors#palette = {} -let s:gui00 = "#111111" -let s:gui01 = "#333333" -let s:gui02 = "#555555" -let s:gui03 = "#777777" -let s:gui04 = "#999999" -let s:gui05 = "#bbbbbb" -let s:gui06 = "#dddddd" -let s:gui07 = "#ffffff" -let s:gui08 = "#ff4136" -let s:gui09 = "#ff851b" -let s:gui0A = "#ffdc00" -let s:gui0B = "#2ecc40" -let s:gui0C = "#7fdbff" -let s:gui0D = "#0074d9" -let s:gui0E = "#b10dc9" -let s:gui0F = "#85144b" - -let s:cterm00 = 233 -let s:cterm01 = 236 -let s:cterm02 = 240 -let s:cterm03 = 243 -let s:cterm04 = 246 -let s:cterm05 = 250 -let s:cterm06 = 253 -let s:cterm07 = 15 -let s:cterm08 = 203 -let s:cterm09 = 208 -let s:cterm0A = 220 -let s:cterm0B = 41 -let s:cterm0C = 117 -let s:cterm0D = 32 -let s:cterm0E = 128 -let s:cterm0F = 89 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_colors#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_colors#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_colors#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_colors#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_colors#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_colors#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_default.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_default.vim deleted file mode 100644 index 841c12e4..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_default.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Default Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_default#palette = {} -let s:gui00 = "#181818" -let s:gui01 = "#282828" -let s:gui02 = "#383838" -let s:gui03 = "#585858" -let s:gui04 = "#b8b8b8" -let s:gui05 = "#d8d8d8" -let s:gui06 = "#e8e8e8" -let s:gui07 = "#f8f8f8" -let s:gui08 = "#ab4642" -let s:gui09 = "#dc9656" -let s:gui0A = "#f7ca88" -let s:gui0B = "#a1b56c" -let s:gui0C = "#86c1b9" -let s:gui0D = "#7cafc2" -let s:gui0E = "#ba8baf" -let s:gui0F = "#a16946" - -let s:cterm00 = 233 -let s:cterm01 = 235 -let s:cterm02 = 237 -let s:cterm03 = 240 -let s:cterm04 = 249 -let s:cterm05 = 253 -let s:cterm06 = 254 -let s:cterm07 = 15 -let s:cterm08 = 131 -let s:cterm09 = 173 -let s:cterm0A = 222 -let s:cterm0B = 143 -let s:cterm0C = 109 -let s:cterm0D = 109 -let s:cterm0E = 139 -let s:cterm0F = 131 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_default#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_default#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_default#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_default#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_default#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_default#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_eighties.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_eighties.vim deleted file mode 100644 index 7161e391..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_eighties.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Eighties Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_eighties#palette = {} -let s:gui00 = "#2d2d2d" -let s:gui01 = "#393939" -let s:gui02 = "#515151" -let s:gui03 = "#747369" -let s:gui04 = "#a09f93" -let s:gui05 = "#d3d0c8" -let s:gui06 = "#e8e6df" -let s:gui07 = "#f2f0ec" -let s:gui08 = "#f2777a" -let s:gui09 = "#f99157" -let s:gui0A = "#ffcc66" -let s:gui0B = "#99cc99" -let s:gui0C = "#66cccc" -let s:gui0D = "#6699cc" -let s:gui0E = "#cc99cc" -let s:gui0F = "#d27b53" - -let s:cterm00 = 236 -let s:cterm01 = 237 -let s:cterm02 = 239 -let s:cterm03 = 95 -let s:cterm04 = 144 -let s:cterm05 = 188 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 210 -let s:cterm09 = 209 -let s:cterm0A = 221 -let s:cterm0B = 114 -let s:cterm0C = 80 -let s:cterm0D = 68 -let s:cterm0E = 176 -let s:cterm0F = 173 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_eighties#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_eighties#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_eighties#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_eighties#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_eighties#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_eighties#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_embers.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_embers.vim deleted file mode 100644 index 0c260769..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_embers.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Embers Scheme by Jannik Siebert (https://github.com/janniks) -let g:airline#themes#base16_embers#palette = {} -let s:gui00 = "#16130F" -let s:gui01 = "#2C2620" -let s:gui02 = "#433B32" -let s:gui03 = "#5A5047" -let s:gui04 = "#8A8075" -let s:gui05 = "#A39A90" -let s:gui06 = "#BEB6AE" -let s:gui07 = "#DBD6D1" -let s:gui08 = "#826D57" -let s:gui09 = "#828257" -let s:gui0A = "#6D8257" -let s:gui0B = "#57826D" -let s:gui0C = "#576D82" -let s:gui0D = "#6D5782" -let s:gui0E = "#82576D" -let s:gui0F = "#825757" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 59 -let s:cterm03 = 59 -let s:cterm04 = 102 -let s:cterm05 = 138 -let s:cterm06 = 145 -let s:cterm07 = 188 -let s:cterm08 = 95 -let s:cterm09 = 101 -let s:cterm0A = 65 -let s:cterm0B = 65 -let s:cterm0C = 60 -let s:cterm0D = 60 -let s:cterm0E = 95 -let s:cterm0F = 95 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_embers#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_embers#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_embers#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_embers#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_embers#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_embers#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_flat.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_flat.vim deleted file mode 100644 index aa4f5cf2..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_flat.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Flat Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_flat#palette = {} -let s:gui00 = "#2C3E50" -let s:gui01 = "#34495E" -let s:gui02 = "#7F8C8D" -let s:gui03 = "#95A5A6" -let s:gui04 = "#BDC3C7" -let s:gui05 = "#e0e0e0" -let s:gui06 = "#f5f5f5" -let s:gui07 = "#ECF0F1" -let s:gui08 = "#E74C3C" -let s:gui09 = "#E67E22" -let s:gui0A = "#F1C40F" -let s:gui0B = "#2ECC71" -let s:gui0C = "#1ABC9C" -let s:gui0D = "#3498DB" -let s:gui0E = "#9B59B6" -let s:gui0F = "#be643c" - -let s:cterm00 = 23 -let s:cterm01 = 59 -let s:cterm02 = 102 -let s:cterm03 = 109 -let s:cterm04 = 146 -let s:cterm05 = 253 -let s:cterm06 = 15 -let s:cterm07 = 15 -let s:cterm08 = 167 -let s:cterm09 = 172 -let s:cterm0A = 220 -let s:cterm0B = 41 -let s:cterm0C = 37 -let s:cterm0D = 68 -let s:cterm0E = 97 -let s:cterm0F = 131 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_flat#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_flat#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_flat#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_flat#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_flat#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_flat#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_google.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_google.vim deleted file mode 100644 index f20da8c2..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_google.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Google Scheme by Seth Wright (http://sethawright.com) -let g:airline#themes#base16_google#palette = {} -let s:gui00 = "#1d1f21" -let s:gui01 = "#282a2e" -let s:gui02 = "#373b41" -let s:gui03 = "#969896" -let s:gui04 = "#b4b7b4" -let s:gui05 = "#c5c8c6" -let s:gui06 = "#e0e0e0" -let s:gui07 = "#ffffff" -let s:gui08 = "#CC342B" -let s:gui09 = "#F96A38" -let s:gui0A = "#FBA922" -let s:gui0B = "#198844" -let s:gui0C = "#3971ED" -let s:gui0D = "#3971ED" -let s:gui0E = "#A36AC7" -let s:gui0F = "#3971ED" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 59 -let s:cterm03 = 102 -let s:cterm04 = 145 -let s:cterm05 = 188 -let s:cterm06 = 253 -let s:cterm07 = 15 -let s:cterm08 = 166 -let s:cterm09 = 203 -let s:cterm0A = 214 -let s:cterm0B = 29 -let s:cterm0C = 12 -let s:cterm0D = 12 -let s:cterm0E = 134 -let s:cterm0F = 12 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_google#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_google#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_google#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_google#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_google#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_google#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim deleted file mode 100644 index bf60eb3f..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Grayscale Scheme by Alexandre Gavioli (https://github.com/Alexx2/) -let g:airline#themes#base16_grayscale#palette = {} -let s:gui00 = "#101010" -let s:gui01 = "#252525" -let s:gui02 = "#464646" -let s:gui03 = "#525252" -let s:gui04 = "#ababab" -let s:gui05 = "#b9b9b9" -let s:gui06 = "#e3e3e3" -let s:gui07 = "#f7f7f7" -let s:gui08 = "#7c7c7c" -let s:gui09 = "#999999" -let s:gui0A = "#a0a0a0" -let s:gui0B = "#8e8e8e" -let s:gui0C = "#868686" -let s:gui0D = "#686868" -let s:gui0E = "#747474" -let s:gui0F = "#5e5e5e" - -let s:cterm00 = 233 -let s:cterm01 = 235 -let s:cterm02 = 238 -let s:cterm03 = 239 -let s:cterm04 = 248 -let s:cterm05 = 250 -let s:cterm06 = 254 -let s:cterm07 = 15 -let s:cterm08 = 243 -let s:cterm09 = 246 -let s:cterm0A = 247 -let s:cterm0B = 245 -let s:cterm0C = 244 -let s:cterm0D = 241 -let s:cterm0E = 243 -let s:cterm0F = 240 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_grayscale#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_grayscale#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_grayscale#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_grayscale#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_grayscale#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_grayscale#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim deleted file mode 100644 index b460449a..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Green Screen Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_greenscreen#palette = {} -let s:gui00 = "#001100" -let s:gui01 = "#003300" -let s:gui02 = "#005500" -let s:gui03 = "#007700" -let s:gui04 = "#009900" -let s:gui05 = "#00bb00" -let s:gui06 = "#00dd00" -let s:gui07 = "#00ff00" -let s:gui08 = "#007700" -let s:gui09 = "#009900" -let s:gui0A = "#007700" -let s:gui0B = "#00bb00" -let s:gui0C = "#005500" -let s:gui0D = "#009900" -let s:gui0E = "#00bb00" -let s:gui0F = "#005500" - -let s:cterm00 = 0 -let s:cterm01 = 22 -let s:cterm02 = 22 -let s:cterm03 = 28 -let s:cterm04 = 28 -let s:cterm05 = 34 -let s:cterm06 = 40 -let s:cterm07 = 10 -let s:cterm08 = 28 -let s:cterm09 = 28 -let s:cterm0A = 28 -let s:cterm0B = 34 -let s:cterm0C = 22 -let s:cterm0D = 28 -let s:cterm0E = 34 -let s:cterm0F = 22 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_greenscreen#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_greenscreen#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_greenscreen#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_greenscreen#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_greenscreen#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_greenscreen#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim deleted file mode 100644 index 9700a049..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 harmonic16 Scheme by Jannik Siebert (https://github.com/janniks) -let g:airline#themes#base16_harmonic16#palette = {} -let s:gui00 = "#0b1c2c" -let s:gui01 = "#223b54" -let s:gui02 = "#405c79" -let s:gui03 = "#627e99" -let s:gui04 = "#aabcce" -let s:gui05 = "#cbd6e2" -let s:gui06 = "#e5ebf1" -let s:gui07 = "#f7f9fb" -let s:gui08 = "#bf8b56" -let s:gui09 = "#bfbf56" -let s:gui0A = "#8bbf56" -let s:gui0B = "#56bf8b" -let s:gui0C = "#568bbf" -let s:gui0D = "#8b56bf" -let s:gui0E = "#bf568b" -let s:gui0F = "#bf5656" - -let s:cterm00 = 0 -let s:cterm01 = 23 -let s:cterm02 = 60 -let s:cterm03 = 66 -let s:cterm04 = 146 -let s:cterm05 = 188 -let s:cterm06 = 189 -let s:cterm07 = 15 -let s:cterm08 = 137 -let s:cterm09 = 143 -let s:cterm0A = 107 -let s:cterm0B = 72 -let s:cterm0C = 67 -let s:cterm0D = 97 -let s:cterm0E = 132 -let s:cterm0F = 131 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_harmonic16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_harmonic16#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_harmonic16#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_harmonic16#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_harmonic16#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_harmonic16#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim deleted file mode 100644 index 0e78688a..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Hopscotch Scheme by Jan T. Sott -let g:airline#themes#base16_hopscotch#palette = {} -let s:gui00 = "#322931" -let s:gui01 = "#433b42" -let s:gui02 = "#5c545b" -let s:gui03 = "#797379" -let s:gui04 = "#989498" -let s:gui05 = "#b9b5b8" -let s:gui06 = "#d5d3d5" -let s:gui07 = "#ffffff" -let s:gui08 = "#dd464c" -let s:gui09 = "#fd8b19" -let s:gui0A = "#fdcc59" -let s:gui0B = "#8fc13e" -let s:gui0C = "#149b93" -let s:gui0D = "#1290bf" -let s:gui0E = "#c85e7c" -let s:gui0F = "#b33508" - -let s:cterm00 = 53 -let s:cterm01 = 59 -let s:cterm02 = 59 -let s:cterm03 = 96 -let s:cterm04 = 102 -let s:cterm05 = 145 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 167 -let s:cterm09 = 208 -let s:cterm0A = 221 -let s:cterm0B = 107 -let s:cterm0C = 30 -let s:cterm0D = 31 -let s:cterm0E = 168 -let s:cterm0F = 130 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_hopscotch#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_hopscotch#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_hopscotch#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_hopscotch#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_hopscotch#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_hopscotch#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_isotope.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_isotope.vim deleted file mode 100644 index aa5e0bd3..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_isotope.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Isotope Scheme by Jan T. Sott -let g:airline#themes#base16_isotope#palette = {} -let s:gui00 = "#000000" -let s:gui01 = "#404040" -let s:gui02 = "#606060" -let s:gui03 = "#808080" -let s:gui04 = "#c0c0c0" -let s:gui05 = "#d0d0d0" -let s:gui06 = "#e0e0e0" -let s:gui07 = "#ffffff" -let s:gui08 = "#ff0000" -let s:gui09 = "#ff9900" -let s:gui0A = "#ff0099" -let s:gui0B = "#33ff00" -let s:gui0C = "#00ffff" -let s:gui0D = "#0066ff" -let s:gui0E = "#cc00ff" -let s:gui0F = "#3300ff" - -let s:cterm00 = 0 -let s:cterm01 = 237 -let s:cterm02 = 241 -let s:cterm03 = 244 -let s:cterm04 = 250 -let s:cterm05 = 252 -let s:cterm06 = 253 -let s:cterm07 = 15 -let s:cterm08 = 9 -let s:cterm09 = 208 -let s:cterm0A = 198 -let s:cterm0B = 82 -let s:cterm0C = 14 -let s:cterm0D = 27 -let s:cterm0E = 165 -let s:cterm0F = 57 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_isotope#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_isotope#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_isotope#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_isotope#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_isotope#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_isotope#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_londontube.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_londontube.vim deleted file mode 100644 index b228e23d..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_londontube.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 London Tube Scheme by Jan T. Sott -let g:airline#themes#base16_londontube#palette = {} -let s:gui00 = "#231f20" -let s:gui01 = "#1c3f95" -let s:gui02 = "#5a5758" -let s:gui03 = "#737171" -let s:gui04 = "#959ca1" -let s:gui05 = "#d9d8d8" -let s:gui06 = "#e7e7e8" -let s:gui07 = "#ffffff" -let s:gui08 = "#ee2e24" -let s:gui09 = "#f386a1" -let s:gui0A = "#ffd204" -let s:gui0B = "#00853e" -let s:gui0C = "#85cebc" -let s:gui0D = "#009ddc" -let s:gui0E = "#98005d" -let s:gui0F = "#b06110" - -let s:cterm00 = 0 -let s:cterm01 = 24 -let s:cterm02 = 59 -let s:cterm03 = 59 -let s:cterm04 = 109 -let s:cterm05 = 188 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 1 -let s:cterm09 = 211 -let s:cterm0A = 220 -let s:cterm0B = 29 -let s:cterm0C = 115 -let s:cterm0D = 38 -let s:cterm0E = 89 -let s:cterm0F = 130 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_londontube#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_londontube#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_londontube#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_londontube#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_londontube#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_londontube#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim deleted file mode 100644 index e6cd4590..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Marrakesh Scheme by Alexandre Gavioli (http://github.com/Alexx2/) -let g:airline#themes#base16_marrakesh#palette = {} -let s:gui00 = "#201602" -let s:gui01 = "#302e00" -let s:gui02 = "#5f5b17" -let s:gui03 = "#6c6823" -let s:gui04 = "#86813b" -let s:gui05 = "#948e48" -let s:gui06 = "#ccc37a" -let s:gui07 = "#faf0a5" -let s:gui08 = "#c35359" -let s:gui09 = "#b36144" -let s:gui0A = "#a88339" -let s:gui0B = "#18974e" -let s:gui0C = "#75a738" -let s:gui0D = "#477ca1" -let s:gui0E = "#8868b3" -let s:gui0F = "#b3588e" - -let s:cterm00 = 0 -let s:cterm01 = 52 -let s:cterm02 = 58 -let s:cterm03 = 58 -let s:cterm04 = 101 -let s:cterm05 = 101 -let s:cterm06 = 180 -let s:cterm07 = 229 -let s:cterm08 = 131 -let s:cterm09 = 131 -let s:cterm0A = 137 -let s:cterm0B = 29 -let s:cterm0C = 107 -let s:cterm0D = 67 -let s:cterm0E = 97 -let s:cterm0F = 132 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_marrakesh#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_marrakesh#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_marrakesh#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_marrakesh#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_marrakesh#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_marrakesh#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_mocha.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_mocha.vim deleted file mode 100644 index 1097c95f..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_mocha.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Mocha Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_mocha#palette = {} -let s:gui00 = "#3B3228" -let s:gui01 = "#534636" -let s:gui02 = "#645240" -let s:gui03 = "#7e705a" -let s:gui04 = "#b8afad" -let s:gui05 = "#d0c8c6" -let s:gui06 = "#e9e1dd" -let s:gui07 = "#f5eeeb" -let s:gui08 = "#cb6077" -let s:gui09 = "#d28b71" -let s:gui0A = "#f4bc87" -let s:gui0B = "#beb55b" -let s:gui0C = "#7bbda4" -let s:gui0D = "#8ab3b5" -let s:gui0E = "#a89bb9" -let s:gui0F = "#bb9584" - -let s:cterm00 = 58 -let s:cterm01 = 59 -let s:cterm02 = 59 -let s:cterm03 = 95 -let s:cterm04 = 145 -let s:cterm05 = 188 -let s:cterm06 = 188 -let s:cterm07 = 230 -let s:cterm08 = 168 -let s:cterm09 = 173 -let s:cterm0A = 216 -let s:cterm0B = 143 -let s:cterm0C = 109 -let s:cterm0D = 109 -let s:cterm0E = 139 -let s:cterm0F = 138 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_mocha#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_mocha#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_mocha#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_mocha#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_mocha#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_mocha#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_monokai.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_monokai.vim deleted file mode 100644 index fe1b7742..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_monokai.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Monokai Scheme by Wimer Hazenberg (http://www.monokai.nl) -let g:airline#themes#base16_monokai#palette = {} -let s:gui00 = "#272822" -let s:gui01 = "#383830" -let s:gui02 = "#49483e" -let s:gui03 = "#75715e" -let s:gui04 = "#a59f85" -let s:gui05 = "#f8f8f2" -let s:gui06 = "#f5f4f1" -let s:gui07 = "#f9f8f5" -let s:gui08 = "#f92672" -let s:gui09 = "#fd971f" -let s:gui0A = "#f4bf75" -let s:gui0B = "#a6e22e" -let s:gui0C = "#a1efe4" -let s:gui0D = "#66d9ef" -let s:gui0E = "#ae81ff" -let s:gui0F = "#cc6633" - -let s:cterm00 = 0 -let s:cterm01 = 59 -let s:cterm02 = 59 -let s:cterm03 = 95 -let s:cterm04 = 144 -let s:cterm05 = 15 -let s:cterm06 = 15 -let s:cterm07 = 15 -let s:cterm08 = 197 -let s:cterm09 = 208 -let s:cterm0A = 216 -let s:cterm0B = 3 -let s:cterm0C = 158 -let s:cterm0D = 81 -let s:cterm0E = 141 -let s:cterm0F = 167 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_monokai#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_monokai#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_monokai#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_monokai#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_monokai#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_monokai#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ocean.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ocean.vim deleted file mode 100644 index b1a76dd8..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_ocean.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Ocean Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_ocean#palette = {} -let s:gui00 = "#2b303b" -let s:gui01 = "#343d46" -let s:gui02 = "#4f5b66" -let s:gui03 = "#65737e" -let s:gui04 = "#a7adba" -let s:gui05 = "#c0c5ce" -let s:gui06 = "#dfe1e8" -let s:gui07 = "#eff1f5" -let s:gui08 = "#bf616a" -let s:gui09 = "#d08770" -let s:gui0A = "#ebcb8b" -let s:gui0B = "#a3be8c" -let s:gui0C = "#96b5b4" -let s:gui0D = "#8fa1b3" -let s:gui0E = "#b48ead" -let s:gui0F = "#ab7967" - -let s:cterm00 = 23 -let s:cterm01 = 59 -let s:cterm02 = 59 -let s:cterm03 = 60 -let s:cterm04 = 145 -let s:cterm05 = 152 -let s:cterm06 = 188 -let s:cterm07 = 15 -let s:cterm08 = 131 -let s:cterm09 = 173 -let s:cterm0A = 186 -let s:cterm0B = 144 -let s:cterm0C = 109 -let s:cterm0D = 109 -let s:cterm0E = 139 -let s:cterm0F = 137 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_ocean#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_ocean#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_ocean#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_ocean#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_ocean#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_ocean#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim deleted file mode 100644 index 1277b315..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Paraiso Scheme by Jan T. Sott -let g:airline#themes#base16_paraiso#palette = {} -let s:gui00 = "#2f1e2e" -let s:gui01 = "#41323f" -let s:gui02 = "#4f424c" -let s:gui03 = "#776e71" -let s:gui04 = "#8d8687" -let s:gui05 = "#a39e9b" -let s:gui06 = "#b9b6b0" -let s:gui07 = "#e7e9db" -let s:gui08 = "#ef6155" -let s:gui09 = "#f99b15" -let s:gui0A = "#fec418" -let s:gui0B = "#48b685" -let s:gui0C = "#5bc4bf" -let s:gui0D = "#06b6ef" -let s:gui0E = "#815ba4" -let s:gui0F = "#e96ba8" - -let s:cterm00 = 0 -let s:cterm01 = 59 -let s:cterm02 = 59 -let s:cterm03 = 95 -let s:cterm04 = 102 -let s:cterm05 = 144 -let s:cterm06 = 145 -let s:cterm07 = 188 -let s:cterm08 = 203 -let s:cterm09 = 208 -let s:cterm0A = 220 -let s:cterm0B = 72 -let s:cterm0C = 79 -let s:cterm0D = 39 -let s:cterm0E = 97 -let s:cterm0F = 169 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_paraiso#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_paraiso#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_paraiso#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_paraiso#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_paraiso#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_paraiso#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_pop.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_pop.vim deleted file mode 100644 index 08887034..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_pop.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Pop Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_pop#palette = {} -let s:gui00 = "#000000" -let s:gui01 = "#202020" -let s:gui02 = "#303030" -let s:gui03 = "#505050" -let s:gui04 = "#b0b0b0" -let s:gui05 = "#d0d0d0" -let s:gui06 = "#e0e0e0" -let s:gui07 = "#ffffff" -let s:gui08 = "#eb008a" -let s:gui09 = "#f29333" -let s:gui0A = "#f8ca12" -let s:gui0B = "#37b349" -let s:gui0C = "#00aabb" -let s:gui0D = "#0e5a94" -let s:gui0E = "#b31e8d" -let s:gui0F = "#7a2d00" - -let s:cterm00 = 0 -let s:cterm01 = 234 -let s:cterm02 = 236 -let s:cterm03 = 239 -let s:cterm04 = 249 -let s:cterm05 = 252 -let s:cterm06 = 253 -let s:cterm07 = 15 -let s:cterm08 = 162 -let s:cterm09 = 209 -let s:cterm0A = 220 -let s:cterm0B = 71 -let s:cterm0C = 37 -let s:cterm0D = 24 -let s:cterm0E = 126 -let s:cterm0F = 88 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_pop#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_pop#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_pop#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_pop#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_pop#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_pop#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim deleted file mode 100644 index 771a5b15..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Railscasts Scheme by Ryan Bates (http://railscasts.com) -let g:airline#themes#base16_railscasts#palette = {} -let s:gui00 = "#2b2b2b" -let s:gui01 = "#272935" -let s:gui02 = "#3a4055" -let s:gui03 = "#5a647e" -let s:gui04 = "#d4cfc9" -let s:gui05 = "#e6e1dc" -let s:gui06 = "#f4f1ed" -let s:gui07 = "#f9f7f3" -let s:gui08 = "#da4939" -let s:gui09 = "#cc7833" -let s:gui0A = "#ffc66d" -let s:gui0B = "#a5c261" -let s:gui0C = "#519f50" -let s:gui0D = "#6d9cbe" -let s:gui0E = "#b6b3eb" -let s:gui0F = "#bc9458" - -let s:cterm00 = 235 -let s:cterm01 = 17 -let s:cterm02 = 59 -let s:cterm03 = 60 -let s:cterm04 = 188 -let s:cterm05 = 188 -let s:cterm06 = 15 -let s:cterm07 = 15 -let s:cterm08 = 167 -let s:cterm09 = 173 -let s:cterm0A = 221 -let s:cterm0B = 143 -let s:cterm0C = 71 -let s:cterm0D = 73 -let s:cterm0E = 146 -let s:cterm0F = 137 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_railscasts#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_railscasts#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_railscasts#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_railscasts#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_railscasts#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_railscasts#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim deleted file mode 100644 index a5182653..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 shapeshifter Scheme by Tyler Benziger (http://tybenz.com) -let g:airline#themes#base16_shapeshifter#palette = {} -let s:gui00 = "#000000" -let s:gui01 = "#040404" -let s:gui02 = "#102015" -let s:gui03 = "#343434" -let s:gui04 = "#555555" -let s:gui05 = "#ababab" -let s:gui06 = "#e0e0e0" -let s:gui07 = "#f9f9f9" -let s:gui08 = "#e92f2f" -let s:gui09 = "#e09448" -let s:gui0A = "#dddd13" -let s:gui0B = "#0ed839" -let s:gui0C = "#23edda" -let s:gui0D = "#3b48e3" -let s:gui0E = "#f996e2" -let s:gui0F = "#69542d" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 0 -let s:cterm03 = 236 -let s:cterm04 = 240 -let s:cterm05 = 248 -let s:cterm06 = 253 -let s:cterm07 = 15 -let s:cterm08 = 1 -let s:cterm09 = 173 -let s:cterm0A = 3 -let s:cterm0B = 41 -let s:cterm0C = 50 -let s:cterm0D = 12 -let s:cterm0E = 212 -let s:cterm0F = 58 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_shapeshifter#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_shapeshifter#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_shapeshifter#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_shapeshifter#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_shapeshifter#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_shapeshifter#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_solarized.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_solarized.vim deleted file mode 100644 index 81edd567..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_solarized.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Solarized Scheme by Ethan Schoonover (http://ethanschoonover.com/solarized) -let g:airline#themes#base16_solarized#palette = {} -let s:gui00 = "#002b36" -let s:gui01 = "#073642" -let s:gui02 = "#586e75" -let s:gui03 = "#657b83" -let s:gui04 = "#839496" -let s:gui05 = "#93a1a1" -let s:gui06 = "#eee8d5" -let s:gui07 = "#fdf6e3" -let s:gui08 = "#dc322f" -let s:gui09 = "#cb4b16" -let s:gui0A = "#b58900" -let s:gui0B = "#859900" -let s:gui0C = "#2aa198" -let s:gui0D = "#268bd2" -let s:gui0E = "#6c71c4" -let s:gui0F = "#d33682" - -let s:cterm00 = 17 -let s:cterm01 = 23 -let s:cterm02 = 60 -let s:cterm03 = 66 -let s:cterm04 = 102 -let s:cterm05 = 109 -let s:cterm06 = 224 -let s:cterm07 = 230 -let s:cterm08 = 166 -let s:cterm09 = 166 -let s:cterm0A = 136 -let s:cterm0B = 100 -let s:cterm0C = 36 -let s:cterm0D = 32 -let s:cterm0E = 12 -let s:cterm0F = 168 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_solarized#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_solarized#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_solarized#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_solarized#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_solarized#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_solarized#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim deleted file mode 100644 index 4bafd59c..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Summerfruit Scheme by Christopher Corley (http://cscorley.github.io/) -let g:airline#themes#base16_summerfruit#palette = {} -let s:gui00 = "#151515" -let s:gui01 = "#202020" -let s:gui02 = "#303030" -let s:gui03 = "#505050" -let s:gui04 = "#B0B0B0" -let s:gui05 = "#D0D0D0" -let s:gui06 = "#E0E0E0" -let s:gui07 = "#FFFFFF" -let s:gui08 = "#FF0086" -let s:gui09 = "#FD8900" -let s:gui0A = "#ABA800" -let s:gui0B = "#00C918" -let s:gui0C = "#1faaaa" -let s:gui0D = "#3777E6" -let s:gui0E = "#AD00A1" -let s:gui0F = "#cc6633" - -let s:cterm00 = 233 -let s:cterm01 = 234 -let s:cterm02 = 236 -let s:cterm03 = 239 -let s:cterm04 = 249 -let s:cterm05 = 252 -let s:cterm06 = 253 -let s:cterm07 = 15 -let s:cterm08 = 198 -let s:cterm09 = 208 -let s:cterm0A = 142 -let s:cterm0B = 2 -let s:cterm0C = 37 -let s:cterm0D = 68 -let s:cterm0E = 127 -let s:cterm0F = 167 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_summerfruit#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_summerfruit#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_summerfruit#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_summerfruit#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_summerfruit#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_summerfruit#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim deleted file mode 100644 index f8128bca..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Tomorrow Scheme by Chris Kempson (http://chriskempson.com) -let g:airline#themes#base16_tomorrow#palette = {} -let s:gui00 = "#1d1f21" -let s:gui01 = "#282a2e" -let s:gui02 = "#373b41" -let s:gui03 = "#969896" -let s:gui04 = "#b4b7b4" -let s:gui05 = "#c5c8c6" -let s:gui06 = "#e0e0e0" -let s:gui07 = "#ffffff" -let s:gui08 = "#cc6666" -let s:gui09 = "#de935f" -let s:gui0A = "#f0c674" -let s:gui0B = "#b5bd68" -let s:gui0C = "#8abeb7" -let s:gui0D = "#81a2be" -let s:gui0E = "#b294bb" -let s:gui0F = "#a3685a" - -let s:cterm00 = 0 -let s:cterm01 = 0 -let s:cterm02 = 59 -let s:cterm03 = 102 -let s:cterm04 = 145 -let s:cterm05 = 188 -let s:cterm06 = 253 -let s:cterm07 = 15 -let s:cterm08 = 167 -let s:cterm09 = 173 -let s:cterm0A = 222 -let s:cterm0B = 143 -let s:cterm0C = 109 -let s:cterm0D = 109 -let s:cterm0E = 139 -let s:cterm0F = 131 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_tomorrow#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_tomorrow#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_tomorrow#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_tomorrow#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_tomorrow#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_tomorrow#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_twilight.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_twilight.vim deleted file mode 100644 index fa82418a..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16_twilight.vim +++ /dev/null @@ -1,73 +0,0 @@ -" vim-airline template by chartoin (http://github.com/chartoin) -" Base 16 Twilight Scheme by David Hart (http://hart-dev.com) -let g:airline#themes#base16_twilight#palette = {} -let s:gui00 = "#1e1e1e" -let s:gui01 = "#323537" -let s:gui02 = "#464b50" -let s:gui03 = "#5f5a60" -let s:gui04 = "#838184" -let s:gui05 = "#a7a7a7" -let s:gui06 = "#c3c3c3" -let s:gui07 = "#ffffff" -let s:gui08 = "#cf6a4c" -let s:gui09 = "#cda869" -let s:gui0A = "#f9ee98" -let s:gui0B = "#8f9d6a" -let s:gui0C = "#afc4db" -let s:gui0D = "#7587a6" -let s:gui0E = "#9b859d" -let s:gui0F = "#9b703f" - -let s:cterm00 = 234 -let s:cterm01 = 59 -let s:cterm02 = 59 -let s:cterm03 = 59 -let s:cterm04 = 102 -let s:cterm05 = 248 -let s:cterm06 = 251 -let s:cterm07 = 15 -let s:cterm08 = 167 -let s:cterm09 = 179 -let s:cterm0A = 228 -let s:cterm0B = 107 -let s:cterm0C = 152 -let s:cterm0D = 103 -let s:cterm0E = 103 -let s:cterm0F = 95 - -let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] -let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_twilight#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] -let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_twilight#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - -let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] -let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_twilight#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - -let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] -let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] -let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] -let g:airline#themes#base16_twilight#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - -let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] -let g:airline#themes#base16_twilight#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#base16_twilight#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], - \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], - \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16color.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16color.vim deleted file mode 100644 index 6c0a1d70..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/base16color.vim +++ /dev/null @@ -1,77 +0,0 @@ -" Normal mode -" [ guifg, guibg, ctermfg, ctermbg, opts ] -let s:N1 = [ '#141413' , '#CAE682' , 232 , 'green' ] " mode -let s:N2 = [ '#CAE682' , '#32322F' , 'green' , 235 ] " info -let s:N3 = [ '#CAE682' , '#242424' , 'green' , 234 ] " statusline -let s:N4 = [ '#86CD74' , 'DarkGreen' ] " mode modified - -" Insert mode -let s:I1 = [ '#141413' , '#FDE76E' , 232 , 'yellow' ] -let s:I2 = [ '#FDE76E' , '#32322F' , 'yellow' , 235 ] -let s:I3 = [ '#FDE76E' , '#242424' , 'yellow' , 234 ] -let s:I4 = [ '#FADE3E' , 'yellow' ] - -" Visual mode -let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 'blue' ] -let s:V2 = [ '#B5D3F3' , '#32322F' , 'blue' , 235 ] -let s:V3 = [ '#B5D3F3' , '#242424' , 'blue' , 234 ] -let s:V4 = [ '#7CB0E6' , 'blue' ] - -" Replace mode -let s:R1 = [ '#141413' , '#E5786D' , 232 , 'red' ] -let s:R2 = [ '#E5786D' , '#32322F' , 'red' , 235 ] -let s:R3 = [ '#E5786D' , '#242424' , 'red' , 234 ] -let s:R4 = [ '#E55345' , 'red' ] - -" Paste mode -let s:PA = [ '#94E42C' , 005 ] - -" Info modified -let s:IM = [ '#40403C' , 236 ] - -" Inactive mode -let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] - -let g:airline#themes#base16color#palette = {} - -let g:airline#themes#base16color#palette.accents = { - \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], - \ } - -let g:airline#themes#base16color#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#base16color#palette.normal_modified = { - \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , - \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#base16color#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#base16color#palette.insert_modified = { - \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , - \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#base16color#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#base16color#palette.visual_modified = { - \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , - \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#base16color#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) -let g:airline#themes#base16color#palette.replace_modified = { - \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , - \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#base16color#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , - \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } - - -let g:airline#themes#base16color#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#base16color#palette.inactive_modified = { - \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/behelit.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/behelit.vim deleted file mode 100644 index 77f551c7..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/behelit.vim +++ /dev/null @@ -1,58 +0,0 @@ -let g:airline#themes#behelit#palette = {} - -" Normal mode -let s:N1 = [ '#121212', '#5f87ff', 233, 69 ] -let s:N2 = [ '#5f87ff', '#262626', 69 , 235 ] -let s:N3 = [ '#5f87ff', '#1c1c1c', 69 , 234, 'bold' ] -let g:airline#themes#behelit#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#behelit#palette.normal_modified = { - \ 'airline_c': [ '#d7005f', '#1c1c1c', 161, 234, 'bold' ], - \ } - -" Insert mode -let s:I1 = [ '#121212', '#00ff87', 233, 48 ] -let s:I2 = s:N2 -let s:I3 = s:N3 -let g:airline#themes#behelit#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#behelit#palette.insert_modified = g:airline#themes#behelit#palette.normal_modified -let g:airline#themes#behelit#palette.insert_paste = { - \ 'airline_a': [ "#121212", "#5f5faf", 233, 61, '' ], - \ } - -" Replace mode -let g:airline#themes#behelit#palette.replace = copy(g:airline#themes#behelit#palette.insert) -let g:airline#themes#behelit#palette.replace.airline_a = [ s:I1[0], '#d70057', s:I1[2], 161, '' ] -let g:airline#themes#behelit#palette.replace_modified = g:airline#themes#behelit#palette.insert_modified - -" Visual mode -let s:V1 = [ '#121212', '#5fff5f', 233, 83 ] -let s:V2 = s:N2 -let s:V3 = s:N3 -let g:airline#themes#behelit#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#behelit#palette.visual_modified = g:airline#themes#behelit#palette.normal_modified - -" Inactive window -let s:IA1 = [ '#4e4e4e', '#1c1c1c', 239, 234, '' ] -let s:IA2 = [ '#4e4e4e', '#262626', 239, 235, '' ] -let s:IA3 = [ '#4e4e4e', '#1c1c1c', 239, 234, 'bold' ] -let g:airline#themes#behelit#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) -let g:airline#themes#behelit#palette.inactive_modified = { - \ 'airline_c': [ '#5f5f87', '#1c1c1c', 60, 234, 'bold' ], - \ } - -" Accents -let g:airline#themes#behelit#palette.accents = { - \ 'red': [ '#d7005f', '', 161, '' ] - \ } - -" Warnings -let s:WI = [ '#121212', '#d7005f', 233, 161 ] -let g:airline#themes#behelit#palette.normal.airline_warning = s:WI -let g:airline#themes#behelit#palette.normal_modified.airline_warning = s:WI -let g:airline#themes#behelit#palette.insert.airline_warning = s:WI -let g:airline#themes#behelit#palette.insert_modified.airline_warning = s:WI -let g:airline#themes#behelit#palette.insert_paste.airline_warning = s:WI -let g:airline#themes#behelit#palette.visual.airline_warning = s:WI -let g:airline#themes#behelit#palette.visual_modified.airline_warning = s:WI -let g:airline#themes#behelit#palette.replace.airline_warning = s:WI -let g:airline#themes#behelit#palette.replace_modified.airline_warning = s:WI diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/bubblegum.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/bubblegum.vim deleted file mode 100644 index f2378ce8..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/bubblegum.vim +++ /dev/null @@ -1,70 +0,0 @@ -" Color palette -let s:gui_dark_gray = '#303030' -let s:cterm_dark_gray = 236 -let s:gui_med_gray_hi = '#444444' -let s:cterm_med_gray_hi = 238 -let s:gui_med_gray_lo = '#3a3a3a' -let s:cterm_med_gray_lo = 237 -let s:gui_light_gray = '#b2b2b2' -let s:cterm_light_gray = 249 -let s:gui_green = '#afd787' -let s:cterm_green = 150 -let s:gui_blue = '#87afd7' -let s:cterm_blue = 110 -let s:gui_purple = '#afafd7' -let s:cterm_purple = 146 -let s:gui_orange = '#d7af5f' -let s:cterm_orange = 179 -let s:gui_red = '#d78787' -let s:cterm_red = 174 -let s:gui_pink = '#d7afd7' -let s:cterm_pink = 182 - -let g:airline#themes#bubblegum#palette = {} - -" Normal mode -let s:N1 = [s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green] -let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] -let s:N3 = [s:gui_green, s:gui_med_gray_hi, s:cterm_green, s:cterm_med_gray_hi] -let g:airline#themes#bubblegum#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#bubblegum#palette.normal_modified = { - \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, ''], - \ } - -" Insert mode -let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] -let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] -let g:airline#themes#bubblegum#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) -let g:airline#themes#bubblegum#palette.insert_modified = copy(g:airline#themes#bubblegum#palette.normal_modified) -let g:airline#themes#bubblegum#palette.insert_paste = { - \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], - \ } - -" Replace mode -let g:airline#themes#bubblegum#palette.replace = { - \ 'airline_a': [s:gui_dark_gray, s:gui_red, s:cterm_dark_gray, s:cterm_red, ''], - \ 'airline_c': [s:gui_red, s:gui_med_gray_hi, s:cterm_red, s:cterm_med_gray_hi, ''], - \ } -let g:airline#themes#bubblegum#palette.replace_modified = copy(g:airline#themes#bubblegum#palette.insert_modified) - -" Visual mode -let s:V1 = [s:gui_dark_gray, s:gui_pink, s:cterm_dark_gray, s:cterm_pink] -let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:cterm_pink, s:cterm_med_gray_hi] -let g:airline#themes#bubblegum#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) -let g:airline#themes#bubblegum#palette.visual_modified = copy(g:airline#themes#bubblegum#palette.insert_modified) - -" Inactive window -let s:IA = [s:gui_light_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi, ''] -let g:airline#themes#bubblegum#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#bubblegum#palette.inactive_modified = { - \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], - \ } - -" CtrlP -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#bubblegum#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, '' ] , - \ [ s:gui_orange, s:gui_med_gray_lo, s:cterm_orange, s:cterm_med_gray_lo, '' ] , - \ [ s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green, 'bold' ] ) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/cool.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/cool.vim deleted file mode 100644 index 83abdb10..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/cool.vim +++ /dev/null @@ -1,65 +0,0 @@ -let g:airline#themes#cool#palette = {} - -" NORMAL -let s:N1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] -let s:N2 = [ '#E4E4E4' , '#0087AF' , 188 , 31 ] -let s:N3 = [ '#EEEEEE' , '#005F87' , 231 , 24] -let g:airline#themes#cool#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -"let g:airline#themes#cool#palette.normal_modified = { - "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - "\ } - -" INSERT -let s:I1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] -let s:I2 = [ '#E4E4E4' , '#47AF00' , 188 , 70 ] -let s:I3 = [ '#EEEEEE' , '#2E8700' , 231 , 28 ] -let g:airline#themes#cool#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -"let g:airline#themes#cool#palette.insert_modified = { - "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - "\ } -"let g:airline#themes#cool#palette.insert_paste = { - "\ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , - "\ } - -" REPLACE -let s:R1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] -let s:R2 = [ '#E4E4E4' , '#AF5F00' , 188 , 130 ] -let s:R3 = [ '#EEEEEE' , '#875300' , 231 , 94 ] -let g:airline#themes#cool#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) -"let g:airline#themes#cool#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] -"let g:airline#themes#cool#palette.replace_modified = g:airline#themes#cool#palette.insert_modified - -" VISUAL -let s:V1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] -let s:V2 = [ '#E4E4E4' , '#AF2800' , 188 , 124 ] -let s:V3 = [ '#EEEEEE' , '#872800' , 231 , 88 ] -let g:airline#themes#cool#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -"let g:airline#themes#cool#palette.visual_modified = { - "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - "\ } - -" INACTIVE -let s:IA1 = [ '#585858' , '#E4E4E4' , 59 , 188 , '' ] -let s:IA2 = [ '#E4E4E4' , '#466D79' , 188 , 60 , '' ] -let s:IA3 = [ '#EEEEEE' , '#324E59' , 231 , 59 , '' ] -let g:airline#themes#cool#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) -"let g:airline#themes#cool#palette.inactive_modified = { - "\ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , - "\ } - - -let g:airline#themes#cool#palette.accents = { - \ 'red': [ '#ff0000' , '' , 196 , '' ] - \ } - -" CTRLP -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#cool#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#E4E4E4' , '#00AFA2' , 188 , 37 , '' ], - \ [ '#EEEEEE' , '#008787' , 231 , 30 , '' ], - \ [ '#585858' , '#E4E4E4' , 59 , 188 , '' ]) - - - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/distinguished.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/distinguished.vim deleted file mode 100644 index 0d65f4c4..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/distinguished.vim +++ /dev/null @@ -1,59 +0,0 @@ -" vim-airline companion theme of distinguished -" (https://github.com/Lokaltog/vim-distinguished) -" I have nothing to do with the original -" distinguished theme other than being a big fan. -" this theme was shamelessly created by modifying -" the Ubaryd airline theme. - -let s:gray = [245, '#8a8a8a'] -let s:golden = [143, '#afaf5f'] -let s:pink = [131, '#af5f5f'] -let s:blue = [ 67, '#5f87af'] -let s:orange = [166, '#d75f00'] -let s:outerfg = [ 16, '#000000'] -let s:innerbg = [234, '#1c1c1c'] -let s:middle = ['#bcbcbc', '#444444', 250, 238] - -" Normal mode -let s:N1 = [s:outerfg[1], s:gray[1], s:outerfg[0], s:gray[0]] -let s:N3 = [s:gray[1], s:innerbg[1], s:gray[0], s:innerbg[0]] - -" Insert mode -let s:I1 = [s:outerfg[1], s:golden[1], s:outerfg[0], s:golden[0]] -let s:I3 = [s:golden[1], s:innerbg[1], s:golden[0], s:innerbg[0]] - -" Visual mode -let s:V1 = [s:outerfg[1], s:pink[1], s:outerfg[0], s:pink[0]] -let s:V3 = [s:pink[1], s:innerbg[1], s:pink[0], s:innerbg[0]] - -" Replace mode -let s:R1 = [s:outerfg[1], s:blue[1], s:outerfg[0], s:blue[0]] -let s:R3 = [s:blue[1], s:innerbg[1], s:blue[0], s:innerbg[0]] - -" Inactive pane -let s:IA = [s:middle[1], s:innerbg[1], s:middle[3], s:innerbg[0]] - -let g:airline#themes#distinguished#palette = {} -let g:airline#themes#distinguished#palette.accents = { - \ 'red': ['#d70000', '', 160, '', '']} - -let g:airline#themes#distinguished#palette.inactive = { - \ 'airline_a': s:IA, - \ 'airline_b': s:IA, - \ 'airline_c': s:IA} - -let g:airline#themes#distinguished#palette.normal = airline#themes#generate_color_map(s:N1, s:middle, s:N3) -let g:airline#themes#distinguished#palette.normal_modified = { - \ 'airline_a': ['', s:orange[1], '', s:orange[0], ''], - \ 'airline_c': [s:orange[1], '', s:orange[0], '', ''], - \ 'airline_x': [s:orange[1], '', s:orange[0], '', ''], - \ 'airline_z': ['', s:orange[1], '', s:orange[0], '']} - -let g:airline#themes#distinguished#palette.insert = airline#themes#generate_color_map(s:I1, s:middle, s:I3) -let g:airline#themes#distinguished#palette.insert_modified = {} - -let g:airline#themes#distinguished#palette.replace = airline#themes#generate_color_map(s:R1, s:middle, s:R3) -let g:airline#themes#distinguished#palette.replace_modified = {} - -let g:airline#themes#distinguished#palette.visual = airline#themes#generate_color_map(s:V1, s:middle, s:V3) -let g:airline#themes#distinguished#palette.visual_modified = {} diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/durant.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/durant.vim deleted file mode 100644 index cb844d4e..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/durant.vim +++ /dev/null @@ -1,62 +0,0 @@ -let g:airline#themes#durant#palette = {} - - -let s:N1 = [ '#005f00' , '#afd700' , 22 , 148 ] -let s:N2 = [ '#93a1a1' , '#586e75' , 245 , 240 ] -let s:N3 = [ '#93a1a1' , '#073642' , 240 , 233 ] -let g:airline#themes#durant#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - - -let g:airline#themes#durant#normal_modified = { - \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - \ } - - - -let s:I1 = [ '#ffffff' , '#00875f' , 255 , 29 ] -let s:I2 = [ '#9e9e9e' , '#303030' , 247 , 236 ] -let s:I3 = [ '#87d7ff' , '#005f87' , 117 , 24 ] -let g:airline#themes#durant#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#durant#palette.insert_modified = { - \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - \ } -let g:airline#themes#durant#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , - \ } - - -let g:airline#themes#durant#palette.replace = copy(g:airline#themes#durant#palette.insert) -let g:airline#themes#durant#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] - -let g:airline#themes#durant#palette.replace_modified = g:airline#themes#durant#palette.insert_modified - -let s:V1 = [ '#1a1a18' , '#ffffff' , 232 , 255 ] -let s:V2 = [ '#ffffff' , '#44403a' , 255, 238 ] -let s:V3 = [ '#90a680' , '#2e2d2a' , 64, 235 ] -let g:airline#themes#durant#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#durant#palette.visual_modified = { - \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - \ } - - -let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] -let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] -let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] -let g:airline#themes#durant#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) -let g:airline#themes#durant#palette.inactive_modified = { - \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , - \ } - - -let g:airline#themes#durant#palette.accents = { - \ 'red': [ '#ff0000' , '' , 160 , '' ] - \ } - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif - let g:airline#themes#durant#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], - \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], - \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ]) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/hybrid.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/hybrid.vim deleted file mode 100644 index b0df8441..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/hybrid.vim +++ /dev/null @@ -1,58 +0,0 @@ -" vim-airline companion theme of Hybrid -" (https://github.com/w0ng/vim-hybrid) - -let g:airline#themes#hybrid#palette = {} - -function! airline#themes#hybrid#refresh() - let s:N1 = airline#themes#get_highlight('DiffAdd') - let s:N2 = airline#themes#get_highlight('CursorLine') - let s:N3 = airline#themes#get_highlight('PMenu') - let g:airline#themes#hybrid#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - - let modified_group = airline#themes#get_highlight2(['Text', 'fg'], ['SpellRare', 'bg'], 'bold') - let g:airline#themes#hybrid#palette.normal_modified = { - \ 'airline_c': airline#themes#get_highlight2(['Text', 'fg'], ['SpellRare', 'bg'], 'bold') - \ } - - let warning_group = airline#themes#get_highlight('SpellRare') - let g:airline#themes#hybrid#palette.normal.airline_warning = warning_group - let g:airline#themes#hybrid#palette.normal_modified.airline_warning = warning_group - - let s:I1 = airline#themes#get_highlight2(['Text', 'fg'], ['DiffText', 'bg'], 'bold') - let s:I2 = airline#themes#get_highlight2(['Text', 'fg'], ['SpellLocal', 'bg'], 'bold') - let s:I3 = airline#themes#get_highlight2(['Text', 'fg'], ['SpellCap', 'bg'], 'bold') - let g:airline#themes#hybrid#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - let g:airline#themes#hybrid#palette.insert_modified = g:airline#themes#hybrid#palette.normal_modified - let g:airline#themes#hybrid#palette.insert.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning - let g:airline#themes#hybrid#palette.insert_modified.airline_warning = g:airline#themes#hybrid#palette.normal_modified.airline_warning - - let s:R1 = airline#themes#get_highlight('DiffChange') - let s:R2 = s:N2 - let s:R3 = s:N3 - let g:airline#themes#hybrid#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - let replace_group = airline#themes#get_highlight('SpellRare') - let g:airline#themes#hybrid#palette.replace_modified = g:airline#themes#hybrid#palette.normal_modified - let g:airline#themes#hybrid#palette.replace.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning - let g:airline#themes#hybrid#palette.replace_modified.airline_warning = g:airline#themes#hybrid#palette.replace_modified.airline_warning - - let s:V1 = airline#themes#get_highlight2(['Text', 'fg'], ['Folded', 'bg'], 'bold') - let s:V2 = airline#themes#get_highlight2(['Text', 'fg'], ['DiffDelete', 'bg'], 'bold') - let s:V3 = airline#themes#get_highlight2(['Text', 'fg'], ['Error', 'bg'], 'bold') - let g:airline#themes#hybrid#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - let g:airline#themes#hybrid#palette.visual_modified = g:airline#themes#hybrid#palette.normal_modified - let g:airline#themes#hybrid#palette.visual.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning - let g:airline#themes#hybrid#palette.visual_modified.airline_warning = g:airline#themes#hybrid#palette.normal_modified.airline_warning - - let s:IA = airline#themes#get_highlight('StatusLineNC') - let g:airline#themes#hybrid#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) - let g:airline#themes#hybrid#palette.inactive_modified = { - \ 'airline_c': [ modified_group[0], '', modified_group[2], '', '' ] - \ } - - let g:airline#themes#hybrid#palette.accents = { - \ 'red': airline#themes#get_highlight('Constant'), - \ } - -endfunction - -call airline#themes#hybrid#refresh() diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/hybridline.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/hybridline.vim deleted file mode 100644 index 84729c13..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/hybridline.vim +++ /dev/null @@ -1,34 +0,0 @@ -" vim-airline theme based on vim-hybrid and powerline -" (https://github.com/w0ng/vim-hybrid) -" (https://github.com/Lokaltog/powerline) - -let g:airline#themes#hybridline#palette = {} - -let s:N1 = [ '#282a2e' , '#c5c8c6' , 'black' , 15 ] -let s:N2 = [ '#c5c8c6' , '#373b41' , 15 , 8 ] -let s:N3 = [ '#ffffff' , '#282a2e' , 255 , 'black' ] -let g:airline#themes#hybridline#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#hybridline#palette.normal.airline_a = ['#005f00', '#b5bd68', 22, 10, ''] - -let s:I1 = [ '#005f5f' , '#8abeb7' , 23 , 14 ] -let s:I2 = [ '#c5c8c6' , '#0087af' , 15 , 31 ] -let s:I3 = [ '#ffffff' , '#005f87' , 255 , 24 ] -let g:airline#themes#hybridline#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#hybridline#palette.insert_paste = { - \ 'airline_a': ['#000000', '#ac4142', 16 , 1, ''] , - \ } - -let g:airline#themes#hybridline#palette.replace = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#hybridline#palette.replace.airline_a = ['#000000', '#CC6666', 16, 9] - -let g:airline#themes#hybridline#palette.visual = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#hybridline#palette.visual.airline_a = ['#000000', '#de935f', 16, 3] - -let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] -let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] -let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] -let g:airline#themes#hybridline#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -let g:airline#themes#hybridline#palette.accents = { - \ 'red': [ '#ff0000' , '' , 160 , '' ] - \ } diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/jellybeans.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/jellybeans.vim deleted file mode 100644 index 3b72a1f5..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/jellybeans.vim +++ /dev/null @@ -1,88 +0,0 @@ -" Color palette -let s:gui00 = "#151515" -let s:gui01 = "#262626" -let s:gui02 = "#4f5b66" -let s:gui03 = "#65737e" -let s:gui04 = "#a7adba" -let s:gui05 = "#c0c5ce" -let s:gui06 = "#cdd3de" -let s:gui07 = "#d8dee9" -let s:gui08 = "#870000" -let s:gui09 = "#f99157" -let s:gui0A = "#fac863" -let s:gui0B = "#437019" -let s:gui0C = "#5fb3b3" -let s:gui0D = "#0d61ac" -let s:gui0E = "#c594c5" -let s:gui0F = "#ab7967" - -let s:cterm00 = "233" -let s:cterm01 = "235" -let s:cterm02 = "59" -let s:cterm03 = "66" -let s:cterm04 = "145" -let s:cterm05 = "152" -let s:cterm06 = "188" -let s:cterm07 = "189" -let s:cterm08 = "88" -let s:cterm09 = "209" -let s:cterm0A = "221" -let s:cterm0B = "22" -let s:cterm0C = "73" -let s:cterm0D = "25" -let s:cterm0E = "176" -let s:cterm0F = "137" - -let s:guiWhite = "#ffffff" -let s:guiGray = "#666666" -let s:ctermWhite = "231" -let s:ctermGray = "243" - -let g:airline#themes#jellybeans#palette = {} -let s:modified = { 'airline_c': [ '#ffb964', '', 215, '', '' ] } - -" Normal mode -let s:N1 = [ s:gui07 , s:gui0D , s:cterm07 , s:cterm0D ] -let s:N2 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ] -let s:N3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] -let g:airline#themes#jellybeans#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#jellybeans#palette.normal_modified = s:modified - -" Insert mode -let s:I1 = [ s:guiWhite , s:gui0B , s:ctermWhite , s:cterm0B ] -let s:I2 = s:N2 -let s:I3 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm00 ] -let g:airline#themes#jellybeans#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#jellybeans#palette.insert_modified = s:modified - -" Visual mode -let s:V1 = [ s:guiWhite , s:gui08 , s:ctermWhite , s:cterm08 ] -let s:V2 = s:N2 -let s:V3 = s:I3 -let g:airline#themes#jellybeans#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#jellybeans#palette.visual_modified = s:modified - -" Replace mode -let s:R1 = [ s:gui08 , s:gui01 , s:cterm08, s:cterm00 ] -let s:R2 = s:N2 -let s:R3 = s:I3 -let g:airline#themes#jellybeans#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) -let g:airline#themes#jellybeans#palette.replace_modified = s:modified - -" Inactive mode -let s:IN1 = [ s:guiGray , s:gui01 , s:ctermGray , s:cterm01 ] -let s:IN2 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] -let s:IN3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] -let g:airline#themes#jellybeans#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) -let g:airline#themes#jellybeans#palette.inactive_modified = s:modified - -" CtrlP -if !get(g:, 'loaded_ctrlp', 0) - finish -endif - -let s:CP1 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ] -let s:CP2 = [ s:guiWhite , s:gui03 , s:ctermWhite , s:cterm01 ] -let s:CP3 = [ s:guiWhite , s:gui0D , s:ctermWhite , s:cterm0D ] - -let g:airline#themes#jellybeans#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/kalisi.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/kalisi.vim deleted file mode 100644 index 78504fab..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/kalisi.vim +++ /dev/null @@ -1,70 +0,0 @@ -" -" Colorscheme: Kalisi for airline. Inspired by powerline. -" Arthur Jaron -" hifreeo@gmail.com -" 24.10.2014 - -" Visual mode -let s:V1 = [ '#0087ff' , '#ffffff','33','231'] -let s:V2 = [ '#005faf' , '#5fafff','25','75'] -let s:V3 = [ '#87d7ff' , '#005faf','117','25'] - -" Replace mode -let s:R1 = [ '#d75fff' , '#ffffff','171','231'] -let s:R2 = [ '#5f005f' , '#d75fff','53','171'] -let s:R3 = [ '#ff87ff' , '#8700af','213','91'] - -let g:airline#themes#kalisi#palette = {} - - -function! airline#themes#kalisi#refresh() - - let s:StatusLine = airline#themes#get_highlight('StatusLine') - let s:StatusLineNC = airline#themes#get_highlight('StatusLineNC') - - " Insert mode - let s:I1 = [ '#ffffff' , '#e80000','231','160'] - let s:I2 = [ '#ff0000' , '#5f0000','196','52'] - let s:I3 = s:StatusLine - - " Normal mode - let s:N1 = [ '#005f00' , '#afd700','22','148'] - let s:N2 = [ '#afd700' , '#005f00','148','22'] - let s:N3 = s:StatusLine - - " Tabline Plugin - let g:airline#themes#kalisi#palette.tabline = { - \ 'airline_tab': ['#bcbcbc', '#005f00','250','22'], - \ 'airline_tabsel': ['#404042', '#A6DB29','238','148'], - \ 'airline_tabtype':['#afd700', '#204d20','148','22'], - \ 'airline_tabfill': s:StatusLine, - \ 'airline_tabhid': ['#c5c5c5', '#404042','251','238'], - \ 'airline_tabmod': ['#d7ff00', '#afd700','190','148'], - \ 'airline_tabmod_unsel': ['#d7ff00', '#005f00','190','22'] - \ } - - let g:airline#themes#kalisi#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - let g:airline#themes#kalisi#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - let g:airline#themes#kalisi#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - let g:airline#themes#kalisi#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - - " Inactive Mode - let s:IA = airline#themes#get_highlight('StatusLineNC') - let g:airline#themes#kalisi#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) - let g:airline#themes#kalisi#palette.inactive_modified = { - \ 'airline_c': ['#d7ff00', s:IA[1],'190',s:IA[3]], - \ } - -endfunction - -call airline#themes#kalisi#refresh() - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#kalisi#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ s:StatusLine, - \ ['#afd700', '#005f00','148','22'], - \ [ '#005f00' , '#afd700' , '22','148'] - \) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/kolor.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/kolor.vim deleted file mode 100644 index e61f56f2..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/kolor.vim +++ /dev/null @@ -1,59 +0,0 @@ -let g:airline#themes#kolor#palette = {} - -let s:N1 = [ '#e2e2e2' , '#4f3598' , 254 , 56 ] -let s:N2 = [ '#ff5fd7' , '#242322' , 206 , 234 ] -let s:N3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] - -let g:airline#themes#kolor#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let g:airline#themes#kolor#palette.normal_modified = { - \ 'airline_c': [ '#e2e2e2' , '#4f3598' , 254 , 56 , '' ] , - \ } - - -let s:I1 = [ '#242322' , '#7eaefd' , 234 , 111 ] -let s:I2 = [ '#75d7d8' , '#242322' , 80 , 234 ] -let s:I3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] -let g:airline#themes#kolor#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#kolor#palette.insert_modified = { - \ 'airline_c': [ '#242322' , '#7eaefd' , 234 , 111 , '' ] , - \ } - - -let g:airline#themes#kolor#palette.replace = copy(g:airline#themes#kolor#palette.insert) -let g:airline#themes#kolor#palette.replace.airline_a = [ s:I2[0] , '#005154' , s:I2[2] , 23 , '' ] -let g:airline#themes#kolor#palette.replace_modified = { - \ 'airline_c': [ '#e2e2e2' , '#005154' , 254 , 23 , '' ] , - \ } - - -let s:V1 = [ '#242322' , '#e6987a' , 234 , 180 ] -let s:V2 = [ '#dbc570' , '#242322' , 186 , 234 ] -let s:V3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] -let g:airline#themes#kolor#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#kolor#palette.visual_modified = { - \ 'airline_c': [ '#242322' , '#e6987a' , 234 , 180 , '' ] , - \ } - - -let s:IA1 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 , '' ] -let s:IA2 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 ] -let s:IA3 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 , '' ] -let g:airline#themes#kolor#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) -let g:airline#themes#kolor#palette.inactive_modified = { - \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , - \ } - - -let g:airline#themes#kolor#palette.accents = { - \ 'red': [ '#d96e8a' , '' , 168 , '' ] - \ } - - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#kolor#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#e2e2e2' , '#4a4a4a' , 254 , 238 , '' ], - \ [ '#e2e2e2' , '#242322' , 254 , 234 , '' ], - \ [ '#e2e2e2' , '#4f3598' , 254 , 56 , 'bold' ]) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/laederon.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/laederon.vim deleted file mode 100644 index 115c1079..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/laederon.vim +++ /dev/null @@ -1,62 +0,0 @@ -" vim-airline companion theme of Laederon -" (https://github.com/Donearm/Laederon) - -" Normal mode -let s:N1 = [ '#1a1a18' , '#ffffff' , 232 , 255 ] " blackestgravel & snow -let s:N2 = [ '#ffffff' , '#44403a' , 255, 238 ] " snow & deepgravel -let s:N3 = [ '#90a680' , '#2e2d2a' , 64, 235 ] " dilutedpaint & darkgravel -let s:N4 = [ '#777470' , 240 ] " gravel - -" Insert mode -let s:I1 = [ '#1a1a18' , '#1693a5' , 232 , 62 ] " blackestgravel & crystallake -let s:I2 = [ '#515744' , '#44403a' , 101 , 238 ] " lichen & deepgravel -let s:I3 = [ '#1693a5' , '#2e2d2a' , 39 , 235 ] " crystallake & darkgravel - -" Visual mode -let s:V1 = [ '#1a1a18' , '#ab3e5d' , 232 , 161 ] " blackestgravel & raspberry -let s:V2 = [ '#000000' , '#908571' , 16 , 252 ] " coal & winterterrain -let s:V3 = [ '#ab3e5d' , '#8c7f77' , 161 , 245 ] " raspberry & wetcoldterrain -let s:V4 = [ '#515744' , 101 ] " lichen - -" Replace mode -let s:RE = [ '#233e09' , 22 ] " oakleaf - -" Paste mode -let s:PA = [ '#ab3e5d' , 161 ] " raspberry - -let s:IA = [ s:N2[1] , s:N3[1] , s:N2[3], s:N3[3] , '' ] - - -let g:airline#themes#laederon#palette = {} - -let g:airline#themes#laederon#palette.accents = { - \ 'red': [ '#ef393d' , '' , 196 , '' , '' ] - \ } - -let g:airline#themes#laederon#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#laederon#palette.normal_modified = { - \ 'airline_a' : [ s:N2[0] , s:N4[0] , s:N2[2] , s:N4[1] , '' ] , - \ 'airline_c' : [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } - - -let g:airline#themes#laederon#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#laederon#palette.insert_modified = { - \ 'airline_c' : [ s:V2[1] , s:N2[1] , s:V2[3] , s:N2[3] , '' ] } -let g:airline#themes#laederon#palette.insert_paste = { - \ 'airline_a' : [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] } - - -let g:airline#themes#laederon#palette.replace = copy(airline#themes#laederon#palette.insert) -let g:airline#themes#laederon#palette.replace.airline_a = [ s:I1[0] , s:RE[0] , s:I1[2] , s:RE[1] , '' ] -let g:airline#themes#laederon#palette.replace_modified = g:airline#themes#laederon#palette.insert_modified - - -let g:airline#themes#laederon#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#laederon#palette.visual_modified = { - \ 'airline_c' : [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } - - -let g:airline#themes#laederon#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#laederon#palette.inactive_modified = { - \ 'airline_c' : [ s:V1[1] , '' , s:V1[3] , '' , '' ] } - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/light.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/light.vim deleted file mode 100644 index d9fe8441..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/light.vim +++ /dev/null @@ -1,45 +0,0 @@ -let g:airline#themes#light#palette = {} - -let s:N1 = [ '#ffffff' , '#005fff' , 255 , 27 ] -let s:N2 = [ '#000087' , '#00dfff' , 18 , 45 ] -let s:N3 = [ '#005fff' , '#afffff' , 27 , 159 ] -let g:airline#themes#light#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#light#palette.normal_modified = { - \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , - \ } - - -let s:I1 = [ '#ffffff' , '#00875f' , 255 , 29 ] -let s:I2 = [ '#005f00' , '#00df87' , 22 , 42 ] -let s:I3 = [ '#005f5f' , '#afff87' , 23 , 156 ] -let g:airline#themes#light#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#light#palette.insert_modified = { - \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , - \ } -let g:airline#themes#light#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , - \ } - - -let g:airline#themes#light#palette.replace = copy(g:airline#themes#light#palette.insert) -let g:airline#themes#light#palette.replace.airline_a = [ s:I2[0] , '#ff0000' , s:I1[2] , 196 , '' ] -let g:airline#themes#light#palette.replace_modified = g:airline#themes#light#palette.insert_modified - - -let s:V1 = [ '#ffffff' , '#ff5f00' , 255 , 202 ] -let s:V2 = [ '#5f0000' , '#ffaf00' , 52 , 214 ] -let s:V3 = [ '#df5f00' , '#ffff87' , 166 , 228 ] -let g:airline#themes#light#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#light#palette.visual_modified = { - \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , - \ } - - -let s:IA1 = [ '#666666' , '#b2b2b2' , 242 , 249 , '' ] -let s:IA2 = [ '#8a8a8a' , '#d0d0d0' , 245 , 252 , '' ] -let s:IA3 = [ '#a8a8a8' , '#ffffff' , 248 , 255 , '' ] -let g:airline#themes#light#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) -let g:airline#themes#light#palette.inactive_modified = { - \ 'airline_c': [ '#df0000' , '' , 160 , '' , '' ] , - \ } - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/lucius.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/lucius.vim deleted file mode 100644 index c6db8b63..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/lucius.vim +++ /dev/null @@ -1,62 +0,0 @@ -let g:airline#themes#lucius#palette = {} - -function! airline#themes#lucius#refresh() - - let s:N1 = airline#themes#get_highlight('StatusLine') - let s:N2 = airline#themes#get_highlight('Folded') - let s:N3 = airline#themes#get_highlight('CursorLine') - let g:airline#themes#lucius#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - - let modified_group = airline#themes#get_highlight('Statement') - let g:airline#themes#lucius#palette.normal_modified = { - \ 'airline_c': [modified_group[0], '', modified_group[2], '', ''] - \ } - - let warning_group = airline#themes#get_highlight('DiffDelete') - let g:airline#themes#lucius#palette.normal.airline_warning = warning_group - let g:airline#themes#lucius#palette.normal_modified.airline_warning = warning_group - - let s:I1 = airline#themes#get_highlight('DiffAdd') - let s:I2 = s:N2 - let s:I3 = s:N3 - let g:airline#themes#lucius#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - let g:airline#themes#lucius#palette.insert_modified = g:airline#themes#lucius#palette.normal_modified - let g:airline#themes#lucius#palette.insert.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning - let g:airline#themes#lucius#palette.insert_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning - - let s:R1 = airline#themes#get_highlight('DiffChange') - let s:R2 = s:N2 - let s:R3 = s:N3 - let g:airline#themes#lucius#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - let g:airline#themes#lucius#palette.replace_modified = g:airline#themes#lucius#palette.normal_modified - let g:airline#themes#lucius#palette.replace.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning - let g:airline#themes#lucius#palette.replace_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning - - let s:V1 = airline#themes#get_highlight('Cursor') - let s:V2 = s:N2 - let s:V3 = s:N3 - let g:airline#themes#lucius#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - let g:airline#themes#lucius#palette.visual_modified = g:airline#themes#lucius#palette.normal_modified - let g:airline#themes#lucius#palette.visual.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning - let g:airline#themes#lucius#palette.visual_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning - - let s:IA = airline#themes#get_highlight('StatusLineNC') - let g:airline#themes#lucius#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) - let g:airline#themes#lucius#palette.inactive_modified = { - \ 'airline_c': [ modified_group[0], '', modified_group[2], '', '' ] - \ } - - let g:airline#themes#lucius#palette.accents = { - \ 'red': airline#themes#get_highlight('Constant'), - \ } - - " Extra tabline colors - let s:TS = airline#themes#get_highlight('TabLineSel') - let g:airline#themes#lucius#palette.tabline = {} - let g:airline#themes#lucius#palette.tabline.airline_tabsel = s:TS - let g:airline#themes#lucius#palette.tabline.airline_tabsel_right = s:TS - -endfunction - -call airline#themes#lucius#refresh() - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/luna.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/luna.vim deleted file mode 100644 index 879d8623..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/luna.vim +++ /dev/null @@ -1,92 +0,0 @@ -" vim-airline companion theme of Luna -" (https://github.com/Pychimp/vim-luna) - -let g:airline#themes#luna#palette = {} - -let g:airline#themes#luna#palette.accents = { - \ 'red': [ '#ffffff' , '' , 231 , '' , '' ], - \ } - - -let s:N1 = [ '#ffffff' , '#005252' , 231 , 36 ] -let s:N2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] -let s:N3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] -let g:airline#themes#luna#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#luna#palette.normal_modified = { - \ 'airline_c': [ '#ffffff' , '#450000' , 231 , 52 , '' ] , - \ } - - -let s:I1 = [ '#ffffff' , '#789f00' , 231 , 106 ] -let s:I2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] -let s:I3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] -let g:airline#themes#luna#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#luna#palette.insert_modified = { - \ 'airline_c': [ '#ffffff' , '#005e5e' , 255 , 52 , '' ] , - \ } -let g:airline#themes#luna#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#789f00' , s:I1[2] , 106 , '' ] , - \ } - - -let g:airline#themes#luna#palette.replace = copy(g:airline#themes#luna#palette.insert) -let g:airline#themes#luna#palette.replace.airline_a = [ s:I2[0] , '#920000' , s:I2[2] , 88 , '' ] -let g:airline#themes#luna#palette.replace_modified = g:airline#themes#luna#palette.insert_modified - -let s:V1 = [ '#ffff9a' , '#ff8036' , 222 , 208 ] -let s:V2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] -let s:V3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] -let g:airline#themes#luna#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#luna#palette.visual_modified = { - \ 'airline_c': [ '#ffffff' , '#450000' , 231 , 52 , '' ] , - \ } - -let s:IA = [ '#4e4e4e' , '#002b2b' , 59 , 23 , '' ] -let g:airline#themes#luna#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#luna#palette.inactive_modified = { - \ 'airline_c': [ '#e20000' , '' , 166 , '' , '' ] , - \ } - -let g:airline#themes#luna#palette.tabline = { - \ 'airline_tab': ['#2aa198', '#003f3f', 231, 29, ''], - \ 'airline_tabsel': ['#ffffff', '#2e8b57', 231, 36, ''], - \ 'airline_tabtype': ['#ffffff', '#005252', 231, 36, ''], - \ 'airline_tabfill': ['#ffffff', '#002b2b', 231, 23, ''], - \ 'airline_tabmod': ['#ffffff', '#780000', 231, 88, ''], - \ } - -let s:WI = [ '#ffffff', '#5f0000', 231, 88 ] -let g:airline#themes#luna#palette.normal.airline_warning = [ - \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] - \ ] - -let g:airline#themes#luna#palette.normal_modified.airline_warning = - \ g:airline#themes#luna#palette.normal.airline_warning - -let g:airline#themes#luna#palette.insert.airline_warning = - \ g:airline#themes#luna#palette.normal.airline_warning - -let g:airline#themes#luna#palette.insert_modified.airline_warning = - \ g:airline#themes#luna#palette.normal.airline_warning - -let g:airline#themes#luna#palette.visual.airline_warning = - \ g:airline#themes#luna#palette.normal.airline_warning - -let g:airline#themes#luna#palette.visual_modified.airline_warning = - \ g:airline#themes#luna#palette.normal.airline_warning - -let g:airline#themes#luna#palette.replace.airline_warning = - \ g:airline#themes#luna#palette.normal.airline_warning - -let g:airline#themes#luna#palette.replace_modified.airline_warning = - \ g:airline#themes#luna#palette.normal.airline_warning - - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#luna#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#ffffff' , '#002b2b' , 231 , 23 , '' ] , - \ [ '#ffffff' , '#005252' , 231 , 36 , '' ] , - \ [ '#ffffff' , '#973d45' , 231 , 95 , '' ] ) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/molokai.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/molokai.vim deleted file mode 100644 index 1998f002..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/molokai.vim +++ /dev/null @@ -1,65 +0,0 @@ -let g:airline#themes#molokai#palette = {} - -let g:airline#themes#molokai#palette.accents = { - \ 'red': [ '#66d9ef' , '' , 81 , '' , '' ], - \ } - - -" Normal mode -let s:N1 = [ '#080808' , '#e6db74' , 232 , 144 ] " mode -let s:N2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] " info -let s:N3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] " statusline - -let g:airline#themes#molokai#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#molokai#palette.normal_modified = { - \ 'airline_c': [ '#080808' , '#e6db74' , 232 , 144 , '' ] , - \ } - - -" Insert mode -let s:I1 = [ '#080808' , '#66d9ef' , 232 , 81 ] -let s:I2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] -let s:I3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] - -let g:airline#themes#molokai#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#molokai#palette.insert_modified = { - \ 'airline_c': [ '#080808' , '#66d9ef' , 232 , 81 , '' ] , - \ } - - -" Replace mode -let g:airline#themes#molokai#palette.replace = copy(g:airline#themes#molokai#palette.insert) -let g:airline#themes#molokai#palette.replace.airline_a = [ s:I1[0] , '#ef5939' , s:I1[2] , 166 , '' ] -let g:airline#themes#molokai#palette.replace_modified = { - \ 'airline_c': [ '#080808' , '#ef5939' , 232 , 166 , '' ] , - \ } - - -" Visual mode -let s:V1 = [ '#080808' , '#fd971f' , 232 , 208 ] -let s:V2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] -let s:V3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] - -let g:airline#themes#molokai#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#molokai#palette.visual_modified = { - \ 'airline_c': [ '#080808' , '#fd971f' , 232 , 208 , '' ] , - \ } - - -" Inactive -let s:IA = [ '#1b1d1e' , '#465457' , 233 , 67 , '' ] -let g:airline#themes#molokai#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#molokai#palette.inactive_modified = { - \ 'airline_c': [ '#f8f8f0' , '' , 253 , '' , '' ] , - \ } - - -" CtrlP -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#molokai#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#f8f8f0' , '#465457' , 253 , 67 , '' ] , - \ [ '#f8f8f0' , '#232526' , 253 , 16 , '' ] , - \ [ '#080808' , '#e6db74' , 232 , 144 , 'bold' ] ) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/monochrome.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/monochrome.vim deleted file mode 100644 index 7dd1a173..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/monochrome.vim +++ /dev/null @@ -1,15 +0,0 @@ -let g:airline#themes#monochrome#palette = {} - -function! airline#themes#monochrome#refresh() - let s:SL = airline#themes#get_highlight('StatusLine') - let g:airline#themes#monochrome#palette.normal = airline#themes#generate_color_map(s:SL, s:SL, s:SL) - let g:airline#themes#monochrome#palette.insert = g:airline#themes#monochrome#palette.normal - let g:airline#themes#monochrome#palette.replace = g:airline#themes#monochrome#palette.normal - let g:airline#themes#monochrome#palette.visual = g:airline#themes#monochrome#palette.normal - - let s:SLNC = airline#themes#get_highlight('StatusLineNC') - let g:airline#themes#monochrome#palette.inactive = airline#themes#generate_color_map(s:SLNC, s:SLNC, s:SLNC) -endfunction - -call airline#themes#monochrome#refresh() - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/murmur.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/murmur.vim deleted file mode 100644 index 08e47572..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/murmur.vim +++ /dev/null @@ -1,82 +0,0 @@ -let g:airline#themes#murmur#palette = {} - -" Color palette -let s:cterm_termbg = 237 " Background for branch and file format blocks -let s:gui_termbg = '#5F5F5F' -let s:cterm_termfg = 144 " Foreground for branch and file format blocks -let s:gui_termfg = '#AFAF87' - -let s:cterm_termbg2 = 234 " Background for middle block -let s:gui_termbg2 = '#1C1C1C' -let s:cterm_termfg2 = 39 " Foreground for middle block -let s:gui_termfg2 = '#F5F5F5' - -let s:cterm_normalbg = 27 " Background for normal mode and file position blocks -let s:gui_normalbg = '#5F87FF' -let s:cterm_normalfg = 15 " Foreground for normal mode and file position blocks -let s:gui_normalfg = '#FFFFFF' - -let s:cterm_insertbg = 70 " Background for insert mode and file position blocks -let s:gui_insertbg = '#87AF5F' -let s:cterm_insertfg = 15 " Foreground for insert mode and file position blocks -let s:gui_insertfg = '#FFFFFF' - -let s:cterm_visualbg = 166 " Background for visual mode and file position blocks -let s:gui_visualbg = '#ff8c00' -let s:cterm_visualfg = 15 " Foreground for visual mode and file position blocks -let s:gui_visualfg = '#FFFFFF' - -let s:cterm_replacebg = 88 " Background for replace mode and file position blocks -let s:gui_replacebg = '#870000' -let s:cterm_replacefg = 15 " Foreground for replace mode and file position blocks -let s:gui_replacefg = '#FFFFFF' - -let s:cterm_alert = 88 " Modified file alert color -let s:gui_alert = '#870000' - -let s:cterm_inactivebg = 234 " Background for inactive mode -let s:gui_inactivebg = '#1C1C1C' -let s:cterm_inactivefg = 239 " Foreground for inactive mode -let s:gui_inactivefg = '#4E4E4E' - -" Branch and file format -let s:BB = [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg] " Branch and file format blocks - -" Normal mode -let s:N1 = [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg] " Outside blocks in normal mode -let s:N2 = [s:gui_termfg2, s:gui_termbg2, s:cterm_normalbg, s:cterm_termbg2] " Middle block -let g:airline#themes#murmur#palette.normal = airline#themes#generate_color_map(s:N1, s:BB, s:N2) -let g:airline#themes#murmur#palette.normal_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} - -" Insert mode -let s:I1 = [s:gui_insertfg, s:gui_insertbg, s:cterm_insertfg, s:cterm_insertbg] " Outside blocks in insert mode -let s:I2 = [s:gui_insertbg, s:gui_termbg2, s:cterm_insertbg, s:cterm_termbg2] " Middle block -let g:airline#themes#murmur#palette.insert = airline#themes#generate_color_map(s:I1, s:BB, s:I2) -let g:airline#themes#murmur#palette.insert_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} - -" Replace mode -let s:R1 = [s:gui_replacefg, s:gui_replacebg, s:cterm_replacefg, s:cterm_replacebg] " Outside blocks in replace mode -let s:R2 = [s:gui_termfg, s:gui_termbg2, s:cterm_termfg, s:cterm_termbg2] " Middle block -let g:airline#themes#murmur#palette.replace = airline#themes#generate_color_map(s:R1, s:BB, s:R2) -let g:airline#themes#murmur#palette.replace_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} - -" Visual mode -let s:V1 = [s:gui_visualfg, s:gui_visualbg, s:cterm_visualfg, s:cterm_visualbg] " Outside blocks in visual mode -let s:V2 = [s:gui_visualbg, s:gui_termbg2, s:cterm_visualbg, s:cterm_termbg2] " Middle block -let g:airline#themes#murmur#palette.visual = airline#themes#generate_color_map(s:V1, s:BB, s:V2) -let g:airline#themes#murmur#palette.visual_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} - -" Inactive mode -let s:IA1 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] -let s:IA2 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] -let s:IA3 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] -let g:airline#themes#murmur#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - -" CtrlP plugin colors -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#murmur#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg, ''], - \ [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg, ''], - \ [s:gui_termfg2, s:gui_termbg2, s:cterm_termfg2, s:cterm_termbg2, 'bold']) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/papercolor.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/papercolor.vim deleted file mode 100644 index fb8022ba..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/papercolor.vim +++ /dev/null @@ -1,65 +0,0 @@ -let g:airline#themes#papercolor#palette = {} - -let g:airline#themes#papercolor#palette.accents = { - \ 'red': [ '#66d9ef' , '' , 81 , '' , '' ], - \ } - -" Normal Mode: -let s:N1 = [ '#585858' , '#e4e4e4' , 240 , 254 ] " Mode -let s:N2 = [ '#e4e4e4' , '#0087af' , 254 , 31 ] " Info -let s:N3 = [ '#eeeeee' , '#005f87' , 255 , 24 ] " StatusLine - - -let g:airline#themes#papercolor#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#papercolor#palette.normal_modified = { - \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , - \ } - - -" Insert Mode: -let s:I1 = [ '#585858' , '#e4e4e4' , 240 , 254 ] " Mode -let s:I2 = [ '#e4e4e4' , '#0087af' , 254 , 31 ] " Info -let s:I3 = [ '#eeeeee' , '#005f87' , 255 , 24 ] " StatusLine - - -let g:airline#themes#papercolor#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#papercolor#palette.insert_modified = { - \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , - \ } - - -" Replace Mode: -let g:airline#themes#papercolor#palette.replace = copy(g:airline#themes#papercolor#palette.insert) -let g:airline#themes#papercolor#palette.replace.airline_a = [ '#d7005f' , '#e4e4e4' , 161 , 254, '' ] -let g:airline#themes#papercolor#palette.replace_modified = { - \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , - \ } - - -" Visual Mode: -let s:V1 = [ '#005f87', '#e4e4e4', 24, 254 ] -let s:V2 = [ '', '#0087af', '', 31 ] -let s:V3 = [ '#e4e4e4', '#005f87', 254, 24 ] - -let g:airline#themes#papercolor#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#papercolor#palette.visual_modified = { - \ 'airline_c': [ '#e4e4e4', '#005f87', 254, 24 ] , - \ } - -" Inactive: -let s:IA = [ '#585858' , '#e4e4e4' , 240 , 254 , '' ] -let g:airline#themes#papercolor#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#papercolor#palette.inactive_modified = { - \ 'airline_c': [ '#585858' , '#e4e4e4' , 240 , 254 , '' ] , - \ } - - -" CtrlP: -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#papercolor#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#e4e4e4' , '#005f87' , 254 , 24 , '' ] , - \ [ '#e4e4e4' , '#0087af' , 254 , 31 , '' ] , - \ [ '#585858' , '#e4e4e4' , 240 , 254 , 'bold' ] ) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/powerlineish.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/powerlineish.vim deleted file mode 100644 index d550e110..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/powerlineish.vim +++ /dev/null @@ -1,46 +0,0 @@ -" Theme to mimic the default colorscheme of powerline -" Not 100% the same so it's powerline... ish. -" -" Differences from default powerline: -" * Paste indicator isn't colored different -" * Far right hand section matches the color of the mode indicator -" -" Differences from other airline themes: -" * No color differences when you're in a modified buffer -" * Visual mode only changes the mode section. Otherwise -" it appears the same as normal mode - -" Normal mode " fg & bg -let s:N1 = [ '#005f00' , '#afd700' , 22 , 148 ] " darkestgreen & brightgreen -let s:N2 = [ '#9e9e9e' , '#303030' , 247 , 236 ] " gray8 & gray2 -let s:N3 = [ '#ffffff' , '#121212' , 231 , 233 ] " white & gray4 - -" Insert mode " fg & bg -let s:I1 = [ '#005f5f' , '#ffffff' , 23 , 231 ] " darkestcyan & white -let s:I2 = [ '#5fafd7' , '#0087af' , 74 , 31 ] " darkcyan & darkblue -let s:I3 = [ '#87d7ff' , '#005f87' , 117 , 24 ] " mediumcyan & darkestblue - -" Visual mode " fg & bg -let s:V1 = [ '#080808' , '#ffaf00' , 232 , 214 ] " gray3 & brightestorange - -" Replace mode " fg & bg -let s:RE = [ '#ffffff' , '#d70000' , 231 , 160 ] " white & brightred - -let g:airline#themes#powerlineish#palette = {} - -let g:airline#themes#powerlineish#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -let g:airline#themes#powerlineish#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#powerlineish#palette.insert_replace = { - \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } - -let g:airline#themes#powerlineish#palette.visual = { - \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } - -let g:airline#themes#powerlineish#palette.replace = copy(airline#themes#powerlineish#palette.normal) -let g:airline#themes#powerlineish#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] - - -let s:IA = [ s:N2[1] , s:N3[1] , s:N2[3] , s:N3[3] , '' ] -let g:airline#themes#powerlineish#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/raven.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/raven.vim deleted file mode 100644 index 02bfd73a..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/raven.vim +++ /dev/null @@ -1,85 +0,0 @@ -let g:airline#themes#raven#palette = {} - -let g:airline#themes#raven#palette.accents = { - \ 'red': [ '#ff2121' , '' , 196 , '' , '' ], - \ } - -let s:N1 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] -let s:N2 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] -let s:N3 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] -let g:airline#themes#raven#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#raven#palette.normal_modified = { - \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , - \ } - -let s:I1 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] -let s:I2 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] -let s:I3 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] -let g:airline#themes#raven#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#raven#palette.insert_modified = { - \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , - \ } -let g:airline#themes#raven#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#2e2e2e' , s:I1[2] , 235 , '' ] , - \ } - -let g:airline#themes#raven#palette.replace = copy(g:airline#themes#raven#palette.insert) -let g:airline#themes#raven#palette.replace.airline_a = [ '#e60000' , s:I1[1] , 160 , s:I1[3] , '' ] -let g:airline#themes#raven#palette.replace.airline_z = [ '#e60000' , s:I1[1] , 160 , s:I1[3] , '' ] -let g:airline#themes#raven#palette.replace_modified = g:airline#themes#raven#palette.insert_modified - -let s:V1 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] -let s:V2 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] -let s:V3 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] -let g:airline#themes#raven#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#raven#palette.visual_modified = { - \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , - \ } - -let s:IA = [ '#5e5e5e' , '#222222' , 59 , 235 , '' ] -let g:airline#themes#raven#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#raven#palette.inactive_modified = { - \ 'airline_c': [ '#e25000' , '' , 166 , '' , '' ] , - \ } - -let g:airline#themes#raven#palette.tabline = { - \ 'airline_tab': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], - \ 'airline_tabsel': ['#2e2e2e' , '#a4c639' , 235 , 149 , '' ], - \ 'airline_tabtype': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], - \ 'airline_tabfill': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], - \ 'airline_tabmod': ['#2e2e2e' , '#a4c639' , 235 , 149 , '' ], - \ } - -let s:WI = [ '#ff0000', '#2e2e2e', 196, 235 ] -let g:airline#themes#raven#palette.normal.airline_warning = [ - \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] - \ ] - -let g:airline#themes#raven#palette.normal_modified.airline_warning = - \ g:airline#themes#raven#palette.normal.airline_warning - -let g:airline#themes#raven#palette.insert.airline_warning = - \ g:airline#themes#raven#palette.normal.airline_warning - -let g:airline#themes#raven#palette.insert_modified.airline_warning = - \ g:airline#themes#raven#palette.normal.airline_warning - -let g:airline#themes#raven#palette.visual.airline_warning = - \ g:airline#themes#raven#palette.normal.airline_warning - -let g:airline#themes#raven#palette.visual_modified.airline_warning = - \ g:airline#themes#raven#palette.normal.airline_warning - -let g:airline#themes#raven#palette.replace.airline_warning = - \ g:airline#themes#raven#palette.normal.airline_warning - -let g:airline#themes#raven#palette.replace_modified.airline_warning = - \ g:airline#themes#raven#palette.normal.airline_warning - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#raven#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ] , - \ [ '#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ] , - \ [ '#2e2e2e' , '#a4c639' , 235 , 149 , '' ] ) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/serene.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/serene.vim deleted file mode 100644 index 9191c077..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/serene.vim +++ /dev/null @@ -1,41 +0,0 @@ -let g:airline#themes#serene#palette = {} - -let s:guibg = '#080808' -let s:termbg = 232 -let s:termsep = 236 -let s:guisep = '#303030' - -let s:N1 = [ '#00dfff' , s:guibg , 45 , s:termbg ] -let s:N2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] -let s:N3 = [ '#767676' , s:guibg , 7 , s:termbg ] - -let g:airline#themes#serene#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#serene#palette.normal_modified = { - \ 'airline_c': [ '#df0000' , s:guibg, 160 , s:termbg , '' ] , - \ } - -let s:I1 = [ '#5fff00' , s:guibg , 82 , s:termbg ] -let s:I2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] -let s:I3 = [ '#767676' , s:guibg , 7 , s:termbg ] -let g:airline#themes#serene#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#serene#palette.insert_modified = copy(g:airline#themes#serene#palette.normal_modified) -let g:airline#themes#serene#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , - \ } - -let g:airline#themes#serene#palette.replace = { - \ 'airline_a': [ s:I1[0] , '#af0000' , s:I1[2] , 124 , '' ] , - \ } -let g:airline#themes#serene#palette.replace_modified = copy(g:airline#themes#serene#palette.normal_modified) - -let s:V1 = [ '#dfdf00' , s:guibg , 184 , s:termbg ] -let s:V2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] -let s:V3 = [ '#767676' , s:guibg , 7 , s:termbg ] -let g:airline#themes#serene#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#serene#palette.visual_modified = copy(g:airline#themes#serene#palette.normal_modified) - -let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] -let s:IA2 = [ '#4e4e4e' , s:guisep , 239 , s:termsep , '' ] -let g:airline#themes#serene#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA2, s:IA2) -let g:airline#themes#serene#palette.inactive_modified = copy(g:airline#themes#serene#palette.normal_modified) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/silver.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/silver.vim deleted file mode 100644 index fd85edba..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/silver.vim +++ /dev/null @@ -1,85 +0,0 @@ -let g:airline#themes#silver#palette = {} - -let g:airline#themes#silver#palette.accents = { - \ 'red': [ '#ff2121' , '' , 196 , '' , '' ], - \ } - -let s:N1 = [ '#414141' , '#e1e1e1' , 59 , 188 ] -let s:N2 = [ '#414141' , '#e1e1e1' , 59 , 188 ] -let s:N3 = [ '#414141' , '#e1e1e1' , 59 , 188 ] -let g:airline#themes#silver#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#silver#palette.normal_modified = { - \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , - \ } - -let s:I1 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] -let s:I2 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] -let s:I3 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] -let g:airline#themes#silver#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#silver#palette.insert_modified = { - \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , - \ } -let g:airline#themes#silver#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#e1e1e1' , s:I1[2] , 188 , '' ] , - \ } - -let g:airline#themes#silver#palette.replace = copy(g:airline#themes#silver#palette.insert) -let g:airline#themes#silver#palette.replace.airline_a = [ '#b30000' , s:I1[1] , 124 , s:I1[3] , '' ] -let g:airline#themes#silver#palette.replace.airline_z = [ '#b30000' , s:I1[1] , 124 , s:I1[3] , '' ] -let g:airline#themes#silver#palette.replace_modified = g:airline#themes#silver#palette.insert_modified - -let s:V1 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] -let s:V2 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] -let s:V3 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] -let g:airline#themes#silver#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#silver#palette.visual_modified = { - \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , - \ } - -let s:IA = [ '#a1a1a1' , '#dddddd' , 145 , 188 , '' ] -let g:airline#themes#silver#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#silver#palette.inactive_modified = { - \ 'airline_c': [ '#e25000' , '' , 166 , '' , '' ] , - \ } - -let g:airline#themes#silver#palette.tabline = { - \ 'airline_tab': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], - \ 'airline_tabsel': ['#e1e1e1' , '#007599' , 188 , 30 , '' ], - \ 'airline_tabtype': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], - \ 'airline_tabfill': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], - \ 'airline_tabmod': ['#e1e1e1' , '#007599' , 188 , 30 , '' ], - \ } - -let s:WI = [ '#ff0000', '#e1e1e1', 196, 188 ] -let g:airline#themes#silver#palette.normal.airline_warning = [ - \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] - \ ] - -let g:airline#themes#silver#palette.normal_modified.airline_warning = - \ g:airline#themes#silver#palette.normal.airline_warning - -let g:airline#themes#silver#palette.insert.airline_warning = - \ g:airline#themes#silver#palette.normal.airline_warning - -let g:airline#themes#silver#palette.insert_modified.airline_warning = - \ g:airline#themes#silver#palette.normal.airline_warning - -let g:airline#themes#silver#palette.visual.airline_warning = - \ g:airline#themes#silver#palette.normal.airline_warning - -let g:airline#themes#silver#palette.visual_modified.airline_warning = - \ g:airline#themes#silver#palette.normal.airline_warning - -let g:airline#themes#silver#palette.replace.airline_warning = - \ g:airline#themes#silver#palette.normal.airline_warning - -let g:airline#themes#silver#palette.replace_modified.airline_warning = - \ g:airline#themes#silver#palette.normal.airline_warning - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#silver#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#414141' , '#e1e1e1' , 59 , 188 , '' ] , - \ [ '#414141' , '#e1e1e1' , 59 , 188 , '' ] , - \ [ '#e1e1e1' , '#007599' , 188 , 30 , '' ] ) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/simple.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/simple.vim deleted file mode 100644 index a111a1cb..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/simple.vim +++ /dev/null @@ -1,46 +0,0 @@ -let g:airline#themes#simple#palette = {} - -let s:guibg = '#080808' -let s:guibg2 = '#1c1c1c' -let s:termbg = 232 -let s:termbg2= 234 - -let s:N1 = [ s:guibg , '#00dfff' , s:termbg , 45 ] -let s:N2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] -let s:N3 = [ '#767676' , s:guibg, 243 , s:termbg] -let g:airline#themes#simple#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#simple#palette.normal_modified = { - \ 'airline_c': [ '#df0000' , s:guibg, 160 , s:termbg , '' ] , - \ } - - -let s:I1 = [ s:guibg, '#5fff00' , s:termbg , 82 ] -let s:I2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] -let s:I3 = [ '#767676' , s:guibg, 243 , s:termbg ] -let g:airline#themes#simple#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#simple#palette.insert_modified = copy(g:airline#themes#simple#palette.normal_modified) -let g:airline#themes#simple#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , - \ } - - -let g:airline#themes#simple#palette.replace = { - \ 'airline_a': [ s:I1[0] , '#af0000' , s:I1[2] , 124 , '' ] , - \ } -let g:airline#themes#simple#palette.replace_modified = copy(g:airline#themes#simple#palette.normal_modified) - - -let s:V1 = [ s:guibg, '#dfdf00' , s:termbg , 184 ] -let s:V2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] -let s:V3 = [ '#767676' , s:guibg, 243 , s:termbg ] -let g:airline#themes#simple#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#simple#palette.visual_modified = copy(g:airline#themes#simple#palette.normal_modified) - - -let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] -let s:IA2 = [ '#4e4e4e' , s:guibg2 , 239 , s:termbg2 , '' ] -let g:airline#themes#simple#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA2, s:IA2) -let g:airline#themes#simple#palette.inactive_modified = { - \ 'airline_c': [ '#df0000', '', 160, '', '' ] , - \ } - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/sol.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/sol.vim deleted file mode 100644 index 89ea5058..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/sol.vim +++ /dev/null @@ -1,90 +0,0 @@ -" vim-airline companion theme of Sol -" (https://github.com/Pychimp/vim-sol) - -let g:airline#themes#sol#palette = {} - -let g:airline#themes#sol#palette.accents = { - \ 'red': [ '#ffffff' , '' , 231 , '' , '' ], - \ } - -let s:N1 = [ '#343434' , '#a0a0a0' , 237 , 248 ] -let s:N2 = [ '#343434' , '#b3b3b3' , 237 , 250 ] -let s:N3 = [ '#343434' , '#c7c7c7' , 237 , 252 ] -let g:airline#themes#sol#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#sol#palette.normal_modified = { - \ 'airline_c': [ '#ffffff' , '#ff6868' , 237 , 209 , '' ] , - \ } - - -let s:I1 = [ '#eeeeee' , '#09643f' , 255 , 30 ] -let s:I2 = [ '#343434' , '#a3a3a3' , 237 , 249 ] -let s:I3 = [ '#343434' , '#b0b0b0' , 237 , 250 ] -let g:airline#themes#sol#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#sol#palette.insert_modified = { - \ 'airline_c': [ '#343434' , '#ffdbc7' , 237 , 216 , '' ] , - \ } -let g:airline#themes#sol#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#09643f' , s:I1[2] , 30 , '' ] , - \ } - - -let g:airline#themes#sol#palette.replace = copy(g:airline#themes#sol#palette.insert) -let g:airline#themes#sol#palette.replace.airline_a = [ s:I1[0] , '#ff2121' , s:I1[2] , 196 , '' ] -let g:airline#themes#sol#palette.replace.airline_z = [ s:I1[0] , '#ff2121' , s:I1[2] , 196 , '' ] -let g:airline#themes#sol#palette.replace_modified = g:airline#themes#sol#palette.insert_modified - -let s:V1 = [ '#ffff9a' , '#ff6003' , 222 , 202 ] -let s:V2 = [ '#343434' , '#a3a3a3' , 237 , 249 ] -let s:V3 = [ '#343434' , '#b0b0b0' , 237 , 250 ] -let g:airline#themes#sol#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#sol#palette.visual_modified = { - \ 'airline_c': [ '#343434' , '#ffdbc7' , 237 , 216 , '' ] , - \ } - -let s:IA = [ '#777777' , '#c7c7c7' , 244 , 251 , '' ] -let g:airline#themes#sol#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#sol#palette.inactive_modified = { - \ 'airline_c': [ '#ff3535' , '' , 203 , '' , '' ] , - \ } - -let g:airline#themes#sol#palette.tabline = { - \ 'airline_tab': ['#343434', '#b3b3b3', 237, 250, ''], - \ 'airline_tabsel': ['#ffffff', '#004b9a', 231, 31 , ''], - \ 'airline_tabtype': ['#343434', '#a0a0a0', 237, 248, ''], - \ 'airline_tabfill': ['#343434', '#c7c7c7', 237, 251, ''], - \ 'airline_tabmod': ['#343434', '#ffdbc7', 237, 216, ''], - \ } - -let s:WI = [ '#eeeeee', '#e33900', 255, 166 ] -let g:airline#themes#sol#palette.normal.airline_warning = [ - \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] - \ ] - -let g:airline#themes#sol#palette.normal_modified.airline_warning = - \ g:airline#themes#sol#palette.normal.airline_warning - -let g:airline#themes#sol#palette.insert.airline_warning = - \ g:airline#themes#sol#palette.normal.airline_warning - -let g:airline#themes#sol#palette.insert_modified.airline_warning = - \ g:airline#themes#sol#palette.normal.airline_warning - -let g:airline#themes#sol#palette.visual.airline_warning = - \ g:airline#themes#sol#palette.normal.airline_warning - -let g:airline#themes#sol#palette.visual_modified.airline_warning = - \ g:airline#themes#sol#palette.normal.airline_warning - -let g:airline#themes#sol#palette.replace.airline_warning = - \ g:airline#themes#sol#palette.normal.airline_warning - -let g:airline#themes#sol#palette.replace_modified.airline_warning = - \ g:airline#themes#sol#palette.normal.airline_warning - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#sol#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#343434' , '#c7c7c7' , 237 , 251 , '' ] , - \ [ '#343434' , '#b3b3b3' , 237 , 250 , '' ] , - \ [ '#eeeeee' , '#007fff' , 255 , 27 , '' ] ) diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/solarized.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/solarized.vim deleted file mode 100644 index 95b7058e..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/solarized.vim +++ /dev/null @@ -1,198 +0,0 @@ -let g:airline#themes#solarized#palette = {} - -function! airline#themes#solarized#refresh() - """""""""""""""""""""""""""""""""""""""""""""""" - " Options - """""""""""""""""""""""""""""""""""""""""""""""" - let s:background = get(g:, 'airline_solarized_bg', &background) - let s:ansi_colors = get(g:, 'solarized_termcolors', 16) != 256 && &t_Co >= 16 ? 1 : 0 - let s:tty = &t_Co == 8 - - """""""""""""""""""""""""""""""""""""""""""""""" - " Colors - """""""""""""""""""""""""""""""""""""""""""""""" - " Base colors - " Extended base16 support by @cuviper. - " Via https://github.com/blueyed/vim-colors-solarized/commit/92f2f994 / - " https://github.com/cuviper/vim-colors-solarized. - if s:ansi_colors && get(g:, 'solarized_base16', 0) - let s:base03 = {'t': 0, 'g': "#002b36"} " Base 00 - let s:base02 = {'t': 18, 'g': "#073642"} " Base 01 - let s:base01 = {'t': 19, 'g': "#586e75"} " Base 02 - let s:base00 = {'t': 8, 'g': "#657b83"} " Base 03 - let s:base0 = {'t': 20, 'g': "#839496"} " Base 04 - let s:base1 = {'t': 7, 'g': "#93a1a1"} " Base 05 - let s:base2 = {'t': 21, 'g': "#eee8d5"} " Base 06 - let s:base3 = {'t': 15, 'g': "#fdf6e3"} " Base 07 - let s:yellow = {'t': 3, 'g': "#dc322f"} " Base 0A - let s:orange = {'t': 16, 'g': "#cb4b16"} " Base 09 - let s:red = {'t': 1, 'g': "#b58900"} " Base 08 - let s:magenta = {'t': 17, 'g': "#859900"} " Base 0F - let s:violet = {'t': 5, 'g': "#2aa198"} " Base 0E - let s:blue = {'t': 4, 'g': "#268bd2"} " Base 0D - let s:cyan = {'t': 6, 'g': "#6c71c4"} " Base 0C - let s:green = {'t': 2, 'g': "#d33682"} " Base 0B - else - let s:base03 = {'t': s:ansi_colors ? 8 : (s:tty ? '0' : 234), 'g': '#002b36'} - let s:base02 = {'t': s:ansi_colors ? '0' : (s:tty ? '0' : 235), 'g': '#073642'} - let s:base01 = {'t': s:ansi_colors ? 10 : (s:tty ? '0' : 240), 'g': '#586e75'} - let s:base00 = {'t': s:ansi_colors ? 11 : (s:tty ? '7' : 241), 'g': '#657b83'} - let s:base0 = {'t': s:ansi_colors ? 12 : (s:tty ? '7' : 244), 'g': '#839496'} - let s:base1 = {'t': s:ansi_colors ? 14 : (s:tty ? '7' : 245), 'g': '#93a1a1'} - let s:base2 = {'t': s:ansi_colors ? 7 : (s:tty ? '7' : 254), 'g': '#eee8d5'} - let s:base3 = {'t': s:ansi_colors ? 15 : (s:tty ? '7' : 230), 'g': '#fdf6e3'} - let s:yellow = {'t': s:ansi_colors ? 3 : (s:tty ? '3' : 136), 'g': '#b58900'} - let s:orange = {'t': s:ansi_colors ? 9 : (s:tty ? '1' : 166), 'g': '#cb4b16'} - let s:red = {'t': s:ansi_colors ? 1 : (s:tty ? '1' : 160), 'g': '#dc322f'} - let s:magenta = {'t': s:ansi_colors ? 5 : (s:tty ? '5' : 125), 'g': '#d33682'} - let s:violet = {'t': s:ansi_colors ? 13 : (s:tty ? '5' : 61 ), 'g': '#6c71c4'} - let s:blue = {'t': s:ansi_colors ? 4 : (s:tty ? '4' : 33 ), 'g': '#268bd2'} - let s:cyan = {'t': s:ansi_colors ? 6 : (s:tty ? '6' : 37 ), 'g': '#2aa198'} - let s:green = {'t': s:ansi_colors ? 2 : (s:tty ? '2' : 64 ), 'g': '#859900'} - endif - - """""""""""""""""""""""""""""""""""""""""""""""" - " Simple mappings - " NOTE: These are easily tweakable mappings. The actual mappings get - " the specific gui and terminal colors from the base color dicts. - """""""""""""""""""""""""""""""""""""""""""""""" - " Normal mode - if s:background == 'dark' - let s:N1 = [s:base3, s:base1, 'bold'] - let s:N2 = [s:base2, (s:tty ? s:base01 : s:base00), ''] - let s:N3 = [s:base01, s:base02, ''] - else - let s:N1 = [s:base2, s:base00, 'bold'] - let s:N2 = [(s:tty ? s:base01 : s:base2), s:base1, ''] - let s:N3 = [s:base1, s:base2, ''] - endif - let s:NF = [s:orange, s:N3[1], ''] - let s:NW = [s:base3, s:orange, ''] - if s:background == 'dark' - let s:NM = [s:base1, s:N3[1], ''] - let s:NMi = [s:base2, s:N3[1], ''] - else - let s:NM = [s:base01, s:N3[1], ''] - let s:NMi = [s:base02, s:N3[1], ''] - endif - - " Insert mode - let s:I1 = [s:N1[0], s:yellow, 'bold'] - let s:I2 = s:N2 - let s:I3 = s:N3 - let s:IF = s:NF - let s:IM = s:NM - - " Visual mode - let s:V1 = [s:N1[0], s:magenta, 'bold'] - let s:V2 = s:N2 - let s:V3 = s:N3 - let s:VF = s:NF - let s:VM = s:NM - - " Replace mode - let s:R1 = [s:N1[0], s:red, ''] - let s:R2 = s:N2 - let s:R3 = s:N3 - let s:RM = s:NM - let s:RF = s:NF - - " Inactive, according to VertSplit in solarized - " (bg dark: base00; bg light: base0) - if s:background == 'dark' - let s:IA = [s:base02, s:base00, ''] - else - let s:IA = [s:base2, s:base0, ''] - endif - - """""""""""""""""""""""""""""""""""""""""""""""" - " Actual mappings - " WARNING: Don't modify this section unless necessary. - """""""""""""""""""""""""""""""""""""""""""""""" - let s:NFa = [s:NF[0].g, s:NF[1].g, s:NF[0].t, s:NF[1].t, s:NF[2]] - let s:IFa = [s:IF[0].g, s:IF[1].g, s:IF[0].t, s:IF[1].t, s:IF[2]] - let s:VFa = [s:VF[0].g, s:VF[1].g, s:VF[0].t, s:VF[1].t, s:VF[2]] - let s:RFa = [s:RF[0].g, s:RF[1].g, s:RF[0].t, s:RF[1].t, s:RF[2]] - - let g:airline#themes#solarized#palette.accents = { - \ 'red': s:NFa, - \ } - - let g:airline#themes#solarized#palette.inactive = airline#themes#generate_color_map( - \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], - \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], - \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]]) - let g:airline#themes#solarized#palette.inactive_modified = { - \ 'airline_c': [s:NMi[0].g, '', s:NMi[0].t, '', s:NMi[2]]} - - let g:airline#themes#solarized#palette.normal = airline#themes#generate_color_map( - \ [s:N1[0].g, s:N1[1].g, s:N1[0].t, s:N1[1].t, s:N1[2]], - \ [s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]], - \ [s:N3[0].g, s:N3[1].g, s:N3[0].t, s:N3[1].t, s:N3[2]]) - - let g:airline#themes#solarized#palette.normal.airline_warning = [ - \ s:NW[0].g, s:NW[1].g, s:NW[0].t, s:NW[1].t, s:NW[2]] - - let g:airline#themes#solarized#palette.normal_modified = { - \ 'airline_c': [s:NM[0].g, s:NM[1].g, - \ s:NM[0].t, s:NM[1].t, s:NM[2]]} - - let g:airline#themes#solarized#palette.normal_modified.airline_warning = - \ g:airline#themes#solarized#palette.normal.airline_warning - - let g:airline#themes#solarized#palette.insert = airline#themes#generate_color_map( - \ [s:I1[0].g, s:I1[1].g, s:I1[0].t, s:I1[1].t, s:I1[2]], - \ [s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]], - \ [s:I3[0].g, s:I3[1].g, s:I3[0].t, s:I3[1].t, s:I3[2]]) - - let g:airline#themes#solarized#palette.insert.airline_warning = - \ g:airline#themes#solarized#palette.normal.airline_warning - - let g:airline#themes#solarized#palette.insert_modified = { - \ 'airline_c': [s:IM[0].g, s:IM[1].g, - \ s:IM[0].t, s:IM[1].t, s:IM[2]]} - - let g:airline#themes#solarized#palette.insert_modified.airline_warning = - \ g:airline#themes#solarized#palette.normal.airline_warning - - let g:airline#themes#solarized#palette.visual = airline#themes#generate_color_map( - \ [s:V1[0].g, s:V1[1].g, s:V1[0].t, s:V1[1].t, s:V1[2]], - \ [s:V2[0].g, s:V2[1].g, s:V2[0].t, s:V2[1].t, s:V2[2]], - \ [s:V3[0].g, s:V3[1].g, s:V3[0].t, s:V3[1].t, s:V3[2]]) - - let g:airline#themes#solarized#palette.visual.airline_warning = - \ g:airline#themes#solarized#palette.normal.airline_warning - - let g:airline#themes#solarized#palette.visual_modified = { - \ 'airline_c': [s:VM[0].g, s:VM[1].g, - \ s:VM[0].t, s:VM[1].t, s:VM[2]]} - - let g:airline#themes#solarized#palette.visual_modified.airline_warning = - \ g:airline#themes#solarized#palette.normal.airline_warning - - let g:airline#themes#solarized#palette.replace = airline#themes#generate_color_map( - \ [s:R1[0].g, s:R1[1].g, s:R1[0].t, s:R1[1].t, s:R1[2]], - \ [s:R2[0].g, s:R2[1].g, s:R2[0].t, s:R2[1].t, s:R2[2]], - \ [s:R3[0].g, s:R3[1].g, s:R3[0].t, s:R3[1].t, s:R3[2]]) - - let g:airline#themes#solarized#palette.replace.airline_warning = - \ g:airline#themes#solarized#palette.normal.airline_warning - - let g:airline#themes#solarized#palette.replace_modified = { - \ 'airline_c': [s:RM[0].g, s:RM[1].g, - \ s:RM[0].t, s:RM[1].t, s:RM[2]]} - - let g:airline#themes#solarized#palette.replace_modified.airline_warning = - \ g:airline#themes#solarized#palette.normal.airline_warning - - let g:airline#themes#solarized#palette.tabline = {} - - let g:airline#themes#solarized#palette.tabline.airline_tab = [ - \ s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]] - - let g:airline#themes#solarized#palette.tabline.airline_tabtype = [ - \ s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]] -endfunction - -call airline#themes#solarized#refresh() - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/term.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/term.vim deleted file mode 100644 index 288ca6ac..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/term.vim +++ /dev/null @@ -1,92 +0,0 @@ - -" vim-airline 'term' theme -" it is using current terminal colorscheme -" and in gvim i left colors from 'wombat' theme but i am not using it anyway - -" Normal mode -" [ guifg, guibg, ctermfg, ctermbg, opts ] -let s:N1 = [ '#141413' , '#CAE682' , 232 , 2 ] " mode -let s:N2 = [ '#CAE682' , '#32322F' , 2 , 'black' ] " info -let s:N3 = [ '#CAE682' , '#242424' , 2 , 233 ] " statusline -let s:N4 = [ '#86CD74' , 10 ] " mode modified - -" Insert mode -let s:I1 = [ '#141413' , '#FDE76E' , 232 , 3 ] -let s:I2 = [ '#FDE76E' , '#32322F' , 3 , 'black' ] -let s:I3 = [ '#FDE76E' , '#242424' , 3 , 233 ] -let s:I4 = [ '#FADE3E' , 11 ] - -" Visual mode -let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 4 ] -let s:V2 = [ '#B5D3F3' , '#32322F' , 4 , 'black' ] -let s:V3 = [ '#B5D3F3' , '#242424' , 4 , 233 ] -let s:V4 = [ '#7CB0E6' , 12 ] - -" Replace mode -let s:R1 = [ '#141413' , '#E5786D' , 232 , 1 ] -let s:R2 = [ '#E5786D' , '#32322F' , 1 , 'black' ] -let s:R3 = [ '#E5786D' , '#242424' , 1 , 233 ] -let s:R4 = [ '#E55345' , 9 ] - -" Paste mode -let s:PA = [ '#94E42C' , 6 ] - -" Info modified -let s:IM = [ '#40403C' , 238 ] - -" Inactive mode -let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] - -let g:airline#themes#term#palette = {} - -let g:airline#themes#term#palette.accents = { - \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], - \ } - -let g:airline#themes#term#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#term#palette.normal_modified = { - \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , - \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#term#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#term#palette.insert_modified = { - \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , - \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#term#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#term#palette.visual_modified = { - \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , - \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#term#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) -let g:airline#themes#term#palette.replace_modified = { - \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , - \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#term#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , - \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } - - -let g:airline#themes#term#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#term#palette.inactive_modified = { - \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } - - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#term#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#DADADA' , '#242424' , 253 , 234 , '' ] , - \ [ '#DADADA' , '#40403C' , 253 , 238 , '' ] , - \ [ '#141413' , '#DADADA' , 232 , 253 , 'bold' ] ) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/tomorrow.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/tomorrow.vim deleted file mode 100644 index f382fc14..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/tomorrow.vim +++ /dev/null @@ -1,44 +0,0 @@ -let g:airline#themes#tomorrow#palette = {} - -function! airline#themes#tomorrow#refresh() - let g:airline#themes#tomorrow#palette.accents = { - \ 'red': airline#themes#get_highlight('Constant'), - \ } - - let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Directory', 'fg'], 'bold') - let s:N2 = airline#themes#get_highlight('Pmenu') - let s:N3 = airline#themes#get_highlight('CursorLine') - let g:airline#themes#tomorrow#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - - let group = airline#themes#get_highlight('vimCommand') - let g:airline#themes#tomorrow#palette.normal_modified = { - \ 'airline_c': [ group[0], '', group[2], '', '' ] - \ } - - let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['MoreMsg', 'fg'], 'bold') - let s:I2 = airline#themes#get_highlight2(['MoreMsg', 'fg'], ['Normal', 'bg']) - let s:I3 = s:N3 - let g:airline#themes#tomorrow#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - let g:airline#themes#tomorrow#palette.insert_modified = g:airline#themes#tomorrow#palette.normal_modified - - let s:R1 = airline#themes#get_highlight('Error', 'bold') - let s:R2 = s:N2 - let s:R3 = s:N3 - let g:airline#themes#tomorrow#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - let g:airline#themes#tomorrow#palette.replace_modified = g:airline#themes#tomorrow#palette.normal_modified - - let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Constant', 'fg'], 'bold') - let s:V2 = airline#themes#get_highlight2(['Constant', 'fg'], ['Normal', 'bg']) - let s:V3 = s:N3 - let g:airline#themes#tomorrow#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - let g:airline#themes#tomorrow#palette.visual_modified = g:airline#themes#tomorrow#palette.normal_modified - - let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['CursorLine', 'bg']) - let g:airline#themes#tomorrow#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) - let g:airline#themes#tomorrow#palette.inactive_modified = { - \ 'airline_c': [ group[0], '', group[2], '', '' ] - \ } -endfunction - -call airline#themes#tomorrow#refresh() - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/ubaryd.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/ubaryd.vim deleted file mode 100644 index 70232ef8..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/ubaryd.vim +++ /dev/null @@ -1,64 +0,0 @@ -" vim-airline companion theme of Ubaryd -" (https://github.com/Donearm/Ubaryd) - -" Normal mode -let s:N1 = [ '#141413' , '#c7b386' , 232 , 252 ] " blackestgravel & bleaksand -let s:N2 = [ '#c7b386' , '#45413b' , 252, 238 ] " bleaksand & deepgravel -let s:N3 = [ '#b88853' , '#242321' , 137, 235 ] " toffee & darkgravel -let s:N4 = [ '#857f78' , 243 ] " gravel - -" Insert mode -let s:I1 = [ '#1a1a18' , '#fade3e' , 232 , 221 ] " blackestgravel & warmcorn -let s:I2 = [ '#c7b386' , '#45413b' , 252 , 238 ] " bleaksand & deepgravel -let s:I3 = [ '#f4cf86' , '#242321' , 222 , 235 ] " lighttannedskin & darkgravel - -" Visual mode -let s:V1 = [ '#1c1b1a' , '#9a4820' , 233 , 88 ] " blackgravel & warmadobe -let s:V2 = [ '#000000' , '#88633f' , 16 , 95 ] " coal & cappuccino -let s:V3 = [ '#88633f' , '#c7b386' , 95 , 252 ] " cappuccino & bleaksand -let s:V4 = [ '#c14c3d' , 160 ] " tannedumbrella - -" Replace mode -let s:RE = [ '#c7915b' , 173 ] " nut - -" Paste mode -let s:PA = [ '#f9ef6d' , 154 ] " bleaklemon - -let s:IA = [ s:N2[1], s:N3[1], s:N2[3], s:N3[3], '' ] - -let g:airline#themes#ubaryd#palette = {} - -let g:airline#themes#ubaryd#palette.accents = { - \ 'red': [ '#ff7400' , '' , 196 , '' , '' ], - \ } - -let g:airline#themes#ubaryd#palette.inactive = { - \ 'airline_a' : [ s:N2[1] , s:N3[1] , s:N2[3] , s:N3[3] , '' ] } - - -let g:airline#themes#ubaryd#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#ubaryd#palette.normal_modified = { - \ 'airline_a' : [ s:N2[0] , s:N4[0] , s:N2[2] , s:N4[1] , '' ] , - \ 'airline_c' : [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } - - -let g:airline#themes#ubaryd#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#ubaryd#palette.insert_modified = { - \ 'airline_c' : [ s:V2[1] , s:N2[1] , s:V2[3] , s:N2[3] , '' ] } -let g:airline#themes#ubaryd#palette.insert_paste = { - \ 'airline_a' : [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] } - - -let g:airline#themes#ubaryd#palette.replace = copy(airline#themes#ubaryd#palette.insert) -let g:airline#themes#ubaryd#palette.replace.airline_a = [ s:I1[0] , s:RE[0] , s:I1[2] , s:RE[1] , '' ] -let g:airline#themes#ubaryd#palette.replace_modified = g:airline#themes#ubaryd#palette.insert_modified - - -let g:airline#themes#ubaryd#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#ubaryd#palette.visual_modified = { - \ 'airline_c' : [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } - -let g:airline#themes#ubaryd#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#ubaryd#palette.inactive_modified = { - \ 'airline_c' : [ s:V1[1] , '' , s:V1[3] , '' , '' ] } - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/understated.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/understated.vim deleted file mode 100644 index b3e79179..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/understated.vim +++ /dev/null @@ -1,43 +0,0 @@ -let g:airline#themes#understated#palette = {} - -let s:N1 = ['#FFFFFF', '#5F87FF', 15, 69] " Outside blocks in normal mode (mode and file position) -let s:N2 = ['#AFAF87', '#5F5F5F', 144, 59] " Next blocks inside (branch and file format) -let s:N3 = ['#AFAF87', '#5F5F5F', 144, 59] " The middle block - -let g:airline#themes#understated#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#understated#palette.normal_modified = {'airline_c': ['#ffffff', '#5f005f', 144, 59, 'bold'] ,} - -let s:I1 = ['#FFFFFF', '#87AF5F', 15, 107] " Outside blocks in normal mode (mode and file position) -let s:I2 = ['#AFAF87', '#5F5F5F', 144, 59] " Next blocks inside (branch and file format) -let s:I3 = ['#AFAF87', '#5F5F5F', 144, 59] " The middle block -let g:airline#themes#understated#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#understated#palette.insert_modified = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, 'bold'] ,} -let g:airline#themes#understated#palette.insert_paste = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, ''] ,} - -let g:airline#themes#understated#palette.replace = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#understated#palette.replace.airline_a = ['#FFFFFF', '#870000', 15, 88, ''] -let g:airline#themes#understated#palette.replace_modified = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, 'bold'] ,} - -let s:V1 = ['#FFFFFF', '#AF5F00', 15, 130] -let s:V2 = ['#AFAF87', '#5F5F5F', 144, 59] -let s:V3 = ['#AFAF87', '#5F5F5F', 144, 59] -let g:airline#themes#understated#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#understated#palette.visual_modified = {'airline_c': [ '#AFAF87', '#5f005f', 144, 59, 'bold'] ,} - -let s:V1 = ['#080808', '#FFAF00', 232, 214] -let s:IA1 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] -let s:IA2 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] -let s:IA3 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] -let g:airline#themes#understated#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) -let g:airline#themes#understated#palette.inactive_modified = {'airline_c': ['#4E4E4E', '', 239, '', 'bold'] ,} - -let g:airline#themes#understated#palette.accents = {'red': ['#FF0000', '', 88, '']} - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#understated#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ ['#FFFFFF', '#1C1C1C', 15, 234, '' ], - \ ['#FFFFFF', '#262626', 15, 235, '' ], - \ ['#FFFFFF', '#303030', 15, 236, 'bold']) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/wombat.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/wombat.vim deleted file mode 100644 index 622683ff..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/wombat.vim +++ /dev/null @@ -1,90 +0,0 @@ -" vim-airline companion theme of Wombat -" looks great with wombat256 vim colorscheme - -" Normal mode -" [ guifg, guibg, ctermfg, ctermbg, opts ] -let s:N1 = [ '#141413' , '#CAE682' , 232 , 192 ] " mode -let s:N2 = [ '#CAE682' , '#32322F' , 192 , 238 ] " info -let s:N3 = [ '#CAE682' , '#242424' , 192 , 235 ] " statusline -let s:N4 = [ '#86CD74' , 113 ] " mode modified - -" Insert mode -let s:I1 = [ '#141413' , '#FDE76E' , 232 , 227 ] -let s:I2 = [ '#FDE76E' , '#32322F' , 227 , 238 ] -let s:I3 = [ '#FDE76E' , '#242424' , 227 , 235 ] -let s:I4 = [ '#FADE3E' , 221 ] - -" Visual mode -let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 153 ] -let s:V2 = [ '#B5D3F3' , '#32322F' , 153 , 238 ] -let s:V3 = [ '#B5D3F3' , '#242424' , 153 , 235 ] -let s:V4 = [ '#7CB0E6' , 111 ] - -" Replace mode -let s:R1 = [ '#141413' , '#E5786D' , 232 , 173 ] -let s:R2 = [ '#E5786D' , '#32322F' , 173 , 238 ] -let s:R3 = [ '#E5786D' , '#242424' , 173 , 235 ] -let s:R4 = [ '#E55345' , 203 ] - -" Paste mode -let s:PA = [ '#94E42C' , 47 ] - -" Info modified -let s:IM = [ '#40403C' , 238 ] - -" Inactive mode -let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] - -let g:airline#themes#wombat#palette = {} - -let g:airline#themes#wombat#palette.accents = { - \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], - \ } - -let g:airline#themes#wombat#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#wombat#palette.normal_modified = { - \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , - \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#wombat#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#wombat#palette.insert_modified = { - \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , - \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#wombat#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#wombat#palette.visual_modified = { - \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , - \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#wombat#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) -let g:airline#themes#wombat#palette.replace_modified = { - \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , - \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } - - -let g:airline#themes#wombat#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , - \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , - \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } - - -let g:airline#themes#wombat#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) -let g:airline#themes#wombat#palette.inactive_modified = { - \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } - - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#wombat#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#DADADA' , '#242424' , 253 , 234 , '' ] , - \ [ '#DADADA' , '#40403C' , 253 , 238 , '' ] , - \ [ '#141413' , '#DADADA' , 232 , 253 , 'bold' ] ) - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/xtermlight.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/xtermlight.vim deleted file mode 100644 index 21d349ef..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/xtermlight.vim +++ /dev/null @@ -1,45 +0,0 @@ -let g:airline#themes#xtermlight#palette = {} - -let s:N1 = [ '#eeeeee' , '#005fff' , 255 , 27 ] -let s:N2 = [ '#000087' , '#00d7ff' , 18 , 45 ] -let s:N3 = [ '#005fff' , '#afffff' , 27 , 159 ] -let g:airline#themes#xtermlight#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) -let g:airline#themes#xtermlight#palette.normal_modified = { - \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , - \ } - - -let s:I1 = [ '#eeeeee' , '#00875f' , 255 , 29 ] -let s:I2 = [ '#005f00' , '#00d787' , 22 , 42 ] -let s:I3 = [ '#005f5f' , '#afff87' , 23 , 156 ] -let g:airline#themes#xtermlight#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#xtermlight#palette.insert_modified = { - \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , - \ } -let g:airline#themes#xtermlight#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , - \ } - - -let g:airline#themes#xtermlight#palette.replace = copy(g:airline#themes#xtermlight#palette.insert) -let g:airline#themes#xtermlight#palette.replace.airline_a = [ s:I2[0] , '#ff0000' , s:I1[2] , 196 , '' ] -let g:airline#themes#xtermlight#palette.replace_modified = g:airline#themes#xtermlight#palette.insert_modified - - -let s:V1 = [ '#eeeeee' , '#ff5f00' , 255 , 202 ] -let s:V2 = [ '#5f0000' , '#ffaf00' , 52 , 214 ] -let s:V3 = [ '#d75f00' , '#ffff87' , 166 , 228 ] -let g:airline#themes#xtermlight#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#xtermlight#palette.visual_modified = { - \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , - \ } - - -let s:IA1 = [ '#6c6c6c' , '#b2b2b2' , 242 , 249 , '' ] -let s:IA2 = [ '#8a8a8a' , '#d0d0d0' , 245 , 252 , '' ] -let s:IA3 = [ '#a8a8a8' , '#eeeeee' , 248 , 255 , '' ] -let g:airline#themes#xtermlight#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) -let g:airline#themes#xtermlight#palette.inactive_modified = { - \ 'airline_c': [ '#d70000' , '' , 160 , '' , '' ] , - \ } - diff --git a/sources_non_forked/vim-airline-themes/autoload/airline/themes/zenburn.vim b/sources_non_forked/vim-airline-themes/autoload/airline/themes/zenburn.vim deleted file mode 100644 index 9883c213..00000000 --- a/sources_non_forked/vim-airline-themes/autoload/airline/themes/zenburn.vim +++ /dev/null @@ -1,44 +0,0 @@ -let g:airline#themes#zenburn#palette = {} - -function! airline#themes#zenburn#refresh() - let g:airline#themes#zenburn#palette.accents = { - \ 'red': airline#themes#get_highlight('Constant'), - \ } - - let s:N1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Folded', 'fg'], 'bold') - let s:N2 = airline#themes#get_highlight('Folded') - let s:N3 = airline#themes#get_highlight('NonText') - - let g:airline#themes#zenburn#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - let s:Nmod = airline#themes#get_highlight('Comment') - let g:airline#themes#zenburn#palette.normal_modified = { - \ 'airline_c': s:Nmod - \ } - - let s:I1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['String', 'fg'], 'bold') - let s:I2 = airline#themes#get_highlight2(['String', 'fg'], ['Folded', 'bg']) - let s:I3 = s:N3 - let g:airline#themes#zenburn#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - let g:airline#themes#zenburn#palette.insert_modified = g:airline#themes#zenburn#palette.normal_modified - - let s:R1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Comment', 'fg'], 'bold') - let s:R2 = airline#themes#get_highlight2(['Comment', 'fg'], ['Folded', 'bg']) - let s:R3 = s:N3 - let g:airline#themes#zenburn#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - let g:airline#themes#zenburn#palette.replace_modified = g:airline#themes#zenburn#palette.normal_modified - - let s:V1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Identifier', 'fg'], 'bold') - let s:V2 = airline#themes#get_highlight2(['Identifier', 'fg'], ['Folded', 'bg']) - let s:V3 = s:N3 - let g:airline#themes#zenburn#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - let g:airline#themes#zenburn#palette.visual_modified = g:airline#themes#zenburn#palette.normal_modified - - let s:IA = airline#themes#get_highlight('NonText') - let g:airline#themes#zenburn#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) - let g:airline#themes#zenburn#palette.inactive_modified = { - \ 'airline_c': s:Nmod - \ } -endfunction - -call airline#themes#zenburn#refresh() - diff --git a/sources_non_forked/vim-airline-themes/doc/airline-themes.txt b/sources_non_forked/vim-airline-themes/doc/airline-themes.txt deleted file mode 100644 index 71f90751..00000000 --- a/sources_non_forked/vim-airline-themes/doc/airline-themes.txt +++ /dev/null @@ -1,128 +0,0 @@ -*airline-themes.txt* Themes for vim-airline - _ _ _ _ ~ - __ _(_)_ __ ___ __ _(_)_ __| (_)_ __ ___ ~ - \ \ / / | '_ ` _ \ _____ / _` | | '__| | | '_ \ / _ \ ~ - \ V /| | | | | | |_____| (_| | | | | | | | | | __/ ~ - \_/ |_|_| |_| |_| \__,_|_|_| |_|_|_| |_|\___| ~ - ~ -============================================================================== -CONTENTS *airline-theme-contents* - - 01. Intro ........................................ |airline-themes-intro| - 02. Features ........................................... |airline-themes| - 03. Configuration ........................ |airline-themes-configuration| - 04. Contributions ........................ |airline-themes-contributions| - 05. License .................................... |airline-themes-license| - -============================================================================== -INTRODUCTION *airline-themes-intro* - -This is a plugin for vim-airline and provides several themes to be used in -conjuction with |vim-airline| - -============================================================================== -FEATURES *airline-themes-list* - -Currently this repository contains the following themes: - - * badwolf - * base16 - * base16_3024 - * base16_apathy - * base16_ashes - * base16_atelierdune - * base16_atelierforest - * base16_atelierheath - * base16_atelierlakeside - * base16_atelierseaside - * base16_bespin - * base16_brewer - * base16_bright - * base16_chalk - * base16_codeschool - * base16_colors - * base16_default - * base16_eighties - * base16_embers - * base16_flat - * base16_google - * base16_grayscale - * base16_greenscreen - * base16_harmonic16 - * base16_hopscotch - * base16_isotope - * base16_londontube - * base16_marrakesh - * base16_mocha - * base16_monokai - * base16_ocean - * base16_paraiso - * base16_pop - * base16_railscasts - * base16_shapeshifter - * base16_solarized - * base16_summerfruit - * base16_tomorrow - * base16_twilight - * base16color - * behelit - * bubblegum - * cool - * dark - * distinguished - * durant - * hybrid - * hybridline - * jellybeans - * kalisi - * kolor - * laederon - * light - * lucius - * luna - * molokai - * monochrome - * murmur - * papercolor - * powerlineish - * raven - * serene - * silver - * simple - * sol - * solarized (|airline-theme-solarized|) - * term - * tomorrow - * ubaryd - * understated - * wombat - * xtermlight - * zenburn - -============================================================================== -NAME *airline-themes-configuration* - - |airline-theme-solarized| -*g:solarized_base16* - -Base16 has a Solarized theme with the usual colors, but mapped in the -terminal differently. The main difference is that the bright colors, -Ansi 9-15, are left the same as their Ansi 1-7 counterparts. The -remaining solarized colors are mapped into higher indexes by using -Base16 Shell. To enable it: -> - let g:solarized_base16 = 1 -> -See also https://github.com/blueyed/vim-colors-solarized/commit/92f2f994. - -============================================================================== -CONTRIBUTIONS *airline-themes-contributions* - -Contributions and pull requests are welcome. - -============================================================================== -LICENSE *airline-themes-license* - -MIT License. Copyright © 2013-2016 Bailey Ling, et al - - vim:tw=78:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-airline-themes/plugin/airline-themes.vim b/sources_non_forked/vim-airline-themes/plugin/airline-themes.vim deleted file mode 100644 index 1be6b473..00000000 --- a/sources_non_forked/vim-airline-themes/plugin/airline-themes.vim +++ /dev/null @@ -1,7 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling & Contributors. -" vim: et ts=2 sts=2 sw=2 - -if (exists('g:loaded_airline_themes') && g:loaded_airline_themes) - finish -endif -let g:loaded_airline_themes = 1 diff --git a/sources_non_forked/vim-airline/.gitignore b/sources_non_forked/vim-airline/.gitignore deleted file mode 100644 index 296f094e..00000000 --- a/sources_non_forked/vim-airline/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -doc/tags -*.lock -.vim-flavor diff --git a/sources_non_forked/vim-airline/.travis.yml b/sources_non_forked/vim-airline/.travis.yml deleted file mode 100644 index 54deccf7..00000000 --- a/sources_non_forked/vim-airline/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: ruby -before_install: - - curl -f -L "https://raw.githubusercontent.com/vim-airline/vim-airline-themes/master/autoload/airline/themes/simple.vim" -o autoload/airline/themes/simple.vim - - curl -f -L "https://raw.githubusercontent.com/vim-airline/vim-airline-themes/master/autoload/airline/themes/molokai.vim" -o autoload/airline/themes/molokai.vim - - mkdir colors && curl -f -L 'https://raw.githubusercontent.com/tomasr/molokai/master/colors/molokai.vim' -o colors/molokai.vim -rvm: - - 1.9.3 -script: rake ci diff --git a/sources_non_forked/vim-airline/CHANGELOG.md b/sources_non_forked/vim-airline/CHANGELOG.md deleted file mode 100644 index b37ee18c..00000000 --- a/sources_non_forked/vim-airline/CHANGELOG.md +++ /dev/null @@ -1,120 +0,0 @@ -# Change Log - -This is the Changelog for the vim-airline project. - -## [Unreleased] - -## [0.8] - 2016-03-09 -- Changes - - Airline converted to an organization and moved to new [repository](https://github.com/vim-airline/vim-airline) - - Themes have been split into an separate repository [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes) -- Improvements - - Extensions - - branch: support Git and Mercurial simultaneously, untracked files - - whitespace: new mixed-indent rule - - Windows support - - Many bug fixes - - Support for Neovim -- New features - - Many new themes - - Extensions/integration - - [taboo](https://github.com/gcmt/taboo.vim) - - [vim-ctrlspace](https://github.com/szw/vim-ctrlspace) - - [quickfixsigns](https://github.com/tomtom/quickfixsigns_vim) - - [YouCompleteMe](https://github.com/Valloric/YouCompleteMe) - - [po.vim](http://www.vim.org/scripts/script.php?script_id=695) - - [unicode.vim](https://github.com/chrisbra/unicode.vim) - - wordcount - - crypt indicator - - byte order mark indicator - - Tabline's tab mode can display splits simultaneously - -## [0.7] - 2014-12-10 -- New features - - accents support; allowing multiple colors/styles in the same section - - extensions: eclim - - themes: understated, monochrome, murmur, sol, lucius -- Improvements - - solarized theme; support for 8 color terminals - - tabline resizes dynamically based on number of open buffers - - miscellaneous bug fixes - -## [0.6] - 2013-10-08 - -- New features - - accents support; allowing multiple colors/styles in the same section - - extensions: eclim - - themes: understated, monochrome, murmur, sol, lucius -- Improvements - - solarized theme; support for 8 color terminals - - tabline resizes dynamically based on number of open buffers - - miscellaneous bug fixes - -## [0.5] - 2013-09-13 - -- New features - - smart tabline extension which displays all buffers when only one tab is visible - - automatic section truncation when the window resizes - - support for a declarative style of configuration, allowing parts to contain metadata such as minimum window width or conditional visibility - - themes: zenburn, serene -- Other - - a sizable chunk of vim-airline is now running through a unit testing suite, automated via Travis CI - -## [0.4] - 2013-08-26 - - - New features - - integration with csv.vim and vim-virtualenv - - hunks extension for vim-gitgutter and vim-signify - - automatic theme switching with matching colorschemes - - commands: AirlineToggle - - themes: base16 (all variants) - - Improvements - - integration with undotree, tagbar, and unite - - Other - - refactored core and exposed statusline builder and pipeline - - all extension related g:airline_variables have been deprecated in favor of g:airline#extensions# variables - - extensions found in the runtimepath outside of the default distribution will be automatically loaded - -## [0.3] - 2013-08-12 - -- New features - - first-class integration with tagbar - - white space detection for trailing spaces and mixed indentation - - introduced warning section for syntastic and white space detection - - improved ctrlp integration: colors are automatically selected based on the current airline theme - - new themes: molokai, bubblegum, jellybeans, tomorrow -- Bug fixes - - improved handling of eventignore used by other plugins -- Other - - code cleaned up for clearer separation between core functionality and extensions - - introduced color extraction from highlight groups, allowing themes to be generated off of the active colorscheme (e.g. jellybeans and tomorrow) - - License changed to MIT - -## [0.2] - 2013-07-28 - -- New features - - iminsert detection - - integration with vimshell, vimfiler, commandt, lawrencium - - enhanced bufferline theming - - support for ctrlp theming - - support for custom window excludes -- New themes - - luna and wombat -- Bug fixes - - refresh branch name after switching with a shell command - -## [0.1] - 2013-07-17 - -- Initial release - - integration with other plugins: netrw, unite, nerdtree, undotree, gundo, tagbar, minibufexplr, ctrlp - - support for themes: 8 included - -[Unreleased]: https://github.com/vim-airline/vim-airline/compare/v0.8...HEAD -[0.8]: https://github.com/vim-airline/vim-airline/compare/v0.7...v0.8 -[0.7]: https://github.com/vim-airline/vim-airline/compare/v0.6...v0.7 -[0.6]: https://github.com/vim-airline/vim-airline/compare/v0.5...v0.6 -[0.5]: https://github.com/vim-airline/vim-airline/compare/v0.4...v0.5 -[0.4]: https://github.com/vim-airline/vim-airline/compare/v0.3...v0.4 -[0.3]: https://github.com/vim-airline/vim-airline/compare/v0.2...v0.3 -[0.2]: https://github.com/vim-airline/vim-airline/compare/v0.1...v0.2 -[0.1]: https://github.com/vim-airline/vim-airline/releases/tag/v0.1 diff --git a/sources_non_forked/vim-airline/CONTRIBUTING.md b/sources_non_forked/vim-airline/CONTRIBUTING.md deleted file mode 100644 index f97699ec..00000000 --- a/sources_non_forked/vim-airline/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributions - -Contributions and pull requests are welcome. Please take note of the following guidelines: - -* Adhere to the existing style as much as possible; notably, 2 space indents and long-form keywords. -* Keep the history clean! Squash your branches before you submit a pull request. `pull --rebase` is your friend. -* Any changes to the core should be tested against Vim 7.2. - -# Bugs - -Tracking down bugs can take a very long time due to different configurations, versions, and operating systems. To ensure a timely response, please help me out by doing the following: - -* Reproduce it with this [minivimrc][7] repository to rule out any configuration conflicts. Even better, create a `gist` of your vimrc that is compatible with [pathogen][11]. -* And to make it easier to reproduce, please supply the following: - * the `:version` of vim - * the commit of vim-airline you're using - * the OS that you're using, including terminal emulator, GUI vs non-GUI - -# Themes - -* If you submit a theme, please create a screenshot so it can be added to the [Wiki][14]. -* In the majority of cases, modifications to colors of existing themes will likely be rejected. Themes are a subjective thing, so while you may prefer that a particular color be darker, another user will prefer it to be lighter, or something entirely different. The more popular the theme, the more unlikely the change will be accepted. However, it's pretty simple to create your own theme; copy the theme to `~/.vim/autoload/airline/themes` under a new name with your modifications, and it can be used. - -# Maintenance - -If you would like to take a more active role in improving vim-airline, please consider [becoming a maintainer][43]. - - -[7]: https://github.com/bling/minivimrc -[11]: https://github.com/tpope/vim-pathogen -[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots -[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer diff --git a/sources_non_forked/vim-airline/Gemfile b/sources_non_forked/vim-airline/Gemfile deleted file mode 100644 index 088f22e3..00000000 --- a/sources_non_forked/vim-airline/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source 'https://rubygems.org' -gem 'vim-flavor', '~> 1.1' diff --git a/sources_non_forked/vim-airline/ISSUE_TEMPLATE.md b/sources_non_forked/vim-airline/ISSUE_TEMPLATE.md deleted file mode 100644 index 11f5cd54..00000000 --- a/sources_non_forked/vim-airline/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,17 +0,0 @@ -#### environment - -- vim: ???? -- vim-airline: ???? -- OS: ???? -if you are using terminal: -- terminal: ???? -- $TERM variable: ??? -- color configuration (:set t_Co?): - -#### actual behavior - -???? - -#### expected behavior - -???? diff --git a/sources_non_forked/vim-airline/LICENSE b/sources_non_forked/vim-airline/LICENSE deleted file mode 100644 index 875accab..00000000 --- a/sources_non_forked/vim-airline/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2013-2016 Bailey Ling - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/sources_non_forked/vim-airline/README.md b/sources_non_forked/vim-airline/README.md deleted file mode 100644 index d3b898fe..00000000 --- a/sources_non_forked/vim-airline/README.md +++ /dev/null @@ -1,246 +0,0 @@ -# vim-airline [![Build Status](https://travis-ci.org/vim-airline/vim-airline.png)](https://travis-ci.org/vim-airline/vim-airline) - -Lean & mean status/tabline for vim that's light as air. - -![img](https://github.com/vim-airline/vim-airline/wiki/screenshots/demo.gif) - -# Features - -* Tiny core written with extensibility in mind ([open/closed principle][8]). -* Integrates with a variety of plugins, including: [vim-bufferline][6], - [fugitive][4], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16], - [undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29], - [vim-signify][30], [quickfixsigns][39], [syntastic][5], [eclim][34], - [lawrencium][21], [virtualenv][31], [tmuxline][35], [taboo.vim][37], - [ctrlspace][38] and more. -* Looks good with regular fonts and provides configuration points so you can use unicode or powerline symbols. -* Optimized for speed; it loads in under a millisecond. -* Extensive suite of themes for popular color schemes including [solarized][23] (dark and light), [tomorrow][24] (all variants), [base16][32] (all variants), [molokai][25], [jellybeans][26] and others. - Note these are now external to this plugin. See [below][46] for detail. -* Supports 7.2 as the minimum Vim version. -* The master branch tries to be as stable as possible, and new features are merged in only after they have gone through a [full regression test][33]. -* Unit testing suite. - -## Straightforward customization - -If you don't like the defaults, you can replace all sections with standard `statusline` syntax. Give your statusline that you've built over the years a face lift. - -![image](https://f.cloud.github.com/assets/306502/1009429/d69306da-0b38-11e3-94bf-7c6e3eef41e9.png) - -## Themes - -Themes have moved to -another repository as of [this commit][45]. - -Install the themes as you would this plugin (Vundle example): - -```vim -Plugin 'vim-airline/vim-airline' -Plugin 'vim-airline/vim-airline-themes' -``` - -See https://github.com/vim-airline/vim-airline-themes for more. - -## Automatic truncation - -Sections and parts within sections can be configured to automatically hide when the window size shrinks. - -![image](https://f.cloud.github.com/assets/306502/1060831/05c08aac-11bc-11e3-8470-a506a3037f45.png) - -## Smarter tab line - -Automatically displays all buffers when there's only one tab open. - -![tabline](https://f.cloud.github.com/assets/306502/1072623/44c292a0-1495-11e3-9ce6-dcada3f1c536.gif) - -This is disabled by default; add the following to your vimrc to enable the extension: - - let g:airline#extensions#tabline#enabled = 1 - -Separators can be configured independently for the tabline, so here is how you can define "straight" tabs: - - let g:airline#extensions#tabline#left_sep = ' ' - let g:airline#extensions#tabline#left_alt_sep = '|' - -## Seamless integration - -vim-airline integrates with a variety of plugins out of the box. These extensions will be lazily loaded if and only if you have the other plugins installed (and of course you can turn them off). - -#### [ctrlp.vim][10] -![image](https://f.cloud.github.com/assets/306502/962258/7345a224-04ec-11e3-8b5a-f11724a47437.png) - -#### [unite.vim][9] -![image](https://f.cloud.github.com/assets/306502/962319/4d7d3a7e-04ed-11e3-9d59-ab29cb310ff8.png) - -#### [tagbar][19] -![image](https://f.cloud.github.com/assets/306502/962150/7e7bfae6-04ea-11e3-9e28-32af206aed80.png) - -#### [csv.vim][28] -![image](https://f.cloud.github.com/assets/306502/962204/cfc1210a-04eb-11e3-8a93-42e6bcd21efa.png) - -#### [syntastic][5] -![image](https://f.cloud.github.com/assets/306502/962864/9824c484-04f7-11e3-9928-da94f8c7da5a.png) - -#### hunks ([vim-gitgutter][29] & [vim-signify][30]) -![image](https://f.cloud.github.com/assets/306502/995185/73fc7054-09b9-11e3-9d45-618406c6ed98.png) - -#### [virtualenv][31] -![image](https://f.cloud.github.com/assets/390964/1022566/cf81f830-0d98-11e3-904f-cf4fe3ce201e.png) - -#### [tmuxline][35] -![image](https://f.cloud.github.com/assets/1532071/1559276/4c28fbac-4fc7-11e3-90ef-7e833d980f98.gif) - -#### [promptline][36] -![airline-promptline-sc](https://f.cloud.github.com/assets/1532071/1871900/7d4b28a0-789d-11e3-90e4-16f37269981b.gif) - -#### [ctrlspace][38] -![papercolor_with_ctrlspace](https://cloud.githubusercontent.com/assets/493242/12912041/7fc3c6ec-cf16-11e5-8775-8492b9c64ebf.png) - -## Extras - -vim-airline also supplies some supplementary stand-alone extensions. In addition to the tabline extension mentioned earlier, there is also: - -#### whitespace -![image](https://f.cloud.github.com/assets/306502/962401/2a75385e-04ef-11e3-935c-e3b9f0e954cc.png) - -## Configurable and extensible - -#### Fine-tuned configuration - -Every section is composed of parts, and you can reorder and reconfigure them at will. - -![image](https://f.cloud.github.com/assets/306502/1073278/f291dd4c-14a3-11e3-8a83-268e2753f97d.png) - -Sections can contain accents, which allows for very granular control of visuals (see configuration [here](https://github.com/vim-airline/vim-airline/issues/299#issuecomment-25772886)). - -![image](https://f.cloud.github.com/assets/306502/1195815/4bfa38d0-249d-11e3-823e-773cfc2ca894.png) - -#### Extensible pipeline - -Completely transform the statusline to your liking. Build out the statusline as you see fit by extracting colors from the current colorscheme's highlight groups. - -![allyourbase](https://f.cloud.github.com/assets/306502/1022714/e150034a-0da7-11e3-94a5-ca9d58a297e8.png) - -# Rationale - -There's already [powerline][2], why yet another statusline? - -* 100% vimscript; no python needed. - -What about [vim-powerline][1]? - -* vim-powerline has been deprecated in favor of the newer, unifying powerline, which is under active development; the new version is written in python at the core and exposes various bindings such that it can style statuslines not only in vim, but also tmux, bash, zsh, and others. - -# Where did the name come from? - -I wrote the initial version on an airplane, and since it's light as air it turned out to be a good name. Thanks for flying vim! - -# Installation - -This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers: - -* [Pathogen][11] - * `git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline` - * Remember to run `:Helptags` to generate help tags -* [NeoBundle][12] - * `NeoBundle 'vim-airline/vim-airline'` -* [Vundle][13] - * `Plugin 'vim-airline/vim-airline'` -* [Plug][40] - * `Plug 'vim-airline/vim-airline'` -* [VAM][22] - * `call vam#ActivateAddons([ 'vim-airline' ])` -* manual - * copy all of the files into your `~/.vim` directory - -# Configuration - -`:help airline` - -The default setting of 'laststatus' is for the statusline to not appear until a split is created. If you want it to appear all the time, add the following to your vimrc: -`set laststatus=2` - -# Integrating with powerline fonts - -For the nice looking powerline symbols to appear, you will need to install a patched font. Instructions can be found in the official powerline [documentation][20]. Prepatched fonts can be found in the [powerline-fonts][3] repository. - -Finally, you can add the convenience variable `let g:airline_powerline_fonts = 1` to your vimrc which will automatically populate the `g:airline_symbols` dictionary with the powerline symbols. - -# FAQ - -Solutions to common problems can be found in the [Wiki][27]. - -# Performance - -Whoa! Everything got slow all of a sudden... - -vim-airline strives to make it easy to use out of the box, which means that by default it will look for all compatible plugins that you have installed and enable the relevant extension. - -Many optimizations have been made such that the majority of users will not see any performance degradation, but it can still happen. For example, users who routinely open very large files may want to disable the `tagbar` extension, as it can be very expensive to scan for the name of the current function. - -The [minivimrc][7] project has some helper mappings to troubleshoot performance related issues. - -If you don't want all the bells and whistles enabled by default, you can define a value for `g:airline_extensions`. When this variable is defined, only the extensions listed will be loaded; an empty array would effectively disable all extensions. - -# Screenshots - -A full list of screenshots for various themes can be found in the [Wiki][14]. - -# Maintainers - -The project is currently being maintained by [Bailey Ling][41], [Christian Brabandt][42], and [Mike Hartington][44]. - -If you are interested in becoming a maintainer (we always welcome more maintainers), please [go here][43]. - -# License - -MIT License. Copyright (c) 2013-2016 Bailey Ling. - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/vim-airline/vim-airline/trend.png)](https://bitdeli.com/free "Bitdeli Badge") - -[1]: https://github.com/Lokaltog/vim-powerline -[2]: https://github.com/Lokaltog/powerline -[3]: https://github.com/Lokaltog/powerline-fonts -[4]: https://github.com/tpope/vim-fugitive -[5]: https://github.com/scrooloose/syntastic -[6]: https://github.com/bling/vim-bufferline -[7]: https://github.com/bling/minivimrc -[8]: http://en.wikipedia.org/wiki/Open/closed_principle -[9]: https://github.com/Shougo/unite.vim -[10]: https://github.com/ctrlpvim/ctrlp.vim -[11]: https://github.com/tpope/vim-pathogen -[12]: https://github.com/Shougo/neobundle.vim -[13]: https://github.com/gmarik/vundle -[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots -[15]: https://github.com/techlivezheng/vim-plugin-minibufexpl -[16]: https://github.com/sjl/gundo.vim -[17]: https://github.com/mbbill/undotree -[18]: https://github.com/scrooloose/nerdtree -[19]: https://github.com/majutsushi/tagbar -[20]: https://powerline.readthedocs.org/en/master/installation.html#patched-fonts -[21]: https://bitbucket.org/ludovicchabant/vim-lawrencium -[22]: https://github.com/MarcWeber/vim-addon-manager -[23]: https://github.com/altercation/solarized -[24]: https://github.com/chriskempson/tomorrow-theme -[25]: https://github.com/tomasr/molokai -[26]: https://github.com/nanotech/jellybeans.vim -[27]: https://github.com/vim-airline/vim-airline/wiki/FAQ -[28]: https://github.com/chrisbra/csv.vim -[29]: https://github.com/airblade/vim-gitgutter -[30]: https://github.com/mhinz/vim-signify -[31]: https://github.com/jmcantrell/vim-virtualenv -[32]: https://github.com/chriskempson/base16-vim -[33]: https://github.com/vim-airline/vim-airline/wiki/Test-Plan -[34]: http://eclim.org -[35]: https://github.com/edkolev/tmuxline.vim -[36]: https://github.com/edkolev/promptline.vim -[37]: https://github.com/gcmt/taboo.vim -[38]: https://github.com/szw/vim-ctrlspace -[39]: https://github.com/tomtom/quickfixsigns_vim -[40]: https://github.com/junegunn/vim-plug -[41]: https://github.com/bling -[42]: https://github.com/chrisbra -[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer -[44]: https://github.com/mhartington -[45]: https://github.com/vim-airline/vim-airline/commit/d7fd8ca649e441b3865551a325b10504cdf0711b -[46]: https://github.com/vim-airline/vim-airline#themes diff --git a/sources_non_forked/vim-airline/Rakefile b/sources_non_forked/vim-airline/Rakefile deleted file mode 100644 index 741cfc25..00000000 --- a/sources_non_forked/vim-airline/Rakefile +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env rake - -task :default => [:test] - -task :ci => [:dump, :test] - -task :dump do - sh 'vim --version' -end - -task :test do - sh 'bundle exec vim-flavor test' -end - diff --git a/sources_non_forked/vim-airline/autoload/airline.vim b/sources_non_forked/vim-airline/autoload/airline.vim deleted file mode 100644 index bd14a97f..00000000 --- a/sources_non_forked/vim-airline/autoload/airline.vim +++ /dev/null @@ -1,195 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let g:airline_statusline_funcrefs = get(g:, 'airline_statusline_funcrefs', []) - -let s:sections = ['a','b','c','gutter','x','y','z', 'error', 'warning'] -let s:inactive_funcrefs = [] - -function! airline#add_statusline_func(name) - call airline#add_statusline_funcref(function(a:name)) -endfunction - -function! airline#add_statusline_funcref(function) - if index(g:airline_statusline_funcrefs, a:function) >= 0 - echohl WarningMsg - echo 'The airline statusline funcref '.string(a:function).' has already been added.' - echohl NONE - return - endif - call add(g:airline_statusline_funcrefs, a:function) -endfunction - -function! airline#remove_statusline_func(name) - let i = index(g:airline_statusline_funcrefs, function(a:name)) - if i > -1 - call remove(g:airline_statusline_funcrefs, i) - endif -endfunction - -function! airline#add_inactive_statusline_func(name) - call add(s:inactive_funcrefs, function(a:name)) -endfunction - -function! airline#load_theme() - if exists('*airline#themes#{g:airline_theme}#refresh') - call airline#themes#{g:airline_theme}#refresh() - endif - - let palette = g:airline#themes#{g:airline_theme}#palette - call airline#themes#patch(palette) - - if exists('g:airline_theme_patch_func') - let Fn = function(g:airline_theme_patch_func) - call Fn(palette) - endif - - call airline#highlighter#load_theme() - call airline#extensions#load_theme() - call airline#update_statusline() -endfunction - -function! airline#switch_theme(name) - try - let palette = g:airline#themes#{a:name}#palette "also lazy loads the theme - let g:airline_theme = a:name - catch - echohl WarningMsg | echo 'The specified theme cannot be found.' | echohl NONE - if exists('g:airline_theme') - return - else - let g:airline_theme = 'dark' - endif - endtry - - let w:airline_lastmode = '' - call airline#load_theme() - - " this is required to prevent clobbering the startup info message, i don't know why... - call airline#check_mode(winnr()) -endfunction - -function! airline#switch_matching_theme() - if exists('g:colors_name') - let existing = g:airline_theme - let theme = substitute(g:colors_name, '-', '_', 'g') - try - let palette = g:airline#themes#{theme}#palette - call airline#switch_theme(theme) - return 1 - catch - for map in items(g:airline_theme_map) - if match(g:colors_name, map[0]) > -1 - try - let palette = g:airline#themes#{map[1]}#palette - call airline#switch_theme(map[1]) - catch - call airline#switch_theme(existing) - endtry - return 1 - endif - endfor - endtry - endif - return 0 -endfunction - -function! airline#update_statusline() - if airline#util#getwinvar(winnr(), 'airline_disabled', 0) - return - endif - for nr in filter(range(1, winnr('$')), 'v:val != winnr()') - if airline#util#getwinvar(nr, 'airline_disabled', 0) - continue - endif - call setwinvar(nr, 'airline_active', 0) - let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } - call s:invoke_funcrefs(context, s:inactive_funcrefs) - endfor - - unlet! w:airline_render_left - unlet! w:airline_render_right - for section in s:sections - unlet! w:airline_section_{section} - endfor - - let w:airline_active = 1 - let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } - call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) -endfunction - -let s:contexts = {} -let s:core_funcrefs = [ - \ function('airline#extensions#apply'), - \ function('airline#extensions#default#apply') ] -function! s:invoke_funcrefs(context, funcrefs) - let builder = airline#builder#new(a:context) - let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context) - if err == 1 - let a:context.line = builder.build() - let s:contexts[a:context.winnr] = a:context - call setwinvar(a:context.winnr, '&statusline', '%!airline#statusline('.a:context.winnr.')') - endif -endfunction - -function! airline#statusline(winnr) - if has_key(s:contexts, a:winnr) - return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line - endif - - " in rare circumstances this happens...see #276 - return '' -endfunction - -function! airline#check_mode(winnr) - let context = s:contexts[a:winnr] - - if get(w:, 'airline_active', 1) - let l:m = mode() - if l:m ==# "i" - let l:mode = ['insert'] - elseif l:m ==# "R" - let l:mode = ['replace'] - elseif l:m =~# '\v(v|V||s|S|)' - let l:mode = ['visual'] - elseif l:m ==# "t" - let l:mode = ['terminal'] - else - let l:mode = ['normal'] - endif - let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m) - else - let l:mode = ['inactive'] - let w:airline_current_mode = get(g:airline_mode_map, '__') - endif - - if g:airline_detect_modified && &modified - call add(l:mode, 'modified') - endif - - if g:airline_detect_paste && &paste - call add(l:mode, 'paste') - endif - - if g:airline_detect_crypt && exists("+key") && !empty(&key) - call add(l:mode, 'crypt') - endif - - if g:airline_detect_spell && &spell - call add(l:mode, 'spell') - endif - - if &readonly || ! &modifiable - call add(l:mode, 'readonly') - endif - - let mode_string = join(l:mode) - if get(w:, 'airline_lastmode', '') != mode_string - call airline#highlighter#highlight_modified_inactive(context.bufnr) - call airline#highlighter#highlight(l:mode) - let w:airline_lastmode = mode_string - endif - - return '' -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/builder.vim b/sources_non_forked/vim-airline/autoload/airline/builder.vim deleted file mode 100644 index 08c383c1..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/builder.vim +++ /dev/null @@ -1,192 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:prototype = {} - -function! s:prototype.split(...) - call add(self._sections, ['|', a:0 ? a:1 : '%=']) -endfunction - -function! s:prototype.add_section_spaced(group, contents) - let spc = empty(a:contents) ? '' : g:airline_symbols.space - call self.add_section(a:group, spc.a:contents.spc) -endfunction - -function! s:prototype.add_section(group, contents) - call add(self._sections, [a:group, a:contents]) -endfunction - -function! s:prototype.add_raw(text) - call add(self._sections, ['', a:text]) -endfunction - -function! s:get_prev_group(sections, i) - let x = a:i - 1 - while x >= 0 - let group = a:sections[x][0] - if group != '' && group != '|' - return group - endif - let x = x - 1 - endwhile - return '' -endfunction - -function! s:prototype.build() - let side = 1 - let line = '' - let i = 0 - let length = len(self._sections) - let split = 0 - let is_empty = 0 - let prev_group = '' - - while i < length - let section = self._sections[i] - let group = section[0] - let contents = section[1] - let pgroup = prev_group - let prev_group = s:get_prev_group(self._sections, i) - if is_empty - let prev_group = pgroup - endif - let is_empty = s:section_is_empty(self, contents) - - if is_empty - " need to fix highlighting groups, since we - " have skipped a section, we actually need - " the previous previous group and so the - " seperator goes from the previous previous group - " to the current group - let pgroup = group - endif - - if group == '' - let line .= contents - elseif group == '|' - let side = 0 - let line .= contents - let split = 1 - else - if prev_group == '' - let line .= '%#'.group.'#' - elseif split - if !is_empty - let line .= s:get_transitioned_seperator(self, prev_group, group, side) - endif - let split = 0 - else - if !is_empty - let line .= s:get_seperator(self, prev_group, group, side) - endif - endif - let line .= is_empty ? '' : s:get_accented_line(self, group, contents) - endif - - let i = i + 1 - endwhile - - if !self._context.active - let line = substitute(line, '%#.\{-}\ze#', '\0_inactive', 'g') - endif - return line -endfunction - -function! s:should_change_group(group1, group2) - if a:group1 == a:group2 - return 0 - endif - let color1 = airline#highlighter#get_highlight(a:group1) - let color2 = airline#highlighter#get_highlight(a:group2) - if g:airline_gui_mode ==# 'gui' - return color1[1] != color2[1] || color1[0] != color2[0] - else - return color1[3] != color2[3] || color1[2] != color2[2] - endif -endfunction - -function! s:get_transitioned_seperator(self, prev_group, group, side) - let line = '' - call airline#highlighter#add_separator(a:prev_group, a:group, a:side) - let line .= '%#'.a:prev_group.'_to_'.a:group.'#' - let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep - let line .= '%#'.a:group.'#' - return line -endfunction - -function! s:get_seperator(self, prev_group, group, side) - if s:should_change_group(a:prev_group, a:group) - return s:get_transitioned_seperator(a:self, a:prev_group, a:group, a:side) - else - return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep - endif -endfunction - -function! s:get_accented_line(self, group, contents) - if a:self._context.active - let contents = [] - let content_parts = split(a:contents, '__accent') - for cpart in content_parts - let accent = matchstr(cpart, '_\zs[^#]*\ze') - call add(contents, cpart) - endfor - let line = join(contents, a:group) - let line = substitute(line, '__restore__', a:group, 'g') - else - let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g') - let line = substitute(line, '%#__restore__#', '', 'g') - endif - return line -endfunction - -function! s:section_is_empty(self, content) - let start=1 - - " do not check for inactive windows - if a:self._context.active == 0 - return 0 - endif - - " only check, if airline#skip_empty_sections == 1 - if get(g:, 'airline_skip_empty_sections', 0) == 0 - return 0 - endif - " assume accents sections to be never empty - " (avoides, that on startup the mode message becomes empty) - if match(a:content, '%#__accent_[^#]*#.*__restore__#') > -1 - return 0 - endif - let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) - if empty(list) - return 0 " no function in statusline text - endif - while len(list) > 0 - let expr = list[0] - try - " catch all exceptions, just in case - if !empty(eval(expr)) - return 0 - endif - catch - return 0 - endtry - let start += 1 - let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) - endw - return 1 -endfunction - -function! airline#builder#new(context) - let builder = copy(s:prototype) - let builder._context = a:context - let builder._sections = [] - - call extend(builder._context, { - \ 'left_sep': g:airline_left_sep, - \ 'left_alt_sep': g:airline_left_alt_sep, - \ 'right_sep': g:airline_right_sep, - \ 'right_alt_sep': g:airline_right_alt_sep, - \ }, 'keep') - return builder -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/debug.vim b/sources_non_forked/vim-airline/autoload/airline/debug.vim deleted file mode 100644 index 3273b0c1..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/debug.vim +++ /dev/null @@ -1,50 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -function! airline#debug#profile1() - profile start airline-profile-switch.log - profile func * - profile file * - split - for i in range(1, 1000) - wincmd w - redrawstatus - endfor - profile pause - noautocmd qall! -endfunction - -function! airline#debug#profile2() - profile start airline-profile-cursor.log - profile func * - profile file * - edit blank - call setline(1, 'all your base are belong to us') - call setline(2, 'all your base are belong to us') - let positions = [[1,2], [2,2], [1,2], [1,1]] - for i in range(1, 1000) - for pos in positions - call cursor(pos[0], pos[1]) - redrawstatus - endfor - endfor - profile pause - noautocmd qall! -endfunction - -function! airline#debug#profile3() - profile start airline-profile-mode.log - profile func * - profile file * - - for i in range(1000) - startinsert - redrawstatus - stopinsert - redrawstatus - endfor - - profile pause - noautocmd qall! -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions.vim b/sources_non_forked/vim-airline/autoload/airline/extensions.vim deleted file mode 100644 index 5a499536..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions.vim +++ /dev/null @@ -1,273 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:ext = {} -let s:ext._theme_funcrefs = [] - -function! s:ext.add_statusline_func(name) dict - call airline#add_statusline_func(a:name) -endfunction -function! s:ext.add_statusline_funcref(function) dict - call airline#add_statusline_funcref(a:function) -endfunction -function! s:ext.add_inactive_statusline_func(name) dict - call airline#add_inactive_statusline_func(a:name) -endfunction -function! s:ext.add_theme_func(name) dict - call add(self._theme_funcrefs, function(a:name)) -endfunction - -let s:script_path = tolower(resolve(expand(':p:h'))) - -let s:filetype_overrides = { - \ 'nerdtree': [ 'NERD', '' ], - \ 'gundo': [ 'Gundo', '' ], - \ 'vimfiler': [ 'vimfiler', '%{vimfiler#get_status_string()}' ], - \ 'minibufexpl': [ 'MiniBufExplorer', '' ], - \ 'startify': [ 'startify', '' ], - \ 'vim-plug': [ 'Plugins', '' ], - \ } - -let s:filetype_regex_overrides = {} - -function! s:check_defined_section(name) - if !exists('w:airline_section_{a:name}') - let w:airline_section_{a:name} = g:airline_section_{a:name} - endif -endfunction - -function! airline#extensions#append_to_section(name, value) - call check_defined_section(a:name) - let w:airline_section_{a:name} .= a:value -endfunction - -function! airline#extensions#prepend_to_section(name, value) - call check_defined_section(a:name) - let w:airline_section_{a:name} = a:value . w:airline_section_{a:name} -endfunction - -function! airline#extensions#apply_left_override(section1, section2) - let w:airline_section_a = a:section1 - let w:airline_section_b = a:section2 - let w:airline_section_c = airline#section#create(['readonly']) - let w:airline_render_left = 1 - let w:airline_render_right = 0 -endfunction - -let s:active_winnr = -1 -function! airline#extensions#apply(...) - let s:active_winnr = winnr() - - if s:is_excluded_window() - return -1 - endif - - if &buftype == 'help' - call airline#extensions#apply_left_override('Help', '%f') - let w:airline_section_x = '' - let w:airline_section_y = '' - let w:airline_render_right = 1 - endif - - if &previewwindow - let w:airline_section_a = 'Preview' - let w:airline_section_b = '' - let w:airline_section_c = bufname(winbufnr(winnr())) - endif - - if has_key(s:filetype_overrides, &ft) - let args = s:filetype_overrides[&ft] - call airline#extensions#apply_left_override(args[0], args[1]) - endif - - for item in items(s:filetype_regex_overrides) - if match(&ft, item[0]) >= 0 - call airline#extensions#apply_left_override(item[1][0], item[1][1]) - endif - endfor -endfunction - -function! s:is_excluded_window() - for matchft in g:airline_exclude_filetypes - if matchft ==# &ft - return 1 - endif - endfor - - for matchw in g:airline_exclude_filenames - if matchstr(expand('%'), matchw) ==# matchw - return 1 - endif - endfor - - if g:airline_exclude_preview && &previewwindow - return 1 - endif - - return 0 -endfunction - -function! airline#extensions#load_theme() - call airline#util#exec_funcrefs(s:ext._theme_funcrefs, g:airline#themes#{g:airline_theme}#palette) -endfunction - -function! s:sync_active_winnr() - if exists('#airline') && winnr() != s:active_winnr - call airline#update_statusline() - endif -endfunction - -function! airline#extensions#load() - " non-trivial number of external plugins use eventignore=all, so we need to account for that - autocmd CursorMoved * call sync_active_winnr() - - if exists('g:airline_extensions') - for ext in g:airline_extensions - try - call airline#extensions#{ext}#init(s:ext) - catch /^Vim\%((\a\+)\)\=:E117/ " E117, function does not exist - call airline#util#warning("Extension '".ext."' not installed, ignoring!") - endtry - endfor - return - endif - - call airline#extensions#quickfix#init(s:ext) - - if get(g:, 'loaded_unite', 0) - call airline#extensions#unite#init(s:ext) - endif - - if exists(':NetrwSettings') - call airline#extensions#netrw#init(s:ext) - endif - - if get(g:, 'airline#extensions#ycm#enabled', 0) - call airline#extensions#ycm#init(s:ext) - endif - - if get(g:, 'loaded_vimfiler', 0) - let g:vimfiler_force_overwrite_statusline = 0 - endif - - if get(g:, 'loaded_ctrlp', 0) - call airline#extensions#ctrlp#init(s:ext) - endif - - if get(g:, 'CtrlSpaceLoaded', 0) - call airline#extensions#ctrlspace#init(s:ext) - endif - - if get(g:, 'command_t_loaded', 0) - call airline#extensions#commandt#init(s:ext) - endif - - if exists(':UndotreeToggle') - call airline#extensions#undotree#init(s:ext) - endif - - if get(g:, 'airline#extensions#hunks#enabled', 1) - \ && (exists('g:loaded_signify') || exists('g:loaded_gitgutter') || exists('g:loaded_changes') || exists('g:loaded_quickfixsigns')) - call airline#extensions#hunks#init(s:ext) - endif - - if get(g:, 'airline#extensions#tagbar#enabled', 1) - \ && exists(':TagbarToggle') - call airline#extensions#tagbar#init(s:ext) - endif - - if get(g:, 'airline#extensions#csv#enabled', 1) - \ && (get(g:, 'loaded_csv', 0) || exists(':Table')) - call airline#extensions#csv#init(s:ext) - endif - - if exists(':VimShell') - let s:filetype_overrides['vimshell'] = ['vimshell','%{vimshell#get_status_string()}'] - let s:filetype_regex_overrides['^int-'] = ['vimshell','%{substitute(&ft, "int-", "", "")}'] - endif - - if get(g:, 'airline#extensions#branch#enabled', 1) - \ && (exists('*fugitive#head') || exists('*lawrencium#statusline') || - \ (get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine'))) - call airline#extensions#branch#init(s:ext) - endif - - if get(g:, 'airline#extensions#bufferline#enabled', 1) - \ && exists('*bufferline#get_status_string') - call airline#extensions#bufferline#init(s:ext) - endif - - if (get(g:, 'airline#extensions#virtualenv#enabled', 1) && (exists(':VirtualEnvList') || isdirectory($VIRTUAL_ENV))) - call airline#extensions#virtualenv#init(s:ext) - endif - - if (get(g:, 'airline#extensions#eclim#enabled', 1) && exists(':ProjectCreate')) - call airline#extensions#eclim#init(s:ext) - endif - - if get(g:, 'airline#extensions#syntastic#enabled', 1) - \ && exists(':SyntasticCheck') - call airline#extensions#syntastic#init(s:ext) - endif - - if get(g:, 'airline#extensions#whitespace#enabled', 1) - call airline#extensions#whitespace#init(s:ext) - endif - - if get(g:, 'airline#extensions#po#enabled', 1) && executable('msgfmt') - call airline#extensions#po#init(s:ext) - endif - - if get(g:, 'airline#extensions#wordcount#enabled', 1) - call airline#extensions#wordcount#init(s:ext) - endif - - if get(g:, 'airline#extensions#tabline#enabled', 0) - call airline#extensions#tabline#init(s:ext) - endif - - if get(g:, 'airline#extensions#tmuxline#enabled', 1) && exists(':Tmuxline') - call airline#extensions#tmuxline#init(s:ext) - endif - - if get(g:, 'airline#extensions#promptline#enabled', 1) && exists(':PromptlineSnapshot') && len(get(g:, 'airline#extensions#promptline#snapshot_file', '')) - call airline#extensions#promptline#init(s:ext) - endif - - if get(g:, 'airline#extensions#nrrwrgn#enabled', 1) && exists(':NR') == 2 - call airline#extensions#nrrwrgn#init(s:ext) - endif - - if get(g:, 'airline#extensions#unicode#enabled', 1) && exists(':UnicodeTable') == 2 - call airline#extensions#unicode#init(s:ext) - endif - - if (get(g:, 'airline#extensions#capslock#enabled', 1) && exists('*CapsLockStatusline')) - call airline#extensions#capslock#init(s:ext) - endif - - if (get(g:, 'airline#extensions#windowswap#enabled', 1) && get(g:, 'loaded_windowswap', 0)) - call airline#extensions#windowswap#init(s:ext) - endif - - if !get(g:, 'airline#extensions#disable_rtp_load', 0) - " load all other extensions, which are not part of the default distribution. - " (autoload/airline/extensions/*.vim outside of our s:script_path). - for file in split(globpath(&rtp, "autoload/airline/extensions/*.vim"), "\n") - " we have to check both resolved and unresolved paths, since it's possible - " that they might not get resolved properly (see #187) - if stridx(tolower(resolve(fnamemodify(file, ':p'))), s:script_path) < 0 - \ && stridx(tolower(fnamemodify(file, ':p')), s:script_path) < 0 - let name = fnamemodify(file, ':t:r') - if !get(g:, 'airline#extensions#'.name.'#enabled', 1) - continue - endif - try - call airline#extensions#{name}#init(s:ext) - catch - endtry - endif - endfor - endif -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/branch.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/branch.vim deleted file mode 100644 index 2157547d..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/branch.vim +++ /dev/null @@ -1,215 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:has_fugitive = exists('*fugitive#head') -let s:has_lawrencium = exists('*lawrencium#statusline') -let s:has_vcscommand = get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine') - -if !s:has_fugitive && !s:has_lawrencium && !s:has_vcscommand - finish -endif - -let s:git_dirs = {} -let s:untracked_git = {} -let s:untracked_hg = {} - -let s:head_format = get(g:, 'airline#extensions#branch#format', 0) -if s:head_format == 1 - function! s:format_name(name) - return fnamemodify(a:name, ':t') - endfunction -elseif s:head_format == 2 - function! s:format_name(name) - return pathshorten(a:name) - endfunction -elseif type(s:head_format) == type('') - function! s:format_name(name) - return call(s:head_format, [a:name]) - endfunction -else - function! s:format_name(name) - return a:name - endfunction -endif - -function! s:get_git_branch(path) - if !s:has_fugitive - return '' - endif - - let name = fugitive#head(7) - if empty(name) - if has_key(s:git_dirs, a:path) - return s:git_dirs[a:path] - endif - - let dir = fugitive#extract_git_dir(a:path) - if empty(dir) - let name = '' - else - try - let line = join(readfile(dir . '/HEAD')) - if strpart(line, 0, 16) == 'ref: refs/heads/' - let name = strpart(line, 16) - else - " raw commit hash - let name = strpart(line, 0, 7) - endif - catch - let name = '' - endtry - endif - endif - - let s:git_dirs[a:path] = name - return name -endfunction - -function! s:get_git_untracked(file) - let untracked = '' - if empty(a:file) - return untracked - endif - if has_key(s:untracked_git, a:file) - let untracked = s:untracked_git[a:file] - else - let output = system('git status --porcelain -- '. shellescape(a:file)) - if output[0:1] is# '??' && output[3:-2] is? a:file - let untracked = get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists) - endif - let s:untracked_git[a:file] = untracked - endif - return untracked -endfunction - -function! s:get_hg_untracked(file) - if s:has_lawrencium - " delete cache when unlet b:airline head? - let untracked = '' - if empty(a:file) - return untracked - endif - if has_key(s:untracked_hg, a:file) - let untracked = s:untracked_hg[a:file] - else - let untracked = (system('hg status -u -- '. shellescape(a:file))[0] is# '?' ? - \ get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists) : '') - let s:untracked_hg[a:file] = untracked - endif - return untracked - endif -endfunction - -function! s:get_hg_branch() - if s:has_lawrencium - return lawrencium#statusline() - endif - return '' -endfunction - -function! airline#extensions#branch#head() - if exists('b:airline_head') && !empty(b:airline_head) - return b:airline_head - endif - - let b:airline_head = '' - let l:heads = {} - let l:vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"]) - let found_fugitive_head = 0 - - let l:git_head = s:get_git_branch(expand("%:p:h")) - let l:hg_head = s:get_hg_branch() - - if !empty(l:git_head) - let found_fugitive_head = 1 - let l:heads.git = (!empty(l:hg_head) ? "git:" : '') . s:format_name(l:git_head) - let l:git_untracked = s:get_git_untracked(expand("%:p")) - let l:heads.git .= l:git_untracked - endif - - if !empty(l:hg_head) - let l:heads.mercurial = (!empty(l:git_head) ? "hg:" : '') . s:format_name(l:hg_head) - let l:hg_untracked = s:get_hg_untracked(expand("%:p")) - let l:heads.mercurial.= l:hg_untracked - endif - - if empty(l:heads) - if s:has_vcscommand - call VCSCommandEnableBufferSetup() - if exists('b:VCSCommandBufferInfo') - let b:airline_head = s:format_name(get(b:VCSCommandBufferInfo, 0, '')) - endif - endif - else - for vcs in l:vcs_priority - if has_key(l:heads, vcs) - if !empty(b:airline_head) - let b:airline_head = b:airline_head . " | " - endif - let b:airline_head = b:airline_head . l:heads[vcs] - endif - endfor - endif - - if exists("g:airline#extensions#branch#displayed_head_limit") - let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit - if len(b:airline_head) > w:displayed_head_limit - 1 - let b:airline_head = b:airline_head[0:(w:displayed_head_limit - 1)].(&encoding ==? 'utf-8' ? '…' : '.') - endif - endif - - if empty(b:airline_head) || !found_fugitive_head && !s:check_in_path() - let b:airline_head = '' - endif - return b:airline_head -endfunction - -function! airline#extensions#branch#get_head() - let head = airline#extensions#branch#head() - let empty_message = get(g:, 'airline#extensions#branch#empty_message', '') - let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch) - return empty(head) - \ ? empty_message - \ : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head) -endfunction - -function! s:check_in_path() - if !exists('b:airline_branch_path') - let root = get(b:, 'git_dir', get(b:, 'mercurial_dir', '')) - let bufferpath = resolve(fnamemodify(expand('%'), ':p')) - - if !filereadable(root) "not a file - " if .git is a directory, it's the old submodule format - if match(root, '\.git$') >= 0 - let root = expand(fnamemodify(root, ':h')) - else - " else it's the newer format, and we need to guesstimate - let pattern = '\.git\(\\\|\/\)modules\(\\\|\/\)' - if match(root, pattern) >= 0 - let root = substitute(root, pattern, '', '') - endif - endif - endif - - let b:airline_file_in_root = stridx(bufferpath, root) > -1 - endif - return b:airline_file_in_root -endfunction - -function! s:reset_untracked_cache() - if exists("s:untracked_git") - let s:untracked_git={} - endif - if exists("s:untracked_hg") - let s:untracked_hg={} - endif -endfunction - -function! airline#extensions#branch#init(ext) - call airline#parts#define_function('branch', 'airline#extensions#branch#get_head') - - autocmd BufReadPost * unlet! b:airline_file_in_root - autocmd CursorHold,ShellCmdPost,CmdwinLeave * unlet! b:airline_head - autocmd User AirlineBeforeRefresh unlet! b:airline_head - autocmd BufWritePost,ShellCmdPost * call s:reset_untracked_cache() -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/bufferline.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/bufferline.vim deleted file mode 100644 index 31d77aad..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/bufferline.vim +++ /dev/null @@ -1,23 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !exists('*bufferline#get_status_string') - finish -endif - -let s:overwrite = get(g:, 'airline#extensions#bufferline#overwrite_variables', 1) - -function! airline#extensions#bufferline#init(ext) - if s:overwrite - highlight bufferline_selected gui=bold cterm=bold term=bold - highlight link bufferline_selected_inactive airline_c_inactive - let g:bufferline_inactive_highlight = 'airline_c' - let g:bufferline_active_highlight = 'bufferline_selected' - let g:bufferline_active_buffer_left = '' - let g:bufferline_active_buffer_right = '' - let g:bufferline_separator = g:airline_symbols.space - endif - - call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string()) -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/capslock.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/capslock.vim deleted file mode 100644 index 32aaf39c..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/capslock.vim +++ /dev/null @@ -1,14 +0,0 @@ -" MIT License. Copyright (c) 2014 Mathias Andersson. -" vim: et ts=2 sts=2 sw=2 -if !exists('*CapsLockStatusline') - finish -endif - -function! airline#extensions#capslock#status() - return tolower(CapsLockStatusline()) == '[caps]' ? 'CAPS' : '' -endfunction - -function! airline#extensions#capslock#init(ext) - call airline#parts#define_function('capslock', 'airline#extensions#capslock#status') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/commandt.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/commandt.vim deleted file mode 100644 index fe6bbf94..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/commandt.vim +++ /dev/null @@ -1,16 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !get(g:, 'command_t_loaded', 0) - finish -endif - -function! airline#extensions#commandt#apply(...) - if bufname('%') ==# 'GoToFile' - call airline#extensions#apply_left_override('CommandT', '') - endif -endfunction - -function! airline#extensions#commandt#init(ext) - call a:ext.add_statusline_func('airline#extensions#commandt#apply') -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/csv.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/csv.vim deleted file mode 100644 index c051ad67..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/csv.vim +++ /dev/null @@ -1,31 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !get(g:, 'loaded_csv', 0) && !exists(':Table') - finish -endif - -let s:column_display = get(g:, 'airline#extensions#csv#column_display', 'Number') - -function! airline#extensions#csv#get_column() - if exists('*CSV_WCol') - if s:column_display ==# 'Name' - return '['.CSV_WCol('Name').CSV_WCol().']' - else - return '['.CSV_WCol().']' - endif - endif - return '' -endfunction - -function! airline#extensions#csv#apply(...) - if &ft ==# "csv" - call airline#extensions#prepend_to_section('gutter', - \ g:airline_left_alt_sep.' %{airline#extensions#csv#get_column()}') - endif -endfunction - -function! airline#extensions#csv#init(ext) - call a:ext.add_statusline_func('airline#extensions#csv#apply') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/ctrlp.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/ctrlp.vim deleted file mode 100644 index c4f856bb..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/ctrlp.vim +++ /dev/null @@ -1,80 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !get(g:, 'loaded_ctrlp', 0) - finish -endif - -let s:color_template = get(g:, 'airline#extensions#ctrlp#color_template', 'insert') - -function! airline#extensions#ctrlp#generate_color_map(dark, light, white) - return { - \ 'CtrlPdark' : a:dark, - \ 'CtrlPlight' : a:light, - \ 'CtrlPwhite' : a:white, - \ 'CtrlParrow1' : [ a:light[1] , a:white[1] , a:light[3] , a:white[3] , '' ] , - \ 'CtrlParrow2' : [ a:white[1] , a:light[1] , a:white[3] , a:light[3] , '' ] , - \ 'CtrlParrow3' : [ a:light[1] , a:dark[1] , a:light[3] , a:dark[3] , '' ] , - \ } -endfunction - -function! airline#extensions#ctrlp#load_theme(palette) - if exists('a:palette.ctrlp') - let theme = a:palette.ctrlp - else - let s:color_template = has_key(a:palette, s:color_template) ? s:color_template : 'insert' - let theme = airline#extensions#ctrlp#generate_color_map( - \ a:palette[s:color_template]['airline_c'], - \ a:palette[s:color_template]['airline_b'], - \ a:palette[s:color_template]['airline_a']) - endif - for key in keys(theme) - call airline#highlighter#exec(key, theme[key]) - endfor -endfunction - -" Arguments: focus, byfname, regexp, prv, item, nxt, marked -function! airline#extensions#ctrlp#ctrlp_airline(...) - let b = airline#builder#new({'active': 1}) - if a:2 == 'file' - call b.add_section_spaced('CtrlPlight', 'by fname') - endif - if a:3 - call b.add_section_spaced('CtrlPlight', 'regex') - endif - if get(g:, 'airline#extensions#ctrlp#show_adjacent_modes', 1) - call b.add_section_spaced('CtrlPlight', a:4) - call b.add_section_spaced('CtrlPwhite', a:5) - call b.add_section_spaced('CtrlPlight', a:6) - else - call b.add_section_spaced('CtrlPwhite', a:5) - endif - call b.add_section_spaced('CtrlPdark', a:7) - call b.split() - call b.add_section_spaced('CtrlPdark', a:1) - call b.add_section_spaced('CtrlPdark', a:2) - call b.add_section_spaced('CtrlPlight', '%{getcwd()}') - return b.build() -endfunction - -" Argument: len -function! airline#extensions#ctrlp#ctrlp_airline_status(...) - let len = '%#CtrlPdark# '.a:1 - let dir = '%=%<%#CtrlParrow3#'.g:airline_right_sep.'%#CtrlPlight# '.getcwd().' %*' - return len.dir -endfunction - -function! airline#extensions#ctrlp#apply(...) - " disable statusline overwrite if ctrlp already did it - return match(&statusline, 'CtrlPwhite') >= 0 ? -1 : 0 -endfunction - -function! airline#extensions#ctrlp#init(ext) - let g:ctrlp_status_func = { - \ 'main': 'airline#extensions#ctrlp#ctrlp_airline', - \ 'prog': 'airline#extensions#ctrlp#ctrlp_airline_status', - \ } - call a:ext.add_statusline_func('airline#extensions#ctrlp#apply') - call a:ext.add_theme_func('airline#extensions#ctrlp#load_theme') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/ctrlspace.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/ctrlspace.vim deleted file mode 100644 index 166cd923..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/ctrlspace.vim +++ /dev/null @@ -1,17 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:spc = g:airline_symbols.space -let s:padding = s:spc . s:spc . s:spc - -function! airline#extensions#ctrlspace#statusline(...) - let b = airline#builder#new({ 'active': 1 }) - call b.add_section('airline_b', '⌗' . s:padding . ctrlspace#api#StatuslineModeSegment(s:padding)) - call b.split() - call b.add_section('airline_x', s:spc . ctrlspace#api#StatuslineTabSegment() . s:spc) - return b.build() -endfunction - -function! airline#extensions#ctrlspace#init(ext) - let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()" -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/default.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/default.vim deleted file mode 100644 index ec305c5d..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/default.vim +++ /dev/null @@ -1,98 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:section_use_groups = get(g:, 'airline#extensions#default#section_use_groupitems', 1) -let s:section_truncate_width = get(g:, 'airline#extensions#default#section_truncate_width', { - \ 'b': 79, - \ 'x': 60, - \ 'y': 88, - \ 'z': 45, - \ 'warning': 80, - \ 'error': 80, - \ }) -let s:layout = get(g:, 'airline#extensions#default#layout', [ - \ [ 'a', 'b', 'c' ], - \ [ 'x', 'y', 'z', 'warning', 'error' ] - \ ]) - -function! s:get_section(winnr, key, ...) - if has_key(s:section_truncate_width, a:key) - if winwidth(a:winnr) < s:section_truncate_width[a:key] - return '' - endif - endif - let spc = g:airline_symbols.space - if !exists('g:airline_section_{a:key}') - return '' - endif - let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key}) - let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')] - return empty(text) ? '' : prefix.text.suffix -endfunction - -function! s:build_sections(builder, context, keys) - for key in a:keys - if (key == 'warning' || key == 'error') && !a:context.active - continue - endif - call s:add_section(a:builder, a:context, key) - endfor -endfunction - -" There still is a highlighting bug when using groups %(%) in the statusline, -" deactivate it, until this is properly fixed: -" https://groups.google.com/d/msg/vim_dev/sb1jmVirXPU/mPhvDnZ-CwAJ -if s:section_use_groups && (v:version >= 704 || (v:version >= 703 && has('patch81'))) - function! s:add_section(builder, context, key) - " i have no idea why the warning section needs special treatment, but it's - " needed to prevent separators from showing up - if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) - return - endif - if (a:key == 'warning' || a:key == 'error') - call a:builder.add_raw('%(') - endif - call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) - if (a:key == 'warning' || a:key == 'error') - call a:builder.add_raw('%)') - endif - endfunction -else - " older version don't like the use of %(%) - function! s:add_section(builder, context, key) - if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) - return - endif - if a:key == 'warning' - call a:builder.add_raw('%#airline_warning#'.s:get_section(a:context.winnr, a:key)) - elseif a:key == 'error' - call a:builder.add_raw('%#airline_error#'.s:get_section(a:context.winnr, a:key)) - else - call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) - endif - endfunction -endif - -function! airline#extensions#default#apply(builder, context) - let winnr = a:context.winnr - let active = a:context.active - - if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) - call s:build_sections(a:builder, a:context, s:layout[0]) - else - let text = s:get_section(winnr, 'c') - if empty(text) - let text = ' %f%m ' - endif - call a:builder.add_section('airline_c'.(a:context.bufnr), text) - endif - - call a:builder.split(s:get_section(winnr, 'gutter', '', '')) - - if airline#util#getwinvar(winnr, 'airline_render_right', 1) - call s:build_sections(a:builder, a:context, s:layout[1]) - endif - - return 1 -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/eclim.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/eclim.vim deleted file mode 100644 index 50cef99c..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/eclim.vim +++ /dev/null @@ -1,53 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !exists(':ProjectCreate') - finish -endif - -function! airline#extensions#eclim#creat_line(...) - if &filetype == "tree" - let builder = a:1 - call builder.add_section('airline_a', ' Project ') - call builder.add_section('airline_b', ' %f ') - call builder.add_section('airline_c', '') - return 1 - endif -endfunction - -function! airline#extensions#eclim#get_warnings() - let eclimList = eclim#display#signs#GetExisting() - - if !empty(eclimList) - " Remove any non-eclim signs (see eclim#display#signs#Update) - " First check for just errors since they are more important. - " If there are no errors, then check for warnings. - let errorList = filter(copy(eclimList), 'v:val.name =~ "^\\(qf_\\)\\?\\(error\\)$"') - - if (empty(errorList)) - " use the warnings - call filter(eclimList, 'v:val.name =~ "^\\(qf_\\)\\?\\(warning\\)$"') - let type = 'W' - else - " Use the errors - let eclimList = errorList - let type = 'E' - endif - - if !empty(eclimList) - let errorsLine = eclimList[0]['line'] - let errorsNumber = len(eclimList) - let errors = "[Eclim:" . type . " line:".string(errorsLine)." (".string(errorsNumber).")]" - if !exists(':SyntasticCheck') || SyntasticStatuslineFlag() == '' - return errors.(g:airline_symbols.space) - endif - endif - endif - return '' -endfunction - -function! airline#extensions#eclim#init(ext) - call airline#parts#define_function('eclim', 'airline#extensions#eclim#get_warnings') - call a:ext.add_statusline_func('airline#extensions#eclim#creat_line') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/example.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/example.vim deleted file mode 100644 index d744bea2..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/example.vim +++ /dev/null @@ -1,54 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -" we don't actually want this loaded :P -finish - -" Due to some potential rendering issues, the use of the `space` variable is -" recommended. -let s:spc = g:airline_symbols.space - -" Extension specific variables can be defined the usual fashion. -if !exists('g:airline#extensions#example#number_of_cats') - let g:airline#extensions#example#number_of_cats = 42 -endif - -" First we define an init function that will be invoked from extensions.vim -function! airline#extensions#example#init(ext) - - " Here we define a new part for the plugin. This allows users to place this - " extension in arbitrary locations. - call airline#parts#define_raw('cats', '%{airline#extensions#example#get_cats()}') - - " Next up we add a funcref so that we can run some code prior to the - " statusline getting modifed. - call a:ext.add_statusline_func('airline#extensions#example#apply') - - " You can also add a funcref for inactive statuslines. - " call a:ext.add_inactive_statusline_func('airline#extensions#example#unapply') -endfunction - -" This function will be invoked just prior to the statusline getting modified. -function! airline#extensions#example#apply(...) - " First we check for the filetype. - if &filetype == "nyancat" - - " Let's say we want to append to section_c, first we check if there's - " already a window-local override, and if not, create it off of the global - " section_c. - let w:airline_section_c = get(w:, 'airline_section_c', g:airline_section_c) - - " Then we just append this extenion to it, optionally using separators. - let w:airline_section_c .= s:spc.g:airline_left_alt_sep.s:spc.'%{airline#extensions#example#get_cats()}' - endif -endfunction - -" Finally, this function will be invoked from the statusline. -function! airline#extensions#example#get_cats() - let cats = '' - for i in range(1, g:airline#extensions#example#number_of_cats) - let cats .= ' (,,,)=(^.^)=(,,,) ' - endfor - return cats -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/hunks.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/hunks.vim deleted file mode 100644 index 86d86557..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/hunks.vim +++ /dev/null @@ -1,83 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !get(g:, 'loaded_signify', 0) && !get(g:, 'loaded_gitgutter', 0) && !get(g:, 'loaded_changes', 0) && !get(g:, 'loaded_quickfixsigns', 0) - finish -endif - -let s:non_zero_only = get(g:, 'airline#extensions#hunks#non_zero_only', 0) -let s:hunk_symbols = get(g:, 'airline#extensions#hunks#hunk_symbols', ['+', '~', '-']) - -function! s:get_hunks_signify() - let hunks = sy#repo#get_stats() - if hunks[0] >= 0 - return hunks - endif - return [] -endfunction - -function! s:is_branch_empty() - return exists('*airline#extensions#branch#head') && empty(airline#extensions#branch#head()) -endfunction - -function! s:get_hunks_gitgutter() - if !get(g:, 'gitgutter_enabled', 0) || s:is_branch_empty() - return '' - endif - return GitGutterGetHunkSummary() -endfunction - -function! s:get_hunks_changes() - if !get(b:, 'changes_view_enabled', 0) || s:is_branch_empty() - return [] - endif - let hunks = changes#GetStats() - for i in hunks - if i > 0 - return hunks - endif - endfor - return [] -endfunction - -function! s:get_hunks_empty() - return '' -endfunction - -function! s:get_hunks() - if !exists('b:source_func') - if get(g:, 'loaded_signify') && sy#buffer_is_active() - let b:source_func = 's:get_hunks_signify' - elseif exists('*GitGutterGetHunkSummary') - let b:source_func = 's:get_hunks_gitgutter' - elseif exists('*changes#GetStats') - let b:source_func = 's:get_hunks_changes' - elseif exists('*quickfixsigns#vcsdiff#GetHunkSummary') - let b:source_func = 'quickfixsigns#vcsdiff#GetHunkSummary' - else - let b:source_func = 's:get_hunks_empty' - endif - endif - return {b:source_func}() -endfunction - -function! airline#extensions#hunks#get_hunks() - if !get(w:, 'airline_active', 0) - return '' - endif - let hunks = s:get_hunks() - let string = '' - if !empty(hunks) - for i in [0, 1, 2] - if s:non_zero_only == 0 || hunks[i] > 0 - let string .= printf('%s%s ', s:hunk_symbols[i], hunks[i]) - endif - endfor - endif - return string -endfunction - -function! airline#extensions#hunks#init(ext) - call airline#parts#define_function('hunks', 'airline#extensions#hunks#get_hunks') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/netrw.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/netrw.vim deleted file mode 100644 index fcd312d3..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/netrw.vim +++ /dev/null @@ -1,32 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !exists(':NetrwSettings') - finish -endif - -function! airline#extensions#netrw#apply(...) - if &ft == 'netrw' - let spc = g:airline_symbols.space - - call a:1.add_section('airline_a', spc.'netrw'.spc) - if exists('*airline#extensions#branch#get_head') - call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) - endif - call a:1.add_section('airline_c', spc.'%f'.spc) - call a:1.split() - call a:1.add_section('airline_y', spc.'%{airline#extensions#netrw#sortstring()}'.spc) - return 1 - endif -endfunction - -function! airline#extensions#netrw#init(ext) - let g:netrw_force_overwrite_statusline = 0 - call a:ext.add_statusline_func('airline#extensions#netrw#apply') -endfunction - - -function! airline#extensions#netrw#sortstring() - let order = (g:netrw_sort_direction =~ 'n') ? '+' : '-' - return g:netrw_sort_by . (g:airline_symbols.space) . '[' . order . ']' -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/nrrwrgn.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/nrrwrgn.vim deleted file mode 100644 index 78a1daaf..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/nrrwrgn.vim +++ /dev/null @@ -1,55 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !get(g:, 'loaded_nrrw_rgn', 0) - finish -endif - -function! airline#extensions#nrrwrgn#apply(...) - if exists(":WidenRegion") == 2 - let spc = g:airline_symbols.space - if !exists("*nrrwrgn#NrrwRgnStatus()") || empty(nrrwrgn#NrrwRgnStatus()) - call a:1.add_section('airline_a', printf('%s[Narrowed%s#%d]', spc, spc, b:nrrw_instn)) - let bufname=(get(b:, 'orig_buf', 0) ? bufname(b:orig_buf) : substitute(bufname('%'), '^Nrrwrgn_\zs.*\ze_\d\+$', submatch(0), '')) - call a:1.add_section('airline_c', spc.bufname.spc) - call a:1.split() - else - let dict=nrrwrgn#NrrwRgnStatus() - let vmode = { 'v': 'Char ', 'V': 'Line ', '': 'Block '} - let mode = dict.visual ? vmode[dict.visual] : vmode['V'] - let winwidth = winwidth(0) - if winwidth < 80 - let mode = mode[0] - endif - let title = (winwidth < 80 ? "Nrrw" : "Narrowed ") - let multi = (winwidth < 80 ? 'M' : 'Multi') - call a:1.add_section('airline_a', printf('[%s%s%s#%d]%s', (dict.multi ? multi : ""), - \ title, mode, b:nrrw_instn, spc)) - let name = dict.fullname - if name !=# '[No Name]' - if winwidth > 100 - " need some space - let name = fnamemodify(dict.fullname, ':~') - if strlen(name) > 8 - " shorten name - let name = substitute(name, '\(.\)[^/\\]*\([/\\]\)', '\1\2', 'g') - endif - else - let name = fnamemodify(dict.fullname, ':t') - endif - endif - let range=(dict.multi ? '' : printf("[%d-%d]", dict.start[1], dict.end[1])) - call a:1.add_section('airline_c', printf("%s %s %s", name, range, - \ dict.enabled ? (&encoding ==? 'utf-8' ? "\u2713" : '') : '!')) - call a:1.split() - call a:1.add_section('airline_x', get(g:, 'airline_section_x').spc) - call a:1.add_section('airline_y', spc.get(g:, 'airline_section_y').spc) - call a:1.add_section('airline_z', spc.get(g:, 'airline_section_z')) - endif - return 1 - endif -endfunction - -function! airline#extensions#nrrwrgn#init(ext) - call a:ext.add_statusline_func('airline#extensions#nrrwrgn#apply') -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/po.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/po.vim deleted file mode 100644 index 6e5b6bca..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/po.vim +++ /dev/null @@ -1,36 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -function! airline#extensions#po#apply(...) - if &ft ==# 'po' - call airline#extensions#prepend_to_section('z', '%{airline#extensions#po#stats()}') - autocmd airline BufWritePost * unlet! b:airline_po_stats - endif -endfunction - -function! airline#extensions#po#stats() - if exists('b:airline_po_stats') && !empty(b:airline_po_stats) - return b:airline_po_stats - endif - - let airline_po_stats = system('msgfmt --statistics -o /dev/null -- '. expand('%:p')) - if v:shell_error - return '' - endif - try - let b:airline_po_stats = '['. split(airline_po_stats, '\n')[0]. ']' - catch - let b:airline_po_stats = '' - endtry - if exists("g:airline#extensions#po#displayed_limit") - let w:displayed_po_limit = g:airline#extensions#po#displayed_limit - if len(b:airline_po_stats) > w:displayed_po_limit - 1 - let b:airline_po_stats = b:airline_po_stats[0:(w:displayed_po_limit - 1)].(&encoding==?'utf-8' ? '…' : '.') - endif - endif - return b:airline_po_stats -endfunction - -function! airline#extensions#po#init(ext) - call a:ext.add_statusline_func('airline#extensions#po#apply') -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/promptline.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/promptline.vim deleted file mode 100644 index 770a5736..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/promptline.vim +++ /dev/null @@ -1,33 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !exists(':PromptlineSnapshot') - finish -endif - -if !exists('airline#extensions#promptline#snapshot_file') || !len('airline#extensions#promptline#snapshot_file') - finish -endif - -let s:prompt_snapshot_file = get(g:, 'airline#extensions#promptline#snapshot_file', '') -let s:color_template = get(g:, 'airline#extensions#promptline#color_template', 'normal') - -function! airline#extensions#promptline#init(ext) - call a:ext.add_theme_func('airline#extensions#promptline#set_prompt_colors') -endfunction - -function! airline#extensions#promptline#set_prompt_colors(palette) - let color_template = has_key(a:palette, s:color_template) ? s:color_template : 'normal' - let mode_palette = a:palette[color_template] - - if !has_key(g:, 'promptline_symbols') - let g:promptline_symbols = { - \ 'left' : g:airline_left_sep, - \ 'right' : g:airline_right_sep, - \ 'left_alt' : g:airline_left_alt_sep, - \ 'right_alt' : g:airline_right_alt_sep} - endif - - let promptline_theme = promptline#api#create_theme_from_airline(mode_palette) - call promptline#api#create_snapshot_with_theme(s:prompt_snapshot_file, promptline_theme) -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/quickfix.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/quickfix.vim deleted file mode 100644 index 2a37f8c0..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/quickfix.vim +++ /dev/null @@ -1,44 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let g:airline#extensions#quickfix#quickfix_text = 'Quickfix' -let g:airline#extensions#quickfix#location_text = 'Location' - -function! airline#extensions#quickfix#apply(...) - if &buftype == 'quickfix' - let w:airline_section_a = s:get_text() - let w:airline_section_b = '%{get(w:, "quickfix_title", "")}' - let w:airline_section_c = '' - let w:airline_section_x = '' - endif -endfunction - -function! airline#extensions#quickfix#init(ext) - call a:ext.add_statusline_func('airline#extensions#quickfix#apply') - call a:ext.add_inactive_statusline_func('airline#extensions#quickfix#inactive_qf_window') -endfunction - -function! airline#extensions#quickfix#inactive_qf_window(...) - if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(getwinvar(a:2.winnr, 'quickfix_title', '')) - call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m') - endif -endfunction - -function! s:get_text() - redir => buffers - silent ls - redir END - - let nr = bufnr('%') - for buf in split(buffers, '\n') - if match(buf, '\v^\s*'.nr) > -1 - if match(buf, '\cQuickfix') > -1 - return g:airline#extensions#quickfix#quickfix_text - else - return g:airline#extensions#quickfix#location_text - endif - endif - endfor - return '' -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/syntastic.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/syntastic.vim deleted file mode 100644 index 0c0c53c4..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/syntastic.vim +++ /dev/null @@ -1,19 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !exists(':SyntasticCheck') - finish -endif - -function! airline#extensions#syntastic#get_warnings() - let errors = SyntasticStatuslineFlag() - if strlen(errors) > 0 - return errors.(g:airline_symbols.space) - endif - return '' -endfunction - -function! airline#extensions#syntastic#init(ext) - call airline#parts#define_function('syntastic', 'airline#extensions#syntastic#get_warnings') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim deleted file mode 100644 index af03c62b..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim +++ /dev/null @@ -1,186 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') -let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) -let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) -let s:ignore_bufadd_pat = get(g:, 'airline#extensions#tabline#ignore_bufadd_pat', '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree') - -let s:taboo = get(g:, 'airline#extensions#taboo#enabled', 1) && get(g:, 'loaded_taboo', 0) -if s:taboo - let g:taboo_tabline = 0 -endif - -let s:ctrlspace = get(g:, 'CtrlSpaceLoaded', 0) - -function! airline#extensions#tabline#init(ext) - if has('gui_running') - set guioptions-=e - endif - - autocmd User AirlineToggledOn call s:toggle_on() - autocmd User AirlineToggledOff call s:toggle_off() - - call s:toggle_on() - call a:ext.add_theme_func('airline#extensions#tabline#load_theme') -endfunction - -function! s:toggle_off() - call airline#extensions#tabline#autoshow#off() - call airline#extensions#tabline#tabs#off() - call airline#extensions#tabline#buffers#off() - call airline#extensions#tabline#ctrlspace#off() -endfunction - -function! s:toggle_on() - call airline#extensions#tabline#autoshow#on() - call airline#extensions#tabline#tabs#on() - call airline#extensions#tabline#buffers#on() - call airline#extensions#tabline#ctrlspace#on() - - set tabline=%!airline#extensions#tabline#get() -endfunction - -function! s:update_tabline() - if get(g:, 'airline#extensions#tabline#disable_refresh', 0) - return - endif - let match = expand('') - if pumvisible() - return - elseif !get(g:, 'airline#extensions#tabline#enabled', 0) - return - " return, if buffer matches ignore pattern or is directory (netrw) - elseif empty(match) - \ || match(match, s:ignore_bufadd_pat) > -1 - \ || isdirectory(expand("")) - return - endif - doautocmd User BufMRUChange -endfunction - -function! airline#extensions#tabline#load_theme(palette) - if pumvisible() - return - endif - let colors = get(a:palette, 'tabline', {}) - " Theme for tabs on the left - let l:tab = get(colors, 'airline_tab', a:palette.normal.airline_b) - let l:tabsel = get(colors, 'airline_tabsel', a:palette.normal.airline_a) - let l:tabtype = get(colors, 'airline_tabtype', a:palette.visual.airline_a) - let l:tabfill = get(colors, 'airline_tabfill', a:palette.normal.airline_c) - let l:tabmod = get(colors, 'airline_tabmod', a:palette.insert.airline_a) - let l:tabhid = get(colors, 'airline_tabhid', a:palette.normal.airline_c) - if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c') - let l:tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal_modified.airline_c) - else - "Fall back to normal airline_c if modified airline_c isn't present - let l:tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal.airline_c) - endif - call airline#highlighter#exec('airline_tab', l:tab) - call airline#highlighter#exec('airline_tabsel', l:tabsel) - call airline#highlighter#exec('airline_tabtype', l:tabtype) - call airline#highlighter#exec('airline_tabfill', l:tabfill) - call airline#highlighter#exec('airline_tabmod', l:tabmod) - call airline#highlighter#exec('airline_tabmod_unsel', l:tabmodu) - call airline#highlighter#exec('airline_tabhid', l:tabhid) - - " Theme for tabs on the right - let l:tabsel_right = get(colors, 'airline_tabsel_right', a:palette.normal.airline_a) - let l:tab_right = get(colors, 'airline_tab_right', a:palette.inactive.airline_c) - let l:tabmod_right = get(colors, 'airline_tabmod_right', a:palette.insert.airline_a) - let l:tabhid_right = get(colors, 'airline_tabhid_right', a:palette.normal.airline_c) - if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c') - let l:tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal_modified.airline_c) - else - "Fall back to normal airline_c if modified airline_c isn't present - let l:tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal.airline_c) - endif - call airline#highlighter#exec('airline_tab_right', l:tab_right) - call airline#highlighter#exec('airline_tabsel_right', l:tabsel_right) - call airline#highlighter#exec('airline_tabmod_right', l:tabmod_right) - call airline#highlighter#exec('airline_tabhid_right', l:tabhid_right) - call airline#highlighter#exec('airline_tabmod_unsel_right', l:tabmodu_right) -endfunction - -let s:current_tabcnt = -1 -function! airline#extensions#tabline#get() - let curtabcnt = tabpagenr('$') - if curtabcnt != s:current_tabcnt - let s:current_tabcnt = curtabcnt - call airline#extensions#tabline#tabs#invalidate() - call airline#extensions#tabline#buffers#invalidate() - call airline#extensions#tabline#ctrlspace#invalidate() - endif - - if !exists('#airline#BufAdd#*') - autocmd airline BufAdd * call update_tabline() - endif - if s:ctrlspace - return airline#extensions#tabline#ctrlspace#get() - elseif s:show_buffers && curtabcnt == 1 || !s:show_tabs - return airline#extensions#tabline#buffers#get() - else - return airline#extensions#tabline#tabs#get() - endif -endfunction - -function! airline#extensions#tabline#title(n) - let title = '' - if s:taboo - let title = TabooTabTitle(a:n) - endif - - if empty(title) && exists('*gettabvar') - let title = gettabvar(a:n, 'title') - endif - - if empty(title) - let buflist = tabpagebuflist(a:n) - let winnr = tabpagewinnr(a:n) - return airline#extensions#tabline#get_buffer_name(buflist[winnr - 1]) - endif - - return title -endfunction - -function! airline#extensions#tabline#get_buffer_name(nr) - return airline#extensions#tabline#formatters#{s:formatter}#format(a:nr, airline#extensions#tabline#buflist#list()) -endfunction - -function! airline#extensions#tabline#new_builder() - let builder_context = { - \ 'active' : 1, - \ 'right_sep' : get(g:, 'airline#extensions#tabline#right_sep' , g:airline_right_sep), - \ 'right_alt_sep' : get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), - \ } - if get(g:, 'airline_powerline_fonts', 0) - let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , g:airline_left_sep) - let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , g:airline_left_alt_sep) - else - let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') - let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') - endif - - return airline#builder#new(builder_context) -endfunction - -function! airline#extensions#tabline#group_of_bufnr(tab_bufs, bufnr) - let cur = bufnr('%') - if cur == a:bufnr - if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') - let group = 'airline_tabmod' - else - let group = 'airline_tabsel' - endif - else - if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') - let group = 'airline_tabmod_unsel' - elseif index(a:tab_bufs, a:bufnr) > -1 - let group = 'airline_tab' - else - let group = 'airline_tabhid' - endif - endif - return group -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/autoshow.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/autoshow.vim deleted file mode 100644 index 32bcf54f..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/autoshow.vim +++ /dev/null @@ -1,53 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) -let s:buf_min_count = get(g:, 'airline#extensions#tabline#buffer_min_count', 0) -let s:tab_min_count = get(g:, 'airline#extensions#tabline#tab_min_count', 0) - -function! airline#extensions#tabline#autoshow#off() - if exists('s:original_tabline') - let &tabline = s:original_tabline - let &showtabline = s:original_showtabline - endif - - augroup airline_tabline_autoshow - autocmd! - augroup END -endfunction - -function! airline#extensions#tabline#autoshow#on() - let [ s:original_tabline, s:original_showtabline ] = [ &tabline, &showtabline ] - - augroup airline_tabline_autoshow - autocmd! - if s:buf_min_count <= 0 && s:tab_min_count <= 1 - if &lines > 3 - set showtabline=2 - endif - else - if s:show_buffers == 1 - autocmd BufEnter * call show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list())) - autocmd BufUnload * call show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list()) - 1) - else - autocmd TabEnter * call show_tabline(s:tab_min_count, tabpagenr('$')) - endif - endif - - " Invalidate cache. This has to come after the BufUnload for - " s:show_buffers, to invalidate the cache for BufEnter. - autocmd BufLeave,BufAdd,BufUnload * call airline#extensions#tabline#buflist#invalidate() - augroup END -endfunction - -function! s:show_tabline(min_count, total_count) - if a:total_count >= a:min_count - if &showtabline != 2 && &lines > 3 - set showtabline=2 - endif - else - if &showtabline != 0 - set showtabline=0 - endif - endif -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buffers.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buffers.vim deleted file mode 100644 index 8c3f3445..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buffers.vim +++ /dev/null @@ -1,213 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -scriptencoding utf-8 - -let s:buffer_idx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) -let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1) -let s:buffers_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') -let s:spc = g:airline_symbols.space - -let s:current_bufnr = -1 -let s:current_modified = 0 -let s:current_tabline = '' -let s:current_visible_buffers = [] - -let s:number_map = &encoding == 'utf-8' - \ ? { - \ '0': '⁰', - \ '1': '¹', - \ '2': '²', - \ '3': '³', - \ '4': '⁴', - \ '5': '⁵', - \ '6': '⁶', - \ '7': '⁷', - \ '8': '⁸', - \ '9': '⁹' - \ } - \ : {} - -function! airline#extensions#tabline#buffers#off() - augroup airline_tabline_buffers - autocmd! - augroup END -endfunction - -function! airline#extensions#tabline#buffers#on() - augroup airline_tabline_buffers - autocmd! - autocmd BufDelete * call airline#extensions#tabline#buffers#invalidate() - autocmd User BufMRUChange call airline#extensions#tabline#buflist#invalidate() - autocmd User BufMRUChange call airline#extensions#tabline#buffers#invalidate() - augroup END -endfunction - -function! airline#extensions#tabline#buffers#invalidate() - let s:current_bufnr = -1 -endfunction - -function! airline#extensions#tabline#buffers#get() - call map_keys() - let cur = bufnr('%') - if cur == s:current_bufnr - if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified - return s:current_tabline - endif - endif - - let l:index = 1 - let b = airline#extensions#tabline#new_builder() - let tab_bufs = tabpagebuflist(tabpagenr()) - for nr in s:get_visible_buffers() - if nr < 0 - call b.add_raw('%#airline_tabhid#...') - continue - endif - - let group = airline#extensions#tabline#group_of_bufnr(tab_bufs, nr) - - if nr == cur - let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 - endif - - " Neovim feature: Have clickable buffers - if has("tablineat") - call b.add_raw('%'.nr.'@airline#extensions#tabline#buffers#clickbuf@') - endif - if s:buffer_idx_mode - if len(s:number_map) > 0 - call b.add_section(group, s:spc . get(s:number_map, l:index, '') . '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)' . s:spc) - else - call b.add_section(group, '['.l:index.s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.']') - endif - let l:index = l:index + 1 - else - call b.add_section(group, s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.s:spc) - endif - if has("tablineat") - call b.add_raw('%X') - endif - endfor - - call b.add_section('airline_tabfill', '') - call b.split() - call b.add_section('airline_tabfill', '') - if s:show_tab_type - call b.add_section_spaced('airline_tabtype', s:buffers_label) - endif - - let s:current_bufnr = cur - let s:current_tabline = b.build() - return s:current_tabline -endfunction - -function! s:get_visible_buffers() - let buffers = airline#extensions#tabline#buflist#list() - let cur = bufnr('%') - - let total_width = 0 - let max_width = 0 - - for nr in buffers - let width = len(airline#extensions#tabline#get_buffer_name(nr)) + 4 - let total_width += width - let max_width = max([max_width, width]) - endfor - - " only show current and surrounding buffers if there are too many buffers - let position = index(buffers, cur) - let vimwidth = &columns - if total_width > vimwidth && position > -1 - let buf_count = len(buffers) - - " determine how many buffers to show based on the longest buffer width, - " use one on the right side and put the rest on the left - let buf_max = vimwidth / max_width - let buf_right = 1 - let buf_left = max([0, buf_max - buf_right]) - - let start = max([0, position - buf_left]) - let end = min([buf_count, position + buf_right]) - - " fill up available space on the right - if position < buf_left - let end += (buf_left - position) - endif - - " fill up available space on the left - if end > buf_count - 1 - buf_right - let start -= max([0, buf_right - (buf_count - 1 - position)]) - endif - - let buffers = eval('buffers[' . start . ':' . end . ']') - - if start > 0 - call insert(buffers, -1, 0) - endif - - if end < buf_count - 1 - call add(buffers, -1) - endif - endif - - let s:current_visible_buffers = buffers - return buffers -endfunction - -function! s:select_tab(buf_index) - " no-op when called in the NERDTree buffer - if exists('t:NERDTreeBufName') && bufname('%') == t:NERDTreeBufName - return - endif - - let idx = a:buf_index - if s:current_visible_buffers[0] == -1 - let idx = idx + 1 - endif - - let buf = get(s:current_visible_buffers, idx, 0) - if buf != 0 - exec 'b!' . buf - endif -endfunction - -function! s:jump_to_tab(offset) - let l = s:current_visible_buffers - let i = index(l, bufnr('%')) - if i > -1 - exec 'b!' . l[float2nr(fmod(i + a:offset, len(l)))] - endif -endfunction - -function! s:map_keys() - if s:buffer_idx_mode - noremap AirlineSelectTab1 :call select_tab(0) - noremap AirlineSelectTab2 :call select_tab(1) - noremap AirlineSelectTab3 :call select_tab(2) - noremap AirlineSelectTab4 :call select_tab(3) - noremap AirlineSelectTab5 :call select_tab(4) - noremap AirlineSelectTab6 :call select_tab(5) - noremap AirlineSelectTab7 :call select_tab(6) - noremap AirlineSelectTab8 :call select_tab(7) - noremap AirlineSelectTab9 :call select_tab(8) - noremap AirlineSelectPrevTab :call jump_to_tab(-v:count1) - noremap AirlineSelectNextTab :call jump_to_tab(v:count1) - endif -endfunction - -function! airline#extensions#tabline#buffers#clickbuf(minwid, clicks, button, modifiers) abort - " Clickable buffers - " works only in recent NeoVim with has('tablineat') - - " single mouse button click without modifiers pressed - if a:clicks == 1 && a:modifiers !~# '[^ ]' - if a:button is# 'l' - " left button - switch to buffer - silent execute 'buffer' a:minwid - elseif a:button is# 'm' - " middle button - delete buffer - silent execute 'bdelete' a:minwid - endif - endif -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buflist.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buflist.vim deleted file mode 100644 index 6ee23ed0..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/buflist.vim +++ /dev/null @@ -1,42 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:excludes = get(g:, 'airline#extensions#tabline#excludes', []) -let s:exclude_preview = get(g:, 'airline#extensions#tabline#exclude_preview', 1) - -function! airline#extensions#tabline#buflist#invalidate() - unlet! s:current_buffer_list -endfunction - -function! airline#extensions#tabline#buflist#list() - if exists('s:current_buffer_list') - return s:current_buffer_list - endif - - let list = (exists('g:did_bufmru') && g:did_bufmru) ? BufMRUList() : range(1, bufnr("$")) - - let buffers = [] - " If this is too slow, we can switch to a different algorithm. - " Basically branch 535 already does it, but since it relies on - " BufAdd autocommand, I'd like to avoid this if possible. - for nr in list - if buflisted(nr) - " Do not add to the bufferlist, if either - " 1) buffername matches exclude pattern - " 2) buffer is a quickfix buffer - " 3) exclude preview windows (if 'bufhidden' == wipe - " and 'buftype' == nofile - if (!empty(s:excludes) && match(bufname(nr), join(s:excludes, '\|')) > -1) || - \ (getbufvar(nr, 'current_syntax') == 'qf') || - \ (s:exclude_preview && getbufvar(nr, '&bufhidden') == 'wipe' - \ && getbufvar(nr, '&buftype') == 'nofile') - continue - endif - call add(buffers, nr) - endif - endfor - - let s:current_buffer_list = buffers - return buffers -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim deleted file mode 100644 index 99f4a212..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim +++ /dev/null @@ -1,149 +0,0 @@ -" MIT License. Copyright (c) 2016 Kevin Sapper -" vim: et ts=2 sts=2 sw=2 - -scriptencoding utf-8 - -let s:current_bufnr = -1 -let s:current_tabnr = -1 -let s:current_tabline = '' - -let s:buffers_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') -let s:tabs_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs') -let s:switch_buffers_and_tabs = get(g:, 'airline#extensions#tabline#switch_buffers_and_tabs', 0) -let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) -let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) - -function! airline#extensions#tabline#ctrlspace#off() - augroup airline_tabline_ctrlspace - autocmd! - augroup END -endfunction - -function! airline#extensions#tabline#ctrlspace#on() - augroup airline_tabline_ctrlspace - autocmd! - autocmd BufDelete * call airline#extensions#tabline#ctrlspace#invalidate() - augroup END -endfunction - -function! airline#extensions#tabline#ctrlspace#invalidate() - let s:current_bufnr = -1 - let s:current_tabnr = -1 -endfunction - -function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pos) - if a:pos == 0 - let pos_extension = '' - else - let pos_extension = '_right' - endif - - let s:buffer_list = ctrlspace#api#BufferList(a:cur_tab) - for buffer in s:buffer_list - if a:cur_buf == buffer.index - if buffer.modified - let group = 'airline_tabmod'.pos_extension - else - let group = 'airline_tabsel'.pos_extension - endif - else - if buffer.modified - let group = 'airline_tabmod_unsel'.pos_extension - elseif buffer.visible - let group = 'airline_tab'.pos_extension - else - let group = 'airline_tabhid'.pos_extension - endif - endif - - let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.index.')}%)' - - if has("tablineat") - let buf_name = '%'.buffer.index.'@airline#extensions#tabline#buffers#switchbuf@'.buf_name.'%X' - endif - - call a:builder.add_section_spaced(group, buf_name) - endfor -endfunction - -function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pos) - if a:pos == 0 - let pos_extension = '' - else - let pos_extension = '_right' - endif - - for tab in s:tab_list - if tab.current - if tab.modified - let group = 'airline_tabmod'.pos_extension - else - let group = 'airline_tabsel'.pos_extension - endif - else - if tab.modified - let group = 'airline_tabmod_unsel'.pos_extension - else - let group = 'airline_tabhid'.pos_extension - endif - endif - - call a:builder.add_section_spaced(group, '%'.tab.index.'T'.tab.title.ctrlspace#api#TabBuffersNumber(tab.index).'%T') - endfor -endfunction - -function! airline#extensions#tabline#ctrlspace#get() - let cur_buf = bufnr('%') - - let s:tab_list = ctrlspace#api#TabList() - for tab in s:tab_list - if tab.current - let cur_tab = tab.index - endif - endfor - - if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr - return s:current_tabline - endif - - let builder = airline#extensions#tabline#new_builder() - - " Add left tabline content - if s:show_buffers == 0 - call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 0) - elseif s:show_tabs == 0 - call airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 0) - else - if s:switch_buffers_and_tabs == 0 - call builder.add_section_spaced('airline_tabtype', s:buffers_label) - call airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 0) - else - call builder.add_section_spaced('airline_tabtype', s:tabs_label) - call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 0) - endif - endif - - call builder.add_section('airline_tabfill', '') - call builder.split() - call builder.add_section('airline_tabfill', '') - - " Add right tabline content - if s:show_buffers == 0 - call builder.add_section_spaced('airline_tabtype', s:tabs_label) - elseif s:show_tabs == 0 - call builder.add_section_spaced('airline_tabtype', s:buffers_label) - else - if s:switch_buffers_and_tabs == 0 - call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 1) - call builder.add_section_spaced('airline_tabtype', s:tabs_label) - else - call airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 1) - call builder.add_section_spaced('airline_tabtype', s:buffers_label) - endif - endif - - let s:current_bufnr = cur_buf - let s:current_tabnr = cur_tab - let s:current_tabline = builder.build() - return s:current_tabline -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim deleted file mode 100644 index e57eaa07..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim +++ /dev/null @@ -1,39 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.') -let s:fnamecollapse = get(g:, 'airline#extensions#tabline#fnamecollapse', 1) -let s:fnametruncate = get(g:, 'airline#extensions#tabline#fnametruncate', 0) -let s:buf_nr_format = get(g:, 'airline#extensions#tabline#buffer_nr_format', '%s: ') -let s:buf_nr_show = get(g:, 'airline#extensions#tabline#buffer_nr_show', 0) -let s:buf_modified_symbol = g:airline_symbols.modified - -function! airline#extensions#tabline#formatters#default#format(bufnr, buffers) - let _ = '' - - let name = bufname(a:bufnr) - if empty(name) - let _ .= '[No Name]' - else - if s:fnamecollapse - let _ .= substitute(fnamemodify(name, s:fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g') - else - let _ .= fnamemodify(name, s:fmod) - endif - if a:bufnr != bufnr('%') && s:fnametruncate && strlen(_) > s:fnametruncate - let _ = strpart(_, 0, s:fnametruncate) - endif - endif - - return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) -endfunction - -function! airline#extensions#tabline#formatters#default#wrap_name(bufnr, buffer_name) - let _ = s:buf_nr_show ? printf(s:buf_nr_format, a:bufnr) : '' - let _ .= substitute(a:buffer_name, '\\', '/', 'g') - - if getbufvar(a:bufnr, '&modified') == 1 - let _ .= s:buf_modified_symbol - endif - return _ -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim deleted file mode 100644 index 3954f49e..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim +++ /dev/null @@ -1,32 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -function! airline#extensions#tabline#formatters#unique_tail#format(bufnr, buffers) - let duplicates = {} - let tails = {} - let map = {} - for nr in a:buffers - let name = bufname(nr) - if empty(name) - let map[nr] = '[No Name]' - else - let tail = fnamemodify(name, ':s?/\+$??:t') - if has_key(tails, tail) - let duplicates[nr] = nr - endif - let tails[tail] = 1 - let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, tail) - endif - endfor - - for nr in values(duplicates) - let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, fnamemodify(bufname(nr), ':p:.')) - endfor - - if has_key(map, a:bufnr) - return map[a:bufnr] - endif - - " if we get here, the buffer list isn't in sync with the selected buffer yet, fall back to the default - return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim deleted file mode 100644 index e860bd8d..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim +++ /dev/null @@ -1,91 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -scriptencoding utf-8 - -let s:skip_symbol = '…' - -function! airline#extensions#tabline#formatters#unique_tail_improved#format(bufnr, buffers) - if len(a:buffers) <= 1 " don't need to compare bufnames if has less than one buffer opened - return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) - endif - - let curbuf_tail = fnamemodify(bufname(a:bufnr), ':t') - let do_deduplicate = 0 - let path_tokens = {} - - for nr in a:buffers - let name = bufname(nr) - if !empty(name) && nr != a:bufnr && fnamemodify(name, ':t') == curbuf_tail " only perform actions if curbuf_tail isn't unique - let do_deduplicate = 1 - let tokens = reverse(split(substitute(fnamemodify(name, ':p:h'), '\\', '/', 'g'), '/')) - let token_index = 0 - for token in tokens - if token == '' | continue | endif - if token == '.' | break | endif - if !has_key(path_tokens, token_index) - let path_tokens[token_index] = {} - endif - let path_tokens[token_index][token] = 1 - let token_index += 1 - endfor - endif - endfor - - if do_deduplicate == 1 - let path = [] - let token_index = 0 - for token in reverse(split(substitute(fnamemodify(bufname(a:bufnr), ':p:h'), '\\', '/', 'g'), '/')) - if token == '.' | break | endif - let duplicated = 0 - let uniq = 1 - let single = 1 - if has_key(path_tokens, token_index) - let duplicated = 1 - if len(keys(path_tokens[token_index])) > 1 | let single = 0 | endif - if has_key(path_tokens[token_index], token) | let uniq = 0 | endif - endif - call insert(path, {'token': token, 'duplicated': duplicated, 'uniq': uniq, 'single': single}) - let token_index += 1 - endfor - - let buf_name = [curbuf_tail] - let has_uniq = 0 - let has_skipped = 0 - for token1 in reverse(path) - if !token1['duplicated'] && len(buf_name) > 1 - call insert(buf_name, s:skip_symbol) - let has_skipped = 0 - break - endif - - if has_uniq == 1 - call insert(buf_name, s:skip_symbol) - let has_skipped = 0 - break - endif - - if token1['uniq'] == 0 && token1['single'] == 1 - let has_skipped = 1 - else - if has_skipped == 1 - call insert(buf_name, s:skip_symbol) - let has_skipped = 0 - endif - call insert(buf_name, token1['token']) - endif - - if token1['uniq'] == 1 - let has_uniq = 1 - endif - endfor - - if has_skipped == 1 - call insert(buf_name, s:skip_symbol) - endif - - return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, join(buf_name, '/')) - else - return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) - endif -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/tabs.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/tabs.vim deleted file mode 100644 index 649579e3..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline/tabs.vim +++ /dev/null @@ -1,110 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:show_close_button = get(g:, 'airline#extensions#tabline#show_close_button', 1) -let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1) -let s:show_tab_nr = get(g:, 'airline#extensions#tabline#show_tab_nr', 1) -let s:tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0) -let s:close_symbol = get(g:, 'airline#extensions#tabline#close_symbol', 'X') -let s:tabs_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs') -let s:show_splits = get(g:, 'airline#extensions#tabline#show_splits', 1) -let s:spc = g:airline_symbols.space - -let s:current_bufnr = -1 -let s:current_tabnr = -1 -let s:current_modified = 0 - -function! airline#extensions#tabline#tabs#off() - augroup airline_tabline_tabs - autocmd! - augroup END -endfunction - -function! airline#extensions#tabline#tabs#on() - augroup airline_tabline_tabs - autocmd! - autocmd BufDelete * call airline#extensions#tabline#tabs#invalidate() - augroup END -endfunction - -function! airline#extensions#tabline#tabs#invalidate() - let s:current_bufnr = -1 -endfunction - -function! airline#extensions#tabline#tabs#get() - let curbuf = bufnr('%') - let curtab = tabpagenr() - call s:map_keys() - if curbuf == s:current_bufnr && curtab == s:current_tabnr - if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified - return s:current_tabline - endif - endif - - let b = airline#extensions#tabline#new_builder() - - for i in range(1, tabpagenr('$')) - if i == curtab - let group = 'airline_tabsel' - if g:airline_detect_modified - for bi in tabpagebuflist(i) - if getbufvar(bi, '&modified') - let group = 'airline_tabmod' - endif - endfor - endif - let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 - else - let group = 'airline_tab' - endif - let val = '%(' - if s:show_tab_nr - if s:tab_nr_type == 0 - let val .= (g:airline_symbols.space).'%{len(tabpagebuflist('.i.'))}' - elseif s:tab_nr_type == 1 - let val .= (g:airline_symbols.space).i - else "== 2 - let val .= (g:airline_symbols.space).i.'.%{len(tabpagebuflist('.i.'))}' - endif - endif - call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)') - endfor - - call b.add_section('airline_tabfill', '') - call b.split() - call b.add_section('airline_tabfill', '') - - if s:show_close_button - call b.add_section('airline_tab_right', ' %999X'.s:close_symbol.' ') - endif - - if s:show_splits == 1 - let buffers = tabpagebuflist(curtab) - for nr in buffers - let group = airline#extensions#tabline#group_of_bufnr(buffers, nr) . "_right" - call b.add_section_spaced(group, '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)') - endfor - elseif s:show_tab_type == 1 - call b.add_section_spaced('airline_tabtype', s:tabs_label) - endif - - let s:current_bufnr = curbuf - let s:current_tabnr = curtab - let s:current_tabline = b.build() - return s:current_tabline -endfunction - -function! s:map_keys() - noremap AirlineSelectTab1 :1tabn - noremap AirlineSelectTab2 :2tabn - noremap AirlineSelectTab3 :3tabn - noremap AirlineSelectTab4 :4tabn - noremap AirlineSelectTab5 :5tabn - noremap AirlineSelectTab6 :6tabn - noremap AirlineSelectTab7 :7tabn - noremap AirlineSelectTab8 :8tabn - noremap AirlineSelectTab9 :9tabn - noremap AirlineSelectPrevTab gT - " tabn {count} goes to count tab does not go {count} tab pages forward! - noremap AirlineSelectNextTab :exe repeat(':tabn\|', v:count1) -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tagbar.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tagbar.vim deleted file mode 100644 index da8abf61..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tagbar.vim +++ /dev/null @@ -1,45 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !exists(':TagbarToggle') - finish -endif - -let s:flags = get(g:, 'airline#extensions#tagbar#flags', '') -let s:spc = g:airline_symbols.space - -" Arguments: current, sort, fname -function! airline#extensions#tagbar#get_status(...) - let builder = airline#builder#new({ 'active': a:1 }) - call builder.add_section('airline_a', s:spc.'Tagbar'.s:spc) - call builder.add_section('airline_b', s:spc.a:2.s:spc) - call builder.add_section('airline_c', s:spc.a:3.s:spc) - return builder.build() -endfunction - -function! airline#extensions#tagbar#inactive_apply(...) - if getwinvar(a:2.winnr, '&filetype') == 'tagbar' - return -1 - endif -endfunction - -let s:airline_tagbar_last_lookup_time = 0 -let s:airline_tagbar_last_lookup_val = '' -function! airline#extensions#tagbar#currenttag() - if get(w:, 'airline_active', 0) - if s:airline_tagbar_last_lookup_time != localtime() - let s:airline_tagbar_last_lookup_val = tagbar#currenttag('%s', '', s:flags) - let s:airline_tagbar_last_lookup_time = localtime() - endif - return s:airline_tagbar_last_lookup_val - endif - return '' -endfunction - -function! airline#extensions#tagbar#init(ext) - call a:ext.add_inactive_statusline_func('airline#extensions#tagbar#inactive_apply') - let g:tagbar_status_func = 'airline#extensions#tagbar#get_status' - - call airline#parts#define_function('tagbar', 'airline#extensions#tagbar#currenttag') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tmuxline.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tmuxline.vim deleted file mode 100644 index 0e55588e..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tmuxline.vim +++ /dev/null @@ -1,26 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !exists(':Tmuxline') - finish -endif - -let s:tmuxline_snapshot_file = get(g:, 'airline#extensions#tmuxline#snapshot_file', '') -let s:color_template = get(g:, 'airline#extensions#tmuxline#color_template', 'normal') - -function! airline#extensions#tmuxline#init(ext) - call a:ext.add_theme_func('airline#extensions#tmuxline#set_tmux_colors') -endfunction - -function! airline#extensions#tmuxline#set_tmux_colors(palette) - let color_template = has_key(a:palette, s:color_template) ? s:color_template : 'normal' - let mode_palette = a:palette[color_template] - - let tmuxline_theme = tmuxline#api#create_theme_from_airline(mode_palette) - call tmuxline#api#set_theme(tmuxline_theme) - - if strlen(s:tmuxline_snapshot_file) - call tmuxline#api#snapshot(s:tmuxline_snapshot_file) - endif -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/undotree.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/undotree.vim deleted file mode 100644 index aa24bef4..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/undotree.vim +++ /dev/null @@ -1,27 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !exists(':UndotreeToggle') - finish -endif - -function! airline#extensions#undotree#apply(...) - if exists('t:undotree') - if &ft == 'undotree' - if exists('*t:undotree.GetStatusLine') - call airline#extensions#apply_left_override('undo', '%{t:undotree.GetStatusLine()}') - else - call airline#extensions#apply_left_override('undotree', '%f') - endif - endif - - if &ft == 'diff' && exists('*t:diffpanel.GetStatusLine') - call airline#extensions#apply_left_override('diff', '%{t:diffpanel.GetStatusLine()}') - endif - endif -endfunction - -function! airline#extensions#undotree#init(ext) - call a:ext.add_statusline_func('airline#extensions#undotree#apply') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/unicode.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/unicode.vim deleted file mode 100644 index 38a2141a..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/unicode.vim +++ /dev/null @@ -1,22 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !get(g:, 'loaded_unicodePlugin', 0) - finish -endif - -function! airline#extensions#unicode#apply(...) - if exists(":UnicodeTable") == 2 && bufname('') ==# 'UnicodeTable' - call airline#parts#define('unicode', { - \ 'text': '[UnicodeTable]', - \ 'accent': 'bold' }) - let w:airline_section_a = airline#section#create(['unicode']) - let w:airline_section_b = '' - let w:airline_section_c = '' - let w:airline_section_y = '' - endif -endfunction - -function! airline#extensions#unicode#init(ext) - call a:ext.add_statusline_func('airline#extensions#unicode#apply') -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/unite.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/unite.vim deleted file mode 100644 index 33cee27e..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/unite.vim +++ /dev/null @@ -1,23 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if !get(g:, 'loaded_unite', 0) - finish -endif - -function! airline#extensions#unite#apply(...) - if &ft == 'unite' - call a:1.add_section('airline_a', ' Unite ') - call a:1.add_section('airline_b', ' %{get(unite#get_context(), "buffer_name", "")} ') - call a:1.add_section('airline_c', ' %{unite#get_status_string()} ') - call a:1.split() - call a:1.add_section('airline_y', ' %{get(unite#get_context(), "real_buffer_name", "")} ') - return 1 - endif -endfunction - -function! airline#extensions#unite#init(ext) - let g:unite_force_overwrite_statusline = 0 - call a:ext.add_statusline_func('airline#extensions#unite#apply') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/virtualenv.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/virtualenv.vim deleted file mode 100644 index 00a0c02c..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/virtualenv.vim +++ /dev/null @@ -1,29 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:spc = g:airline_symbols.space - -function! airline#extensions#virtualenv#init(ext) - call a:ext.add_statusline_func('airline#extensions#virtualenv#apply') -endfunction - -function! airline#extensions#virtualenv#apply(...) - if &filetype =~# "python" - if get(g:, 'virtualenv_loaded', 0) - let statusline = virtualenv#statusline() - else - let statusline = fnamemodify($VIRTUAL_ENV, ':t') - endif - if !empty(statusline) - call airline#extensions#append_to_section('x', - \ s:spc.g:airline_right_alt_sep.s:spc.statusline) - endif - endif -endfunction - -function! airline#extensions#virtualenv#update() - if &filetype =~# "python" - call airline#extensions#virtualenv#apply() - call airline#update_statusline() - endif -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/whitespace.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/whitespace.vim deleted file mode 100644 index 7e13d472..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/whitespace.vim +++ /dev/null @@ -1,148 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -" http://got-ravings.blogspot.com/2008/10/vim-pr0n-statusline-whitespace-flags.html - -let s:show_message = get(g:, 'airline#extensions#whitespace#show_message', 1) -let s:symbol = get(g:, 'airline#extensions#whitespace#symbol', g:airline_symbols.whitespace) -let s:default_checks = ['indent', 'trailing', 'mixed-indent-file'] - -let s:trailing_format = get(g:, 'airline#extensions#whitespace#trailing_format', 'trailing[%s]') -let s:mixed_indent_format = get(g:, 'airline#extensions#whitespace#mixed_indent_format', 'mixed-indent[%s]') -let s:long_format = get(g:, 'airline#extensions#whitespace#long_format', 'long[%s]') -let s:mixed_indent_file_format = get(g:, 'airline#extensions#whitespace#mixed_indent_file_format', 'mix-indent-file[%s]') -let s:indent_algo = get(g:, 'airline#extensions#whitespace#mixed_indent_algo', 0) -let s:skip_check_ft = {'make': ['indent', 'mixed-indent-file'] } -let s:max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000) -let s:enabled = get(g:, 'airline#extensions#whitespace#enabled', 1) -let s:c_like_langs = get(g:, 'airline#extensions#c_like_langs', [ 'c', 'cpp', 'cuda', 'javascript', 'ld', 'php' ]) - -function! s:check_mixed_indent() - if s:indent_algo == 1 - " [] - " spaces before or between tabs are not allowed - let t_s_t = '(^\t* +\t\s*\S)' - " ( x count) - " count of spaces at the end of tabs should be less than tabstop value - let t_l_s = '(^\t+ {' . &ts . ',}' . '\S)' - return search('\v' . t_s_t . '|' . t_l_s, 'nw') - elseif s:indent_algo == 2 - return search('\v(^\t* +\t\s*\S)', 'nw') - else - return search('\v(^\t+ +)|(^ +\t+)', 'nw') - endif -endfunction - -function! s:check_mixed_indent_file() - if index(s:c_like_langs, &ft) > -1 - " for C-like languages: allow /** */ comment style with one space before the '*' - let head_spc = '\v(^ +\*@!)' - else - let head_spc = '\v(^ +)' - endif - let indent_tabs = search('\v(^\t+)', 'nw') - let indent_spc = search(head_spc, 'nw') - if indent_tabs > 0 && indent_spc > 0 - return printf("%d:%d", indent_tabs, indent_spc) - else - return '' - endif -endfunction - -function! airline#extensions#whitespace#check() - if &readonly || !&modifiable || !s:enabled || line('$') > s:max_lines - return '' - endif - - if !exists('b:airline_whitespace_check') - let b:airline_whitespace_check = '' - let checks = get(g:, 'airline#extensions#whitespace#checks', s:default_checks) - - let trailing = 0 - if index(checks, 'trailing') > -1 - try - let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$') - let trailing = search(regexp, 'nw') - catch - echomsg 'airline#whitespace: error occured evaluating '. regexp - echomsg v:exception - return '' - endtry - endif - - let mixed = 0 - let check = 'indent' - if index(checks, check) > -1 && index(get(s:skip_check_ft, &ft, []), check) < 0 - let mixed = s:check_mixed_indent() - endif - - let mixed_file = '' - let check = 'mixed-indent-file' - if index(checks, check) > -1 && index(get(s:skip_check_ft, &ft, []), check) < 0 - let mixed_file = s:check_mixed_indent_file() - endif - - let long = 0 - if index(checks, 'long') > -1 && &tw > 0 - let long = search('\%>'.&tw.'v.\+', 'nw') - endif - - if trailing != 0 || mixed != 0 || long != 0 || !empty(mixed_file) - let b:airline_whitespace_check = s:symbol - if s:show_message - if trailing != 0 - let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:trailing_format, trailing) - endif - if mixed != 0 - let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:mixed_indent_format, mixed) - endif - if long != 0 - let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:long_format, long) - endif - if !empty(mixed_file) - let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:mixed_indent_file_format, mixed_file) - endif - endif - endif - endif - return b:airline_whitespace_check -endfunction - -function! airline#extensions#whitespace#toggle() - if s:enabled - augroup airline_whitespace - autocmd! - augroup END - augroup! airline_whitespace - let s:enabled = 0 - else - call airline#extensions#whitespace#init() - let s:enabled = 1 - endif - - if exists("g:airline#extensions#whitespace#enabled") - let g:airline#extensions#whitespace#enabled = s:enabled - if s:enabled && match(g:airline_section_warning, '#whitespace#check') < 0 - let g:airline_section_warning .= airline#section#create(['whitespace']) - call airline#update_statusline() - endif - endif - echo 'Whitespace checking: '.(s:enabled ? 'Enabled' : 'Disabled') -endfunction - -function! airline#extensions#whitespace#init(...) - call airline#parts#define_function('whitespace', 'airline#extensions#whitespace#check') - - unlet! b:airline_whitespace_check - augroup airline_whitespace - autocmd! - autocmd CursorHold,BufWritePost * call ws_refresh() - augroup END -endfunction - -function! s:ws_refresh() - unlet! b:airline_whitespace_check - if get(g:, 'airline_skip_empty_sections', 0) - exe ':AirlineRefresh' - endif -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/windowswap.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/windowswap.vim deleted file mode 100644 index 7f260571..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/windowswap.vim +++ /dev/null @@ -1,27 +0,0 @@ -" vim: et ts=2 sts=2 sw=2 - -if !exists('g:loaded_windowswap') - finish -endif - -let s:spc = g:airline_symbols.space - -if !exists('g:airline#extensions#windowswap#indicator_text') - let g:airline#extensions#windowswap#indicator_text = 'WS' -endif - -function! airline#extensions#windowswap#init(ext) - call airline#parts#define_function('windowswap', 'airline#extensions#windowswap#get_status') -endfunction - -function! airline#extensions#windowswap#get_status() - " use new tab-aware api if WS is up to date - let s:mark = exists('*WindowSwap#IsCurrentWindowMarked') ? - \WindowSwap#IsCurrentWindowMarked() : - \(WindowSwap#HasMarkedWindow() && WindowSwap#GetMarkedWindowNum() == winnr()) - if s:mark - return g:airline#extensions#windowswap#indicator_text.s:spc - endif - return '' -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/wordcount.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/wordcount.vim deleted file mode 100644 index 1a403eda..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/wordcount.vim +++ /dev/null @@ -1,36 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:filetypes = get(g:, 'airline#extensions#wordcount#filetypes', '\vhelp|markdown|rst|org|text|asciidoc') -let s:format = get(g:, 'airline#extensions#wordcount#format', '%d words') -let s:formatter = get(g:, 'airline#extensions#wordcount#formatter', 'default') - -function! s:update() - if match(&ft, s:filetypes) > -1 - let l:mode = mode() - if l:mode ==# 'v' || l:mode ==# 'V' || l:mode ==# 's' || l:mode ==# 'S' - let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() - let b:airline_change_tick = b:changedtick - else - if get(b:, 'airline_wordcount_cache', '') is# '' || - \ b:airline_wordcount_cache isnot# get(b:, 'airline_wordcount', '') || - \ get(b:, 'airline_change_tick', 0) != b:changedtick - " cache data - let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() - let b:airline_wordcount_cache = b:airline_wordcount - let b:airline_change_tick = b:changedtick - endif - endif - endif -endfunction - -function! airline#extensions#wordcount#apply(...) - if &ft =~ s:filetypes - call airline#extensions#prepend_to_section('z', '%{get(b:, "airline_wordcount", "")}') - endif -endfunction - -function! airline#extensions#wordcount#init(ext) - call a:ext.add_statusline_func('airline#extensions#wordcount#apply') - autocmd BufReadPost,CursorMoved,CursorMovedI * call s:update() -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim deleted file mode 100644 index e652c9e6..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim +++ /dev/null @@ -1,58 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -function! airline#extensions#wordcount#formatters#default#format() - let words = string(s:wordcount()) - if empty(words) - return - endif - let separator = s:get_decimal_group() - if words > 999 && !empty(separator) - " Format number according to locale, e.g. German: 1.245 or English: 1,245 - let a = join(reverse(split(words, '.\zs')),'') - let a = substitute(a, '...', '&'.separator, 'g') - let words = join(reverse(split(a, '.\zs')),'') - endif - return words . " words" . g:airline_symbols.space . g:airline_right_alt_sep . g:airline_symbols.space -endfunction - -function! s:wordcount() - if exists("*wordcount") - let l:mode = mode() - if l:mode ==# 'v' || l:mode ==# 'V' || l:mode ==# 's' || l:mode ==# 'S' - let l:visual_words = wordcount()['visual_words'] - if l:visual_words != '' - return l:visual_words - else - return 0 - endif - else - return wordcount()['words'] - endif - elseif mode() =~? 's' - return - else - let old_status = v:statusmsg - let position = getpos(".") - exe "silent normal! g\" - let stat = v:statusmsg - call setpos('.', position) - let v:statusmsg = old_status - - let parts = split(stat) - if len(parts) > 11 - return str2nr(parts[11]) - else - return - endif - endif -endfunction - -function! s:get_decimal_group() - if match(v:lang, '\v\cC|en') > -1 - return ',' - elseif match(v:lang, '\v\cde|dk|fr|pt') > -1 - return '.' - endif - return '' -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/ycm.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/ycm.vim deleted file mode 100644 index dc44c0e7..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/ycm.vim +++ /dev/null @@ -1,36 +0,0 @@ -" MIT License. Copyright (c) 2015 Evgeny Firsov. -" vim: et ts=2 sts=2 sw=2 - -let s:spc = g:airline_symbols.space -let s:error_symbol = get(g:, 'airline#extensions#ycm#error_symbol', 'E:') -let s:warning_symbol = get(g:, 'airline#extensions#ycm#warning_symbol', 'W:') - -function! airline#extensions#ycm#init(ext) - call airline#parts#define_function('ycm_error_count', 'airline#extensions#ycm#get_error_count') - call airline#parts#define_function('ycm_warning_count', 'airline#extensions#ycm#get_warning_count') -endfunction - -function! airline#extensions#ycm#get_error_count() - if exists(':YcmDiag') - let cnt = youcompleteme#GetErrorCount() - - if cnt != 0 - return s:error_symbol.cnt - endif - endif - - return '' -endfunction - -function! airline#extensions#ycm#get_warning_count() - if exists(':YcmDiag') - let cnt = youcompleteme#GetWarningCount() - - if cnt != 0 - return s:warning_symbol.cnt.s:spc - endif - endif - - return '' -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/highlighter.vim b/sources_non_forked/vim-airline/autoload/airline/highlighter.vim deleted file mode 100644 index 3d30d69e..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/highlighter.vim +++ /dev/null @@ -1,178 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:is_win32term = (has('win32') || has('win64')) && !has('gui_running') && (empty($CONEMUBUILD) || &term !=? 'xterm') - -let s:separators = {} -let s:accents = {} - -function! s:gui2cui(rgb, fallback) - if a:rgb == '' - return a:fallback - elseif match(a:rgb, '^\%(NONE\|[fb]g\)$') > -1 - return a:rgb - endif - let rgb = map(split(a:rgb[1:], '..\zs'), '0 + ("0x".v:val)') - return airline#msdos#round_msdos_colors(rgb) -endfunction - -function! s:get_syn(group, what) - if !exists("g:airline_gui_mode") - let g:airline_gui_mode = airline#init#gui_mode() - endif - let color = synIDattr(synIDtrans(hlID(a:group)), a:what, g:airline_gui_mode) - if empty(color) || color == -1 - let color = synIDattr(synIDtrans(hlID('Normal')), a:what, g:airline_gui_mode) - endif - if empty(color) || color == -1 - let color = 'NONE' - endif - return color -endfunction - -function! s:get_array(fg, bg, opts) - let fg = a:fg - let bg = a:bg - return g:airline_gui_mode ==# 'gui' - \ ? [ fg, bg, '', '', join(a:opts, ',') ] - \ : [ '', '', fg, bg, join(a:opts, ',') ] -endfunction - -function! airline#highlighter#get_highlight(group, ...) - let fg = s:get_syn(a:group, 'fg') - let bg = s:get_syn(a:group, 'bg') - let reverse = g:airline_gui_mode ==# 'gui' - \ ? synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'gui') - \ : synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'cterm') - \|| synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'term') - return reverse ? s:get_array(bg, fg, a:000) : s:get_array(fg, bg, a:000) -endfunction - -function! airline#highlighter#get_highlight2(fg, bg, ...) - let fg = s:get_syn(a:fg[0], a:fg[1]) - let bg = s:get_syn(a:bg[0], a:bg[1]) - return s:get_array(fg, bg, a:000) -endfunction - -function! airline#highlighter#exec(group, colors) - if pumvisible() - return - endif - let colors = a:colors - if s:is_win32term - let colors[2] = s:gui2cui(get(colors, 0, ''), get(colors, 2, '')) - let colors[3] = s:gui2cui(get(colors, 1, ''), get(colors, 3, '')) - endif - let cmd= printf('hi %s %s %s %s %s %s %s %s', - \ a:group, s:Get(colors, 0, 'guifg=', ''), s:Get(colors, 1, 'guibg=', ''), - \ s:Get(colors, 2, 'ctermfg=', ''), s:Get(colors, 3, 'ctermbg=', ''), - \ s:Get(colors, 4, 'gui=', ''), s:Get(colors, 4, 'cterm=', ''), - \ s:Get(colors, 4, 'term=', '')) - let old_hi = airline#highlighter#get_highlight(a:group) - if len(colors) == 4 - call add(colors, '') - endif - if old_hi != colors - exe cmd - endif -endfunction - -function! s:Get(dict, key, prefix, default) - if get(a:dict, a:key, a:default) isnot# a:default - return a:prefix. get(a:dict, a:key) - else - return '' - endif -endfunction - -function! s:exec_separator(dict, from, to, inverse, suffix) - if pumvisible() - return - endif - let l:from = airline#themes#get_highlight(a:from.a:suffix) - let l:to = airline#themes#get_highlight(a:to.a:suffix) - let group = a:from.'_to_'.a:to.a:suffix - if a:inverse - let colors = [ l:from[1], l:to[1], l:from[3], l:to[3] ] - else - let colors = [ l:to[1], l:from[1], l:to[3], l:from[3] ] - endif - let a:dict[group] = colors - call airline#highlighter#exec(group, colors) -endfunction - -function! airline#highlighter#load_theme() - if pumvisible() - return - endif - for winnr in filter(range(1, winnr('$')), 'v:val != winnr()') - call airline#highlighter#highlight_modified_inactive(winbufnr(winnr)) - endfor - call airline#highlighter#highlight(['inactive']) - call airline#highlighter#highlight(['normal']) -endfunction - -function! airline#highlighter#add_separator(from, to, inverse) - let s:separators[a:from.a:to] = [a:from, a:to, a:inverse] - call exec_separator({}, a:from, a:to, a:inverse, '') -endfunction - -function! airline#highlighter#add_accent(accent) - let s:accents[a:accent] = 1 -endfunction - -function! airline#highlighter#highlight_modified_inactive(bufnr) - if getbufvar(a:bufnr, '&modified') - let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c') - \ ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c : [] - else - let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c') - \ ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c : [] - endif - - if !empty(colors) - call airline#highlighter#exec('airline_c'.(a:bufnr).'_inactive', colors) - endif -endfunction - -function! airline#highlighter#highlight(modes) - let p = g:airline#themes#{g:airline_theme}#palette - - " draw the base mode, followed by any overrides - let mapped = map(a:modes, 'v:val == a:modes[0] ? v:val : a:modes[0]."_".v:val') - let suffix = a:modes[0] == 'inactive' ? '_inactive' : '' - for mode in mapped - if exists('g:airline#themes#{g:airline_theme}#palette[mode]') - let dict = g:airline#themes#{g:airline_theme}#palette[mode] - for kvp in items(dict) - let mode_colors = kvp[1] - call airline#highlighter#exec(kvp[0].suffix, mode_colors) - - for accent in keys(s:accents) - if !has_key(p.accents, accent) - continue - endif - let colors = copy(mode_colors) - if p.accents[accent][0] != '' - let colors[0] = p.accents[accent][0] - endif - if p.accents[accent][2] != '' - let colors[2] = p.accents[accent][2] - endif - if len(colors) >= 5 - let colors[4] = get(p.accents[accent], 4, '') - else - call add(colors, get(p.accents[accent], 4, '')) - endif - call airline#highlighter#exec(kvp[0].suffix.'_'.accent, colors) - endfor - endfor - - " TODO: optimize this - for sep in items(s:separators) - call exec_separator(dict, sep[1][0], sep[1][1], sep[1][2], suffix) - endfor - endif - endfor -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/init.vim b/sources_non_forked/vim-airline/autoload/airline/init.vim deleted file mode 100644 index b42fb860..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/init.vim +++ /dev/null @@ -1,143 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -function! s:check_defined(variable, default) - if !exists(a:variable) - let {a:variable} = a:default - endif -endfunction - -let s:loaded = 0 -function! airline#init#bootstrap() - if s:loaded - return - endif - let s:loaded = 1 - - let g:airline#init#bootstrapping = 1 - call s:check_defined('g:airline_left_sep', get(g:, 'airline_powerline_fonts', 0)?"\ue0b0":">") - call s:check_defined('g:airline_left_alt_sep', get(g:, 'airline_powerline_fonts', 0)?"\ue0b1":">") - call s:check_defined('g:airline_right_sep', get(g:, 'airline_powerline_fonts', 0)?"\ue0b2":"<") - call s:check_defined('g:airline_right_alt_sep', get(g:, 'airline_powerline_fonts', 0)?"\ue0b3":"<") - call s:check_defined('g:airline_detect_modified', 1) - call s:check_defined('g:airline_detect_paste', 1) - call s:check_defined('g:airline_detect_crypt', 1) - call s:check_defined('g:airline_detect_spell', 1) - call s:check_defined('g:airline_detect_iminsert', 0) - call s:check_defined('g:airline_inactive_collapse', 1) - call s:check_defined('g:airline_exclude_filenames', ['DebuggerWatch','DebuggerStack','DebuggerStatus']) - call s:check_defined('g:airline_exclude_filetypes', []) - call s:check_defined('g:airline_exclude_preview', 0) - call s:check_defined('g:airline_gui_mode', airline#init#gui_mode()) - - call s:check_defined('g:airline_mode_map', {}) - call extend(g:airline_mode_map, { - \ '__' : '------', - \ 'n' : 'NORMAL', - \ 'i' : 'INSERT', - \ 'R' : 'REPLACE', - \ 'v' : 'VISUAL', - \ 'V' : 'V-LINE', - \ 'c' : 'COMMAND', - \ '' : 'V-BLOCK', - \ 's' : 'SELECT', - \ 'S' : 'S-LINE', - \ '' : 'S-BLOCK', - \ 't' : 'TERMINAL', - \ }, 'keep') - - call s:check_defined('g:airline_theme_map', {}) - call extend(g:airline_theme_map, { - \ '\CTomorrow': 'tomorrow', - \ 'base16': 'base16', - \ 'mo[l|n]okai': 'molokai', - \ 'wombat': 'wombat', - \ 'zenburn': 'zenburn', - \ 'solarized': 'solarized', - \ }, 'keep') - - call s:check_defined('g:airline_symbols', {}) - call extend(g:airline_symbols, { - \ 'paste': 'PASTE', - \ 'spell': 'SPELL', - \ 'readonly': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a2" : 'RO', - \ 'whitespace': get(g:, 'airline_powerline_fonts', 0) ? "\u2739" : '!', - \ 'linenr': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a1" : ':', - \ 'maxlinenr': get(g:, 'airline_powerline_fonts', 0) ? "\u2630" : '', - \ 'branch': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a0" : '', - \ 'notexists': "\u2204", - \ 'modified': '+', - \ 'space': ' ', - \ 'crypt': get(g:, 'airline_crypt_symbol', nr2char(0x1F512)), - \ }, 'keep') - - call airline#parts#define('mode', { - \ 'function': 'airline#parts#mode', - \ 'accent': 'bold', - \ }) - call airline#parts#define_function('iminsert', 'airline#parts#iminsert') - call airline#parts#define_function('paste', 'airline#parts#paste') - call airline#parts#define_function('crypt', 'airline#parts#crypt') - call airline#parts#define_function('spell', 'airline#parts#spell') - call airline#parts#define_function('filetype', 'airline#parts#filetype') - call airline#parts#define('readonly', { - \ 'function': 'airline#parts#readonly', - \ 'accent': 'red', - \ }) - call airline#parts#define_raw('file', '%f%m') - call airline#parts#define_raw('path', '%F%m') - call airline#parts#define('linenr', { - \ 'raw': '%{g:airline_symbols.linenr}%#__accent_bold#%4l%#__restore__#', - \ 'accent': 'bold'}) - call airline#parts#define('maxlinenr', { - \ 'raw': '%#__accent_bold#/%L%{g:airline_symbols.maxlinenr}%#__restore__#', - \ 'accent': 'bold'}) - call airline#parts#define_function('ffenc', 'airline#parts#ffenc') - call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic', - \ 'eclim', 'whitespace','windowswap', 'ycm_error_count', 'ycm_warning_count']) - call airline#parts#define_text('capslock', '') - - unlet g:airline#init#bootstrapping -endfunction - -function! airline#init#gui_mode() - return ((has('nvim') && exists('$NVIM_TUI_ENABLE_TRUE_COLOR') && !exists("+termguicolors")) - \ || has('gui_running') || (has("termtruecolor") && &guicolors == 1) || (has("termguicolors") && &termguicolors == 1)) ? - \ 'gui' : 'cterm' -endfunction - -function! airline#init#sections() - let spc = g:airline_symbols.space - if !exists('g:airline_section_a') - let g:airline_section_a = airline#section#create_left(['mode', 'crypt', 'paste', 'spell', 'capslock', 'iminsert']) - endif - if !exists('g:airline_section_b') - let g:airline_section_b = airline#section#create(['hunks', 'branch']) - endif - if !exists('g:airline_section_c') - if exists("+autochdir") && &autochdir == 1 - let g:airline_section_c = airline#section#create(['%<', 'path', spc, 'readonly']) - else - let g:airline_section_c = airline#section#create(['%<', 'file', spc, 'readonly']) - endif - endif - if !exists('g:airline_section_gutter') - let g:airline_section_gutter = airline#section#create(['%=']) - endif - if !exists('g:airline_section_x') - let g:airline_section_x = airline#section#create_right(['tagbar', 'filetype']) - endif - if !exists('g:airline_section_y') - let g:airline_section_y = airline#section#create_right(['ffenc']) - endif - if !exists('g:airline_section_z') - let g:airline_section_z = airline#section#create(['windowswap', '%3p%%'.spc, 'linenr', 'maxlinenr', spc.':%3v']) - endif - if !exists('g:airline_section_error') - let g:airline_section_error = airline#section#create(['ycm_error_count', 'syntastic', 'eclim']) - endif - if !exists('g:airline_section_warning') - let g:airline_section_warning = airline#section#create(['ycm_warning_count', 'whitespace']) - endif -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/msdos.vim b/sources_non_forked/vim-airline/autoload/airline/msdos.vim deleted file mode 100644 index 92e9bb52..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/msdos.vim +++ /dev/null @@ -1,57 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -" basic 16 msdos from MSDOS -" see output of color, should be -" 0 Black -" 1 DarkBlue -" 2 DarkGreen -" 3 DarkCyan -" 4 DarkRed -" 5 DarkMagenta -" 6 Brown -" 7 LightGray -" 8 DarkGray -" 9 Blue -" 10 Green -" 11 Cyan -" 12 Red -" 13 Magenta -" 14 Yellow -" 15 White - -let s:basic16 = [ - \ [ 0x00, 0x00, 0x00 ], - \ [ 0x00, 0x00, 0x80 ], - \ [ 0x00, 0x80, 0x00 ], - \ [ 0x00, 0x80, 0x80 ], - \ [ 0x80, 0x00, 0x00 ], - \ [ 0x80, 0x00, 0x80 ], - \ [ 0x80, 0x80, 0x00 ], - \ [ 0xC0, 0xC0, 0xC0 ], - \ [ 0x80, 0x80, 0x80 ], - \ [ 0x00, 0x00, 0xFF ], - \ [ 0x00, 0xFF, 0x00 ], - \ [ 0x00, 0xFF, 0xFF ], - \ [ 0xFF, 0x00, 0x00 ], - \ [ 0xFF, 0x00, 0xFF ], - \ [ 0xFF, 0xFF, 0x00 ], - \ [ 0xFF, 0xFF, 0xFF ] - \ ] - -function! airline#msdos#round_msdos_colors(rgblist) - " Check for values from MSDOS 16 color terminal - let best = [] - let min = 100000 - let list = s:basic16 - for value in list - let t = abs(value[0] - a:rgblist[0]) + - \ abs(value[1] - a:rgblist[1]) + - \ abs(value[2] - a:rgblist[2]) - if min > t - let min = t - let best = value - endif - endfor - return index(s:basic16, best) -endfunction diff --git a/sources_non_forked/vim-airline/autoload/airline/parts.vim b/sources_non_forked/vim-airline/autoload/airline/parts.vim deleted file mode 100644 index 0c1fd668..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/parts.vim +++ /dev/null @@ -1,91 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -let s:parts = {} - -" PUBLIC API {{{ - -function! airline#parts#define(key, config) - let s:parts[a:key] = get(s:parts, a:key, {}) - if exists('g:airline#init#bootstrapping') - call extend(s:parts[a:key], a:config, 'keep') - else - call extend(s:parts[a:key], a:config, 'force') - endif -endfunction - -function! airline#parts#define_function(key, name) - call airline#parts#define(a:key, { 'function': a:name }) -endfunction - -function! airline#parts#define_text(key, text) - call airline#parts#define(a:key, { 'text': a:text }) -endfunction - -function! airline#parts#define_raw(key, raw) - call airline#parts#define(a:key, { 'raw': a:raw }) -endfunction - -function! airline#parts#define_minwidth(key, width) - call airline#parts#define(a:key, { 'minwidth': a:width }) -endfunction - -function! airline#parts#define_condition(key, predicate) - call airline#parts#define(a:key, { 'condition': a:predicate }) -endfunction - -function! airline#parts#define_accent(key, accent) - call airline#parts#define(a:key, { 'accent': a:accent }) -endfunction - -function! airline#parts#define_empty(keys) - for key in a:keys - call airline#parts#define_raw(key, '') - endfor -endfunction - -function! airline#parts#get(key) - return get(s:parts, a:key, {}) -endfunction - -" }}} - -function! airline#parts#mode() - return get(w:, 'airline_current_mode', '') -endfunction - -function! airline#parts#crypt() - return g:airline_detect_crypt && exists("+key") && !empty(&key) ? g:airline_symbols.crypt : '' -endfunction - -function! airline#parts#paste() - return g:airline_detect_paste && &paste ? g:airline_symbols.paste : '' -endfunction - -function! airline#parts#spell() - return g:airline_detect_spell && &spell ? g:airline_symbols.spell : '' -endfunction - -function! airline#parts#iminsert() - if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name') - return toupper(b:keymap_name) - endif - return '' -endfunction - -function! airline#parts#readonly() - if &readonly && &modifiable && !filereadable(bufname('%')) - return '[noperm]' - else - return &readonly ? g:airline_symbols.readonly : '' - endif -endfunction - -function! airline#parts#filetype() - return &filetype -endfunction - -function! airline#parts#ffenc() - return printf('%s%s%s', &fenc, &l:bomb ? '[BOM]' : '', strlen(&ff) > 0 ? '['.&ff.']' : '') -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/section.vim b/sources_non_forked/vim-airline/autoload/airline/section.vim deleted file mode 100644 index 2e94d4e7..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/section.vim +++ /dev/null @@ -1,73 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -call airline#init#bootstrap() -let s:spc = g:airline_symbols.space - -function! s:wrap_accent(part, value) - if exists('a:part.accent') - call airline#highlighter#add_accent(a:part.accent) - return '%#__accent_'.(a:part.accent).'#'.a:value.'%#__restore__#' - endif - return a:value -endfunction - -function! s:create(parts, append) - let _ = '' - for idx in range(len(a:parts)) - let part = airline#parts#get(a:parts[idx]) - let val = '' - - if exists('part.function') - let func = (part.function).'()' - elseif exists('part.text') - let func = '"'.(part.text).'"' - else - if a:append > 0 && idx != 0 - let val .= s:spc.g:airline_left_alt_sep.s:spc - endif - if a:append < 0 && idx != 0 - let val = s:spc.g:airline_right_alt_sep.s:spc.val - endif - if exists('part.raw') - let _ .= s:wrap_accent(part, val.(part.raw)) - continue - else - let _ .= s:wrap_accent(part, val.a:parts[idx]) - continue - endif - endif - - let minwidth = get(part, 'minwidth', 0) - - if a:append > 0 && idx != 0 - let partval = printf('%%{airline#util#append(%s,%s)}', func, minwidth) - elseif a:append < 0 && idx != len(a:parts) - 1 - let partval = printf('%%{airline#util#prepend(%s,%s)}', func, minwidth) - else - let partval = printf('%%{airline#util#wrap(%s,%s)}', func, minwidth) - endif - - if exists('part.condition') - let partval = substitute(partval, '{', '\="{".(part.condition)." ? "', '') - let partval = substitute(partval, '}', ' : ""}', '') - endif - - let val .= s:wrap_accent(part, partval) - let _ .= val - endfor - return _ -endfunction - -function! airline#section#create(parts) - return s:create(a:parts, 0) -endfunction - -function! airline#section#create_left(parts) - return s:create(a:parts, 1) -endfunction - -function! airline#section#create_right(parts) - return s:create(a:parts, -1) -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/themes.vim b/sources_non_forked/vim-airline/autoload/airline/themes.vim deleted file mode 100644 index 920a225b..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/themes.vim +++ /dev/null @@ -1,70 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -" generates a dictionary which defines the colors for each highlight group -function! airline#themes#generate_color_map(sect1, sect2, sect3, ...) - let palette = { - \ 'airline_a': [ a:sect1[0] , a:sect1[1] , a:sect1[2] , a:sect1[3] , get(a:sect1 , 4 , '') ] , - \ 'airline_b': [ a:sect2[0] , a:sect2[1] , a:sect2[2] , a:sect2[3] , get(a:sect2 , 4 , '') ] , - \ 'airline_c': [ a:sect3[0] , a:sect3[1] , a:sect3[2] , a:sect3[3] , get(a:sect3 , 4 , '') ] , - \ } - - if a:0 > 0 - call extend(palette, { - \ 'airline_x': [ a:1[0] , a:1[1] , a:1[2] , a:1[3] , get(a:1 , 4 , '' ) ] , - \ 'airline_y': [ a:2[0] , a:2[1] , a:2[2] , a:2[3] , get(a:2 , 4 , '' ) ] , - \ 'airline_z': [ a:3[0] , a:3[1] , a:3[2] , a:3[3] , get(a:3 , 4 , '' ) ] , - \ }) - else - call extend(palette, { - \ 'airline_x': [ a:sect3[0] , a:sect3[1] , a:sect3[2] , a:sect3[3] , '' ] , - \ 'airline_y': [ a:sect2[0] , a:sect2[1] , a:sect2[2] , a:sect2[3] , '' ] , - \ 'airline_z': [ a:sect1[0] , a:sect1[1] , a:sect1[2] , a:sect1[3] , '' ] , - \ }) - endif - - return palette -endfunction - -function! airline#themes#get_highlight(group, ...) - return call('airline#highlighter#get_highlight', [a:group] + a:000) -endfunction - -function! airline#themes#get_highlight2(fg, bg, ...) - return call('airline#highlighter#get_highlight2', [a:fg, a:bg] + a:000) -endfunction - -function! airline#themes#patch(palette) - for mode in keys(a:palette) - if !has_key(a:palette[mode], 'airline_warning') - let a:palette[mode]['airline_warning'] = [ '#000000', '#df5f00', 232, 166 ] - endif - if !has_key(a:palette[mode], 'airline_error') - let a:palette[mode]['airline_error'] = [ '#000000', '#990000', 232, 160 ] - endif - endfor - - let a:palette.accents = get(a:palette, 'accents', {}) - let a:palette.accents.bold = [ '', '', '', '', 'bold' ] - let a:palette.accents.italic = [ '', '', '', '', 'italic' ] - - if !has_key(a:palette.accents, 'red') - let a:palette.accents.red = [ '#ff0000' , '' , 160 , '' ] - endif - if !has_key(a:palette.accents, 'green') - let a:palette.accents.green = [ '#008700' , '' , 22 , '' ] - endif - if !has_key(a:palette.accents, 'blue') - let a:palette.accents.blue = [ '#005fff' , '' , 27 , '' ] - endif - if !has_key(a:palette.accents, 'yellow') - let a:palette.accents.yellow = [ '#dfff00' , '' , 190 , '' ] - endif - if !has_key(a:palette.accents, 'orange') - let a:palette.accents.orange = [ '#df5f00' , '' , 166 , '' ] - endif - if !has_key(a:palette.accents, 'purple') - let a:palette.accents.purple = [ '#af00df' , '' , 128 , '' ] - endif -endfunction - diff --git a/sources_non_forked/vim-airline/autoload/airline/themes/dark.vim b/sources_non_forked/vim-airline/autoload/airline/themes/dark.vim deleted file mode 100644 index 217b2f1f..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/themes/dark.vim +++ /dev/null @@ -1,102 +0,0 @@ -" Each theme is contained in its own file and declares variables scoped to the -" file. These variables represent the possible "modes" that airline can -" detect. The mode is the return value of mode(), which gets converted to a -" readable string. The following is a list currently supported modes: normal, -" insert, replace, visual, and inactive. -" -" Each mode can also have overrides. These are small changes to the mode that -" don't require a completely different look. "modified" and "paste" are two -" such supported overrides. These are simply suffixed to the major mode, -" separated by an underscore. For example, "normal_modified" would be normal -" mode where the current buffer is modified. -" -" The theming algorithm is a 2-pass system where the mode will draw over all -" parts of the statusline, and then the override is applied after. This means -" it is possible to specify a subset of the theme in overrides, as it will -" simply overwrite the previous colors. If you want simultaneous overrides, -" then they will need to change different parts of the statusline so they do -" not conflict with each other. -" -" First, let's define an empty dictionary and assign it to the "palette" -" variable. The # is a separator that maps with the directory structure. If -" you get this wrong, Vim will complain loudly. -let g:airline#themes#dark#palette = {} - -" First let's define some arrays. The s: is just a VimL thing for scoping the -" variables to the current script. Without this, these variables would be -" declared globally. Now let's declare some colors for normal mode and add it -" to the dictionary. The array is in the format: -" [ guifg, guibg, ctermfg, ctermbg, opts ]. See "help attr-list" for valid -" values for the "opt" value. -let s:N1 = [ '#00005f' , '#dfff00' , 17 , 190 ] -let s:N2 = [ '#ffffff' , '#444444' , 255 , 238 ] -let s:N3 = [ '#9cffd3' , '#202020' , 85 , 234 ] -let g:airline#themes#dark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - -" Here we define overrides for when the buffer is modified. This will be -" applied after g:airline#themes#dark#palette.normal, hence why only certain keys are -" declared. -let g:airline#themes#dark#palette.normal_modified = { - \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - \ } - - -let s:I1 = [ '#00005f' , '#00dfff' , 17 , 45 ] -let s:I2 = [ '#ffffff' , '#005fff' , 255 , 27 ] -let s:I3 = [ '#ffffff' , '#000080' , 15 , 17 ] -let g:airline#themes#dark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) -let g:airline#themes#dark#palette.insert_modified = { - \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - \ } -let g:airline#themes#dark#palette.insert_paste = { - \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , - \ } - - -let g:airline#themes#dark#palette.replace = copy(g:airline#themes#dark#palette.insert) -let g:airline#themes#dark#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] -let g:airline#themes#dark#palette.replace_modified = g:airline#themes#dark#palette.insert_modified - - -let s:V1 = [ '#000000' , '#ffaf00' , 232 , 214 ] -let s:V2 = [ '#000000' , '#ff5f00' , 232 , 202 ] -let s:V3 = [ '#ffffff' , '#5f0000' , 15 , 52 ] -let g:airline#themes#dark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) -let g:airline#themes#dark#palette.visual_modified = { - \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , - \ } - - -let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] -let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] -let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] -let g:airline#themes#dark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) -let g:airline#themes#dark#palette.inactive_modified = { - \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , - \ } - - -" Accents are used to give parts within a section a slightly different look or -" color. Here we are defining a "red" accent, which is used by the 'readonly' -" part by default. Only the foreground colors are specified, so the background -" colors are automatically extracted from the underlying section colors. What -" this means is that regardless of which section the part is defined in, it -" will be red instead of the section's foreground color. You can also have -" multiple parts with accents within a section. -let g:airline#themes#dark#palette.accents = { - \ 'red': [ '#ff0000' , '' , 160 , '' ] - \ } - - -" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp -" variable so that related functionality is loaded iff the user is using -" ctrlp. Note that this is optional, and if you do not define ctrlp colors -" they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish -endif -let g:airline#themes#dark#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], - \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], - \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ]) - diff --git a/sources_non_forked/vim-airline/autoload/airline/util.vim b/sources_non_forked/vim-airline/autoload/airline/util.vim deleted file mode 100644 index f4525516..00000000 --- a/sources_non_forked/vim-airline/autoload/airline/util.vim +++ /dev/null @@ -1,70 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -call airline#init#bootstrap() -let s:spc = g:airline_symbols.space - -function! airline#util#wrap(text, minwidth) - if a:minwidth > 0 && winwidth(0) < a:minwidth - return '' - endif - return a:text -endfunction - -function! airline#util#append(text, minwidth) - if a:minwidth > 0 && winwidth(0) < a:minwidth - return '' - endif - let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc - return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text -endfunction - -function! airline#util#warning(msg) - echohl WarningMsg - echomsg "airline: ".a:msg - echohl Normal -endfunction - -function! airline#util#prepend(text, minwidth) - if a:minwidth > 0 && winwidth(0) < a:minwidth - return '' - endif - return empty(a:text) ? '' : a:text.s:spc.g:airline_right_alt_sep.s:spc -endfunction - -if v:version >= 704 - function! airline#util#getwinvar(winnr, key, def) - return getwinvar(a:winnr, a:key, a:def) - endfunction -else - function! airline#util#getwinvar(winnr, key, def) - let winvals = getwinvar(a:winnr, '') - return get(winvals, a:key, a:def) - endfunction -endif - -if v:version >= 704 - function! airline#util#exec_funcrefs(list, ...) - for Fn in a:list - let code = call(Fn, a:000) - if code != 0 - return code - endif - endfor - return 0 - endfunction -else - function! airline#util#exec_funcrefs(list, ...) - " for 7.2; we cannot iterate the list, hence why we use range() - " for 7.3-[97, 328]; we cannot reuse the variable, hence the {} - for i in range(0, len(a:list) - 1) - let Fn{i} = a:list[i] - let code = call(Fn{i}, a:000) - if code != 0 - return code - endif - endfor - return 0 - endfunction -endif - diff --git a/sources_non_forked/vim-airline/doc/airline.txt b/sources_non_forked/vim-airline/doc/airline.txt deleted file mode 100644 index 0053504c..00000000 --- a/sources_non_forked/vim-airline/doc/airline.txt +++ /dev/null @@ -1,1017 +0,0 @@ -*airline.txt* Lean and mean status/tabline that's light as air -*airline* - _ _ _ _ ~ - __ _(_)_ __ ___ __ _(_)_ __| (_)_ __ ___ ~ - \ \ / / | '_ ` _ \ _____ / _` | | '__| | | '_ \ / _ \ ~ - \ V /| | | | | | |_____| (_| | | | | | | | | | __/ ~ - \_/ |_|_| |_| |_| \__,_|_|_| |_|_|_| |_|\___| ~ - ~ -============================================================================== -CONTENTS *airline-contents* - - 01. Intro ............................................... |airline-intro| - 02. Features ......................................... |airline-features| - 03. Name ................................................. |airline-name| - 04. Configuration ............................... |airline-configuration| - 05. Commands ......................................... |airline-commands| - 06. Autocommands ................................. |airline-autocommands| - 07. Customization ............................... |airline-customization| - 08. Extensions ..................................... |airline-extensions| - 09. Advanced Customization ............. |airline-advanced-customization| - 10. Funcrefs ......................................... |airline-funcrefs| - 11. Pipeline ......................................... |airline-pipeline| - 12. Writing Extensions ..................... |airline-writing-extensions| - 13. Writing Themes ..................................... |airline-themes| - 14. Troubleshooting ........................... |airline-troubleshooting| - 15. Contributions ............................... |airline-contributions| - 16. License ........................................... |airline-license| - -============================================================================== -INTRODUCTION *airline-intro* - -vim-airline is a fast and lightweight alternative to powerline, written -in 100% vimscript with no outside dependencies. - -============================================================================== -FEATURES *airline-features* - -* tiny core written with extensibility in mind. -* integrates with many popular plugins. -* looks good with regular fonts, and provides configuration points so you - can use unicode or powerline symbols. -* optimized for speed; it loads in under a millisecond. -* fully customizable; if you know a little 'statusline' syntax you can - tweak it to your needs. -* extremely easy to write themes. - -============================================================================== -NAME *airline-name* - -Where did the name come from? - -I wrote this on an airplane, and since it's light as air it turned out to be a -good name :-) - -============================================================================== -CONFIGURATION *airline-configuration* - -There are a couple configuration values available (shown with their default -values): - -* the separator used on the left side > - let g:airline_left_sep='>' -< -* the separator used on the right side > - let g:airline_right_sep='<' -< -* enable modified detection > - let g:airline_detect_modified=1 - -* enable paste detection > - let g:airline_detect_paste=1 -< -* enable crypt detection > - let g:airline_detect_crypt=1 - -* enable spell detection > - let g:airline_detect_spell=1 -< -* enable iminsert detection > - let g:airline_detect_iminsert=0 -< -* determine whether inactive windows should have the left section collapsed to - only the filename of that buffer. > - let g:airline_inactive_collapse=1 -< -* themes are automatically selected based on the matching colorscheme. this - can be overridden by defining a value. > - let g:airline_theme='dark' -< - Note: Only the dark theme is distributed with vim-airline. For more themes, - checkout the vim-airline-themes repository - (github.com/vim-airline/vim-airline-themes) - -* if you want to patch the airline theme before it gets applied, you can - supply the name of a function where you can modify the palette. > - let g:airline_theme_patch_func = 'AirlineThemePatch' - function! AirlineThemePatch(palette) - if g:airline_theme == 'badwolf' - for colors in values(a:palette.inactive) - let colors[3] = 245 - endfor - endif - endfunction -< -* enable/disable automatic population of the `g:airline_symbols` dictionary - with powerline symbols. > - let g:airline_powerline_fonts=0 -< -* define the set of text to display for each mode. > - let g:airline_mode_map = {} " see source for the defaults - - " or copy paste the following into your vimrc for shortform text - let g:airline_mode_map = { - \ '__' : '-', - \ 'n' : 'N', - \ 'i' : 'I', - \ 'R' : 'R', - \ 'c' : 'C', - \ 'v' : 'V', - \ 'V' : 'V', - \ '' : 'V', - \ 's' : 'S', - \ 'S' : 'S', - \ '' : 'S', - \ } -< -* define the set of filename match queries which excludes a window from having - its statusline modified > - let g:airline_exclude_filenames = [] " see source for current list -< -* define the set of filetypes which are excluded from having its window - statusline modified > - let g:airline_exclude_filetypes = [] " see source for current list -< -* defines whether the preview window should be excluded from have its window - statusline modified (may help with plugins which use the preview window - heavily) > - let g:airline_exclude_preview = 0 -< -* disable the Airline customization for selective windows (this is a - window-local variable so you can disable it for only some windows) > - let w:airline_disabled = 1 - -* Do not draw separators for empty sections (only for the active window) - > - let g:airline_skip_empty_sections = 1 -< - -============================================================================== -COMMANDS *airline-commands* - -:AirlineTheme {theme-name} *:AirlineTheme* - Displays or changes the current theme. - -:AirlineToggleWhitespace *:AirlineToggleWhitespace* - Toggles whitespace detection. - -:AirlineToggle *:AirlineToggle* - Toggles between the standard 'statusline' and airline. - -:AirlineRefresh *:AirlineRefresh* - Refreshes all highlight groups and redraws the statusline. - -============================================================================== -AUTOCOMMANDS *airline-autocommands* - -Airline comes with some user-defined autocommands. - -|AirlineAfterInit| after plugin is initialized, but before the statusline - is replaced -|AirlineToggledOn| after airline is activated and replaced the statusline -|AirlineToggledOff| after airline is deactivated and the statusline is - restored to the original - -============================================================================== -CUSTOMIZATION *airline-customization* - -The following are some unicode symbols for customizing the left/right -separators, as well as the powerline font glyphs. - -Note: You must define the dictionary first before setting values. Also, it's a -good idea to check whether it exists as to avoid accidentally overwriting -its contents. > - if !exists('g:airline_symbols') - let g:airline_symbols = {} - endif - - " unicode symbols - let g:airline_left_sep = '»' - let g:airline_left_sep = '▶' - let g:airline_right_sep = '«' - let g:airline_right_sep = '◀' - let g:airline_symbols.crypt = '🔒' - let g:airline_symbols.linenr = '␊' - let g:airline_symbols.linenr = '␤' - let g:airline_symbols.linenr = '¶' - let g:airline_symbols.maxlinenr = '☰' - let g:airline_symbols.maxlinenr = '' - let g:airline_symbols.branch = '⎇' - let g:airline_symbols.paste = 'ρ' - let g:airline_symbols.paste = 'Þ' - let g:airline_symbols.paste = '∥' - let g:airline_symbols.spell = 'Ꞩ' - let g:airline_symbols.notexists = '∄' - let g:airline_symbols.whitespace = 'Ξ' - - " powerline symbols - let g:airline_left_sep = '' - let g:airline_left_alt_sep = '' - let g:airline_right_sep = '' - let g:airline_right_alt_sep = '' - let g:airline_symbols.branch = '' - let g:airline_symbols.readonly = '' - let g:airline_symbols.linenr = '' - - " old vim-powerline symbols - let g:airline_left_sep = '⮀' - let g:airline_left_alt_sep = '⮁' - let g:airline_right_sep = '⮂' - let g:airline_right_alt_sep = '⮃' - let g:airline_symbols.branch = '⭠' - let g:airline_symbols.readonly = '⭤' - let g:airline_symbols.linenr = '⭡' -< - -For more intricate customizations, you can replace the predefined sections -with the usual statusline syntax. - -Note: If you define any section variables it will replace the default values -entirely. If you want to disable only certain parts of a section you can try -using variables defined in the |airline-configuration| or |airline-extensions| -section. -> - variable names default contents - ---------------------------------------------------------------------------- - let g:airline_section_a (mode, crypt, paste, spell, iminsert) - let g:airline_section_b (hunks, branch) - let g:airline_section_c (bufferline or filename) - let g:airline_section_gutter (readonly, csv) - let g:airline_section_x (tagbar, filetype, virtualenv) - let g:airline_section_y (fileencoding, fileformat) - let g:airline_section_z (percentage, line number, column number) - let g:airline_section_error (ycm_error_count, syntastic, eclim) - let g:airline_section_warning (ycm_warning_count, whitespace) - - " here is an example of how you could replace the branch indicator with - " the current working directory, followed by the filename. - let g:airline_section_b = '%{getcwd()}' - let g:airline_section_c = '%t' -< -============================================================================== -EXTENSIONS *airline-extensions* - -Most extensions are enabled by default and lazily loaded when the -corresponding plugin (if any) is detected. - -By default, airline will attempt to load any extension it can find in the -'runtimepath'. On some systems this can result in an undesirable startup -cost. You can disable the check with the following flag. > - let g:airline#extensions#disable_rtp_load = 1 -< - Note: Third party plugins that rely on this behavior will be affected. You - will need to manually load them. - -Alternatively, if you want a minimalistic setup and would rather opt-in which -extensions get loaded instead of disabling each individually, you can declare -the following list variable: > - " an empty list disables all extensions - let g:airline_extensions = [] - - " or only load what you want - let g:airline_extensions = ['branch', 'tabline'] -< -------------------------------------- *airline-default* -The default extension understands all of the `g:` variables in the -|airline-configuration| section, however it also has some more fine-tuned -configuration values that you can use. - -* control which sections get truncated and at what width. > - let g:airline#extensions#default#section_truncate_width = { - \ 'b': 79, - \ 'x': 60, - \ 'y': 88, - \ 'z': 45, - \ 'warning': 80, - \ 'error': 80, - \ } - - " Note: set to an empty dictionary to disable truncation. - let g:airline#extensions#default#section_truncate_width = {} -< -* configure the layout of the sections by specifying an array of two arrays - (first array is the left side, second array is the right side). > - let g:airline#extensions#default#layout = [ - \ [ 'a', 'b', 'c' ], - \ [ 'x', 'y', 'z', 'error', 'warning' ] - \ ] -< -* configure the layout to not use %(%) grouping items in the statusline. - Try setting this to zero, if you notice bleeding color artifacts > - let airline#extensions#default#section_use_groupitems = 1 -< -------------------------------------- *airline-quickfix* -The quickfix extension is a simple built-in extension which determines -whether the buffer is a quickfix or location list buffer, and adjusts the -title accordingly. - -* configure the title text for quickfix buffers > - let g:airline#extensions#quickfix#quickfix_text = 'Quickfix' -< -* configure the title text for location list buffers > - let g:airline#extensions#quickfix#location_text = 'Location' -< - -------------------------------------- *airline-bufferline* -vim-bufferline - -* enable/disable bufferline integration > - let g:airline#extensions#bufferline#enabled = 1 -< -* determine whether bufferline will overwrite customization variables > - let g:airline#extensions#bufferline#overwrite_variables = 1 -< -------------------------------------- *airline-branch* -fugitive.vim -lawrencium -vcscommand - -* enable/disable fugitive/lawrencium integration > - let g:airline#extensions#branch#enabled = 1 -< -* change the text for when no branch is detected > - let g:airline#extensions#branch#empty_message = '' -< -* define the order in which the branches of different vcs systems will be - displayed on the statusline (currently only for fugitive and lawrencium) > - let g:airline#extensions#branch#vcs_priority = ["git", "mercurial"] -< -* use vcscommand.vim if available > - let g:airline#extensions#branch#use_vcscommand = 0 -< -* truncate long branch names to a fixed length > - let g:airline#extensions#branch#displayed_head_limit = 10 -< -* customize formatting of branch name > - " default value leaves the name unmodifed - let g:airline#extensions#branch#format = 0 - - " to only show the tail, e.g. a branch 'feature/foo' becomes 'foo', use - let g:airline#extensions#branch#format = 1 - - " to truncate all path sections but the last one, e.g. a branch - " 'foo/bar/baz' becomes 'f/b/baz', use - let g:airline#extensions#branch#format = 2 - - " if a string is provided, it should be the name of a function that - " takes a string and returns the desired value - let g:airline#extensions#branch#format = 'CustomBranchName' - function! CustomBranchName(name) - return '[' . a:name . ']' - endfunction -< -------------------------------------- *airline-syntastic* -syntastic - -* enable/disable syntastic integration > - let g:airline#extensions#syntastic#enabled = 1 -< -------------------------------------- *airline-tagbar* -tagbar - -* enable/disable tagbar integration > - let g:airline#extensions#tagbar#enabled = 1 -< -* change how tags are displayed (:help tagbar-statusline) > - let g:airline#extensions#tagbar#flags = '' (default) - let g:airline#extensions#tagbar#flags = 'f' - let g:airline#extensions#tagbar#flags = 's' - let g:airline#extensions#tagbar#flags = 'p' -< -------------------------------------- *airline-csv* -csv.vim - -* enable/disable csv integration for displaying the current column. > - let g:airline#extensions#csv#enabled = 1 -< -* change how columns are displayed. > - let g:airline#extensions#csv#column_display = 'Number' (default) - let g:airline#extensions#csv#column_display = 'Name' -< -------------------------------------- *airline-hunks* -vim-gitgutter -vim-signify -changesPlugin -quickfixsigns - -* enable/disable showing a summary of changed hunks under source control. > - let g:airline#extensions#hunks#enabled = 1 -< -* enable/disable showing only non-zero hunks. > - let g:airline#extensions#hunks#non_zero_only = 0 -< -* set hunk count symbols. > - let g:airline#extensions#hunks#hunk_symbols = ['+', '~', '-'] -< -------------------------------------- *airline-ctrlp* -ctrlp - -* configure which mode colors should ctrlp window use (takes effect - only if the active airline theme doesn't define ctrlp colors) > - let g:airline#extensions#ctrlp#color_template = 'insert' (default) - let g:airline#extensions#ctrlp#color_template = 'normal' - let g:airline#extensions#ctrlp#color_template = 'visual' - let g:airline#extensions#ctrlp#color_template = 'replace' -< - -* configure whether to show the previous and next modes (mru, buffer, etc...) -> - let g:airline#extensions#ctrlp#show_adjacent_modes = 1 -< -------------------------------------- *airline-virtualenv* -virtualenv - -* enable/disable virtualenv integration > - let g:airline#extensions#virtualenv#enabled = 1 -< -------------------------------------- *airline-eclim* -eclim - -* enable/disable eclim integration, which works well with the - |airline-syntastic| extension. > - let g:airline#extensions#eclim#enabled = 1 - -------------------------------------- *airline-wordcount* -* enable/disable word counting. > - let g:airline#extensions#wordcount#enabled = 1 -< -* regex of filetypes to enable word counting. > - " the default value matches filetypes typically used for documentation - " such as markdown and help files. - let g:airline#extensions#wordcount#filetypes = ... - (default: markdown,rst,org,help,text) - -* defines the name of a formatter for word count will be displayed: > - " The default will try to guess LC_NUMERIC and format number accordingly - " e.g. 1,042 in English and 1.042 in German locale - let g:airline#extensions#wordcount#formatter = 'default' - - " here is how you can define a 'foo' formatter: - " create a file in the dir autoload/airline/extensions/wordcount/formatters/ - " called foo.vim - " this example needs at least Vim > 7.4.1042 - function! airline#extensions#wordcount#formatters#foo#format() - return (wordcount()['words'] == 0 ? 'NONE' : - \ wordcount()['words'] > 100 ? 'okay' : 'not enough') - endfunction - let g:airline#extensions#wordline#formatter = 'foo' -< -------------------------------------- *airline-whitespace* -* enable/disable detection of whitespace errors. > - let g:airline#extensions#whitespace#enabled = 1 -< -* customize the type of mixed indent checking to perform. > - " must be all spaces or all tabs before the first non-whitespace character - let g:airline#extensions#whitespace#mixed_indent_algo = 0 (default) - - " certain number of spaces are allowed after tabs, but not in between - " this algorithm works well for /** */ style comments in a tab-indented file - let g:airline#extensions#whitespace#mixed_indent_algo = 1 - - " spaces are allowed after tabs, but not in between - " this algorithm works well with programming styles that use tabs for - " indentation and spaces for alignment - let g:airline#extensions#whitespace#mixed_indent_algo = 2 -< -* customize the whitespace symbol. > - let g:airline#extensions#whitespace#symbol = '!' -< -* configure which whitespace checks to enable. > - " indent: mixed indent within a line - " long: overlong lines - " trailing: trailing whitespace - " mixed-indent-file: different indentation in different lines - let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing', 'long', 'mixed-indent-file' ] -< -* configure the maximum number of lines where whitespace checking is enabled. > - let g:airline#extensions#whitespace#max_lines = 20000 -< -* configure whether a message should be displayed. > - let g:airline#extensions#whitespace#show_message = 1 -< -* configure the formatting of the warning messages. > - let g:airline#extensions#whitespace#trailing_format = 'trailing[%s]' - let g:airline#extensions#whitespace#mixed_indent_format = 'mixed-indent[%s]' - let g:airline#extensions#whitespace#long_format = 'long[%s]' - let g:airline#extensions#whitespace#mixed_indent_file_format = 'mix-indent-file[%s]' - -* configure custom trailing whitespace regexp rule > - let g:airline#extensions#whitespace#trailing_regexp = '\s$' - -* configure, which filetypes have special treatment of /* */ comments, - matters for mix-indent-file algorithm: > - let airline#extensions#c_like_langs = ['c', 'cpp', 'cuda', 'javascript', 'ld', 'php'] -< -------------------------------------- *airline-tabline* -Note: If you're using the ctrlspace tabline only the option marked with (c) -are supported! - -* enable/disable enhanced tabline. (c) - let g:airline#extensions#tabline#enabled = 0 - -* enable/disable displaying open splits per tab (only when tabs are opened). > - let g:airline#extensions#tabline#show_splits = 1 - * -* switch position of buffers and tabs on splited tabline (c) - let g:airline#extensions#tabline#switch_buffers_and_tabs = 0 - -* enable/disable displaying buffers with a single tab. (c) - let g:airline#extensions#tabline#show_buffers = 1 -< - -Note: If you are using neovim (has('tablineat') = 1), then you can click -on the tabline with the left mouse button to switch to that buffer, and -with the middle mouse button to delete that buffer. - -* enable/disable displaying tabs, regardless of number. (c) - let g:airline#extensions#tabline#show_tabs = 1 -< -* configure filename match rules to exclude from the tabline. > - let g:airline#extensions#tabline#excludes = [] - -* enable/disable display preview window buffer in the tabline. > - let g:airline#extensions#tabline#exclude_preview = 1 - -* configure how numbers are displayed in tab mode. > - let g:airline#extensions#tabline#tab_nr_type = 0 " # of splits (default) - let g:airline#extensions#tabline#tab_nr_type = 1 " tab number - let g:airline#extensions#tabline#tab_nr_type = 2 " splits and tab number -< -* enable/disable displaying tab number in tabs mode. > - let g:airline#extensions#tabline#show_tab_nr = 1 - -* enable/disable displaying tab type (far right) > - let g:airline#extensions#tabline#show_tab_type = 1 - -* rename label for buffers (default: 'buffers') (c) - let g:airline#extensions#tabline#buffers_label = 'b' - -* rename label for tabs (default: 'tabs') (c) - let g:airline#extensions#tabline#tabs_label = 't' - -* enable/disable displaying index of the buffer. - - When enabled, numbers will be displayed in the tabline and mappings will be - exposed to allow you to select a buffer directly. Up to 9 mappings will be - exposed. > - - let g:airline#extensions#tabline#buffer_idx_mode = 1 - nmap 1 AirlineSelectTab1 - nmap 2 AirlineSelectTab2 - nmap 3 AirlineSelectTab3 - nmap 4 AirlineSelectTab4 - nmap 5 AirlineSelectTab5 - nmap 6 AirlineSelectTab6 - nmap 7 AirlineSelectTab7 - nmap 8 AirlineSelectTab8 - nmap 9 AirlineSelectTab9 - nmap - AirlineSelectPrevTab - nmap + AirlineSelectNextTab - - Note: Mappings will be ignored within a NERDTree buffer. - - Note: In buffer_idx_mode these mappings won't change the - current tab, but switch to the buffer visible in that tab. - Use |gt| for switching tabs. - In tabmode, those mappings will switch to the specified tab. - -* defines the name of a formatter for how buffer names are displayed. (c) - let g:airline#extensions#tabline#formatter = 'default' - - " here is how you can define a 'foo' formatter: - " create a file in the dir autoload/airline/extensions/tabline/formatters/ - " called foo.vim - function! airline#extensions#tabline#formatters#foo#format(bufnr, buffers) - return fnamemodify(bufname(a:bufnr), ':t') - endfunction - let g:airline#extensions#tabline#formatter = 'foo' -< - - Note: the following variables are only used by the 'default' formatter. - When no disambiguation is needed, both 'unique_tail_improved' and - 'unique_tail' delegate formatting to 'default', so these variables also - control rendering of unique filenames when using these formatters. - - * configure whether buffer numbers should be shown. > - let g:airline#extensions#tabline#buffer_nr_show = 0 -< - * configure how buffer numbers should be formatted with |printf()|. > - let g:airline#extensions#tabline#buffer_nr_format = '%s: ' -< - * configure the formatting of filenames (see |filename-modifiers|). > - let g:airline#extensions#tabline#fnamemod = ':p:.' -< - * configure collapsing parent directories in buffer name. > - let g:airline#extensions#tabline#fnamecollapse = 1 -< - * configure truncating non-active buffer names to specified length. > - let g:airline#extensions#tabline#fnametruncate = 0 - - " The `unique_tail` algorithm will display the tail of the filename, unless - " there is another file of the same name, in which it will display it along - " with the containing parent directory. - let g:airline#extensions#tabline#formatter = 'unique_tail' - - " The `unique_tail_improved` - another algorithm, that will smartly uniquify - " buffers names with similar filename, suppressing common parts of paths. - let g:airline#extensions#tabline#formatter = 'unique_tail_improved' -< -* configure the minimum number of buffers needed to show the tabline. > - let g:airline#extensions#tabline#buffer_min_count = 0 -< - Note: this setting only applies to a single tab and when `show_buffers` is - true. - -* configure the minimum number of tabs needed to show the tabline. > - let g:airline#extensions#tabline#tab_min_count = 0 -< - Note: this setting only applies when `show_buffers` is false. - -* configure separators for the tabline only. > - let g:airline#extensions#tabline#left_sep = '' - let g:airline#extensions#tabline#left_alt_sep = '' - let g:airline#extensions#tabline#right_sep = '' - let g:airline#extensions#tabline#right_alt_sep = '' - -* configure whether close button should be shown: > - let g:airline#extensions#tabline#show_close_button = 1 - -* configure symbol used to represent close button > - let g:airline#extensions#tabline#close_symbol = 'X' - -* configure pattern to be ignored on BufAdd autocommand > - " fixes unneccessary redraw, when e.g. opening Gundo window - let airline#extensions#tabline#ignore_bufadd_pat = - \ '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree' - -Note: Enabling this extension will modify 'showtabline' and 'guioptions'. - -* enable Refresh of tabline buffers on |BufAdd| autocommands - (set this to one, if you note 'AirlineTablineRefresh', however, this - won't update airline on |:badd| commands) > - let airline#extensions#tabline#disable_refresh = 0 - -------------------------------------- *airline-tmuxline* -tmuxline - -* enable/disable tmuxline integration > - let g:airline#extensions#tmuxline#enabled = 0 -< -* configure which mode colors should be used in tmux statusline > - let airline#extensions#tmuxline#color_template = 'normal' (default) - let airline#extensions#tmuxline#color_template = 'insert' - let airline#extensions#tmuxline#color_template = 'visual' - let airline#extensions#tmuxline#color_template = 'replace' -< -* if specified, setting this option will trigger writing to the file whenever the - airline theme is applied, i.e. when :AirlineTheme is executed and on vim - startup > - airline#extensions#tmuxline#snapshot_file = "~/.tmux-statusline-colors.conf" -< -------------------------------------- *airline-promptline* -promptline - -* configure the path to the snapshot .sh file. Mandatory option. The created - file should be sourced by the shell on login > - " in .vimrc - airline#extensions#promptline#snapshot_file = "~/.shell_prompt.sh" - - " in .bashrc/.zshrc - [ -f ~/.shell_prompt.sh ] && source ~/.shell_prompt.sh -< -* enable/disable promptline integration > - let g:airline#extensions#promptline#enabled = 0 -< -* configure which mode colors should be used in prompt > - let airline#extensions#promptline#color_template = 'normal' (default) - let airline#extensions#promptline#color_template = 'insert' - let airline#extensions#promptline#color_template = 'visual' - let airline#extensions#promptline#color_template = 'replace' -< -------------------------------------- *airline-nrrwrgn* -NrrwRgn - -* enable/disable NrrwRgn integration > - let g:airline#extensions#nrrwrgn#enabled = 1 - -------------------------------------- *airline-capslock* -vim-capslock - -* enable/disable vim-capslock integration > - let g:airline#extensions#capslock#enabled = 1 - -------------------------------------- *airline-windowswap* -vim-windowswap - -* enable/disable vim-windowswap integration > - let g:airline#extensions#windowswap#enabled = 1 - -* set marked window indicator string > - let g:airline#extensions#windowswap#indicator_text = 'WS' -< -------------------------------------- *airline-taboo* -taboo.vim - -* enable/disable taboo.vim integration > - let g:airline#extensions#taboo#enabled = 1 -< -------------------------------------- *airline-ctrlspace* -vim-ctrlspace - -* enable/disable vim-ctrlspace integration > - let g:airline#extensions#ctrlspace#enabled = 1 - - To make the vim-ctrlspace integration work you will need to make the - ctrlspace statusline function call the correct airline function. Therefore - add the following line into your .vimrc: - - let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()" -< -------------------------------------- *airline-ycm* -YouCompleteMe - -Shows number of errors and warnings in the current file detected by YCM. - -* enable/disable YCM integration > - let g:airline#extensions#ycm#enabled = 1 - -* set error count prefix > - let g:airline#extensions#ycm#error_symbol = 'E:' - -* set warning count prefix > - let g:airline#extensions#ycm#warning_symbol = 'W:' -< -------------------------------------- *airline-po* -po.vim - -* enable/disable po integration > - let g:airline#extensions#po#enabled = 1 -< -* truncate width names to a fixed length > - let g:airline#extensions#po#displayed_limit = 0 -< -============================================================================== -ADVANCED CUSTOMIZATION *airline-advanced-customization* - -The defaults will accommodate the mass majority of users with minimal -configuration. However, if you want to reposition sections or contents you can -do so with built-in helper functions, which makes it possible to create -sections in a more declarative style. - -------------------------------------- *airline-parts* -A part is something that contains metadata that eventually gets rendered into -the statusline. You can define parts that contain constant strings or -functions. Defining parts is needed if you want to use features like automatic -insertion of separators or hiding based on window width. - -For example, this is how you would define a part function: > - call airline#parts#define_function('foo', 'GetFooText') -< -Here is how you would define a part that is visible only if the window width -greater than a minimum width. > - call airline#parts#define_minwidth('foo', 50) -< -Parts can be configured to be visible conditionally. > - call airline#parts#define_condition('foo', 'getcwd() =~ "work_dir"') -< - -Now add part "foo" to section section airline_section_y: > - let g:airline_section_y = airline#section#create_right(['ffenc','foo']) -< -Note: Part definitions are combinative; e.g. the two examples above modify the -same `foo` part. - -Note: Look at the source code and tests for the full API. - -------------------------------------- *airline-predefined-parts* -Before is a list of parts that are predefined by vim-airline. - -* `mode` displays the current mode -* `iminsert` displays the current insert method -* `paste` displays the paste indicator -* `crypt` displays the crypted indicator -* `spell` displays the spell indicator -* `filetype` displays the file type -* `readonly` displays the read only indicator -* `file` displays the filename and modified indicator -* `ffenc` displays the file format and encoding - -And the following are defined for their respective extensions: - -`hunks`, `branch`, `tagbar`, `syntastic`, `whitespace` - -------------------------------------- *airline-accents* -Accents can be defined on any part, like so: > - call airline#parts#define_accent('foo', 'red') -< -This will override the colors of that part by using what is defined in that -particular accent. In the above example, the `red` accent is used, which means -regardless of which section the part is used in, it will have red foreground -colors instead of the section's default foreground color. - -The following accents are defined by default. Themes can define their variants -of the colors, but defaults will be provided if missing. > - bold, italic, red, green, blue, yellow, orange, purple -< -The defaults configure the mode and line number parts to be bold, and the -readonly part to be red. - -------------------------------------- *airline-sections* -Once a part is defined, you can use helper functions to generate the -statuslines for each section. For example, to use the part above, we could -define a section like this: > - function! AirlineInit() - let g:airline_section_a = airline#section#create(['mode', ' ', 'foo']) - let g:airline_section_b = airline#section#create_left(['ffenc','file']) - let g:airline_section_c = airline#section#create(['%{getcwd()}']) - endfunction - autocmd User AirlineAfterInit call AirlineInit() -< -This will create a section with the `mode`, followed by a space, and our `foo` -part in section `a`. Section `b` will have two parts with a left-side -separator. And section `c` will contain the current path. You may notice that -the space and cwd are not defined parts. For convenience, if a part of that -key does not exist, it will be inserted as is. The unit tests will be a good -resource for possibilities. - -Note: The use of |VimEnter| is important, because most extensions are lazily -loaded, so we must give them a chance to define their parts before we can use -them. - -Note: The `airline#section#create` function and friends will do its best to -create a section with the appropriate separators, but it only works for -function and text parts. Special 'statusline' items like %f or raw/undefined -parts will not work as it is not possible to inspect their widths/contents -before rendering to the statusline. - -============================================================================== -FUNCREFS *airline-funcrefs* - -vim-airline internally uses funcrefs to integrate with third party plugins, -and you can tap into this functionality to extend it for you needs. This is -the most powerful way to customize the statusline, and sometimes it may be -easier to go this route than the above methods. - -Every section can have two values. The default value is the global `g:` -variable which is used in the absence of a `w:` value. This makes it very easy -to override only certain parts of the statusline by only defining window-local -variables for a subset of all sections. - -------------------------------------- *add_statusline_func* -The following is an example of how you can extend vim-airline to support a -new plugin. > - function! MyPlugin(...) - if &filetype == 'MyPluginFileType' - let w:airline_section_a = 'MyPlugin' - let w:airline_section_b = '%f' - let w:airline_section_c = '%{MyPlugin#function()}' - let g:airline_variable_referenced_in_statusline = 'foo' - endif - endfunction - call airline#add_statusline_func('MyPlugin') -< -Notice that only the left side of the statusline is overwritten. This means -the right side (the line/column numbers, etc) will be intact. - -------------------------------------- *remove_statusline_func* -You can also remove a function as well, which is useful for when you want a -temporary override. > - call airline#remove_statusline_func('MyPlugin') -< - -============================================================================== -PIPELINE *airline-pipeline* - -Sometimes you want to do more than just use overrides. The statusline funcref -is invoked and passed two arguments. The first of these arguments is the -statusline builder. You can use this to build completely custom statuslines -to your liking. Here is an example: > -> - function! MyPlugin(...) - " first variable is the statusline builder - let builder = a:1 - - " WARNING: the API for the builder is not finalized and may change - call builder.add_section('Normal', '%f') - call builder.add_section('WarningMsg', '%{getcwd()}') - call builder.split() - call builder.add_section('airline_z', '%p%%') - - " tell the core to use the contents of the builder - return 1 - endfunction -< -The above example uses various example highlight groups to demonstrate -that you can use any combination from the loaded colorscheme. However, if -you want colors to change between modes, you should use one of the section -highlight groups, e.g. `airline_a` and `airline_b`. - -The second variable is the context, which is a dictionary containing various -values such as whether the statusline is active or not, and the window number. -> - context = { - 'winnr': 'the window number for the statusline', - 'active': 'whether the window is active or not', - 'bufnr': 'the current buffer for this window', - } -< -------------------------------------- *airline-pipeline-return-codes* -The pipeline accepts various return codes and can be used to determine the -next action. The following are the supported codes: > - 0 the default, continue on with the next funcref - -1 do not modify the statusline - 1 modify the statusline with the current contents of the builder -< -Note: Any value other than 0 will halt the pipeline and prevent the next -funcref from executing. - -============================================================================== -WRITING EXTENSIONS *airline-writing-extensions* - -For contributions into the plugin, here are the following guidelines: - -1. For simple 'filetype' checks, they can be added directly into the -`extensions.vim` file. - -2. Pretty much everything else should live as a separate file under the -`extensions/` directory. - - a. Inside `extensions.vim`, add a check for some variable or command that - is always available (these must be defined in `plugin/`, and _not_ - `autoload/` of the other plugin). If it exists, then initialize the - extension. This ensures that the extension is loaded if and only if the - user has the other plugin installed. Also, a check to - `airline#extensions#foo_plugin#enabled` should be performed to allow the - user to disable it. - - b. Configuration variables for the extension should reside in the - extension, e.g. `g:airline#extensions#foo_plugin#bar_variable`. - -See the source of |example.vim| for documented code of how to write one. -Looking at the other extensions is also a good resource. - -============================================================================== -WRITING THEMES *airline-themes* - -Themes are written "close to the metal" -- you will need to know some basic -VimL syntax to write a theme, but if you've written in any programming -language before it will be easy to pick up. - -The |dark.vim| theme fully documents this procedure and will guide you through -the process. - -For other examples, you can visit the official themes repository at -. It also includes -examples such as |jellybeans.vim| which define colors by extracting highlight -groups from the underlying colorscheme. - -============================================================================== -TROUBLESHOOTING *airline-troubleshooting* - -Q. There are no colors. -A. You need to set up your terminal correctly. For more details, see - . Alternatively, if you want - to bypass the automatic detection of terminal colors, you can force Vim - into 256 color mode with this: > - set t_Co=256 -< -Q. The statusline does not appear until I create a split. -A. This is the default setting of 'laststatus'. If you want it to appear all - the time, add the following to your vimrc: > - set laststatus=2 -< -Q. Powerline symbols are not showing up. -A. First, you must install patched powerline fonts. Second, you must enable - unicode in vim. > - set encoding=utf-8 -< -Q. There is a pause when leaving insert mode. -A. Add the following to your vimrc. > - set ttimeoutlen=50 -< -Q. The colors look a little off for some themes. -A. Certain themes are derived from the active colorscheme by extracting colors - from predefined highlight groups. These airline themes will look good for - their intended matching colorschemes, but will be hit or miss when loaded - with other colorschemes. - -Q. Themes are missing -A. Themes have been extracted into the vim-airlines-themes repository. Simply - clone https://github.com/vim-airline/vim-airline-themes and everything - should work again. - - -Solutions to other common problems can be found in the Wiki: - - -============================================================================== -CONTRIBUTIONS *airline-contributions* - -Contributions and pull requests are welcome. - -============================================================================== -LICENSE *airline-license* - -MIT License. Copyright © 2013-2016 Bailey Ling. - - vim:tw=78:ts=8:ft=help:norl: diff --git a/sources_non_forked/vim-airline/plugin/airline.vim b/sources_non_forked/vim-airline/plugin/airline.vim deleted file mode 100644 index dec8dd2f..00000000 --- a/sources_non_forked/vim-airline/plugin/airline.vim +++ /dev/null @@ -1,137 +0,0 @@ -" MIT License. Copyright (c) 2013-2016 Bailey Ling. -" vim: et ts=2 sts=2 sw=2 - -if &cp || v:version < 702 || (exists('g:loaded_airline') && g:loaded_airline) - finish -endif -let g:loaded_airline = 1 - -let s:airline_initialized = 0 -function! s:init() - if s:airline_initialized - return - endif - let s:airline_initialized = 1 - - call airline#extensions#load() - call airline#init#sections() - - let s:theme_in_vimrc = exists('g:airline_theme') - if s:theme_in_vimrc - try - let palette = g:airline#themes#{g:airline_theme}#palette - catch - echom 'Could not resolve airline theme "' . g:airline_theme . '". Themes have been migrated to github.com/vim-airline/vim-airline-themes.' - let g:airline_theme = 'dark' - endtry - silent call airline#switch_theme(g:airline_theme) - else - let g:airline_theme = 'dark' - silent call s:on_colorscheme_changed() - endif - - silent doautocmd User AirlineAfterInit -endfunction - -function! s:on_window_changed() - if pumvisible() && (!&previewwindow || g:airline_exclude_preview) - return - endif - " Handle each window only once, since we might come here several times for - " different autocommands. - let l:key = [bufnr('%'), winnr(), winnr('$')] - if get(t:, 'airline_last_window_changed', []) == l:key - \ && &stl is# '%!airline#statusline('.winnr().')' - return - endif - let t:airline_last_window_changed = l:key - call s:init() - call airline#update_statusline() -endfunction - -function! s:on_colorscheme_changed() - call s:init() - let g:airline_gui_mode = airline#init#gui_mode() - if !s:theme_in_vimrc - call airline#switch_matching_theme() - endif - - " couldn't find a match, or theme was defined, just refresh - call airline#load_theme() -endfunction - -function! airline#cmdwinenter(...) - call airline#extensions#apply_left_override('Command Line', '') -endfunction - -function! s:airline_toggle() - if exists("#airline") - augroup airline - au! - augroup END - augroup! airline - - if exists("s:stl") - let &stl = s:stl - endif - - silent doautocmd User AirlineToggledOff - else - let s:stl = &statusline - augroup airline - autocmd! - - autocmd CmdwinEnter * - \ call airline#add_statusline_func('airline#cmdwinenter') - \ | call on_window_changed() - autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter') - - autocmd GUIEnter,ColorScheme * call on_colorscheme_changed() - autocmd SessionLoadPost,VimEnter,WinEnter,BufWinEnter,FileType,BufUnload * - \ call on_window_changed() - - autocmd VimResized * call airline_refresh() - autocmd TabEnter * :unlet! w:airline_lastmode w:airline_active - autocmd BufWritePost */autoload/airline/themes/*.vim - \ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), "\n")[0] - \ | call airline#load_theme() - augroup END - - if s:airline_initialized - call s:on_window_changed() - endif - - silent doautocmd User AirlineToggledOn - endif -endfunction - -function! s:get_airline_themes(a, l, p) - let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:a.'*'), "\n") - return map(files, 'fnamemodify(v:val, ":t:r")') -endfunction - -function! s:airline_theme(...) - if a:0 - call airline#switch_theme(a:1) - else - echo g:airline_theme - endif -endfunction - -function! s:airline_refresh() - let nomodeline='' - if v:version > 703 || v:version == 703 && has("patch438") - let nomodeline = '' - endif - exe printf("silent doautocmd %s User AirlineBeforeRefresh", nomodeline) - call airline#load_theme() - call airline#update_statusline() -endfunction - -command! -bar -nargs=? -complete=customlist,get_airline_themes AirlineTheme call airline_theme() -command! -bar AirlineToggleWhitespace call airline#extensions#whitespace#toggle() -command! -bar AirlineToggle call s:airline_toggle() -command! -bar AirlineRefresh call s:airline_refresh() - -call airline#init#bootstrap() -call s:airline_toggle() diff --git a/sources_non_forked/vim-airline/t/airline.vim b/sources_non_forked/vim-airline/t/airline.vim deleted file mode 100644 index 6e66aecc..00000000 --- a/sources_non_forked/vim-airline/t/airline.vim +++ /dev/null @@ -1,87 +0,0 @@ -let g:airline_theme = 'dark' - -source plugin/airline.vim -doautocmd VimEnter - -function! MyFuncref(...) - call a:1.add_raw('hello world') - return 1 -endfunction - -function! MyIgnoreFuncref(...) - return -1 -endfunction - -function! MyAppend1(...) - call a:1.add_raw('hello') -endfunction - -function! MyAppend2(...) - call a:1.add_raw('world') -endfunction - -describe 'airline' - before - let g:airline_statusline_funcrefs = [] - end - - it 'should run user funcrefs first' - call airline#add_statusline_func('MyFuncref') - let &statusline = '' - call airline#update_statusline() - Expect airline#statusline(1) =~ 'hello world' - end - - it 'should not change the statusline with -1' - call airline#add_statusline_funcref(function('MyIgnoreFuncref')) - let &statusline = 'foo' - call airline#update_statusline() - Expect &statusline == 'foo' - end - - it 'should support multiple chained funcrefs' - call airline#add_statusline_func('MyAppend1') - call airline#add_statusline_func('MyAppend2') - call airline#update_statusline() - Expect airline#statusline(1) =~ 'helloworld' - end - - it 'should allow users to redefine sections' - let g:airline_section_a = airline#section#create(['mode', 'mode']) - call airline#update_statusline() - Expect airline#statusline(1) =~ '%{airline#util#wrap(airline#parts#mode(),0)}%#airline_a#%#airline_a_bold#%{airline#util#wrap(airline#parts#mode(),0)}%#airline_a#' - end - - it 'should remove funcrefs properly' - let c = len(g:airline_statusline_funcrefs) - call airline#add_statusline_func('MyIgnoreFuncref') - call airline#remove_statusline_func('MyIgnoreFuncref') - Expect len(g:airline_statusline_funcrefs) == c - end - - it 'should overwrite the statusline with active and inactive splits' - wincmd s - Expect airline#statusline(1) !~ 'inactive' - Expect airline#statusline(2) =~ 'inactive' - wincmd c - end - - it 'should collapse the inactive split if the variable is set true' - let g:airline_inactive_collapse = 1 - wincmd s - Expect getwinvar(2, '&statusline') !~ 'airline#parts#mode' - wincmd c - end - - it 'should not collapse the inactive split if the variable is set false' - let g:airline_inactive_collapse = 0 - wincmd s - Expect getwinvar(2, '&statusline') != 'airline#parts#mode' - wincmd c - end - - it 'should include check_mode' - Expect airline#statusline(1) =~ 'airline#check_mode' - end -end - diff --git a/sources_non_forked/vim-airline/t/builder.vim b/sources_non_forked/vim-airline/t/builder.vim deleted file mode 100644 index 57feb148..00000000 --- a/sources_non_forked/vim-airline/t/builder.vim +++ /dev/null @@ -1,106 +0,0 @@ -let g:airline_theme = 'dark' -call airline#init#bootstrap() - -describe 'active builder' - before - let s:builder = airline#builder#new({'active': 1}) - end - - it 'should start with an empty statusline' - let stl = s:builder.build() - Expect stl == '' - end - - it 'should transition colors from one to the next' - call s:builder.add_section('Normal', 'hello') - call s:builder.add_section('Search', 'world') - let stl = s:builder.build() - Expect stl =~ '%#Normal#hello%#Normal_to_Search#>%#Search#world' - end - - it 'should reuse highlight group if background colors match' - highlight Foo1 ctermfg=1 ctermbg=2 - highlight Foo2 ctermfg=1 ctermbg=2 - call s:builder.add_section('Foo1', 'hello') - call s:builder.add_section('Foo2', 'world') - let stl = s:builder.build() - Expect stl =~ '%#Foo1#hello>world' - end - - it 'should switch highlight groups if foreground colors differ' - highlight Foo1 ctermfg=1 ctermbg=2 - highlight Foo2 ctermfg=2 ctermbg=2 - call s:builder.add_section('Foo1', 'hello') - call s:builder.add_section('Foo2', 'world') - let stl = s:builder.build() - Expect stl =~ '%#Foo1#hello%#Foo1_to_Foo2#>%#Foo2#world' - end - - it 'should split left/right sections' - call s:builder.split() - let stl = s:builder.build() - Expect stl =~ '%=' - end - - it 'after split, sections use the right separator' - call s:builder.split() - call s:builder.add_section('Normal', 'hello') - call s:builder.add_section('Search', 'world') - let stl = s:builder.build() - Expect stl =~ 'hello%#Normal_to_Search#<%#Search#world' - end - - it 'should not repeat the same highlight group' - call s:builder.add_section('Normal', 'hello') - call s:builder.add_section('Normal', 'hello') - let stl = s:builder.build() - Expect stl == '%#Normal#hello>hello' - end - - it 'should replace accent groups with the specified group' - call s:builder.add_section('Normal', '%#__accent_foo#hello') - let stl = s:builder.build() - Expect stl == '%#Normal#%#Normal_foo#hello' - end - - it 'should replace two accent groups with correct groups' - call s:builder.add_section('Normal', '%#__accent_foo#hello%#__accent_bar#world') - let stl = s:builder.build() - Expect stl =~ '%#Normal_foo#hello%#Normal_bar#world' - end - - it 'should special restore group should go back to previous group' - call s:builder.add_section('Normal', '%#__restore__#') - let stl = s:builder.build() - Expect stl !~ '%#__restore__#' - Expect stl =~ '%#Normal#' - end - - it 'should blend colors from the left through the split to the right' - call s:builder.add_section('Normal', 'hello') - call s:builder.split() - call s:builder.add_section('Search', 'world') - let stl = s:builder.build() - Expect stl =~ 'Normal_to_Search' - end -end - -describe 'inactive builder' - before - let s:builder = airline#builder#new({'active': 0}) - end - - it 'should transition colors from one to the next' - call s:builder.add_section('Normal', 'hello') - call s:builder.add_section('Search', 'world') - let stl = s:builder.build() - Expect stl =~ '%#Normal_inactive#hello%#Normal_to_Search_inactive#>%#Search_inactive#world' - end - - it 'should not render accents' - call s:builder.add_section('Normal', '%#__accent_foo#hello%#foo#foo%#__accent_bar#world') - let stl = s:builder.build() - Expect stl == '%#Normal_inactive#hello%#foo_inactive#fooworld' - end -end - diff --git a/sources_non_forked/vim-airline/t/commands.vim b/sources_non_forked/vim-airline/t/commands.vim deleted file mode 100644 index 0f4bcb62..00000000 --- a/sources_non_forked/vim-airline/t/commands.vim +++ /dev/null @@ -1,35 +0,0 @@ -source plugin/airline.vim -doautocmd VimEnter - -describe 'commands' - it 'should toggle off and on' - execute 'AirlineToggle' - Expect exists('#airline') to_be_false - execute 'AirlineToggle' - Expect exists('#airline') to_be_true - end - - it 'should toggle whitespace off and on' - call airline#extensions#load() - execute 'AirlineToggleWhitespace' - Expect exists('#airline_whitespace') to_be_false - execute 'AirlineToggleWhitespace' - Expect exists('#airline_whitespace') to_be_true - end - - it 'should display theme name with no args' - execute 'AirlineTheme simple' - Expect g:airline_theme == 'simple' - execute 'AirlineTheme dark' - Expect g:airline_theme == 'dark' - execute 'AirlineTheme doesnotexist' - Expect g:airline_theme == 'dark' - colors molokai - Expect g:airline_theme == 'molokai' - end - - it 'should have a refresh command' - Expect exists(':AirlineRefresh') to_be_true - end -end - diff --git a/sources_non_forked/vim-airline/t/extensions_default.vim b/sources_non_forked/vim-airline/t/extensions_default.vim deleted file mode 100644 index e60d651a..00000000 --- a/sources_non_forked/vim-airline/t/extensions_default.vim +++ /dev/null @@ -1,31 +0,0 @@ -let g:airline#extensions#default#layout = [ - \ [ 'c', 'a', 'b', 'warning' ], - \ [ 'x', 'z', 'y' ] - \ ] - -source plugin/airline.vim -doautocmd VimEnter - -describe 'default' - before - let s:builder = airline#builder#new({'active': 1}) - end - - it 'should use the layout' - call airline#extensions#default#apply(s:builder, { 'winnr': 1, 'active': 1 }) - let stl = s:builder.build() - Expect stl =~ 'airline_c_to_airline_a' - Expect stl =~ 'airline_a_to_airline_b' - Expect stl =~ 'airline_b_to_airline_warning' - Expect stl =~ 'airline_x_to_airline_z' - Expect stl =~ 'airline_z_to_airline_y' - end - - it 'should only render warning section in active splits' - wincmd s - Expect airline#statusline(1) =~ 'warning' - Expect airline#statusline(2) !~ 'warning' - wincmd c - end -end - diff --git a/sources_non_forked/vim-airline/t/highlighter.vim b/sources_non_forked/vim-airline/t/highlighter.vim deleted file mode 100644 index a1ed4905..00000000 --- a/sources_non_forked/vim-airline/t/highlighter.vim +++ /dev/null @@ -1,21 +0,0 @@ -let g:airline_theme = 'dark' - -describe 'highlighter' - it 'should create separator highlight groups' - hi Foo1 ctermfg=1 ctermbg=2 - hi Foo2 ctermfg=3 ctermbg=4 - call airline#highlighter#add_separator('Foo1', 'Foo2', 0) - let hl = airline#highlighter#get_highlight('Foo1_to_Foo2') - Expect hl == [ '', '', '4', '2', '' ] - end - - it 'should populate accent colors' - Expect exists('g:airline#themes#dark#palette.normal.airline_c_red') to_be_false - Expect hlID('airline_c_red') == 0 - call airline#themes#patch(g:airline#themes#dark#palette) - call airline#highlighter#add_accent('red') - call airline#highlighter#highlight(['normal']) - Expect hlID('airline_c_red') != 0 - end -end - diff --git a/sources_non_forked/vim-airline/t/init.vim b/sources_non_forked/vim-airline/t/init.vim deleted file mode 100644 index acb9f194..00000000 --- a/sources_non_forked/vim-airline/t/init.vim +++ /dev/null @@ -1,78 +0,0 @@ -let s:sections = ['a', 'b', 'c', 'gutter', 'x', 'y', 'z', 'warning'] - -function! s:clear() - for key in s:sections - unlet! g:airline_section_{key} - endfor -endfunction - -call airline#init#bootstrap() - -describe 'init sections' - before - call s:clear() - call airline#init#sections() - end - - after - call s:clear() - end - - it 'section a should have mode, paste, spell, iminsert' - Expect g:airline_section_a =~ 'mode' - Expect g:airline_section_a =~ 'paste' - Expect g:airline_section_a =~ 'spell' - Expect g:airline_section_a =~ 'iminsert' - end - - it 'section b should be blank because no extensions are installed' - Expect g:airline_section_b == '' - end - - it 'section c should be file' - Expect g:airline_section_c == '%<%f%m %#__accent_red#%{airline#util#wrap(airline#parts#readonly(),0)}%#__restore__#' - end - - it 'section x should be filetype' - Expect g:airline_section_x == '%{airline#util#wrap(airline#parts#filetype(),0)}' - end - - it 'section y should be fenc and ff' - Expect g:airline_section_y =~ 'ff' - Expect g:airline_section_y =~ 'fenc' - end - - it 'section z should be line numbers' - Expect g:airline_section_z =~ '%3p%%' - Expect g:airline_section_z =~ '%4l' - Expect g:airline_section_z =~ '%3v' - end - - it 'should not redefine sections already defined' - for s in s:sections - let g:airline_section_{s} = s - endfor - call airline#init#bootstrap() - for s in s:sections - Expect g:airline_section_{s} == s - endfor - end - - it 'all default statusline extensions should be blank' - Expect airline#parts#get('hunks').raw == '' - Expect airline#parts#get('branch').raw == '' - Expect airline#parts#get('tagbar').raw == '' - Expect airline#parts#get('syntastic').raw == '' - Expect airline#parts#get('eclim').raw == '' - Expect airline#parts#get('whitespace').raw == '' - end -end - -describe 'init parts' - it 'should not redefine parts already defined' - call airline#parts#define_raw('linenr', 'bar') - call airline#init#sections() - Expect g:airline_section_z =~ 'bar' - end -end - diff --git a/sources_non_forked/vim-airline/t/parts.vim b/sources_non_forked/vim-airline/t/parts.vim deleted file mode 100644 index ee7c92e3..00000000 --- a/sources_non_forked/vim-airline/t/parts.vim +++ /dev/null @@ -1,39 +0,0 @@ -describe 'parts' - it 'overwrites existing values' - call airline#parts#define('foo', { 'test': '123' }) - Expect airline#parts#get('foo').test == '123' - call airline#parts#define('foo', { 'test': '321' }) - Expect airline#parts#get('foo').test == '321' - end - - it 'can define a function part' - call airline#parts#define_function('func', 'bar') - Expect airline#parts#get('func').function == 'bar' - end - - it 'can define a text part' - call airline#parts#define_text('text', 'bar') - Expect airline#parts#get('text').text == 'bar' - end - - it 'can define a raw part' - call airline#parts#define_raw('raw', 'bar') - Expect airline#parts#get('raw').raw == 'bar' - end - - it 'can define a minwidth' - call airline#parts#define_minwidth('mw', 123) - Expect airline#parts#get('mw').minwidth == 123 - end - - it 'can define a condition' - call airline#parts#define_condition('part', '1') - Expect airline#parts#get('part').condition == '1' - end - - it 'can define a accent' - call airline#parts#define_accent('part', 'red') - Expect airline#parts#get('part').accent == 'red' - end -end - diff --git a/sources_non_forked/vim-airline/t/section.vim b/sources_non_forked/vim-airline/t/section.vim deleted file mode 100644 index 034440c8..00000000 --- a/sources_non_forked/vim-airline/t/section.vim +++ /dev/null @@ -1,76 +0,0 @@ -function! SectionSpec() -endfunction - -describe 'section' - before - call airline#parts#define_text('text', 'text') - call airline#parts#define_raw('raw', 'raw') - call airline#parts#define_function('func', 'SectionSpec') - end - - it 'should be able to reference default parts' - let s = airline#section#create(['paste']) - Expect s == '%{airline#util#wrap(airline#parts#paste(),0)}' - end - - it 'should create sections with no separators' - let s = airline#section#create(['text', 'raw', 'func']) - Expect s == '%{airline#util#wrap("text",0)}raw%{airline#util#wrap(SectionSpec(),0)}' - end - - it 'should create left sections with separators' - let s = airline#section#create_left(['text', 'text']) - Expect s == '%{airline#util#wrap("text",0)}%{airline#util#append("text",0)}' - end - - it 'should create right sections with separators' - let s = airline#section#create_right(['text', 'text']) - Expect s == '%{airline#util#prepend("text",0)}%{airline#util#wrap("text",0)}' - end - - it 'should prefix with accent group if provided and restore afterwards' - call airline#parts#define('hi', { - \ 'raw': 'hello', - \ 'accent': 'red', - \ }) - let s = airline#section#create(['hi']) - Expect s == '%#__accent_red#hello%#__restore__#' - end - - it 'should accent functions' - call airline#parts#define_function('hi', 'Hello') - call airline#parts#define_accent('hi', 'bold') - let s = airline#section#create(['hi']) - Expect s == '%#__accent_bold#%{airline#util#wrap(Hello(),0)}%#__restore__#' - end - - it 'should parse out a section from the distro' - call airline#extensions#load() - let s = airline#section#create(['whitespace']) - Expect s =~ 'airline#extensions#whitespace#check' - end - - it 'should use parts as is if they are not found' - let s = airline#section#create(['asdf', 'func']) - Expect s == 'asdf%{airline#util#wrap(SectionSpec(),0)}' - end - - it 'should force add separators for raw and missing keys' - let s = airline#section#create_left(['asdf', 'raw']) - Expect s == 'asdf > raw' - let s = airline#section#create_left(['asdf', 'aaaa', 'raw']) - Expect s == 'asdf > aaaa > raw' - let s = airline#section#create_right(['raw', '%f']) - Expect s == 'raw < %f' - let s = airline#section#create_right(['%t', 'asdf', '%{getcwd()}']) - Expect s == '%t < asdf < %{getcwd()}' - end - - it 'should empty out parts that do not pass their condition' - call airline#parts#define_text('conditional', 'conditional') - call airline#parts#define_condition('conditional', '0') - let s = airline#section#create(['conditional']) - Expect s == '%{0 ? airline#util#wrap("conditional",0) : ""}' - end -end - diff --git a/sources_non_forked/vim-airline/t/themes.vim b/sources_non_forked/vim-airline/t/themes.vim deleted file mode 100644 index 5a13993e..00000000 --- a/sources_non_forked/vim-airline/t/themes.vim +++ /dev/null @@ -1,68 +0,0 @@ -describe 'themes' - after - highlight clear Foo - highlight clear Normal - end - - it 'should extract correct colors' - highlight Foo ctermfg=1 ctermbg=2 - let colors = airline#themes#get_highlight('Foo') - Expect colors[2] == '1' - Expect colors[3] == '2' - end - - it 'should extract from normal if colors unavailable' - highlight Normal ctermfg=100 ctermbg=200 - highlight Foo ctermbg=2 - let colors = airline#themes#get_highlight('Foo') - Expect colors[2] == '100' - Expect colors[3] == '2' - end - - it 'should flip target group if it is reversed' - highlight Foo ctermbg=222 ctermfg=103 term=reverse - let colors = airline#themes#get_highlight('Foo') - Expect colors[2] == '222' - Expect colors[3] == '103' - end - - it 'should pass args through correctly' - let hl = airline#themes#get_highlight('Foo', 'bold', 'italic') - Expect hl == ['', '', 'NONE', 'NONE', 'bold,italic'] - - let hl = airline#themes#get_highlight2(['Foo','bg'], ['Foo','fg'], 'italic', 'bold') - Expect hl == ['', '', 'NONE', 'NONE', 'italic,bold'] - end - - it 'should generate color map with mirroring' - let map = airline#themes#generate_color_map( - \ [ 1, 1, 1, 1, '1' ], - \ [ 2, 2, 2, 2, '2' ], - \ [ 3, 3, 3, 3, '3' ], - \ ) - Expect map.airline_a[0] == 1 - Expect map.airline_b[0] == 2 - Expect map.airline_c[0] == 3 - Expect map.airline_x[0] == 3 - Expect map.airline_y[0] == 2 - Expect map.airline_z[0] == 1 - end - - it 'should generate color map with full set of colors' - let map = airline#themes#generate_color_map( - \ [ 1, 1, 1, 1, '1' ], - \ [ 2, 2, 2, 2, '2' ], - \ [ 3, 3, 3, 3, '3' ], - \ [ 4, 4, 4, 4, '4' ], - \ [ 5, 5, 5, 5, '5' ], - \ [ 6, 6, 6, 6, '6' ], - \ ) - Expect map.airline_a[0] == 1 - Expect map.airline_b[0] == 2 - Expect map.airline_c[0] == 3 - Expect map.airline_x[0] == 4 - Expect map.airline_y[0] == 5 - Expect map.airline_z[0] == 6 - end -end - diff --git a/sources_non_forked/vim-airline/t/util.vim b/sources_non_forked/vim-airline/t/util.vim deleted file mode 100644 index 913de9d8..00000000 --- a/sources_non_forked/vim-airline/t/util.vim +++ /dev/null @@ -1,54 +0,0 @@ -call airline#init#bootstrap() - -function! Util1() - let g:count += 1 -endfunction -function! Util2() - let g:count += 2 -endfunction -function! Util3(...) - let g:count = a:0 -endfunction - -describe 'util' - before - let g:count = 0 - end - - it 'has append wrapper function' - Expect airline#util#append('', 0) == '' - Expect airline#util#append('1', 0) == ' > 1' - end - - it 'has prepend wrapper function' - Expect airline#util#prepend('', 0) == '' - Expect airline#util#prepend('1', 0) == '1 < ' - end - - it 'has getwinvar function' - Expect airline#util#getwinvar(1, 'asdf', '123') == '123' - call setwinvar(1, 'vspec', 'is cool') - Expect airline#util#getwinvar(1, 'vspec', '') == 'is cool' - end - - it 'has exec funcrefs helper functions' - call airline#util#exec_funcrefs([function('Util1'), function('Util2')]) - Expect g:count == 3 - - call airline#util#exec_funcrefs([function('Util3')], 1, 2, 3, 4) - Expect g:count == 4 - end - - it 'should ignore minwidth if less than 0' - Expect airline#util#append('foo', -1) == ' > foo' - Expect airline#util#prepend('foo', -1) == 'foo < ' - Expect airline#util#wrap('foo', -1) == 'foo' - end - - it 'should return empty if winwidth() > minwidth' - Expect airline#util#append('foo', 99999) == '' - Expect airline#util#prepend('foo', 99999) == '' - Expect airline#util#wrap('foo', 99999) == '' - end -end - diff --git a/update_plugins.py b/update_plugins.py index cc983b46..d4316214 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -40,8 +40,6 @@ vim-surround https://github.com/tpope/vim-surround vim-expand-region https://github.com/terryma/vim-expand-region vim-multiple-cursors https://github.com/terryma/vim-multiple-cursors vim-fugitive https://github.com/tpope/vim-fugitive -vim-airline https://github.com/vim-airline/vim-airline -vim-airline-themes https://github.com/vim-airline/vim-airline-themes goyo.vim https://github.com/junegunn/goyo.vim vim-zenroom2 https://github.com/amix/vim-zenroom2 syntastic https://github.com/scrooloose/syntastic @@ -53,6 +51,7 @@ gruvbox https://github.com/morhetz/gruvbox vim-flake8 https://github.com/nvie/vim-flake8 vim-pug https://github.com/digitaltoad/vim-pug vim-yankstack https://github.com/maxbrunsfeld/vim-yankstack +lightline.vim https://github.com/itchyny/lightline.vim """.strip() GITHUB_ZIP = '%s/archive/master.zip' diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index 706079c3..9af29ad7 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -1,5 +1,5 @@ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Important: +" Important: " This requries that you install https://github.com/amix/vimrc ! " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -78,7 +78,7 @@ let NERDTreeShowHidden=0 let NERDTreeIgnore = ['\.pyc$', '__pycache__'] let g:NERDTreeWinSize=35 map nn :NERDTreeToggle -map nb :NERDTreeFromBookmark +map nb :NERDTreeFromBookmark map nf :NERDTreeFind @@ -97,10 +97,31 @@ au FileType mako vmap Si S"i${ _(2f"a) } """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => vim-airline config (force color) +" => lightline """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -let g:airline_theme="luna" +let g:lightline = { + \ 'colorscheme': 'wombat', + \ } +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ ['mode', 'paste'], + \ ['fugitive', 'readonly', 'filename', 'modified'] ] + \ }, + \ 'component': { + \ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}', + \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', + \ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' + \ }, + \ 'component_visible_condition': { + \ 'readonly': '(&filetype!="help"&& &readonly)', + \ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', + \ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())' + \ }, + \ 'separator': { 'left': ' ', 'right': ' ' }, + \ 'subseparator': { 'left': ' ', 'right': ' ' } + \ } """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Vimroom From 91ebc3ca0d6d97316c2f41a84c9d28c9c6e4f1a6 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 14 May 2016 13:26:42 +0100 Subject: [PATCH 11/12] Simplify the right side of the lightline status bar --- vimrcs/plugins_config.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index 9af29ad7..5d2ef45d 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -107,7 +107,8 @@ let g:lightline = { \ 'colorscheme': 'wombat', \ 'active': { \ 'left': [ ['mode', 'paste'], - \ ['fugitive', 'readonly', 'filename', 'modified'] ] + \ ['fugitive', 'readonly', 'filename', 'modified'] ], + \ 'right': [ [ 'lineinfo' ], ['percent'] ] \ }, \ 'component': { \ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}', From 78f522f1cb066766393110dcb39cf9fc558c5244 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 14 May 2016 16:57:26 +0100 Subject: [PATCH 12/12] Go to the last position in files --- vimrcs/basic.vim | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 8c579772..08011612 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -260,12 +260,7 @@ catch endtry " Return to last edit position when opening files (You want this!) -" autocmd BufReadPost * -" \ if line("'\"") > 0 && line("'\"") <= line("$") | -" \ exe "normal! g`\"" | -" \ endif -" Remember info about open buffers on close -" set viminfo^=% +au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif """"""""""""""""""""""""""""""