├── .gitignore ├── abbrev.vim ├── after ├── ftplugin │ ├── c.vim │ ├── csv.vim │ ├── help.vim │ ├── html.vim │ ├── java.vim │ ├── mail.vim │ ├── mail │ │ ├── format.vim │ │ ├── lbdbq.vim │ │ ├── lbdbq_complete.vim │ │ └── posting.vim │ ├── perl.vim │ ├── php.vim │ ├── qf.vim │ ├── tex.vim │ └── vim.vim └── syntax │ └── tex.vim ├── autoload ├── Colorizer.vim ├── DistractFree.vim ├── DynamicSigns.vim ├── DynamicSigns │ ├── 0.bmp │ ├── 1.bmp │ ├── 2.bmp │ ├── 3.bmp │ ├── 4.bmp │ ├── 5.bmp │ ├── 6.bmp │ ├── 7.bmp │ ├── 8.bmp │ ├── 9.bmp │ ├── A.bmp │ ├── B.bmp │ ├── C.bmp │ ├── D.bmp │ ├── E.bmp │ ├── F.bmp │ ├── G.bmp │ ├── H.bmp │ ├── I.bmp │ ├── J.bmp │ ├── K.bmp │ ├── L.bmp │ ├── M.bmp │ ├── N.bmp │ ├── O.bmp │ ├── P.bmp │ ├── Q.bmp │ ├── R.bmp │ ├── S.bmp │ ├── T.bmp │ ├── U.bmp │ ├── V.bmp │ ├── W.bmp │ ├── X.bmp │ ├── Y.bmp │ ├── Z.bmp │ ├── add.bmp │ ├── arrow-right.bmp │ ├── checkmark.bmp │ ├── delete.bmp │ ├── error.bmp │ ├── flag-yellow.bmp │ ├── license_designkode.txt │ ├── license_red-orb.txt │ ├── stop.bmp │ ├── thumbtack-yellow.bmp │ └── warning.bmp ├── IndGuide.vim ├── Replay.vim ├── SudoEdit.vim ├── camelcasemotion.vim ├── changes.vim ├── digraph.vim ├── explainpat.vim ├── histwin.vim ├── misc.vim ├── nrrwrgn.vim ├── nwo │ └── magic.vim ├── pathogen.vim ├── rails.vim ├── recover.vim ├── savesigns.vim ├── screencapture.sh ├── sudo.cmd ├── unicode.vim ├── unicode │ └── UnicodeData.txt └── vertfold.vim ├── colors ├── black_angus.vim ├── bubblegum-256-dark.vim ├── cb256.vim ├── cb256_1.vim ├── darkroom.vim ├── desert.vim ├── desert256.vim ├── dw_blue.vim ├── inkpot.vim ├── maroloccio.vim ├── moria.vim ├── peaksea.vim ├── sean.vim ├── solarized.vim ├── tester.vim ├── transparent.vim └── zenburn.vim ├── doc ├── BufTimer.txt ├── ChangesPlugin.txt ├── CheckAttach.txt ├── Colorizer.txt ├── DistractFree.txt ├── DynamicSigns.txt ├── Join.txt ├── LargeFile.txt ├── NarrowRegion.txt ├── Replay.txt ├── SudoEdit.txt ├── camelcasemotion.txt ├── cctree.txt ├── dummy.txt ├── explainpat.txt ├── ft-csv.txt ├── histwin.txt ├── mail.txt ├── matchit.txt ├── old │ ├── AnsiEsc.txt.alt │ ├── BufTimer.txt.alt │ ├── NERD_commenter.txt.alt │ ├── SudoEdit.txt.1.alt │ ├── SudoEdit.txt.alt │ ├── bufexplorer.txt.alt │ ├── pi_getscript.txt.alt │ ├── pi_netrw.txt.alt │ ├── pi_vimball.txt.alt │ ├── potwiki.txt.alt │ ├── system_utils.txt.alt │ ├── vcscommand.txt.alt │ └── vim_faq_help.txt.alt ├── rails.txt ├── recoverPlugin.txt ├── savesigns.txt ├── tags ├── togglebg.txt ├── unicode.txt ├── valgrind.txt └── vim_faq.txt ├── experimental.vim ├── filetype.vim ├── ftdetect ├── bash.vim ├── csv.vim └── misc.vim ├── ftplugin ├── csv.vim ├── gitcommit.vim ├── gitrebase.vim ├── mail.vim ├── mail │ └── CheckAttach.vim ├── netrw │ └── index_netrw.vim ├── qf.vim ├── sh.vim └── tex.vim ├── functions.vim ├── init.vim ├── mapping.vim ├── more.vim ├── pack └── dist │ └── start │ ├── alt │ ├── genutils │ │ ├── autoload │ │ │ └── genutils.vim │ │ ├── genutils-2.5.zip │ │ └── plugin │ │ │ └── genutils.vim │ └── perforce │ │ ├── autoload │ │ ├── perforce.vim │ │ └── perforceutils.vim │ │ ├── doc │ │ └── perforce.txt │ │ ├── ftplugin │ │ ├── perforce.vim │ │ └── selectbuf_perforce.vim │ │ ├── perforce-4.1.zip │ │ ├── perforce │ │ ├── bakup.sh │ │ ├── p4Utils.sh │ │ ├── perforcebugrep.vim │ │ ├── perforcemenu.vim │ │ ├── perforceutils.vim │ │ └── restor.sh │ │ ├── plugin │ │ └── perforce.vim │ │ └── syntax │ │ └── perforce.vim │ └── vim-lawrencium │ ├── .hg │ ├── 00changelog.i │ ├── bookmarks │ ├── branch │ ├── cache │ │ └── branch2-served │ ├── dirstate │ ├── hgrc │ ├── requires │ ├── store │ │ ├── 00changelog.i │ │ ├── 00manifest.i │ │ ├── data │ │ │ ├── _r_e_a_d_m_e.markdown.i │ │ │ ├── doc │ │ │ │ └── lawrencium.txt.i │ │ │ ├── ftdetect │ │ │ │ ├── hgcommit.vim.i │ │ │ │ └── hgstatus.vim.i │ │ │ ├── ftplugin │ │ │ │ └── hglog.vim.i │ │ │ ├── plugin │ │ │ │ ├── hglog.vim.i │ │ │ │ └── lawrencium.vim.i │ │ │ ├── resources │ │ │ │ ├── _beautiful_soup.py.i │ │ │ │ ├── _generate_hg_usage.py.i │ │ │ │ ├── hg__command__file__types.vim.i │ │ │ │ ├── hg__log.style.i │ │ │ │ └── hg__usage.vim.i │ │ │ ├── syntax │ │ │ │ ├── hgannotate.vim.i │ │ │ │ ├── hgcommit.vim.i │ │ │ │ ├── hggraphlog.vim.i │ │ │ │ ├── hglog.vim.i │ │ │ │ ├── hgqseries.vim.i │ │ │ │ └── hgstatus.vim.i │ │ │ ├── ~2ehgignore.i │ │ │ └── ~2ehgtags.i │ │ ├── fncache │ │ ├── phaseroots │ │ ├── undo │ │ └── undo.phaseroots │ ├── undo.bookmarks │ ├── undo.branch │ ├── undo.desc │ └── undo.dirstate │ ├── .hgignore │ ├── .hgtags │ ├── README.markdown │ ├── doc │ └── lawrencium.txt │ ├── ftdetect │ ├── hgcommit.vim │ └── hgstatus.vim │ ├── ftplugin │ └── hglog.vim │ ├── plugin │ └── lawrencium.vim │ ├── resources │ ├── BeautifulSoup.py │ ├── GenerateHgUsage.py │ ├── hg_command_file_types.vim │ ├── hg_log.style │ └── hg_usage.vim │ └── syntax │ ├── hgannotate.vim │ ├── hgcommit.vim │ ├── hggraphlog.vim │ ├── hglog.vim │ ├── hgqseries.vim │ └── hgstatus.vim ├── plugin ├── Buftimer.vim ├── ColorizerPlugin.vim ├── CopyFolds.vim ├── CustomFoldText.vim ├── DistractFreePlugin.vim ├── LargeFile.vim ├── NrrwRgn.vim ├── PP.vim ├── ReplayPlugin.vim ├── SudoEdit.vim ├── boxquotes.vim ├── cctree.vim ├── changesPlugin.vim ├── csv.vim ├── explainpat.vim ├── faq_plugin.vim ├── gnupg-symmetric.vim ├── highlightmark.vim ├── histwinPlugin.vim ├── misc.vim ├── savesignsPlugin.vim ├── timer.vim ├── unicode.vim └── uri-ref.vim ├── plugins.vim ├── spell ├── de.utf-8.spl ├── de.utf-8.sug ├── en.ascii.spl ├── en.ascii.sug ├── en.latin1.spl ├── en.latin1.sug ├── en.utf-8.spl └── en.utf-8.sug ├── spellfile.add ├── spellfile.add.spl ├── syntax ├── bbcode.vim ├── csv.vim ├── cvsannotate.vim ├── gitannotate.vim ├── hgannotate.vim ├── intro.vim ├── lab.vim ├── matlab.vim.1 ├── netrw.vim ├── svkannotate.vim ├── svnannotate.vim ├── text.vim └── vcscommit.vim ├── undo └── %tmp%server%.vim%mapping.vim └── vimrc /.gitignore: -------------------------------------------------------------------------------- 1 | **/tags 2 | *.un~ 3 | .*.sw? 4 | .VimballRecord 5 | .cache/* 6 | .netrwhist 7 | backup/* 8 | GetLatest/* 9 | autoload/* 10 | bundle/* 11 | contrib/* 12 | doc/* 13 | ftdetect/* 14 | pack/dist/start/alt/* 15 | pack/dist/start/base16-vim 16 | plugin/* 17 | spell/* 18 | spellfile* 19 | syntax/* 20 | undo/* 21 | undo_recover/* 22 | view/* 23 | -------------------------------------------------------------------------------- /abbrev.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/abbrev.vim -------------------------------------------------------------------------------- /after/ftplugin/c.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------- 2 | " Vim Setting for C-files 3 | " Christian Brabandt 4 | " 5 | " Last update: Di 2013-01-15 22:38 6 | "------------------------------------------------------- 7 | " VIm Configuration for C-files 8 | 9 | " Set C-Indention 10 | set cinoptions=e0,n0,f0,{0,}0,^0,:s,=s,l1,gs,hs,ps,ts,+s,c3,C0,(2s,us,\U0,w0,m0,j0,)20,*30 11 | " set cin 12 | 13 | " Set the makeprg to `gcc -O2 -Wall -o ' 14 | "set makeprg=gcc\ -O2\ -Wall\ -o\ %<\ % 15 | 16 | " Comment text in visual mode 17 | " select a region and press ,co 18 | "vmap ,co :s/^\(.*\)/\/* \1 *\// 19 | "cmap como :s/^\(.*\)/\/* \1 *\// 20 | " and vice versa: ,uco 21 | "cmap comu :s/^\/\* \(.*\)\*\//\1/ 22 | "vmap ,uco :s/^\/\* \(.*\)\*\//\1/ 23 | -------------------------------------------------------------------------------- /after/ftplugin/csv.vim: -------------------------------------------------------------------------------- 1 | 2 | finish 3 | fun! My_CSV_Average(col) 4 | let sum=0 5 | for item in a:col 6 | let sum+=item 7 | endfor 8 | return sum/len(a:col) 9 | endfun 10 | 11 | command! -buffer -nargs=? -range=% AvgCol :echo csv#EvalColumn(, 12 | \ "My_CSV_Average", ,) 13 | -------------------------------------------------------------------------------- /after/ftplugin/help.vim: -------------------------------------------------------------------------------- 1 | ":noremap K :silent exe ':help ' . expand('') 2 | :nnoremap K :silent exe ':help ' . expand('') 3 | -------------------------------------------------------------------------------- /after/ftplugin/html.vim: -------------------------------------------------------------------------------- 1 | 2 | " htmlH\d might not exist, 3 | " so ignore errors 4 | sil! syntax region htmlFold start="<\z(\<\(area\|base\|br\|col\|command\|embed\|hr\|img\|input\|keygen\|link\|meta\|para\|source\|track\|wbr\>\)\@![a-z-]\+\>\)\%(\_s*\_[^/]\?>\|\_s\_[^>]*\_[^>/]>\)" end="" fold transparent keepend extend containedin=htmlHead,htmlH\d 5 | -------------------------------------------------------------------------------- /after/ftplugin/java.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------- 2 | " Vim Setting for Java files 3 | " Christian Brabandt 4 | " 5 | " Last update: Fr 2005-09-02 10:40 6 | "------------------------------------------------------- 7 | 8 | " VIm Configuration for Java-files 9 | " 10 | 11 | " Set Java-Indention 12 | set cinoptions=>2,e0,n0,f0,{0,}0,^0,:s,=s,l1,gs,hs,ps,ts,+s,c3,C0,(2s,us,\U0,w0,m0,j0,)20,*30 13 | set cin 14 | 15 | " Set the makeprg to `javac ' 16 | set makeprg=javac\ % 17 | 18 | 19 | " Comment text in visual mode 20 | " select a region and press ,co 21 | cmap como :s/^\(.*\)/\/* \1 *\// 22 | " and vice versa: ,uco 23 | cmap comu :s/^\/\* \(.*\)\*\//\1/ 24 | -------------------------------------------------------------------------------- /after/ftplugin/mail.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------- 2 | " Vim Setting for writing Mails 3 | " Christian Brabandt 4 | " 5 | " Last update: Do 2009-10-08 23:24 6 | "------------------------------------------------------- 7 | " Called when I am editing files 8 | 9 | "setlocal foldmethod=expr foldlevel=1 foldminlines=2 10 | "setlocal foldexpr=strlen(substitute(substitute(getline(v:lnum),'\\s','','g'),'[^>].*­','','')) 11 | "setlocal foldexpr=strlen(substitute(matchstr(getline(v:lnum),'\\v^\\s*%(\\>\\s*)+'),'\\s','','g')) 12 | "setlocal foldexpr=strlen(substitute(getline(v:lnum),'\\s*\\ze>\\\|.*','','g')) 13 | 14 | setl tw=70 15 | 16 | " I don't like desert256 for mails 17 | "colorscheme desert256 18 | " allow to automatically format messages in insert mode 19 | " see :h fo-table 20 | setl fo+=aw 21 | " instead of tabs, insert spaces 22 | setl et 23 | "au BufRead /tmp/mutt* normal :g/^> -- $/,/^$/-1d^M/^$^M^L 24 | autocmd FileType mail nmap :w:!aspell -e -c %:e 25 | 26 | " enable Spell Checking 27 | if version >= 700 28 | setl spell spelllang=de,en 29 | endif 30 | 31 | " Mail.vim Configuration 32 | " See: http://www.vim.org/scripts/script.php?script_id=99 33 | " and also :h mail.txt 34 | "map mfp MailFormatParagraph 35 | 36 | " Default File to get E-Mail Aliases from 37 | let g:mail_alias_source = "Abook" 38 | " Default mutt alias file 39 | let g:mail_mutt_alias_file = "~/.mutt/aliases" 40 | " Delete quoted Signatures 41 | " let g:mail_erase_quoted_sig = 1 42 | " Remove empty quoted lines 43 | "let g:mail_delete_empty_quoted = 1 44 | 45 | " Enable referencing of URIs as footnotes. 46 | " This is mapped to by default. Press , enter the URI enter 47 | " and enter a reference number 48 | " Pressing will move the URI on which the cursor stands 49 | " to the end of the mail and insert a Reference for that URI. 50 | source ~/.vim/plugin/uri-ref.vim 51 | 52 | 53 | " Mapping of :wq to call the spellchecking function, as I usually forget to 54 | " check what I've written down 55 | "map! q ! sed -e '/^[A-Z][a-z]*:/ D' % 56 | 57 | " Insert separator lines by using comment marker: 58 | iab Y-" 71a"A 59 | iab Y-% 71a%A 60 | iab Y-# 71a#A 61 | iab Y-! 71a!A 62 | iab Y-- 71a-A 63 | 64 | " Translate word under cursor from (English to German) 65 | map ,ed :!translate -ni 66 | " Tranlate word under cursor from (German to English) 67 | map ,de :!translate -in 68 | 69 | " Kill quoted Signature 70 | map ,dqs G?^> *-- $dG 71 | 72 | " Make Message urgent: 73 | map ,mu 1G}OPriority: urgent 74 | 75 | 76 | " Delete '(was old Subject)' in Subject 77 | map ,mds 1G/^Subject: /:s,(was: .*)$f l 78 | 79 | " Squeeze empty lines - join multiple empty lines 80 | nmap ,sl :g/^$/,/./-j 81 | 82 | " Insert an [] to indicate deleted text 83 | " Mark a Textblock in visual mode and then press ',dt' 84 | vmap ,dt c[...] 85 | vmap ,DT c> [ 86 | 87 | " Mark some lines for quotes 88 | vmap ,qq ''>o--- Quote end ---o 89 | 90 | " Mark some lines for code 91 | vmap ,cc ''>o<--- Cut here --->o 92 | 93 | " Change Subject 94 | " Change from 'Subject: old' to Subject: new (was: old) 95 | "map ,mcs 1G/^Subject: /:s,\(Subject: \)\(Re: \)*\(.*\)$,\1(was: \3),f(i 96 | 97 | "set verbose=12 98 | 99 | "ru! posting.vim 100 | " Files in $HOME/.vim/after/ftplugin/mail/ are automatically sourced, 101 | " good to know, I just found out by accident ;) 102 | "source $HOME/.vim/after/ftplugin/mail/lbdbq.vim 103 | "source $HOME/.vim/lbdbq.vim 104 | -------------------------------------------------------------------------------- /after/ftplugin/mail/format.vim: -------------------------------------------------------------------------------- 1 | 2 | " Dynamically set format options, depending on where you are in a 3 | " mail, idea from Teemu Likonen: 4 | " http://groups.google.com/group/vim_use/msg/f59e5c1adc6be2b3 5 | 6 | let d_fo = &fo 7 | let s:defaults = 'setlocal tw=72 ts=8 sts=4 sw=4 fo='.d_fo 8 | execute s:defaults 9 | let b:MailAreaDetect=1 10 | 11 | "nnoremap ma1 :call MailAreaDetect_On() 12 | " \ echo 'MailAreaDetect On' 13 | "nnoremap ma0 :call MailAreaDetect_Off() 14 | " \ echo 'MailAreaDetect Off' 15 | 16 | nnoremap :call MailAreaDetect_Switch(0) 17 | inoremap :call MailAreaDetect_Switch(1) 18 | 19 | function! s:MailAreaDetect_Switch(vmode) 20 | if b:MailAreaDetect 21 | silent call MailAreaDetect_Off() 22 | let b:MailAreaDetect=0 23 | echo 'MailAreaDetect Off' 24 | if a:vmode 25 | sleep 1 26 | endif 27 | else 28 | silent call MailAreaDetect_On() 29 | let b:MailAreaDetect=1 30 | echo 'MailAreaDetect On' 31 | if a:vmode 32 | sleep 1 33 | endif 34 | endif 35 | endfu 36 | 37 | 38 | function! s:MailAreaDetect_On() 39 | silent autocmd! MailAreaDetect CursorMoved,CursorMovedI 40 | \ call AreaOptions() 41 | let b:MailAreaDetect=1 42 | endfunction 43 | 44 | function! s:MailAreaDetect_Off() 45 | silent autocmd! MailAreaDetect 46 | execute s:defaults 47 | let b:MailAreaDetect=0 48 | endfunction 49 | 50 | augroup MailAreaDetect 51 | autocmd! 52 | call MailAreaDetect_On() 53 | augroup END 54 | 55 | function! s:AreaOptions() 56 | execute s:defaults 57 | if CheckArea('\v^From( |: ).*\n','\v^$') 58 | "echo 'Header' 59 | setlocal fo-=a fo-=w fo-=t sts=0 sw=8 noet 60 | elseif getline('.') =~ '\m^\s*>' 61 | "echo 'Quotation' 62 | setlocal fo-=a fo-=w 63 | elseif CheckArea('\m^--- .*\n^+++ ','\v(^$|\n^-- $)') 64 | "echo 'Patch' 65 | setlocal fo-=a fo-=w fo-=t sts=0 sw=8 noet 66 | elseif CheckArea('^-- $','^$') 67 | "echo 'Signature' 68 | setlocal fo-=a fo-=w fo-=t sts=0 sw=8 noet 69 | else 70 | "echo 'My text' 71 | setlocal fo+=aw et 72 | endif 73 | endfunction 74 | 75 | function! s:CheckArea(start, end) 76 | return (search(a:start,'bcnW')-line('.')) > 77 | \ (search(a:end,'bnW')-line('.')) 78 | endfunction 79 | -------------------------------------------------------------------------------- /after/ftplugin/mail/lbdbq.vim: -------------------------------------------------------------------------------- 1 | " Name: lbdbq.vim 2 | " Summary: functions and mode mappings for querying lbdb from Vim 3 | " Copyright: Copyright (C) 2007 Stefano Zacchiroli 4 | " License: GNU GPL version 3 or above 5 | " Maintainer: Stefano Zacchiroli 6 | " URL: http://www.vim.org/scripts/script.php?script_id=1757 7 | " Version: 0.3 8 | 9 | if exists("loaded_lbdbq") 10 | finish 11 | endif 12 | let loaded_lbdbq = 1 13 | 14 | " queries lbdb with a query string and return a list of pairs: 15 | " [['full name', 'email'], ['full name', 'email'], ...] 16 | function! LbdbQuery(qstring) 17 | let output = system("lbdbq '" . a:qstring . "'") 18 | let results = [] 19 | for line in split(output, "\n")[1:] " skip first line (lbdbq summary) 20 | let fields = split(line, "\t") 21 | let results += [ [fields[1], fields[0]] ] 22 | endfor 23 | return results 24 | endfunction 25 | 26 | " check if a potential query string has already been expanded in a complete 27 | " recipient. E.g.: 'Stefano Zacchiroli ' is a complete 28 | " recipient, 'stefano zacchiroli' and 'stefano' are not 29 | function! LbdbIsExpanded(qstring) 30 | return (a:qstring =~ '^\S\+@\S\+$\|<\S\+@\S\+>$') 31 | endfunction 32 | 33 | function! LbdbTrim(s) 34 | return substitute(a:s, '^\s*\(.\{-}\)\s*$', '\1', '') 35 | endfunction 36 | 37 | " expand a (short) contact given as a query string, asking interactively if 38 | " disambiguation is needed 39 | " E.g.: 'stefano zacchiroli' -> 'Stefano Zacchiroli ' 40 | function! LbdbExpandContact(qstring) 41 | let qstring = LbdbTrim(a:qstring) 42 | if LbdbIsExpanded(qstring) 43 | return qstring 44 | else " try to expand (short) contact 45 | let contacts = LbdbQuery(qstring) 46 | let contact = [] 47 | if empty(contacts) " no matching (long) contact found 48 | return qstring 49 | elseif len(contacts) > 1 " multiple matches: disambiguate 50 | echo "Choose a recipient for '" . qstring . "':" 51 | let choices = [] 52 | let counter = 0 53 | for contact in contacts 54 | let choices += [ printf("%2d. %s <%s>", counter, contact[0], contact[1]) ] 55 | let counter += 1 56 | endfor 57 | let contact = contacts[inputlist(choices)] 58 | else " len(contacts) == 1, i.e. one single match 59 | let contact = contacts[0] 60 | endif 61 | return printf("\"%s\" <%s>", escape(contact[0], '"'), contact[1]) 62 | endif 63 | endfunction 64 | 65 | " as above but support input strings composed by comma separated (short) 66 | " contacts 67 | function! LbdbExpandContacts(raw) 68 | let raw = LbdbTrim(a:raw) 69 | let qstrings = split(raw, '\s*,\s*') 70 | let exp_strings = [] 71 | for qstring in qstrings 72 | let exp_strings += [ LbdbExpandContact(qstring) ] 73 | endfor 74 | return join(exp_strings, ', ') 75 | endfunction 76 | 77 | " expand all (short) contacts on a given recipient line, asking interactively 78 | " if disambiguation is needed. 79 | " E.g.: 80 | " 'To: stefano zacchiroli, bram' 81 | " -> 'To: Stefano Zacchiroli , Bram Moolenaar 82 | function! LbdbExpandRcptLine(recpt_line) 83 | if a:recpt_line =~ '^\w\+:' " line is the *beginning* of a RFC822 field 84 | let raw = substitute(a:recpt_line, '^\w\+:\s*', '', '') 85 | let recpt_kind = substitute(a:recpt_line, '^\(\w\+\):\s*.*$', '\1', '') 86 | let exp_line = recpt_kind . ': ' . LbdbExpandContacts(raw) 87 | elseif a:recpt_line =~ '^\s\+' " line is the *continuation* of a RFC822 field 88 | let raw = substitute(a:recpt_line, '^\s\+', '', '') 89 | let lpadding = substitute(a:recpt_line, '\S.*$', '', '') 90 | let exp_line = lpadding . LbdbExpandContacts(raw) 91 | else 92 | return a:recpt_line 93 | endif 94 | if a:recpt_line =~ ',\s*$' 95 | let exp_line .= ',' 96 | endif 97 | return exp_line 98 | endfunction 99 | 100 | function! LbdbExpandCurLine() 101 | call setline(line('.'), LbdbExpandRcptLine(getline('.'))) 102 | endfunction 103 | 104 | function! LbdbExpandVisual() 105 | if visualmode() ==# 'v' 106 | normal gvy 107 | let raw = getreg('"') 108 | let expanded = '' 109 | if raw =~ "," 110 | let expanded = LbdbExpandContacts(raw) 111 | else 112 | let expanded = LbdbExpandContact(raw) 113 | endif 114 | call setreg('"', expanded) 115 | normal gvP 116 | elseif visualmode() ==# 'V' 117 | call LbdbExpandCurLine() 118 | end 119 | endfunction 120 | 121 | nmap lb :call LbdbExpandCurLine() 122 | vmap lb :call LbdbExpandVisual() 123 | imap lb :call LbdbExpandCurLine()A 124 | -------------------------------------------------------------------------------- /after/ftplugin/mail/lbdbq_complete.vim: -------------------------------------------------------------------------------- 1 | " It seems that when you've started completion, vim chooses to ignore 2 | " these mappings. That means we can simply 'invoke' the preferred 3 | " completion method and then C-n and C-p will behave as they should while 4 | " the menu is present 5 | ino 6 | ino 7 | 8 | 9 | fun! LBDBCompleteFn(findstart, base) 10 | if a:findstart 11 | " locate the start of the word 12 | let line = getline('.') 13 | let start = col('.') - 1 14 | while start > 0 && line[start - 1] =~ '[^:,]' 15 | let start -= 1 16 | endwhile 17 | while start < col('.') && line[start] =~ '[:, ]' 18 | let start += 1 19 | endwhile 20 | return start 21 | else 22 | let res = [] 23 | let query = substitute(a:base, '"', '', 'g') 24 | let query = substitute(query, '\s*<.*>\s*', '', 'g') 25 | for m in LbdbQuery(query) 26 | call add(res, printf('"%s" <%s>', escape(m[0], '"'), m[1])) 27 | endfor 28 | return res 29 | endif 30 | endfun 31 | 32 | set completefunc=LBDBCompleteFn 33 | -------------------------------------------------------------------------------- /after/ftplugin/perl.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------- 2 | " Vim Settings for Perl files 3 | " Christian Brabandt 4 | " 5 | " Last update: Fr 2006-09-29 00:55 6 | "------------------------------------------------------- 7 | 8 | " Set Perl-Indention 9 | "set cinoptions=>2,e0,n0,f0,{0,}0,^0,:s,=s,l1,gs,hs,ps,ts,+s,c3,C0,(2s,us,\U0,w0,m0,j0,)20,*30 10 | "set cin 11 | 12 | " Set the makeprg to `perl -W -c ' 13 | set makeprg=perl\ -W\ -c\ %< 14 | 15 | " Comment text in visual mode 16 | " select a region and press ,co 17 | cmap como :s/^/# / 18 | " and vice versa: ,uco 19 | cmap comu :s/^# // 20 | 21 | " Set Smartindent and Tabstop=4 (I do not like soo wide indents) 22 | set smartindent ts=4 23 | 24 | " Foldmethod: Marker 25 | set foldmethod=marker 26 | -------------------------------------------------------------------------------- /after/ftplugin/php.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------- 2 | " Vim Setting for PHP-files 3 | " Christian Brabandt 4 | " 5 | " Last update: Do 2012-07-05 13:34 6 | "------------------------------------------------------- 7 | 8 | " Set C-Indention 9 | set cinoptions=>2,e0,n0,f0,{0,}0,^0,:s,=s,l1,gs,hs,ps,ts,+s,c3,C0,(2s,us,\U0,w0,m0,j0,)20,*30 10 | set cin 11 | 12 | " Comment text in visual mode 13 | function! UnComment() 14 | let s:oldSearch=@/ 15 | s/^\/\/\(.*\)$/\1/ 16 | let @/=s:oldSearch 17 | endfunction 18 | function! Comment() 19 | let s:oldSearch=@/ 20 | s/^[^//].*$/\/\/&/ 21 | let @/=s:oldSearch 22 | endfunction 23 | vmap co :sil! '<,'>:call Comment() 24 | vmap uco :sil! '<,'>:call UnComment() 25 | 26 | let g:nrrw_custom_options={} 27 | let g:nrrw_custom_options['filetype']='php' 28 | -------------------------------------------------------------------------------- /after/ftplugin/qf.vim: -------------------------------------------------------------------------------- 1 | " When hitting Enter in the quickfix window 2 | " use the last active window and not an arbitrary one 3 | 4 | nnoremap :call QfEnter() 5 | 6 | function! QfEnter() 7 | let l:lnum = line('.') 8 | let qf = IsQuickfix() 9 | wincmd p 10 | if qf 11 | exe 'cc' l:lnum 12 | else 13 | exe 'll' l:lnum 14 | endif 15 | endfunction 16 | 17 | function! IsQuickfix() 18 | redir => buffers| exe "sil ls"| redir END 19 | 20 | let nr = bufnr('%') 21 | for buf in split(buffers, '\n') 22 | if match(buf, '^\s*'.nr) > -1 23 | if match(buf, '\cQuickfix') > -1 24 | return 1 25 | else 26 | return 0 27 | endif 28 | endif 29 | endfor 30 | return 0 31 | endfunction 32 | -------------------------------------------------------------------------------- /after/ftplugin/tex.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/after/ftplugin/tex.vim -------------------------------------------------------------------------------- /after/ftplugin/vim.vim: -------------------------------------------------------------------------------- 1 | ":noremap K :silent exe ':help ' . expand('') 2 | :nnoremap K :silent exe ':help ' . expand('') 3 | -------------------------------------------------------------------------------- /after/syntax/tex.vim: -------------------------------------------------------------------------------- 1 | syn keyword globalTodo contained XXX TODO NB FIXME WARN 2 | syn cluster texCommentGroup add=globalTodo 3 | hi link globalTodo Todo 4 | -------------------------------------------------------------------------------- /autoload/DynamicSigns/0.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/0.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/1.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/2.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/3.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/3.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/4.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/5.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/5.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/6.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/6.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/7.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/7.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/8.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/9.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/9.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/A.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/A.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/B.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/B.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/C.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/C.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/D.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/D.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/E.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/E.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/F.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/F.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/G.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/G.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/H.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/H.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/I.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/I.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/J.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/J.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/K.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/K.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/L.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/L.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/M.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/M.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/N.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/N.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/O.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/O.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/P.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/P.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/Q.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/Q.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/R.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/R.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/S.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/S.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/T.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/T.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/U.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/U.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/V.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/V.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/W.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/W.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/X.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/X.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/Y.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/Y.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/Z.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/Z.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/add.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/add.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/arrow-right.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/arrow-right.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/checkmark.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/checkmark.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/delete.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/delete.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/error.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/error.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/flag-yellow.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/flag-yellow.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/license_designkode.txt: -------------------------------------------------------------------------------- 1 | URL: http://www.designkode.com/blog/free-developer-icons 2 | License: Creative Commons (Attribution 3.0 Unported) 3 | "DesignKode is releasing this set of 40 free high quality icons for your web site and application GUI designs. All icons in this set are 32 x 32 pixel PNG image files. You may freely use these icons in your commercial or personal projects without attribution." 4 | -------------------------------------------------------------------------------- /autoload/DynamicSigns/license_red-orb.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/license_red-orb.txt -------------------------------------------------------------------------------- /autoload/DynamicSigns/stop.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/stop.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/thumbtack-yellow.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/thumbtack-yellow.bmp -------------------------------------------------------------------------------- /autoload/DynamicSigns/warning.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/DynamicSigns/warning.bmp -------------------------------------------------------------------------------- /autoload/digraph.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/autoload/digraph.vim -------------------------------------------------------------------------------- /autoload/misc.vim: -------------------------------------------------------------------------------- 1 | fu! misc#List(command) 2 | if a:command == 'scriptnames' 3 | redir => a|exe "sil! scriptnames"|redir end 4 | let b = split(a, "\n") 5 | call map(b, 'matchstr(v:val, ''^\s*\d\+:\s\+\zs.*'')') 6 | call map(b, 'fnamemodify(v:val, '':p'')') 7 | elseif a:command == 'oldfiles' 8 | let b = v:oldfiles 9 | endif 10 | let loclist = [] 11 | for file in b 12 | call add(loclist, {"filename": file, 13 | \ "lnum": 1}) 14 | endfor 15 | call setloclist(0, loclist) 16 | lopen 17 | endfu 18 | 19 | fu! Interpolate(p, fro, to) 20 | return a:fro + a:p * (a:to - a:fro) 21 | endfunction 22 | 23 | function OnCursorMoved1() 24 | if !(&cul || &rnu) 25 | return 26 | endif 27 | let endLNr = line('$') 28 | if endLNr == 1 29 | let endLNr = 2 30 | endif 31 | let colors = [ [33, 196, 0], 32 | \ [235, 235, 54], 33 | \ [230, 28, 28]] 34 | let fg_colors = ['white', 'black', 'white'] 35 | 36 | let p = (line('.') - 1) * 1.0 / (endLNr - 1) 37 | 38 | let fg_color_index = float2nr(p * len(fg_colors) - 0.001) 39 | let fg_color = fg_colors[fg_color_index] 40 | 41 | let color_index_from = float2nr(p * (len(colors) - 1) - 0.001) 42 | let color_index_to = color_index_from + 1 43 | let p2 = (p * (len(colors) - 1 )) - color_index_from 44 | 45 | let color_from = colors[color_index_from] 46 | let color_to = colors[color_index_to] 47 | 48 | let r = float2nr(Interpolate(p2, color_from[0], color_to[0]) ) 49 | let g = float2nr(Interpolate(p2, color_from[1], color_to[1]) ) 50 | let b = float2nr(Interpolate(p2, color_from[2], color_to[2]) ) 51 | 52 | let c = printf('%02x%02x%02x', r, g, b) 53 | exe 'hi CursorLineNr guibg=#'.c.' guifg='.fg_color 54 | endfunction 55 | 56 | function misc#CursorLineNrAdjustment() 57 | if has("gui_running") 58 | aug CursorLineNr 59 | au! 60 | au CursorMoved * call OnCursorMoved1() 61 | augroup END 62 | else 63 | aug CursorLineNr 64 | au GUIEnter * call misc#CursorLineNrAdjustment() 65 | aug END 66 | endif 67 | endfu 68 | -------------------------------------------------------------------------------- /autoload/nwo/magic.vim: -------------------------------------------------------------------------------- 1 | " File: makemagic.vim 2 | " Created: 2011 Apr 18 3 | " Last Change: 2012 Dec 19 4 | " Rev Days: 4 5 | " Author: Andy Wokula 6 | " License: Vim License, see :h license 7 | " Version: 0.1 8 | 9 | "" Comments {{{ 10 | 11 | " nwo#magic#MakeMagic({pat}) 12 | " 13 | " remove embedded switches (\v, \m, \M and \V) from pattern {pat} by 14 | " converting {pat} into a purely magic pattern. Return the converted 15 | " pattern. 16 | " 17 | 18 | " TODO 19 | " - recognize [#-\\]], with spaces: [ #-\ \] ] 20 | " (collection ends at second ']') 21 | 22 | " 2011 Nov 01 copied from asneeded\makemagic.vim 23 | " now asneeded\nwo\makemagic.vim (comments there!) 24 | "}}} 25 | 26 | " Init Folklore {{{ 27 | let s:cpo_save = &cpo 28 | set cpo&vim 29 | let g:nwo#magic#loaded = 1 30 | "}}} 31 | 32 | func! nwo#magic#MakeMagic(pat, ...) "{{{ 33 | " {pat} (string) 34 | " {a:1} (boolean) initial magic mode (default follows the 'magic' option) 35 | 36 | if a:0>=1 ? a:1 : &magic 37 | let magic_mode = 'm' 38 | let bracket_is_magic = 1 39 | else 40 | let magic_mode = 'M' 41 | let bracket_is_magic = 0 42 | endif 43 | let result_pat = '' 44 | let endpos = strlen(a:pat) 45 | 46 | let spos = 0 47 | while spos >= 0 && spos < endpos 48 | let mc1 = a:pat[spos] 49 | let mc2 = a:pat[spos+1] 50 | 51 | let collection = 0 52 | if mc1 == '\' 53 | if mc2 == '[' && !bracket_is_magic 54 | let collection = 1 55 | let spos += 1 56 | elseif mc2 =~ '[vmMV]' 57 | let magic_mode = mc2 58 | let bracket_is_magic = mc2 =~# '[vm]' 59 | let spos += 2 60 | elseif mc2 == '_' 61 | let mc3 = a:pat[spos+2] 62 | if mc3 == '[' 63 | let collection = 1 64 | endif 65 | endif 66 | elseif mc1 == '[' && bracket_is_magic 67 | let collection = 1 68 | endif 69 | 70 | if collection 71 | let nextpos = matchend(a:pat, s:collection_skip_pat, spos) 72 | if nextpos >= 0 73 | let magpart = strpart(a:pat, spos, nextpos-spos) 74 | else 75 | let magpart = strpart(a:pat, spos) 76 | endif 77 | else 78 | let nextpos = match(a:pat, s:switchpat[magic_mode], spos) 79 | if nextpos >= 0 80 | if nextpos == spos 81 | continue " optional 82 | endif 83 | let part = strpart(a:pat, spos, nextpos-spos) 84 | else 85 | let part = strpart(a:pat, spos) 86 | endif 87 | if magic_mode ==# 'v' 88 | let magpart = substitute(part, s:vmagic_items_pat, '\=s:ToggleVmagicBslash(submatch(0))', 'g') 89 | elseif magic_mode ==# 'm' 90 | let magpart = part 91 | elseif magic_mode ==# 'M' 92 | let s:rem_bslash_before = '.*[~' 93 | " the first two branches are only to eat the matches: 94 | let magpart = substitute(part, '\\%\[\|\\_\\\=.\|\\.\|[.*[~]', '\=s:ToggleBslash(submatch(0))', 'g') 95 | elseif magic_mode ==# 'V' 96 | let s:rem_bslash_before = '^$.*[~' 97 | let magpart = substitute(part, '\\%\[\|\\_\\\=.\|\\.\|[\^$.*[~]', '\=s:ToggleBslash(submatch(0))', 'g') 98 | endif 99 | endif 100 | 101 | let result_pat .= magpart 102 | let spos = nextpos 103 | endwhile 104 | 105 | return result_pat 106 | endfunc "}}} 107 | 108 | " s:variables {{{ 109 | 110 | " pattern to match very magic items: 111 | let s:vmagic_items_pat = '\\.\|%\%([#$(UV[\^cdlouvx]\|''.\|[<>]\%(''.\|[clv]\)\)\|[&()+<=>?|]\|@\%([!=>]\|<[!=]\)\|{' 112 | 113 | " not escaped - require an even number of '\' (zero or more) to the left: 114 | let s:not_escaped = '\%(\%(^\|[^\\]\)\%(\\\\\)*\)\@<=' 115 | 116 | " prohibit an unescaped match for '%' before what follows (used when trying 117 | " to find '[', but not '%[', :h /\%[ ) 118 | let s:not_vmagic_opt_atoms = '\%(\%(^\|[^\\]\)\%(\\\\\)*%\)\@\)*]' 133 | 134 | " }}} 135 | 136 | " for magic modes 'V' and 'M' 137 | func! s:ToggleBslash(patitem) "{{{ 138 | " {patitem} magic char or '\'.char 139 | if a:patitem =~ '^.$' 140 | return '\'.a:patitem 141 | else 142 | let mchar = matchstr(a:patitem, '^\\\zs.') 143 | if stridx(s:rem_bslash_before, mchar) >= 0 144 | return mchar 145 | else 146 | return a:patitem 147 | endif 148 | endif 149 | endfunc "}}} 150 | 151 | func! s:ToggleVmagicBslash(patitem) "{{{ 152 | " {patitem} magic char or '\'.char 153 | if a:patitem =~ '^\\' 154 | let mchar = a:patitem[1] 155 | if mchar =~ '[\^$.*[\]~\\[:alnum:]_]' 156 | return a:patitem 157 | else 158 | return mchar 159 | endif 160 | else 161 | return '\'.a:patitem 162 | endif 163 | endfunc "}}} 164 | 165 | " Modeline: {{{1 166 | let &cpo = s:cpo_save 167 | unlet s:cpo_save 168 | " vim:ts=8:fdm=marker: 169 | -------------------------------------------------------------------------------- /autoload/savesigns.vim: -------------------------------------------------------------------------------- 1 | " savesigns.vim - Vim global plugin for saving Signs 2 | " ------------------------------------------------------------- 3 | " Last Change: Mon, 19 Aug 2013 22:00:35 +0200 4 | 5 | 6 | " Maintainer: Christian Brabandt 7 | " Version: 0.5 8 | " Copyright: (c) 2009 by Christian Brabandt 9 | " The VIM LICENSE applies to histwin.vim 10 | " (see |copyright|) except use "savesigns.vim" 11 | " instead of "Vim". 12 | " No warranty, express or implied. 13 | " *** *** Use At-Your-Own-Risk! *** *** 14 | " 15 | " TODO: - write documentation 16 | 17 | " Init: 18 | let s:cpo= &cpo 19 | set cpo&vim 20 | 21 | fu! Output(mess, hi)"{{{ 22 | exe "echohl" a:hi 23 | echomsg a:mess 24 | sleep 2 25 | echohl "Normal" 26 | endfu"}}} 27 | 28 | fu! savesigns#ParseSignsOutput(...) 29 | if !has("signs") 30 | call Output("Aborting, because your vim does not support Signs", "ErrorMsg") 31 | return 32 | endif 33 | 34 | let s:signs=[] 35 | let s:signdict={} 36 | 37 | " Get Highlighting of SignColumn 38 | redir => a 39 | sil hi SignColumn 40 | redir end 41 | 42 | let hi=split(a, '\n')[0] 43 | let hi=substitute(hi, "^", "hi! ", "") 44 | let hi=substitute(hi, '\s\+xxx\s\+', " ", "") 45 | let s:signs = [ '" Highlighting Definition of Signs', 46 | \ hi, 47 | \ ''] 48 | 49 | 50 | " Get Definition of Signs 51 | redir => a 52 | sil sign list 53 | redir end 54 | 55 | call add(s:signs, '" Define Signs') 56 | let s:signs += split(a, '\n') 57 | call map(s:signs, 'substitute(v:val, "^sign", "& define", "")') 58 | let s:signs += [ '', '" Define Placement of Signs' ] 59 | 60 | 61 | " Get placement of signs 62 | redir => a 63 | sil sign place 64 | redir end 65 | 66 | let list=split(a, '\n')[1:] 67 | call filter(list, "!empty(v:val)") 68 | let fname="" 69 | let pat='^Signs for \zs.*\ze:' 70 | for val in list 71 | if match(val, pat) >= 0 72 | let fname=fnamemodify(matchstr(val, pat), ':p') 73 | let s:signdict[fname]=[] 74 | else 75 | let place=split(val, '\s\+') 76 | if place[2] =~ '\[Deleted\]' 77 | continue 78 | endif 79 | call add(s:signdict[fname], "\tsign place " . matchstr(place[1],'id=\zs.*') . " " . place[0] . " " . place[2] . " file=".fname ) 80 | endif 81 | endfor 82 | for file in keys(s:signdict) 83 | call insert(s:signdict[file], "if bufexists('" . file . "')") 84 | call add(s:signdict[file], "endif") 85 | endfor 86 | call CreateSignFiles(empty(a:1) ? '' : a:1, empty(a:2) ? 0 : 1) 87 | endfu 88 | 89 | fun! CreateSignFiles(fname, force) 90 | if !empty(s:signs) && !empty(keys(s:signdict)) 91 | if !empty(a:fname) && !isdirectory(a:fname) && (a:force || !filereadable(a:fname)) 92 | let filename=a:fname 93 | else 94 | if filereadable(a:fname) 95 | call Output("File " . a:fname . " exists! Creating new file. Use '!' to override.", "WarningMsg") 96 | endif 97 | let filename=tempname() 98 | endif 99 | 100 | if bufloaded(filename) && bufwinnr(filename) > 0 101 | exe bufwinnr(filename) . "wincmd w" 102 | else 103 | exe ":sp" filename 104 | endif 105 | %d _ 106 | 107 | call append('.', [ '" Source this file, to reload all signs', 108 | \'" Signs that are defined for files which are currently not loaded', 109 | \'" will not be restored!', 110 | \'', 111 | \'" Check for +sign Feature', 112 | \'if !has("signs") | finish | endif ', 113 | \'', 114 | \'" Remove all previously placed signs', 115 | \'sign unplace *', 116 | \'', 117 | \'" Undefine all previously defined signs' , 118 | \'redir => s:a | exe "sil sign list" | redir end', 119 | \'let s:signlist=split(s:a, "\n")', 120 | \"call map(s:signlist, '\"sign undefine \" . split(v:val, ''\\s\\+'')[1]')", 121 | \'for sign in s:signlist | exe sign | endfor ', 122 | \'unlet s:signlist s:a', 123 | \'']) 124 | $ 125 | call append('.',s:signs) 126 | for file in keys(s:signdict) 127 | call append('$', s:signdict[file]) 128 | endfor 129 | setf vim 130 | 1 131 | d 132 | "setl nomodified 133 | else 134 | call Output("No Signs Defined. Nothing to do", "WarningMsg") 135 | endif 136 | endfun 137 | 138 | " Restore:"{{{ 139 | let &cpo=s:cpo 140 | unlet s:cpo"}}} 141 | " vim: ts=4 sts=4 fdm=marker com+=l\:\" 142 | -------------------------------------------------------------------------------- /autoload/screencapture.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "Starting recording: `date -R`" >&2 3 | echo "Parameters: $@" >&2 4 | echo "==============================" >&2 5 | $@ & 6 | # return pid of screen capturing process so we can kill it later 7 | echo $! 8 | -------------------------------------------------------------------------------- /autoload/sudo.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | 4 | :: File to write to 5 | set mode=%1 6 | set myfile=%2 7 | set newcontent=%3 8 | set sudo=%4 9 | shift 10 | shift 11 | shift 12 | shift 13 | 14 | :: Use runas or something alike to elevate priviliges, but 15 | :: first parse parameter for runas 16 | :: Windows cmd.exe is very clumsy to use ;( 17 | set params=%1 18 | :LOOP 19 | shift 20 | if [%1]==[] goto AFTERLOOP 21 | set params=%params% %1 22 | goto LOOP 23 | 24 | :AFTERLOOP 25 | 26 | :: Use runas or so to elevate rights 27 | echo. 28 | echo *************************************** 29 | echo Calling %sudo% for Privilege Escalation 30 | echo *************************************** 31 | if '%mode%' == 'write' ( 32 | %sudo% %params% " %COMSPEC% /c copy /Y %newcontent% %myfile% " 33 | ) else ( 34 | %sudo% %params% " %COMSPEC% /c copy /Y %myfile% %newcontent% " 35 | ) 36 | exit /B %ERRORLEVEL% 37 | -------------------------------------------------------------------------------- /autoload/vertfold.vim: -------------------------------------------------------------------------------- 1 | " vertfold.vim - Vertical folding plugin for Vim 2 | " ------------------------------------------------------------- 3 | " Version: 0.1 4 | " Maintainer: Christian Brabandt 5 | " Last Change: Fri, 10 Dec 2010 15:16:29 +0100 6 | " 7 | " Script: http://www.vim.org/scripts/script.php?script_id=???? 8 | " Copyright: (c) 2009, 2010, 2011 by Christian Brabandt 9 | " The VIM LICENSE applies to vertfold.vim 10 | " (see |copyright|) except use "vertfold.vim" 11 | " instead of "Vim". 12 | " No warranty, express or implied. 13 | " *** *** Use At-Your-Own-Risk! *** *** 14 | " GetLatestVimScripts: ???? 1 :AutoInstall: vertfold.vim 15 | " 16 | " Functions: 17 | 18 | fun! WarningMsg(msg) "{{{1 19 | let msg = "VertFold: " . a:msg 20 | echohl WarningMsg 21 | if exists(":unsilent") == 2 22 | unsilent echomsg msg 23 | else 24 | echomsg msg 25 | endif 26 | sleep 1 27 | echohl Normal 28 | let v:errmsg = msg 29 | endfun 30 | 31 | fun! Init() "{{{1 32 | if !has("conceal") 33 | call WarningMsg("Your vim does not support concealing of items!") 34 | throw "vertfold:return" 35 | endif 36 | " check the value of conceallevel 37 | if !&cole 38 | setl cole=2 cocu=nc 39 | endif 40 | " Customizations 41 | " Character to show instead of the folded text 42 | let s:cchar='+' 43 | endfu! 44 | 45 | fun! vertfold#VertFoldCol() "{{{1 46 | try 47 | call Init() 48 | catch /vertfold:return/ 49 | return 1 50 | endtry 51 | let vstart = getpos("'<")[1:2] 52 | let vend = getpos("'>")[1:2] 53 | if vend[1] == pow(2,31)-1 54 | let vend[1] = col('$') 55 | endif 56 | call WarningMsg("Concealing columns " . vstart[1] . " - " . vend[1]) 57 | let pat = '/\%' . vstart[1] . 'c.*\%' . vend[1] . 'c/' 58 | call SynConceal(pat) 59 | endfun 60 | 61 | fun! vertfold#VertFoldPat(pat) "{{{1 62 | try 63 | call Init() 64 | let tpat = substitute(pat, '^\(.\)\(.*\)\1$', '\2', '') 65 | if tpat = pat 66 | throw "vertfold:E684" 67 | endif 68 | catch /vertfold:return/ 69 | return 1 70 | catch /vertfold:E684/ " catch error index out of bounds 71 | call WarningMsg("Error! Usage :VFold /pattern/") 72 | return 1 73 | endtry 74 | call WarningMsg("Concealing pattern " . a:pat) 75 | let pat = '/' . a:pat . '/' 76 | call SynConceal(pat) 77 | endfun 78 | 79 | fun! vertfold#VertFoldClear() "{{{1 80 | syn enable 81 | " Is this really necessary? 82 | "redir=>a | silent syn | redir end 83 | "if a=="No Syntax items defined for this buffer" 84 | " syn off 85 | "endif 86 | "hi clear VertFoldCol 87 | endfun 88 | 89 | fun! SynConceal(pattern) "{{{1 90 | if !exists("s:items") 91 | let s:items=1 92 | else 93 | let s:items+=1 94 | endif 95 | "exe 'syn match VertFoldCol' . s:items . ' ' . a:pattern 'transparent conceal contains=ALL cchar=' . s:cchar 96 | exe "syn match VertFoldCol" a:pattern "transparent conceal contains=ALL cchar=" . s:cchar 97 | endfun 98 | 99 | " Modeline {{{1 100 | " vim: ts=4 sts=4 fdm=marker com+=l\:\" fdl=0 101 | -------------------------------------------------------------------------------- /colors/black_angus.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: Angus Salkeld 3 | " Last Change: 14 September 2004 4 | " Version: 1.0 5 | " mainly green on black 6 | 7 | set background=dark 8 | highlight clear 9 | if exists("syntax_on") 10 | syntax reset 11 | endif 12 | 13 | let g:colors_name = "black_angus" 14 | 15 | " GUI 16 | " ----------------------------------------------------------------------- 17 | highlight Normal guifg=Grey80 guibg=Black 18 | highlight Search guifg=brown gui=reverse 19 | highlight Visual guifg=Grey25 gui=bold 20 | highlight Cursor guifg=Yellow guibg=DarkGreen gui=bold 21 | highlight DiffAdd guibg=#000080 gui=NONE 22 | highlight DiffChange guibg=#800080 gui=NONE 23 | highlight DiffDelete guifg=#80c0e0 guibg=#404040 gui=NONE 24 | highlight DiffText guifg=Black guibg=#c0e080 gui=NONE 25 | 26 | " Console 27 | " ----------------------------------------------------------------------- 28 | highlight Normal ctermfg=LightGrey ctermbg=Black 29 | highlight Search ctermfg=Brown cterm=reverse 30 | highlight Visual cterm=reverse 31 | highlight Cursor ctermfg=Yellow ctermbg=Green cterm=bold 32 | 33 | " both 34 | " ----------------------------------------------------------------------- 35 | highlight StatusLine guifg=LightGreen guibg=#003300 gui=none ctermfg=LightGreen ctermbg=DarkGreen term=none 36 | highlight VertSplit guifg=LightGreen guibg=#003300 gui=none ctermfg=LightGreen ctermbg=DarkGreen term=none 37 | highlight Folded guifg=#aaDDaa guibg=#333333 gui=none ctermfg=LightGray ctermbg=DarkGray term=none 38 | highlight FoldColumn guifg=LightGreen guibg=#003300 gui=none ctermfg=LightGreen ctermbg=DarkGreen term=none 39 | highlight SignColumn guifg=LightGreen guibg=#003300 gui=none ctermfg=LightGreen ctermbg=DarkGreen term=none 40 | highlight WildMenu guifg=LightGreen guibg=#003300 gui=none ctermfg=LightGreen ctermbg=DarkGreen term=none 41 | 42 | highlight LineNr guifg=DarkGreen guibg=Black gui=none ctermfg=DarkGreen ctermbg=Black term=none 43 | highlight Directory guifg=LightGreen ctermfg=LightGreen 44 | highlight Comment guifg=DarkGrey ctermfg=DarkGray 45 | 46 | highlight Special guifg=Orange ctermfg=Brown 47 | highlight Title guifg=Orange ctermfg=Brown 48 | highlight Tag guifg=DarkRed ctermfg=DarkRed 49 | highlight link Delimiter Special 50 | highlight link SpecialChar Special 51 | highlight link SpecialComment Special 52 | highlight link SpecialKey Special 53 | highlight link NonText Special 54 | 55 | highlight Error guifg=White guibg=DarkRed gui=none ctermfg=White ctermbg=DarkRed cterm=none 56 | highlight Debug guifg=White guibg=DarkGreen gui=none ctermfg=White ctermbg=DarkRed cterm=none 57 | highlight ErrorMsg guifg=White guibg=DarkBlue gui=none ctermfg=White ctermbg=DarkRed cterm=none 58 | highlight WarningMsg guifg=White guibg=DarkBlue gui=none ctermfg=White ctermbg=DarkBlue cterm=none 59 | highlight Todo guifg=White guibg=DarkYellow gui=none ctermfg=White ctermbg=DarkBlue cterm=none 60 | highlight link cCommentStartError WarningMsg 61 | highlight link cCommentError Debug 62 | 63 | " Preprocesor 64 | highlight PreCondit guifg=Cyan3 ctermfg=Cyan 65 | highlight PreProc guifg=Magenta ctermfg=Magenta 66 | highlight Include guifg=DarkCyan ctermfg=DarkCyan 67 | highlight ifdefIfOut guifg=DarkGray ctermfg=DarkGray 68 | highlight link Macro Include 69 | highlight link Define Include 70 | 71 | " lang 72 | highlight Function guifg=#AAEEAA gui=none ctermfg=LightGreen 73 | highlight Identifier guifg=#bbccbb gui=none ctermfg=Grey 74 | highlight Statement guifg=LightGreen gui=underline ctermfg=LightGreen 75 | highlight Operator guifg=Yellow gui=none ctermfg=Yellow 76 | highlight Conditional guifg=lightslateblue gui=none ctermfg=LightBlue 77 | 78 | highlight link Exception Statement 79 | highlight link Label Statement 80 | highlight link Repeat Conditional 81 | 82 | highlight link Keyword Label 83 | 84 | highlight Constant guifg=LightGreen ctermfg=LightGreen gui=none 85 | highlight link Character Constant 86 | highlight link Number Constant 87 | highlight link Boolean Constant 88 | highlight link String Constant 89 | highlight link Float Constant 90 | 91 | highlight Type guifg=DarkGreen ctermfg=DarkGreen gui=none 92 | highlight link StorageClass Type 93 | highlight link Structure Type 94 | highlight link Typedef Type 95 | 96 | " ------------------------------------------------------------------------------ 97 | " Common groups that link to other highlighting definitions. 98 | highlight link Search IncSearch 99 | highlight link Question Statement 100 | highlight link VisualNOS Visual 101 | " ------------------------------------------------------------------------------ 102 | 103 | " only for vim 5 104 | if has("unix") 105 | if v:version<600 106 | highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE 107 | highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold 108 | highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=Grey25 gui=bold 109 | highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue 110 | highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue 111 | endif 112 | endif 113 | -------------------------------------------------------------------------------- /colors/bubblegum-256-dark.vim: -------------------------------------------------------------------------------- 1 | " Bubblegum 256 Dark 2 | " Author: baskerville 3 | " URL: github.com/baskerville/bubblegum 4 | " Created: 2011 5 | " Version: 0.3 6 | 7 | hi clear 8 | 9 | if exists("syntax_on") 10 | syntax reset 11 | endif 12 | 13 | let g:colors_name="bubblegum-256-dark" 14 | 15 | 16 | " Main 17 | hi Normal ctermfg=249 ctermbg=235 cterm=none guifg=#B2B2B2 guibg=#262626 gui=none 18 | hi Comment ctermfg=244 ctermbg=235 cterm=none guifg=#808080 guibg=#262626 gui=none 19 | 20 | " Constant 21 | hi Constant ctermfg=186 ctermbg=235 cterm=none guifg=#D7D787 guibg=#262626 gui=none 22 | hi String ctermfg=187 ctermbg=235 cterm=none guifg=#D7D7AF guibg=#262626 gui=none 23 | hi Character ctermfg=187 ctermbg=235 cterm=none guifg=#D7D7AF guibg=#262626 gui=none 24 | hi Number ctermfg=180 ctermbg=235 cterm=none guifg=#D7AF87 guibg=#262626 gui=none 25 | hi Boolean ctermfg=187 ctermbg=235 cterm=none guifg=#D7D7AF guibg=#262626 gui=none 26 | hi Float ctermfg=180 ctermbg=235 cterm=none guifg=#D7AF87 guibg=#262626 gui=none 27 | 28 | " Variable Name 29 | hi Identifier ctermfg=182 ctermbg=235 cterm=none guifg=#D7AFD7 guibg=#262626 gui=none 30 | hi Function ctermfg=182 ctermbg=235 cterm=none guifg=#D7AFD7 guibg=#262626 gui=none 31 | 32 | " Statement 33 | hi Statement ctermfg=110 ctermbg=235 cterm=none guifg=#87AFD7 guibg=#262626 gui=none 34 | hi Conditional ctermfg=110 ctermbg=235 cterm=none guifg=#87AFD7 guibg=#262626 gui=none 35 | hi Repeat ctermfg=110 ctermbg=235 cterm=none guifg=#87AFD7 guibg=#262626 gui=none 36 | hi Label ctermfg=110 ctermbg=235 cterm=none guifg=#87AFD7 guibg=#262626 gui=none 37 | hi Operator ctermfg=110 ctermbg=235 cterm=none guifg=#87AFD7 guibg=#262626 gui=none 38 | hi Keyword ctermfg=110 ctermbg=235 cterm=none guifg=#87AFD7 guibg=#262626 gui=none 39 | hi Exception ctermfg=110 ctermbg=235 cterm=none guifg=#87AFD7 guibg=#262626 gui=none 40 | 41 | " Preprocessor 42 | hi PreProc ctermfg=150 ctermbg=235 cterm=none guifg=#AFD787 guibg=#262626 gui=none 43 | hi Include ctermfg=150 ctermbg=235 cterm=none guifg=#AFD787 guibg=#262626 gui=none 44 | hi Define ctermfg=150 ctermbg=235 cterm=none guifg=#AFD787 guibg=#262626 gui=none 45 | hi Macro ctermfg=150 ctermbg=235 cterm=none guifg=#AFD787 guibg=#262626 gui=none 46 | hi PreCondit ctermfg=150 ctermbg=235 cterm=none guifg=#AFD787 guibg=#262626 gui=none 47 | 48 | " Type 49 | hi Type ctermfg=146 ctermbg=235 cterm=none guifg=#AFAFD7 guibg=#262626 gui=none 50 | hi StorageClass ctermfg=146 ctermbg=235 cterm=none guifg=#AFAFD7 guibg=#262626 gui=none 51 | hi Structure ctermfg=146 ctermbg=235 cterm=none guifg=#AFAFD7 guibg=#262626 gui=none 52 | hi Typedef ctermfg=146 ctermbg=235 cterm=none guifg=#AFAFD7 guibg=#262626 gui=none 53 | 54 | " Special 55 | hi Special ctermfg=174 ctermbg=235 cterm=none guifg=#D78787 guibg=#262626 gui=none 56 | hi SpecialChar ctermfg=174 ctermbg=235 cterm=none guifg=#D78787 guibg=#262626 gui=none 57 | hi Tag ctermfg=174 ctermbg=235 cterm=none guifg=#D78787 guibg=#262626 gui=none 58 | hi Delimiter ctermfg=174 ctermbg=235 cterm=none guifg=#D78787 guibg=#262626 gui=none 59 | hi SpecialComment ctermfg=174 ctermbg=235 cterm=none guifg=#D78787 guibg=#262626 gui=none 60 | hi Debug ctermfg=174 ctermbg=235 cterm=none guifg=#D78787 guibg=#262626 gui=none 61 | hi Underlined ctermfg=249 ctermbg=235 cterm=underline guifg=#B2B2B2 guibg=#262626 gui=underline 62 | hi Ignore ctermfg=235 ctermbg=235 cterm=none guifg=#262626 guibg=#262626 gui=none 63 | hi Error ctermfg=231 ctermbg=167 cterm=none guifg=#FFFFFF guibg=#D75F5F gui=none 64 | hi Todo ctermfg=244 ctermbg=235 cterm=none guifg=#808080 guibg=#262626 gui=none 65 | 66 | " Window 67 | hi StatusLine ctermfg=249 ctermbg=237 cterm=none guifg=#B2B2B2 guibg=#3A3A3A gui=none 68 | hi StatusLineNC ctermfg=244 ctermbg=237 cterm=none guifg=#808080 guibg=#3A3A3A gui=none 69 | hi TabLine ctermfg=249 ctermbg=237 cterm=none guifg=#B2B2B2 guibg=#3A3A3A gui=none 70 | hi TabLineSel ctermfg=253 ctermbg=238 cterm=none guifg=#DADADA guibg=#444444 gui=none 71 | hi TabLineFill ctermbg=237 cterm=none guibg=#3A3A3A gui=none 72 | hi VertSplit ctermfg=237 ctermbg=237 cterm=none guifg=#3A3A3A guibg=#3A3A3A gui=none 73 | 74 | " Menu 75 | hi Pmenu ctermfg=249 ctermbg=237 cterm=none guifg=#B2B2B2 guibg=#3A3A3A gui=none 76 | hi PmenuSel ctermfg=231 ctermbg=244 cterm=none guifg=#FFFFFF guibg=#808080 gui=none 77 | hi PmenuSbar ctermbg=59 cterm=none guibg=#5F5F5F gui=none 78 | hi PmenuThumb ctermbg=246 cterm=none guibg=#949494 gui=none 79 | hi WildMenu ctermfg=232 ctermbg=98 cterm=none guifg=#080808 guibg=#875FD7 gui=none 80 | 81 | " Selection 82 | hi Visual ctermfg=235 ctermbg=117 cterm=none guifg=#262626 guibg=#87D7FF gui=none 83 | hi VisualNOS ctermfg=235 ctermbg=80 cterm=none guifg=#262626 guibg=#5FD7D7 gui=none 84 | 85 | " Message 86 | hi ErrorMsg ctermfg=210 ctermbg=235 cterm=none guifg=#FF8787 guibg=#262626 gui=none 87 | hi WarningMsg ctermfg=140 ctermbg=235 cterm=none guifg=#AF87D7 guibg=#262626 gui=none 88 | hi MoreMsg ctermfg=72 ctermbg=235 cterm=none guifg=#5FAF87 guibg=#262626 gui=none 89 | hi ModeMsg ctermfg=222 ctermbg=235 cterm=bold guifg=#FFD787 guibg=#262626 gui=bold 90 | hi Question ctermfg=38 ctermbg=235 cterm=none guifg=#00AFD7 guibg=#262626 gui=none 91 | 92 | " Mark 93 | hi Folded ctermfg=244 ctermbg=235 cterm=none guifg=#808080 guibg=#262626 gui=none 94 | hi FoldColumn ctermfg=79 ctermbg=237 cterm=none guifg=#5FD7AF guibg=#3A3A3A gui=none 95 | hi SignColumn ctermfg=184 ctermbg=237 cterm=none guifg=#D7D700 guibg=#3A3A3A gui=none 96 | -------------------------------------------------------------------------------- /colors/darkroom.vim: -------------------------------------------------------------------------------- 1 | " Vim WriteRoom/DarkRoom/OmniWrite like colorscheme 2 | " Maintainer: Christian Brabandt 3 | " Last Change: 2012 4 | 5 | set background=dark 6 | hi clear 7 | if exists("syntax_on") 8 | syntax reset 9 | endif 10 | let g:colors_name="darkroom" 11 | 12 | let ctermbg=(get(g:, 'distractfree_transparent_cterm', 0) ? 'NONE' : 'Black') 13 | 14 | fu! Hi(group, properties) 15 | exe ':hi' a:group a:properties 16 | endfu 17 | 18 | for group in ['Statement', 'Constant', 'Type', 'Boolean', 'Number', 'Scrollbar'] 19 | call Hi(group, 'ctermfg=DarkCyan ctermbg='.ctermbg.' guifg=DarkCyan guibg=Black') 20 | endfor 21 | 22 | for group in ['Special', 'PreProc', 'Comment'] 23 | call Hi(group, 'ctermfg=DarkGreen ctermbg='.ctermbg.' guifg=DarkGreen guibg=Black') 24 | endfor 25 | 26 | for group in ['Identifier', 'Normal', 'LineNr'] 27 | call Hi(group, 'ctermfg=Green ctermbg='.ctermbg.' guifg=Green guibg=Black') 28 | endfor 29 | 30 | call Hi('VertSplit', 'ctermfg=Green ctermbg='.ctermbg.' guibg=Black guifg=NONE gui=NONE') 31 | call Hi('Cursorline', 'ctermfg=Black ctermbg='.ctermbg.' guibg=DarkGreen guifg=Black') 32 | call Hi('Folded', 'ctermfg=DarkCyan ctermbg='.ctermbg.' cterm=underline guifg=DarkCyan guibg=Black gui=underline') 33 | call Hi('ErrorMsg', 'ctermfg=Red ctermbg='.ctermbg.' guibg=Black guifg=Red') 34 | call Hi('WarningMsg', 'ctermfg=Yellow ctermbg='.ctermbg.' guibg=Black guifg=Yellow') 35 | call Hi('String', 'ctermfg=Cyan ctermbg='.ctermbg.' guibg=Black guifg=Cyan') 36 | call Hi('SignColumn', 'ctermfg=Yellow ctermbg='.ctermbg.' guibg=Black guifg=Yellow') 37 | 38 | hi Directory ctermfg=Green ctermbg=DarkBlue guifg=Green guibg=DarkBlue 39 | hi Cursor ctermfg=Black ctermbg=Green guifg=Black guibg=Green 40 | hi Title ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue 41 | hi Visual ctermfg=White ctermbg=DarkGray cterm=underline guifg=White guibg=DarkGray gui=underline 42 | 43 | " link some highlight groups 44 | hi! link NonText Ignore 45 | 46 | " Make sure bg is still dark (might have been reset after setting the Normal group 47 | set background=dark 48 | 49 | " Reset by distract free 50 | " hi NonText ctermfg=Black ctermbg=Black guifg=black guibg=Black 51 | " hi VertSplit ctermfg=Black ctermbg=Black guifg=black guibg=Black 52 | " hi StatusLine cterm=bold,underline ctermfg=White ctermbg=Black term=bold gui=bold,underline guifg=White guibg=Black 53 | " hi StatusLineNC cterm=bold,underline ctermfg=Gray ctermbg=Black term=bold gui=bold,underline guifg=Gray guibg=Black 54 | -------------------------------------------------------------------------------- /colors/desert.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: Hans Fugal 3 | " Last Change: $Date: 2004/06/13 19:30:30 $ 4 | " Last Change: $Date: 2004/06/13 19:30:30 $ 5 | " URL: http://hans.fugal.net/vim/colors/desert.vim 6 | " Version: $Id: desert.vim,v 1.1 2004/06/13 19:30:30 vimboss Exp $ 7 | 8 | " cool help screens 9 | " :he group-name 10 | " :he highlight-groups 11 | " :he cterm-colors 12 | 13 | set background=dark 14 | if version > 580 15 | " no guarantees for version 5.8 and below, but this makes it stop 16 | " complaining 17 | hi clear 18 | if exists("syntax_on") 19 | syntax reset 20 | endif 21 | endif 22 | let g:colors_name="desert" 23 | 24 | hi Normal guifg=White guibg=grey20 25 | 26 | " highlight groups 27 | hi Cursor guibg=khaki guifg=slategrey 28 | "hi CursorIM 29 | "hi Directory 30 | "hi DiffAdd 31 | "hi DiffChange 32 | "hi DiffDelete 33 | "hi DiffText 34 | "hi ErrorMsg 35 | hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none 36 | hi Folded guibg=grey30 guifg=gold 37 | hi FoldColumn guibg=grey30 guifg=tan 38 | hi IncSearch guifg=slategrey guibg=khaki 39 | "hi LineNr 40 | hi ModeMsg guifg=goldenrod 41 | hi MoreMsg guifg=SeaGreen 42 | hi NonText guifg=LightBlue guibg=grey30 43 | hi Question guifg=springgreen 44 | hi Search guibg=peru guifg=wheat 45 | hi SpecialKey guifg=yellowgreen 46 | hi StatusLine guibg=#c2bfa5 guifg=black gui=none 47 | hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none 48 | hi Title guifg=indianred 49 | hi Visual gui=none guifg=khaki guibg=olivedrab 50 | "hi VisualNOS 51 | hi WarningMsg guifg=salmon 52 | "hi WildMenu 53 | "hi Menu 54 | "hi Scrollbar 55 | "hi Tooltip 56 | 57 | " syntax highlighting groups 58 | hi Comment guifg=SkyBlue 59 | hi Constant guifg=#ffa0a0 60 | hi Identifier guifg=palegreen 61 | hi Statement guifg=khaki 62 | hi PreProc guifg=indianred 63 | hi Type guifg=darkkhaki 64 | hi Special guifg=navajowhite 65 | "hi Underlined 66 | hi Ignore guifg=grey40 67 | "hi Error 68 | hi Todo guifg=orangered guibg=yellow2 69 | 70 | " color terminal definitions 71 | hi SpecialKey ctermfg=darkgreen 72 | hi NonText cterm=bold ctermfg=darkblue 73 | hi Directory ctermfg=darkcyan 74 | hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 75 | hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green 76 | hi Search cterm=NONE ctermfg=grey ctermbg=blue 77 | hi MoreMsg ctermfg=darkgreen 78 | hi ModeMsg cterm=NONE ctermfg=brown 79 | hi LineNr ctermfg=3 80 | hi Question ctermfg=green 81 | hi StatusLine cterm=bold,reverse 82 | hi StatusLineNC cterm=reverse 83 | hi VertSplit cterm=reverse 84 | hi Title ctermfg=5 85 | hi Visual cterm=reverse 86 | hi VisualNOS cterm=bold,underline 87 | hi WarningMsg ctermfg=1 88 | hi WildMenu ctermfg=0 ctermbg=3 89 | hi Folded ctermfg=darkgrey ctermbg=NONE 90 | hi FoldColumn ctermfg=darkgrey ctermbg=NONE 91 | hi DiffAdd ctermbg=4 92 | hi DiffChange ctermbg=5 93 | hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 94 | hi DiffText cterm=bold ctermbg=1 95 | hi Comment ctermfg=darkcyan 96 | hi Constant ctermfg=brown 97 | hi Special ctermfg=5 98 | hi Identifier ctermfg=6 99 | hi Statement ctermfg=3 100 | hi PreProc ctermfg=5 101 | hi Type ctermfg=2 102 | hi Underlined cterm=underline ctermfg=5 103 | hi Ignore cterm=bold ctermfg=7 104 | hi Ignore ctermfg=darkgrey 105 | hi Error cterm=bold ctermfg=7 ctermbg=1 106 | 107 | 108 | "vim: sw=4 109 | -------------------------------------------------------------------------------- /colors/dw_blue.vim: -------------------------------------------------------------------------------- 1 | "-------------------------------------------------------------------- 2 | " Name Of File: dw_blue.vim. 3 | " Description: Gvim colorscheme, designed against VIM 7.0 GUI 4 | " By: Steve Cadwallader 5 | " Contact: demwiz@gmail.com 6 | " Credits: Inspiration from the brookstream and redblack schemes. 7 | " Last Change: Saturday, September 17, 2006. 8 | " Installation: Drop this file in your $VIMRUNTIME/colors/ directory. 9 | "-------------------------------------------------------------------- 10 | 11 | set background=dark 12 | hi clear 13 | if exists("syntax_on") 14 | syntax reset 15 | endif 16 | let g:colors_name="dw_blue" 17 | 18 | "-------------------------------------------------------------------- 19 | 20 | hi Boolean guifg=#0000ff 21 | hi cDefine guifg=#0000ff 22 | hi cInclude guifg=#ffffff 23 | hi Comment guifg=#696969 24 | hi Constant guifg=#0000ff 25 | hi Cursor guibg=#444444 guifg=#ffffff 26 | hi CursorColumn guibg=#000011 27 | hi CursorLine guibg=#000018 28 | hi DiffAdd guibg=#333333 guifg=#0000ff 29 | hi DiffChange guibg=#333333 guifg=#0000ff 30 | hi DiffDelete guibg=#333333 guifg=#0000ff 31 | hi DiffText guibg=#333333 guifg=#ffffff 32 | hi Directory guibg=#000000 guifg=#0000ff 33 | hi ErrorMsg guibg=#ffffff guifg=#000000 34 | hi FoldColumn guibg=#222222 guifg=#ff0000 35 | hi Folded guibg=#222222 guifg=#ff0000 36 | hi Function guibg=#000000 guifg=#0000ff 37 | hi Identifier guibg=#000000 guifg=#0000cc 38 | hi IncSearch gui=none guibg=#0000bb guifg=#000000 39 | hi LineNr guibg=#000000 guifg=#000088 40 | hi MatchParen gui=none guibg=#222222 guifg=#0000ff 41 | hi ModeMsg guibg=#000000 guifg=#0000ff 42 | hi MoreMsg guibg=#000000 guifg=#0000ff 43 | hi NonText guibg=#000000 guifg=#ffffff 44 | hi Normal gui=none guibg=#000000 guifg=#c0c0c0 45 | hi Operator gui=none guifg=#696969 46 | hi PreProc gui=none guifg=#ffffff 47 | hi Question guifg=#0000ff 48 | hi Search gui=none guibg=#0000ff guifg=#000000 49 | hi SignColumn guibg=#111111 guifg=#ffffff 50 | hi Special gui=none guibg=#000000 guifg=#ffffff 51 | hi SpecialKey guibg=#000000 guifg=#0000ff 52 | hi Statement gui=bold guifg=#0000ff 53 | hi StatusLine gui=none guibg=#0000ff guifg=#000000 54 | hi StatusLineNC gui=none guibg=#444444 guifg=#000000 55 | hi String gui=none guifg=#0000bb 56 | hi TabLine gui=none guibg=#444444 guifg=#000000 57 | hi TabLineFill gui=underline guibg=#000000 guifg=#ffffff 58 | hi TabLineSel gui=none guibg=#0000aa guifg=#000000 59 | hi Title gui=none guifg=#0000ff 60 | hi Todo gui=none guibg=#000000 guifg=#ff0000 61 | hi Type gui=none guifg=#ffffff 62 | hi VertSplit gui=none guibg=#000000 guifg=#ffffff 63 | hi Visual guibg=#0000dd guifg=#000000 64 | hi WarningMsg guibg=#888888 guifg=#000000 65 | 66 | "- end of colorscheme ----------------------------------------------- 67 | -------------------------------------------------------------------------------- /colors/sean.vim: -------------------------------------------------------------------------------- 1 | " local syntax file - set colors on a per-machine basis: 2 | " vim: tw=0 ts=4 sw=4 3 | " Vim color file 4 | " Maintainer:Sean Richards 5 | " Last Change:Fri Aug 30 8:50 2002 NZST 6 | 7 | hi clear 8 | set background=dark 9 | if exists("syntax_on") 10 | syntax reset 11 | endif 12 | let g:colors_name = "sean" 13 | hi Normal guifg=white guibg=black 14 | hi SpecialKey guifg=Blue 15 | hi NonText gui=bold guifg=Blue 16 | hi Directory guifg=Blue 17 | hi ErrorMsg guifg=White guibg=Red 18 | hi Search guifg=white guibg=Red 19 | hi MoreMsg gui=bold guifg=SeaGreen 20 | hi ModeMsg gui=bold guifg=White guibg=Blue 21 | hi LineNr ctermfg=Darkyellow guifg=Yellow 22 | hi Question gui=bold guifg=Green 23 | hi StatusLineNC cterm=none ctermfg=grey ctermbg=darkblue gui=NONE guifg=white guibg=darkblue 24 | hi StatusLine cterm=none ctermfg=white ctermbg=darkblue gui=bold guifg=white guibg=darkblue 25 | hi VertSplit gui=bold guifg=White guibg=darkblue 26 | hi Title gui=bold guifg=Magenta 27 | hi Visual cterm=none ctermfg=white ctermbg=darkgreen gui=NONE guifg=white guibg=darkgreen 28 | hi WarningMsg guifg=Red 29 | hi FoldColumn ctermfg=Black ctermbg=Grey guibg=DarkGrey guifg=Black 30 | hi Folded ctermfg=Black ctermbg=Grey guifg=Black 31 | hi Cursor guifg=bg guibg=Green 32 | hi Comment cterm=none ctermfg=darkgreen gui=italic guifg=green 33 | hi Constant ctermfg=darkcyan guifg=darkcyan 34 | hi Special ctermfg=darkyellow guifg=Orange 35 | hi Identifier ctermfg=cyan guifg=cyan 36 | hi Statement ctermfg=darkyellow gui=bold guifg=darkyellow 37 | hi Number ctermfg=Cyan guifg=Cyan 38 | hi PreProc ctermfg=darkmagenta guifg=darkmagenta 39 | hi String ctermfg=darkred guifg=Red 40 | hi Type ctermfg=darkblue guifg=blue 41 | hi Error ctermfg=red guifg=Red guibg=Black 42 | hi Todo ctermfg=blue ctermbg=yellow guifg=Blue guibg=Yellow 43 | hi link IncSearch Visual 44 | hi link String Constant 45 | hi link Character Constant 46 | hi link Number Constant 47 | hi link Boolean Constant 48 | hi link Float Number 49 | hi link Function Identifier 50 | hi link Conditional Statement 51 | hi link Repeat Statement 52 | hi link Label Statement 53 | hi link Operator Statement 54 | hi link Keyword Statement 55 | hi link Exception Statement 56 | hi link Include PreProc 57 | hi link Define PreProc 58 | hi link Macro PreProc 59 | hi link PreCondit PreProc 60 | hi link StorageClass Type 61 | hi link Structure Type 62 | hi link Typedef Type 63 | hi link Tag Special 64 | hi link SpecialChar Special 65 | hi link Delimiter Special 66 | hi link SpecialComment Special 67 | hi link Debug Special 68 | 69 | 70 | "Toggle semicolon matching at the end of lines, author unknown! 71 | nmap sc :call ToggleSemicolonHighlighting() 72 | "{{{ 73 | function! ToggleSemicolonHighlighting() 74 | if exists("b:semicolon") 75 | unlet b:semicolon 76 | hi semicolon guifg=NONE gui=NONE ctermfg=NONE 77 | else 78 | syn match semicolon #;$# 79 | hi semicolon guifg=red gui=bold ctermfg=1 80 | let b:semicolon = 1 81 | endif 82 | endfunction 83 | "}}} 84 | -------------------------------------------------------------------------------- /colors/tester.vim: -------------------------------------------------------------------------------- 1 | echomsg "normal colors sourced" 2 | -------------------------------------------------------------------------------- /colors/transparent.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: Sir Raorn 3 | " Last Change: Nov 10, 2002 4 | " URL: http://hell.binec.ru/ 5 | 6 | " This color scheme uses "transparent" background (dark dark blue in gvim) 7 | " Looks really nice when vim (console) started in transparent aterm 8 | " But gvim is good either 9 | set background=dark 10 | 11 | " First remove all existing highlighting. 12 | hi clear 13 | if exists("syntax_on") 14 | syntax reset 15 | endif 16 | let g:colors_name="transparent" 17 | 18 | " default groups 19 | hi Normal ctermfg=Gray ctermbg=NONE guifg=Gray guibg=#00002A 20 | 21 | hi Cursor guifg=Black guibg=Green 22 | "hi CursorIM NONE guifg=Black guibg=Purple 23 | hi Directory ctermfg=White guifg=White 24 | hi DiffAdd ctermfg=White ctermbg=DarkCyan guifg=White guibg=DarkCyan 25 | hi DiffChange ctermfg=Black ctermbg=Gray guifg=Black guibg=DarkGray 26 | hi DiffDelete ctermfg=White ctermbg=DarkRed guifg=White guibg=DarkRed 27 | hi DiffText cterm=bold ctermfg=White ctermbg=Gray gui=bold guifg=White guibg=DarkGray 28 | hi ErrorMsg ctermfg=White ctermbg=DarkRed guifg=White guibg=DarkRed 29 | hi VertSplit cterm=reverse gui=reverse 30 | hi Folded cterm=bold ctermfg=Cyan ctermbg=NONE gui=bold guifg=Cyan guibg=DarkCyan 31 | hi FoldColumn ctermfg=Green ctermbg=NONE guifg=Green guibg=#00002A 32 | hi IncSearch ctermfg=White ctermbg=Black guifg=White guibg=Black 33 | hi LineNr ctermfg=Yellow guifg=DarkCyan 34 | hi ModeMsg cterm=bold ctermfg=White gui=bold guifg=White 35 | hi MoreMsg cterm=bold ctermfg=White gui=bold guifg=White 36 | hi NonText ctermfg=NONE guifg=NONE 37 | hi Question ctermfg=Green guifg=Green 38 | hi Search cterm=reverse ctermfg=fg ctermbg=NONE gui=reverse guifg=fg guibg=bg 39 | hi SpecialKey ctermfg=LightRed guifg=Red 40 | hi StatusLine cterm=bold,reverse ctermfg=White ctermbg=Black gui=bold,reverse guifg=White guibg=Black 41 | hi StatusLineNC cterm=reverse ctermfg=Gray ctermbg=Black gui=reverse guifg=DarkGray guibg=Black 42 | hi Title ctermfg=LightGreen gui=bold guifg=Green 43 | hi Visual cterm=inverse ctermfg=White ctermbg=DarkGray gui=inverse guifg=DarkGray guibg=Black 44 | hi VisualNOS cterm=bold,underline gui=bold,underline 45 | hi WarningMsg ctermfg=White ctermbg=DarkRed guifg=White guibg=DarkRed 46 | hi WildMenu cterm=bold ctermfg=Black ctermbg=Yellow gui=bold guifg=Black guibg=Yellow 47 | "hi Menu 48 | "hi Scrollbar 49 | "hi Tooltip 50 | 51 | " syntax highlighting groups 52 | hi Comment ctermfg=DarkCyan guifg=DarkCyan 53 | 54 | hi Constant ctermfg=LightGreen guifg=LightGreen 55 | hi String ctermfg=Yellow guifg=Yellow 56 | hi Character ctermfg=Yellow guifg=Yellow 57 | "hi Number 58 | "hi Boolean 59 | "hi Float 60 | 61 | hi Identifier ctermfg=LightCyan guifg=LightCyan 62 | hi Function ctermfg=White guifg=White 63 | 64 | hi Statement ctermfg=Yellow guifg=Yellow 65 | "hi Conditional 66 | "hi Repeat 67 | hi Label ctermfg=White guifg=White 68 | hi Operator ctermfg=Green guifg=Green 69 | "hi Keyword 70 | hi Exception ctermfg=Black ctermbg=DarkRed guifg=Black guibg=DarkRed 71 | 72 | hi PreProc ctermfg=DarkGreen guifg=DarkGreen 73 | "hi Include 74 | "hi Define 75 | "hi Macro 76 | "hi PreCondit 77 | 78 | hi Type ctermfg=Green guifg=Green 79 | "hi StorageClass 80 | "hi Structure 81 | hi Typedef ctermfg=Red guifg=Red 82 | 83 | hi Special ctermfg=Red guifg=Red 84 | "hi SpecialChar 85 | hi Tag ctermfg=LightGreen guifg=LightGreen 86 | hi Delimiter ctermfg=Green guifg=Green 87 | "hi SpecialComment 88 | hi Debug ctermfg=White ctermbg=Black guifg=White guibg=Black 89 | 90 | hi Underlined cterm=underline gui=underline 91 | 92 | hi Ignore ctermfg=DarkBlue guifg=DarkBlue 93 | 94 | hi Error ctermfg=White ctermbg=DarkRed guifg=White guibg=DarkRed 95 | 96 | hi Todo ctermfg=Black ctermbg=Gray guifg=Black guibg=Gray 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /doc/BufTimer.txt: -------------------------------------------------------------------------------- 1 | *BufTimer.txt* Tracks Time Spent in Each Buffer - Vers 1.0 Aug 03, 2008 2 | 3 | Author: Bill McCarthy ~ 4 | 5 | Copyright: (c) 2008 by Bill McCarthy *BufTimer-Copyright* 6 | The VIM LICENSE applies to BufTimer.vim 7 | (see |copyright|) except use "BufTimer" instead of "Vim" 8 | No warranty, express or implied. Use At-Your-Own-Risk. 9 | 10 | 11 | Marc Fourier raised the question of tracking time spent editing with Vim in 12 | the mailing list. Soon after, Ben Schmidt produced several versions of a 13 | solution using an external tool and the strftime function. Because strftime 14 | wasn't working for me in Windows, I modified Ben's work to use the reltime 15 | function. Later, a comment from Christian Brabandt asked about "stopping the 16 | clock" while not in a buffer. 17 | 18 | 19 | ============================================================================== 20 | QUICK START *BufTimer-Quickstart* 21 | 22 | 23 | Functionality: 24 | 25 | Autocmds are used to keep track of the last time you entered a buffer (stored 26 | in b:timeStart) and the accumulated time in a buffer before it was last 27 | entered (stored in b:timeAccum). These two variables are unique for each 28 | buffer. 29 | 30 | The time spent in the current buffer is displayed with|:BufTimer|or a mapping 31 | of your choice (the default is dt). If you have Vim version 7.0 or 32 | later, you can use|:BufTimerReport|or a mapping (the default is dr) to 33 | produce a report of the time spent in each buffer. The report is controlled 34 | by the global|g:btrOpt|variable. 35 | 36 | Requirements: 37 | 38 | You must have have the autocmd facility enabled and be running in non- 39 | compatible mode to use this plugin. The report facility requires at least 40 | Vim version 7.0 (lists are used). 41 | 42 | Instructions: 43 | 44 | Just source the VBA to install. There are two commands and two mappings 45 | provided (one of each if you don't have Vim version 7.0 or later). 46 | 47 | ============================================================================== 48 | COMMANDS *BufTimer-Commands* 49 | 50 | There are only two commands available for a user interface. 51 | 52 | ============================================================================== 53 | BufTimer *:BufTimer* 54 | 55 | This command shows the elapse time that you have spent in the current buffer. 56 | It is displayed in the format h:mm:ss. Floating point arithmetic is used if 57 | you are running Vim version 7.2 or later. This tracks time spend even if you 58 | flip between buffers. Earlier versions use integer calculations truncated to 59 | the second. Although integer arithmetic isn't as accurate, it is sufficient 60 | to the purpose. 61 | 62 | ============================================================================== 63 | BufTimeReport *:BufTimerReport* 64 | 65 | This command will list the time spent in each of the buffers you have defined 66 | in the|g:btrOpt|variable. Because this plugin uses list first introduced in 67 | Vim version 7.0, this feature is not available in earler versions. A sample 68 | report is shown below: 69 | 70 | -----Existing Buffers----- 71 | Buf hh:mm:ss Buffer Name 72 | --- -------- ----------- 73 | 1 0:14:11 BufTimer.vim 74 | 2 0:00:48 eval.txt 75 | 3 0:13:32 BufTimer.txt 76 | --- -------- 77 | Tot 0:28:31 78 | 79 | ============================================================================== 80 | Report Option (Vim version 7.0 or later) *g:btrOpt* 81 | 82 | The report is controlled by the|g:btrOpt|variable. If you have not set this 83 | variable in your _vimrc file, it is set to zero. Only the following values 84 | have meaning: 85 | 86 | Value Meaning 87 | 88 | 0 Show times for all existing buffers (default) 89 | 1 Show times for only loaded buffers 90 | 2 Show times for only listed buffers 91 | 92 | ============================================================================== 93 | Mappings for BufTimer *Mappings-BufTimer* 94 | 95 | The mappings in the plugin can be overwritten by placing a small section in 96 | your _vimrc file. An example follows: 97 | 98 | nmap dt BTmap 99 | if v:version >= 700 100 | nmap dr BTRmap 101 | let|g:btrOpt|= 0 102 | endif 103 | 104 | where dt and dr can be replaced with you choice of mapping and 105 | you can set|g:btrOpt|for your choice of report option. 106 | 107 | ============================================================================== 108 | BufReport Tool History *BufReport-History* 109 | 110 | v1 : Aug 03, 2008 : Initial release 111 | 112 | ============================================================================== 113 | 114 | vim:tabstop=8:textwidth=78:filetype=help:norightleft 115 | -------------------------------------------------------------------------------- /doc/Join.txt: -------------------------------------------------------------------------------- 1 | *Join.txt* Improved Algorithm for joining many lines - Vers 2.2 Oct 1, 2009 2 | 3 | Author: Christian Brabandt 4 | Copyright: (c) 2009 by Christian Brabandt *Join-copyright* 5 | The VIM LICENSE applies to Join.vim and Join.txt 6 | (see |copyright|) except use Join.vim instead of "Vim". 7 | NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK. 8 | 9 | 10 | ============================================================================== 11 | *:Join* *Join* 12 | 1. Functionality 13 | 14 | This plugin tries to implement a different method for joining lines. This is, 15 | because the :join command from within vim suffers from a serious performance 16 | issue, if you are trying to join many lines (>1000). 17 | 18 | This has been discussed on the vim development mailing list (see 19 | http://thread.gmane.org/gmane.editors.vim.devel/22065) as well as on the vim 20 | user mailing list (see http://thread.gmane.org/gmane.editors.vim/80304). 21 | 22 | There has also been a patch proposed, to improve the algorithm used by :join. 23 | This patch is available at http://repo.or.cz/w/vim_extended.git, but this 24 | means, you'll have to build and patch your vim manually (you can't use it with 25 | a prebuilt vim). 26 | 27 | Until this patch is accepted and incorporated into mainline vim, this plugin 28 | tries to improve the joining algorithm by the method mentioned in the user 29 | mailinglist above. It basically works by breaking up the join algorithm into 30 | smaller pieces and joining the smaller pieces together. This may have an 31 | impact on memory usage, though. 32 | 33 | *Join-benchmark* 34 | For reference I include some timings, joining many lines: 35 | 36 | Lines joined :%join | :%Join 37 | 25.000 3,305s | 0,240s 38 | 50.000 13,667s | 0,336s 39 | 100.000 64,140s | 0,588s 40 | 200.000 331,410s | 1,431s 41 | 1.000.000 -[1] | 7,419s 42 | 43 | [1] benchmarking was aborted after 53 Minutes (after which only about 480.000 44 | lines have been joined). 45 | 46 | Please also note, that using a substitute command does not prove to be faster. 47 | It also suffers from the performance impact. 48 | 49 | Also note, that really the best way to remove '\n' on a file with millions 50 | of lines is using tr: 51 | 52 | ~$ tr -d '\n' output_file 53 | 54 | ============================================================================== 55 | 2. Usage *Join-usage* 56 | 57 | :[range]J[oin][!] 58 | Join [range] lines. Same as "J", except with [!] 59 | the join does not insert or delete any spaces. 60 | The default behavior is to join the current line 61 | with the line below it. 62 | 63 | :[range]J[oin][!] {count} 64 | Join {count} lines, starting with [range] (default: 65 | current line |cmdline-ranges|). Same as "J", except 66 | with [!] the join does not insert or delete any 67 | spaces. 68 | 69 | 70 | You should be able to use :Join as drop in replacement for :join. It behaves 71 | exactly like :join and understands it's syntax, with the exception of 1 point: 72 | 73 | 1) :Join does not accept the use of [flags] as |:join| does. 74 | *Join-J* 75 | 76 | If you want the J command to call :Join, you can use something like: 77 | :nmap J :Join 78 | to have J call :Join in normal mode and 79 | :vmap J :Join 80 | to have J join the visually selected lines. 81 | 82 | ============================================================================== 83 | *Join-differences* 84 | 3. Differences 85 | 86 | This plugin has been made to make :Join and :join behave almost identically. 87 | If there are further differences than those described at |Join-usage|, I am 88 | interested at any bug describing exactly what went wrong, so I can fix this. 89 | Please send any bug report to the mail address mentioned at the top of this 90 | page. 91 | 92 | 93 | ============================================================================== 94 | 4. Join History *Join-history* 95 | 2.2: Oct 2, 2009 fixed Copyright, which included wrong Plugin name 96 | 2.1: Sep 1, 2009 fixed Documentation, enabled GetLatestScripts 97 | 2: Aug 31, 2009 Documentation, fixed several bugs. 98 | 1: Aug 27, 2009 Internal version, First working version, 99 | using simple commands 100 | 101 | ============================================================================== 102 | vim:tw=78:ts=8:ft=help 103 | -------------------------------------------------------------------------------- /doc/LargeFile.txt: -------------------------------------------------------------------------------- 1 | *LargeFile.txt* Editing Large Files Quickly Oct 31, 2013 2 | 3 | Author: Charles E. Campbell 4 | (remove NOSPAM from Campbell's email first) 5 | Copyright: (c) 2004-2013 by Charles E. Campbell *LargeFile-copyright* 6 | The VIM LICENSE applies to LargeFile.vim 7 | (see |copyright|) except use "LargeFile" instead of "Vim" 8 | No warranty, express or implied. Use At-Your-Own-Risk. 9 | 10 | ============================================================================== 11 | 1. Large File Plugin *:Unlarge* *:Large* *largefile* {{{1 12 | 13 | The LargeFile plugin is fairly short -- it simply sets up an |:autocmd| that 14 | checks for large files. There is one parameter: > 15 | g:LargeFile 16 | which, by default, is 20 (ie. 20MB). Thus with this value of g:LargeFile, 17 | 20MByte files and larger are considered to be "large files"; smaller ones 18 | aren't. Of course, you as a user may set g:LargeFile to whatever you want in 19 | your <.vimrc> (in units of MBytes). 20 | 21 | LargeFile.vim always assumes that when the file size is larger than what 22 | can fit into a signed integer (2^31, ie. about 2GB) that the file is "Large". 23 | 24 | Essentially, this autocmd simply turns off a number of features in Vim, 25 | including event handling, undo, and syntax highlighting, in the interest of 26 | speed and responsiveness. 27 | 28 | LargeFile.vim borrows from vimtip#611. 29 | 30 | To undo what LargeFile does, type > 31 | :Unlarge 32 | To redo what LargeFile does, type > 33 | :Large 34 | To forcibly have the file handled as a "large file", type > 35 | :Large! 36 | 37 | Note that LargeFile cannot alleviate hardware limitations; vim on 32-bit 38 | machines is limited to editing 2G files. If your vim is compiled on a 64-bit 39 | machine such that it can take advantage of the additional address space, then 40 | presumably vim could edit up to 9.7 quadrillion byte files (not that I've ever 41 | tried that!). 42 | 43 | You may be interested in the following reply Tim Chase made to a question 44 | about loading a large file: 45 | 46 | - I have a text file with more than 40,000,000 lines. It takes 47 | - VIM very long time to load. Is there anything I can do to make 48 | - it quicker? 49 | 50 | You may want to investigate the common large-file solutions: 51 | 52 | http://www.vim.org/scripts/script.php?script_id=1506 53 | http://vim.wikia.com/wiki/Faster_loading_of_large_files 54 | 55 | Depending on your edits, you might have better luck using sed which will 56 | process it as a stream instead of trying to hold the whole thing in 57 | memory. You might also want to read |limits| for limitations you might 58 | bump into with files that large. 59 | 60 | Additionally, with a file that large, it might be useful (if you're on 61 | *nix or have common *nix-utilities on Win32) to use the split/csplit 62 | commands to chop up your file into manageable bits to edit subsets of 63 | them, and then piece them all back together with cat. 64 | 65 | 66 | ============================================================================== 67 | 2. History *largefile-history* {{{1 68 | 69 | 5 : Aug 19, 2009 * Largefile additionally disables folding and parentheses 70 | matching (:Unlarge will restore them) 71 | * complete option set so that buffers from other windows 72 | are not scanned. Thus an open "Large" file will not 73 | cause completion to run slow in other windows. 74 | Unfortunately I see no way to have just the "Large" 75 | buffers bypassed this way; its either all or none. 76 | Jan 20, 2011 * Changed setting retention variables to use a 77 | common "b:LF_" prefix 78 | Apr 24, 2013 * (Kris Malfettone) suggested that |'bk'| and |'wk'| 79 | options should also be suppressed by LargeFile. 80 | Oct 31, 2013 * persistent undo used to localize turning 81 | |undolevels| off to LargeFiles 82 | 4 : Jan 03, 2008 * made LargeFile.vim :AutoInstall:-able by getscript 83 | Apr 11, 2008 * (Daniel Shahaf suggested) that :Large! do the large-file 84 | handling irregardless of file size. Implemented. 85 | Sep 23, 2008 * if getfsize() returns -2 then the file is assumed to be 86 | large 87 | 3 : May 24, 2007 * Unlarge command included 88 | * If getfsize() returns something less than -1, then it 89 | will automatically be assumed to be a large file. 90 | 91 | ============================================================================== 92 | vim:tw=78:ts=8:ft=help:fdm=marker: 93 | -------------------------------------------------------------------------------- /doc/dummy.txt: -------------------------------------------------------------------------------- 1 | " vertfold.vim - Vertical folding plugin for Vim 2 | " ------------------------------------------------------------- 3 | " Version: 0.1 4 | " Maintainer: Christian Brabandt 5 | " Last Change: Fri, 10 Dec 2010 15:16:29 +0100 6 | " 7 | " Script: http://www.vim.org/scripts/script.php?script_id=???? 8 | " Copyright: (c) 2009, 2010, 2011 by Christian Brabandt 9 | " The VIM LICENSE applies to vertfold.vim 10 | " (see |copyright|) except use "vertfold.vim" 11 | " instead of "Vim". 12 | " No warranty, express or implied. 13 | " *** *** Use At-Your-Own-Risk! *** *** 14 | " GetLatestVimScripts: ???? 1 :AutoInstall: vertfold.vim 15 | " 16 | " Functions: 17 | 18 | fun! WarningMsg(msg) "{{{1 19 | let msg = "VertFold: " . a:msg 20 | echohl WarningMsg 21 | if exists(":unsilent") == 2 22 | unsilent echomsg msg 23 | else 24 | echomsg msg 25 | endif 26 | sleep 1 27 | echohl Normal 28 | let v:errmsg = msg 29 | endfun 30 | 31 | fun! Init() "{{{1 32 | if !has("conceal") 33 | call WarningMsg("Your vim does not support concealing of items!") 34 | throw "vertfold:return" 35 | endif 36 | " check the value of conceallevel 37 | if !&cole 38 | setl cole=2 cocu=nc 39 | endif 40 | " Customizations 41 | " Character to show instead of the folded text 42 | let s:cchar='+' 43 | endfu! 44 | 45 | fun! vertfold#VertFoldCol() "{{{1 46 | try 47 | call Init() 48 | catch /vertfold:return/ 49 | return 1 50 | endtry 51 | let vstart = getpos("'<")[1:2] 52 | let vend = getpos("'>")[1:2] 53 | if vend[1] == pow(2,31)-1 54 | let vend[1] = col('$') 55 | endif 56 | call WarningMsg("Concealing columns " . vstart[1] . " - " . vend[1]) 57 | let pat = '/\%' . vstart[1] . 'c.*\%' . vend[1] . 'c/' 58 | call SynConceal(pat) 59 | endfun 60 | 61 | fun! vertfold#VertFoldPat(pat) "{{{1 62 | try 63 | call Init() 64 | let tpat = substitute(pat, '^\(.\)\(.*\)\1$', '\2', '') 65 | if tpat = pat 66 | throw "vertfold:E684" 67 | endif 68 | catch /vertfold:return/ 69 | return 1 70 | catch /vertfold:E684/ " catch error index out of bounds 71 | call WarningMsg("Error! Usage :VFold /pattern/") 72 | return 1 73 | endtry 74 | call WarningMsg("Concealing pattern " . a:pat) 75 | let pat = '/' . a:pat . '/' 76 | call SynConceal(pat) 77 | endfun 78 | 79 | fun! vertfold#VertFoldClear() "{{{1 80 | syn enable 81 | " Is this really necessary? 82 | "redir=>a | silent syn | redir end 83 | "if a=="No Syntax items defined for this buffer" 84 | " syn off 85 | "endif 86 | "hi clear VertFoldCol 87 | endfun 88 | 89 | fun! SynConceal(pattern) "{{{1 90 | if !exists("s:items") 91 | let s:items=1 92 | else 93 | let s:items+=1 94 | endif 95 | "exe 'syn match VertFoldCol' . s:items . ' ' . a:pattern 'transparent conceal contains=ALL cchar=' . s:cchar 96 | exe "syn match VertFoldCol" a:pattern "transparent conceal contains=ALL cchar=" . s:cchar 97 | endfun 98 | 99 | " Modeline {{{1 100 | " vim: ts=4 sts=4 fdm=marker com+=l\:\" fdl=0 101 | -------------------------------------------------------------------------------- /doc/explainpat.txt: -------------------------------------------------------------------------------- 1 | *explainpat.txt* Give detailed help on a regexp pattern. 2 | 3 | For Vim version 7.0. Last change: 2012 Dec 19 4 | By Andy Wokula 5 | 6 | *explainpat* *explainpat.vim* 7 | When you want to inspect a given Vim regexp pattern, this script might save 8 | you lots of help lookups. And it will make the structure of a regexp visible. 9 | And it helps spotting mistakes. 10 | 11 | If you find that it explains something wrong, drop me an email. 12 | 13 | ============================================================================== 14 | *:ExplainPattern* 15 | :ExplainPattern [{pattern} | {register}] 16 | parse the given Vim {pattern} and print a line of help 17 | (with color) for each found pattern item. Nested 18 | items get extra indent. 19 | 20 | A single-char argument is used as {register} argument: 21 | / explain the last search pattern 22 | * explain pattern from the clipboard 23 | a explain pattern from register a 24 | 25 | Notes: 26 | The pattern is first converted into a purely magic pattern using 27 | |nwo#magic#MakeMagic()|. This means that embedded |\V| |\M| |\m| |\V| 28 | specifiers are effectively removed from the explanation. 29 | 30 | :ExplainPattern also accepts some invalid patterns: > 31 | :ExplainPattern \) 32 | Pattern: \) 33 | \) end of group 34 | 35 | ============================================================================== 36 | vim:tw=78:fo=tcq2:sts=0:ts=8:sw=8:fdm=marker:fmr=^_\^,^\^:ft=help: 37 | -------------------------------------------------------------------------------- /doc/old/BufTimer.txt.alt: -------------------------------------------------------------------------------- 1 | *BufTimer.txt* Tracks Time Spent in Each Buffer - Vers 1.0 Aug 03, 2008 2 | 3 | Author: Bill McCarthy ~ 4 | 5 | Copyright: (c) 2008 by Bill McCarthy *BufTimer-Copyright* 6 | The VIM LICENSE applies to BufTimer.vim 7 | (see |copyright|) except use "BufTimer" instead of "Vim" 8 | No warranty, express or implied. Use At-Your-Own-Risk. 9 | 10 | 11 | Marc Fourier raised the question of tracking time spent editing with Vim in 12 | the mailing list. Soon after, Ben Schmidt produced several versions of a 13 | solution using an external tool and the strftime function. Because strftime 14 | wasn't working for me in Windows, I modified Ben's work to use the reltime 15 | function. Later, a comment from Christian Brabandt asked about "stopping the 16 | clock" while not in a buffer. 17 | 18 | 19 | ============================================================================== 20 | QUICK START *BufTimer-Quickstart* 21 | 22 | 23 | Functionality: 24 | 25 | Autocmds are used to keep track of the last time you entered a buffer (stored 26 | in b:timeStart) and the accumulated time in a buffer before it was last 27 | entered (stored in b:timeAccum). These two variables are unique for each 28 | buffer. 29 | 30 | The time spent in the current buffer is displayed with|:BufTimer|or a mapping 31 | of your choice (the default is dt). If you have Vim version 7.0 or 32 | later, you can use|:BufTimerReport|or a mapping (the default is dr) to 33 | produce a report of the time spent in each buffer. The report is controlled 34 | by the global|g:btrOpt|variable. 35 | 36 | Requirements: 37 | 38 | You must have have the autocmd facility enabled and be running in non- 39 | compatible mode to use this plugin. The report facility requires at least 40 | Vim version 7.0 (lists are used). 41 | 42 | Instructions: 43 | 44 | Just source the VBA to install. There are two commands and two mappings 45 | provided (one of each if you don't have Vim version 7.0 or later). 46 | 47 | ============================================================================== 48 | COMMANDS *BufTimer-Commands* 49 | 50 | There are only two commands available for a user interface. 51 | 52 | ============================================================================== 53 | BufTimer *:BufTimer* 54 | 55 | This command shows the elapse time that you have spent in the current buffer. 56 | It is displayed in the format h:mm:ss. Floating point arithmetic is used if 57 | you are running Vim version 7.2 or later. This tracks time spend even if you 58 | flip between buffers. Earlier versions use integer calculations truncated to 59 | the second. Although integer arithmetic isn't as accurate, it is sufficient 60 | to the purpose. 61 | 62 | ============================================================================== 63 | BufTimeReport *:BufTimerReport* 64 | 65 | This command will list the time spent in each of the buffers you have defined 66 | in the|g:btrOpt|variable. Because this plugin uses list first introduced in 67 | Vim version 7.0, this feature is not available in earler versions. A sample 68 | report is shown below: 69 | 70 | -----Existing Buffers----- 71 | Buf hh:mm:ss Buffer Name 72 | --- -------- ----------- 73 | 1 0:14:11 BufTimer.vim 74 | 2 0:00:48 eval.txt 75 | 3 0:13:32 BufTimer.txt 76 | --- -------- 77 | Tot 0:28:31 78 | 79 | ============================================================================== 80 | Report Option (Vim version 7.0 or later) *g:btrOpt* 81 | 82 | The report is controlled by the|g:btrOpt|variable. If you have not set this 83 | variable in your _vimrc file, it is set to zero. Only the following values 84 | have meaning: 85 | 86 | Value Meaning 87 | 88 | 0 Show times for all existing buffers (default) 89 | 1 Show times for only loaded buffers 90 | 2 Show times for only listed buffers 91 | 92 | ============================================================================== 93 | Mappings for BufTimer *Mappings-BufTimer* 94 | 95 | The mappings in the plugin can be overwritten by placing a small section in 96 | your _vimrc file. An example follows: 97 | 98 | nmap dt BTmap 99 | if v:version >= 700 100 | nmap dr BTRmap 101 | let|g:btrOpt|= 0 102 | endif 103 | 104 | where dt and dr can be replaced with you choice of mapping and 105 | you can set|g:btrOpt|for your choice of report option. 106 | 107 | ============================================================================== 108 | BufReport Tool History *BufReport-History* 109 | 110 | v1 : Aug 03, 2008 : Initial release 111 | 112 | ============================================================================== 113 | 114 | vim:tabstop=8:textwidth=78:filetype=help:norightleft 115 | -------------------------------------------------------------------------------- /doc/old/system_utils.txt.alt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/doc/old/system_utils.txt.alt -------------------------------------------------------------------------------- /doc/savesigns.txt: -------------------------------------------------------------------------------- 1 | *savesigns.txt* Plugin to save Signs 2 | 3 | Author: Christian Brabandt 4 | Version: 0.5 Mon, 19 Aug 2013 22:00:35 +0200 5 | *savesigns-copyright* 6 | Copyright: (c) 2009, 2010 by Christian Brabandt 7 | The VIM LICENSE applies to savesigns.vim, savesignsPlugin.vim 8 | and savesigns.txt (see |copyright|) except use savesigns instead 9 | of "Vim". 10 | NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK. 11 | 12 | {only available when compiled with the |+signs| feature} 13 | 14 | ============================================================================== 15 | 1. Contents *savesigns-contents* 16 | 17 | 1. Contents................................................|savesigns-contents| 18 | 2. Functionality...........................................|savesigns-plugin| 19 | 2.1 :SaveSigns...........................................|:SaveSigns| 20 | 3. History.................................................|savesigns-history| 21 | 22 | ============================================================================== 23 | *savesigns-plugin* 24 | 2. Functionality 25 | 26 | This plugin was written to allow you to save your |signs| easily. Signs can be 27 | used to specific highlight certains rows in a buffer. This might be useful 28 | when using a debugger or display a |mark|. Note however, that this works only 29 | when the signs feature has been compiled into your vim. 30 | 31 | If you have defined signs in your file, you might want to save these signs to 32 | be able to reload these signs later on (e.g. with a |Session|). Therefore this 33 | plugin defines the |:SaveSigns| command, which will store all defined signs in 34 | a file in such a way that reloading that file will restore all defined signs. 35 | 36 | When saving Signs, the plugin creates a Vim Script, that can be read in using 37 | |:source| It will save Sign Definitions (see |:sign-define|), Sign placements 38 | (see |:sign-place|) and the Sign hilighting (see |hl-SignColumn|). 39 | 40 | Since signs are usually associated with a buffer or a file, sourcing this file 41 | using |:source| will only restore those signs whose buffers are loaded in that 42 | vim session. Note: All Signs that were defined before reloading this file will 43 | be lost. 44 | 45 | 2.1 :SaveSigns *:SaveSigns* 46 | 47 | :SaveSigns Store all currently defined signs in a temporary file. 48 | This file will be opened in a new split window and you 49 | can edit it further. Note: This file won't be saved. 50 | You need to explicitly save it. 51 | 52 | :SaveSigns[!] {name} Store all currently defined signs in a file called 53 | {name}. If this file exists, it won't be used a new 54 | temporary file will be created. Use ! to force storing 55 | the info in that file. This will however erase the 56 | file {name}. So use with caution. 57 | 58 | 59 | ============================================================================== 60 | *savesigns-history* 61 | 3. savesigns History 62 | 63 | 0.4 - use the blackhole register for deleting the buffer content 64 | - install target did not work 65 | - Deleted spell modeline 66 | 0.3 - Enabled GLVS (see :h GLVS) 67 | 0.2 - Uploaded to http://www.vim.org/ 68 | - Created autoload script 69 | - Created documentation 70 | - added some more error handling. 71 | 0.1 - First initial version 72 | ============================================================================== 73 | vim:tw=78:ts=8:ft=help 74 | -------------------------------------------------------------------------------- /doc/togglebg.txt: -------------------------------------------------------------------------------- 1 | *togglebg.vim* For Vim version 7.3. or newer Modified: 2011 Apr 16 2 | 3 | 4 | TOGGLE BACKGROUND PLUGIN by Ethan Schoonover ~ 5 | 6 | Toggle Background *togglebackground* 7 | *toggle-background* 8 | *togglebg* *toggle-bg* 9 | *togbg* *tog-bg* 10 | 11 | Toggle Background is a simple plugin to switch between light and dark 12 | background modes and reset the colorscheme. This is most useful for 13 | colorschemes that support both light and dark modes and in terminals or gui 14 | vim windows where the background will be properly set. 15 | 16 | 0. Usage |togglebg-usage| 17 | 1. Default Mapping |togglebg-default| 18 | 2. Changing the Mapping |togglebg-newmap| 19 | 3. Issues |togglebg-issues| 20 | 21 | ============================================================================== 22 | 0. Usage *togglebg-usage* 23 | 24 | Press your map key(s) to activate Toggle Background, or select "Toggle 25 | Background" from the 'Window' menu while in gui mode. 26 | 27 | ============================================================================== 28 | 1. Default Mapping *togglebg-default* 29 | 30 | Toggle Background starts with a default mapping to function key . If you 31 | are already using this in a mapping, Toggle Background will not map itself to 32 | a default and you will have to map it manually in your .vimrc file, or 33 | remove/change your existing mapping to another value. 34 | 35 | ============================================================================== 36 | 2. Changing the Mapping *togglebg-newmap* 37 | 38 | To set your own mapping in your .vimrc file, simply add the following line to 39 | support normal, insert and visual mode usage, changing the "" value to the 40 | key or key combination you wish to use: 41 | 42 | call togglebg#map("") 43 | 44 | Note that you'll want to use a single function key or equivalent if you want 45 | the plugin to work in all modes (normal, insert, visual). 46 | 47 | ============================================================================== 48 | 3. Issues *togglebg-issues* 49 | 50 | When using the plugin during insert mode, there should be no interruption in 51 | workflow. However, if you activate the plugin during REPLACE mode, you will 52 | switch to insert mode. 53 | 54 | vim:tw=78:noet:ts=8:ft=help:norl: 55 | -------------------------------------------------------------------------------- /experimental.vim: -------------------------------------------------------------------------------- 1 | if 0 2 | " using airline for a nice fancy statusline 3 | hi User1 term=standout ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow 4 | function! MySTL() 5 | if has("statusline") 6 | let stl='%-3.3n %f %{exists("b:mod")?("[".b:mod."]") : ""} %h%m%r%w[%{strlen(&ft)?&ft:"none"},%{(&fenc==""?&enc:&fenc)},%{&fileformat}%{(&bomb?",BOM":"")}]%=%-10.(%l,%c%V%) %p%%' 7 | if exists("*CSV_WCol") 8 | let csv = '%1*%{&ft=~"csv" ? CSV_WCol("Name") . " " . CSV_WCol() : ""}%*' 9 | else 10 | let csv = '' 11 | endif 12 | return stl.csv 13 | endif 14 | endfunc 15 | set stl=%!MySTL() 16 | endif 17 | 18 | "au TabLeave * :let g:last_tab=tabpagenr() 19 | 20 | "fu! LastTab() 21 | " if !exists("g:last_tab") 22 | " return 23 | " endif 24 | " exe "tabn" g:last_tab 25 | "endfu 26 | 27 | "nnoremap :call LastTab() 28 | "nmap :exe "tabn" exists("g:last_tab") ? g:last_tab :'' 29 | 30 | "if &term =~ "xterm\\|rxvt" 31 | " " use an orange cursor in insert mode 32 | " let &t_SI = "\]12;orange\x7" 33 | " " use a red cursor otherwise 34 | " let &t_EI = "\]12;red\x7" 35 | " silent !echo -ne "\033]12;red\007" 36 | " " reset cursor when vim exits 37 | " autocmd VimLeave * silent !echo -ne "\033]112\007" 38 | " " use \003]12;gray\007 for gnome-terminal 39 | "endif 40 | "let g:auto_color = 1 41 | ":au BufNewFile,BufRead *.css,*.html,*.htm :ColorHighlight! 42 | 43 | "au BufWinEnter * if empty(&ft) 44 | " \| setl indentexpr=indent(prevnonblank(v:lnum-1)) 45 | " \| setl indentkeys-=o 46 | " \| let b:undo_ftplugin='setl inde< indk<' 47 | " \| endif 48 | 49 | "fu! Unload() 50 | " echom b:undo_ftplugin 51 | " echom expand("") 52 | " exe b:undo_ftplugin 53 | " let b:foobar=1 54 | "endfu 55 | 56 | "au BufUnload * :call Unload() 57 | " 58 | " 59 | " fu! MySignsToggle() 60 | " if !has("signs") || empty(bufname('')) 61 | " return 62 | " endif 63 | " if !exists("s:signfile") 64 | " let s:signfile = tempname().'_' 65 | " endif 66 | " redir =>a|exe "sil sign place buffer=".bufnr('')|redir end 67 | " let signs = split(a, "\n")[1:] 68 | " if !empty(signs) 69 | " let bufnr = bufnr('') 70 | " exe ":sil SaveSigns!" s:signfile.bufnr('') 71 | " if bufnr('') != bufnr 72 | " exe "noa wq" 73 | " endif 74 | " sign unplace * 75 | " elseif filereadable(s:signfile.bufnr('')) 76 | " exe "so" s:signfile.bufnr('') 77 | " call delete(s:signfile.bufnr('')) 78 | " endif 79 | " endfu 80 | 81 | 82 | "au VimEnter * exe (localtime()%winnr('$')+1). "wincmd R|1wincmd w" 83 | -------------------------------------------------------------------------------- /filetype.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead kontact* set ft=mail 2 | au BufNewFile,BufRead fstab{,.????????},mtab setf fstab 3 | -------------------------------------------------------------------------------- /ftdetect/bash.vim: -------------------------------------------------------------------------------- 1 | "au BufRead,BufNewFile bash\.* set filetype=sh 2 | au BufNewFile,BufRead $HOME/bash/bash\.* set ft=sh 3 | -------------------------------------------------------------------------------- /ftdetect/csv.vim: -------------------------------------------------------------------------------- 1 | " Install Filetype detection for CSV files 2 | au BufRead,BufNewFile *.csv,*.dat,*.tsv,*.tab set filetype=csv 3 | 4 | -------------------------------------------------------------------------------- /ftdetect/misc.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead *.latex setf tex 2 | au BufNewFile,BufRead *.java setf java 3 | au BufNewFile,BufRead *.ihtml setf html 4 | 5 | "au FileType c so ~/.vim/c.vim 6 | "au FileType mail so ~/.vim/mail.vim 7 | "au FileType php so ~/.vim/php.vim 8 | "au FileType tex so ~/.vim/latex.vim 9 | "au FileType java so ~/.vim/java.vim 10 | -------------------------------------------------------------------------------- /ftplugin/gitcommit.vim: -------------------------------------------------------------------------------- 1 | set expandtab sw=2 sts=2 ts=2 nofoldenable 2 | -------------------------------------------------------------------------------- /ftplugin/gitrebase.vim: -------------------------------------------------------------------------------- 1 | setl nowrap 2 | -------------------------------------------------------------------------------- /ftplugin/netrw/index_netrw.vim: -------------------------------------------------------------------------------- 1 | " Commands and Mappings: "{{{1 2 | 3 | com! -buffer IndexList :call DoIndex() 4 | 5 | nmap :IndexList 6 | 7 | " Plugin Folkore "{{{1 8 | if exists("g:loaded_netrwindex") || &cp 9 | finish 10 | endif 11 | let g:loaded_netrwindex = 1 12 | let s:keepcpo = &cpo 13 | set cpo&vim 14 | 15 | " Functions {{{1 16 | fu! IndexEntries() "{{{2 17 | call SaveRestore(1) 18 | let s:filedic={} 19 | :1 20 | let s:first=search('.\?\V./', 'cnW') 21 | let cline=s:first 22 | while cline <= line('$') 23 | let content = getline(cline) 24 | let s:filedic[(cline - s:first + 1)] = content 25 | call setline(cline, content . ' ['. (cline - s:first +1) .']') 26 | let cline+=1 27 | endw 28 | call SaveRestore(0) 29 | endfu 30 | 31 | fu! HighlightIndex() "{{{2 32 | if exists("s:index_hl") 33 | sil! call matchdelete(s:index_hl) 34 | endif 35 | let s:index_hl = matchadd('WildMenu', '\%>' . (s:first-1) . 'l\[\d\+\]$') 36 | endfu 37 | 38 | 39 | fu! DoIndex() "{{{2 40 | if exists("s:filedic") 41 | call ClearIndex() 42 | unlet s:filedic 43 | endif 44 | call IndexEntries() 45 | call HighlightIndex() 46 | redraw! 47 | call JumpToIndex() 48 | call ClearIndex() 49 | unlet s:filedic 50 | endfu 51 | 52 | fu! ClearIndex() "{{{2 53 | call SaveRestore(1) 54 | exe 'silent! ' . s:first . ',$s/ \[\d\+\]$//g' 55 | call SaveRestore(0) 56 | endfu 57 | 58 | fu! SaveRestore(save) "{{{2 59 | if a:save 60 | let s:view=winsaveview() 61 | setl modifiable noro 62 | else 63 | setl nomodifiable nomod ro 64 | call winrestview(s:view) 65 | endif 66 | endfu 67 | 68 | fu! JumpToIndex() "{{{2 69 | call SaveRestore(1) 70 | let tag=input("Which tag to jump to: ") 71 | if !empty(tag) && !empty(get(s:filedic, tag, '')) 72 | call search('\V' . s:filedic[tag] . ' [' . tag . ']','cW') 73 | silent! s/ \[\d\+\]$//g 74 | setl nomodifiable nomod ro 75 | exe "norm ^\" 76 | redraw! 77 | else 78 | echomsg "Tag " . tag . " does not exist, aborting..." 79 | endif 80 | call SaveRestore(1) 81 | endfu 82 | 83 | " Commands and Mappings: "{{{1 84 | "com! -buffer IndexList :call DoIndex() 85 | 86 | "nmap :IndexList 87 | 88 | " Restoration And Modelines: {{{1 89 | let &cpo= s:keepcpo 90 | unlet s:keepcpo 91 | 92 | " Modeline {{{1 93 | " vim: fdm=marker sw=2 sts=2 ts=8 fdl=0 94 | -------------------------------------------------------------------------------- /ftplugin/qf.vim: -------------------------------------------------------------------------------- 1 | setlocal tw=10 wrap linebreak 2 | -------------------------------------------------------------------------------- /ftplugin/tex.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/ftplugin/tex.vim -------------------------------------------------------------------------------- /init.vim: -------------------------------------------------------------------------------- 1 | vimrc -------------------------------------------------------------------------------- /more.vim: -------------------------------------------------------------------------------- 1 | " source everything from ~/.vimrc 2 | so $HOME/.vimrc 3 | 4 | " remove blankspace on each side of 'CR' on the line below 5 | " the formatting with angled brackets is destroyed when posting here... 6 | nmap q :q 7 | nmap 8 | 9 | set ft=man nomod nolist 10 | " vi:ts=4 sw=4 expandtab 11 | -------------------------------------------------------------------------------- /pack/dist/start/alt/genutils/genutils-2.5.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/alt/genutils/genutils-2.5.zip -------------------------------------------------------------------------------- /pack/dist/start/alt/perforce/ftplugin/perforce.vim: -------------------------------------------------------------------------------- 1 | " Perforce spec filetype plugin file 2 | " Language: Perforce Spec File 3 | " Maintainer: Hari Krishna Dara 4 | " Last Change: 13-Jan-2006 @ 17:38 5 | " Since Version: 1.4 6 | " Revision: 1.0.6 7 | " Plugin Version: 2.1 8 | " Download From: 9 | " http://vim.sourceforge.net/scripts/script.php?script_id=240 10 | " TODO: 11 | 12 | " Only do this when not done yet for this buffer 13 | "if exists("b:did_ftplugin") 14 | " finish 15 | "endif 16 | 17 | " Don't load another plugin for this buffer 18 | let b:did_ftplugin = 1 19 | 20 | " Set some options suitable for pure text editing. 21 | setlocal tabstop=8 22 | setlocal softtabstop=0 23 | setlocal shiftwidth=8 24 | setlocal noexpandtab 25 | setlocal autoindent 26 | setlocal formatoptions=tcqnl 27 | setlocal comments=:#,fb:- 28 | setlocal wrapmargin=0 29 | setlocal textwidth=80 30 | let b:undo_ftplugin = 'setl ts< sts< sw< et< ai< fo< com< wm< tw<' 31 | 32 | if !exists("loaded_perforce_ftplugin") 33 | let s:patterns{'Change'} = '\%(^Description:\s*\_s\?\s*\)\zs\S\|^Description:' 34 | let s:patterns{'Branch'} = '\%(^View:\s*\_s\?\s*\)\zs\S\|^View:' 35 | let s:patterns{'Label'} = '\%(^View:\s*\_s\?\s*\)\zs\S\|^View:' 36 | let s:patterns{'Client'} = '\%(^View:\s*\_s\?\s*\)\zs\S\|^View:' 37 | let s:patterns{'Job'} = '\%(^Job:\s\+\)\@<=new\>\|\%(^Description:\s*\_s\?\s*\)\zs\S\|^Description:' 38 | let s:patterns{'Job_Spec'} = '^Fields:' 39 | let s:patterns{'User'} = '^User:' 40 | let s:patterns{'Depot'} = '\%(^Description:\s*\_s\?\s*\)\zs\S\|^Description:' 41 | let s:patterns{'Group'} = '\%(^Users:\s*\_s\?\s*\)\zs\S\|^Users:' 42 | " Position cursor on the most appropriate line based on the type of spec being 43 | " edited. 44 | function! s:PositionLine() 45 | let specPattern = '^# A Perforce \(.*\) Specification.$' 46 | if getline(1) =~ specPattern 47 | let spec = substitute(substitute(getline(1), specPattern, '\1', ''), ' ', 48 | \ '_', 'g') 49 | if spec != "" && exists('s:patterns'. spec) && 50 | \ search(s:patterns{spec}, 'w') != 0 51 | let b:p4Pattern = s:patterns{spec} 52 | normal! zz 53 | endif 54 | endif 55 | endfunction 56 | let loaded_perforce_ftplugin=1 57 | endif 58 | 59 | call s:PositionLine() 60 | -------------------------------------------------------------------------------- /pack/dist/start/alt/perforce/ftplugin/selectbuf_perforce.vim: -------------------------------------------------------------------------------- 1 | 2 | if !exists('loaded_selectbuf') || loaded_selectbuf < 303 3 | finish 4 | endif 5 | 6 | noremap pfa :SBExec PF add 7 | noremap pfg :SBExec PF sync 8 | noremap pfe :SBExec PF edit 9 | noremap pft :SBExec PF delete 10 | noremap pfr :SBExec PF revert 11 | noremap pfs :SBExec PF submit 12 | noremap pfl :SBExec PF lock 13 | noremap pfu :SBExec PF unlock 14 | noremap pfd :SBExec PF diff 15 | noremap pf2 :SBExec PF diff2 16 | -------------------------------------------------------------------------------- /pack/dist/start/alt/perforce/perforce-4.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/alt/perforce/perforce-4.1.zip -------------------------------------------------------------------------------- /pack/dist/start/alt/perforce/perforce/p4Utils.sh: -------------------------------------------------------------------------------- 1 | # Get the list of unopened files under the given $1/$2 directory. 2 | # It should be possible to implement the logic by using temp files and diff, 3 | # but this was more challenging to me :) 4 | # Ex: 5 | # unOpenedFiles=`getUnOpenedFiles "$root" "src"` 6 | getUnOpenedFiles() { 7 | path=$1 8 | dir=$2 9 | p4 opened $path/$dir/... \ 10 | | sed -e 's/.*'$dir'/'$dir'/' -e 's/#.*$//' \ 11 | | perl -n -e ' 12 | print; 13 | END 14 | { 15 | # Merge the opened list with all the files under BaseClasses. 16 | foreach $f (`find '$path/$dir' -type f | sed -e "s/.*'$dir'/'$dir'/"`) 17 | { 18 | print $f; 19 | } 20 | }' \ 21 | | sort -f \ 22 | | uniq -c \ 23 | | sed -n -e 's/\s*1\s*//p' 24 | } 25 | -------------------------------------------------------------------------------- /pack/dist/start/alt/perforce/perforce/perforcebugrep.vim: -------------------------------------------------------------------------------- 1 | " perforcebugrep.vim: Generate perforcebugrep.txt for perforce plugin. 2 | " Author: Hari Krishna (hari_vim at yahoo dot com) 3 | " Last Change: 29-Aug-2006 @ 17:57 4 | " Created: 07-Nov-2003 5 | " Requires: Vim-7.0, perforce.vim(4.0) 6 | " Version: 2.1.0 7 | " Licence: This program is free software; you can redistribute it and/or 8 | " modify it under the terms of the GNU General Public License. 9 | " See http://www.gnu.org/copyleft/gpl.txt 10 | 11 | if !exists("loaded_perforce") 12 | runtime plugin/perforce.vim 13 | endif 14 | if !exists("loaded_perforce") || loaded_perforce < 400 15 | echomsg "perforcebugrep: You need a newer version of perforce.vim plugin" 16 | finish 17 | endif 18 | 19 | " Make sure line-continuations won't cause any problem. This will be restored 20 | " at the end 21 | let s:save_cpo = &cpo 22 | set cpo&vim 23 | 24 | " Based on $VIM/bugreport.vim 25 | let _more = &more 26 | try 27 | PFInitialize " Make sure it is autoloaded. 28 | 29 | set nomore 30 | call delete('perforcebugrep.txt') 31 | if has("unix") 32 | !echo "uname -a" >perforcebugrep.txt 33 | !uname -a >>perforcebugrep.txt 34 | endif 35 | 36 | redir >>perforcebugrep.txt 37 | version 38 | 39 | echo "Perforce plugin version: " . loaded_perforce 40 | echo "Genutils plugin version: " . loaded_genutils 41 | 42 | echo "--- Perforce Plugin Settings ---" 43 | for nextSetting in perforce#PFGet('s:settings') 44 | let value = perforce#PFCall('s:_', nextSetting) 45 | echo nextSetting.': '.value 46 | endfor 47 | echo "s:p4Contexts: " . string(perforce#PFCall('s:_', 'Contexts')) 48 | echo "g:p4CurDirExpr: " . perforce#PFCall('s:_', 'CurDirExpr') 49 | echo "g:p4CurPresetExpr: " . perforce#PFCall('s:_', 'CurPresetExpr') 50 | echo "s:p4Client: " . perforce#PFCall('s:_', 'Client') 51 | echo "s:p4User: " . perforce#PFCall('s:_', 'User') 52 | echo "s:p4Port: " . perforce#PFCall('s:_', 'Port') 53 | 54 | echo "--- Current Buffer ---" 55 | echo "Current buffer: " . expand('%') 56 | echo "Current directory: " . getcwd() 57 | let tempDir = perforce#PFCall('s:_', 'TempDir') 58 | if isdirectory(tempDir) 59 | echo 'temp directory "' . tempDir . '" exists' 60 | else 61 | echo 'temp directory "' . tempDir . '" does NOT exist' 62 | endif 63 | if exists('b:p4OrgFileName') 64 | echo 'b:p4OrgFileName: ' . b:p4OrgFileName 65 | endif 66 | if exists('b:p4Command') 67 | echo 'b:p4Command: ' . b:p4Command 68 | endif 69 | if exists('b:p4Options') 70 | echo 'b:p4Options: ' . b:p4Options 71 | endif 72 | if exists('b:p4FullCmd') 73 | echo 'b:p4FullCmd: '. b:p4FullCmd 74 | endif 75 | if exists('g:p4FullCmd') 76 | echo 'g:p4FullCmd: '. g:p4FullCmd 77 | endif 78 | setlocal 79 | 80 | echo "--- p4 info ---" 81 | let info = perforce#PFCall('perforce#PFIF', '1', '4', 'info') 82 | " The above resets redir. 83 | redir >>perforcebugrep.txt 84 | echo info 85 | 86 | set all 87 | finally 88 | redir END 89 | let &more = _more 90 | sp perforcebugrep.txt 91 | endtry 92 | 93 | " Restore cpo. 94 | let &cpo = s:save_cpo 95 | unlet s:save_cpo 96 | 97 | " vim6:fdm=marker et sw=2 98 | -------------------------------------------------------------------------------- /pack/dist/start/alt/perforce/perforce/perforceutils.vim: -------------------------------------------------------------------------------- 1 | " perforceutils.vim: Add-On utilities for perforce plugin. 2 | " Author: Hari Krishna (hari_vim at yahoo dot com) 3 | " Last Change: 29-Aug-2006 @ 17:57 4 | " Created: 19-Apr-2004 5 | " Requires: Vim-7.0 6 | " Version: 1.2.0 7 | " Licence: This program is free software; you can redistribute it and/or 8 | " modify it under the terms of the GNU General Public License. 9 | " See http://www.gnu.org/copyleft/gpl.txt 10 | " NOTE: 11 | " - This may not work well if there are multiple diff formats are mixed in 12 | " the same file. 13 | 14 | " Make sure line-continuations won't cause any problem. This will be restored 15 | " at the end 16 | let s:save_cpo = &cpo 17 | set cpo&vim 18 | 19 | " CAUTION: Don't assume the existence of plugin/perforce.vim (or any other 20 | " plugins) at the time this file is sourced. 21 | 22 | command! -nargs=0 PFDiffLink :call perforceutils#DiffOpenSrc(0) 23 | command! -nargs=0 PFDiffPLink :call perforceutils#DiffOpenSrc(1) 24 | 25 | command! PFShowConflicts :call perforceutils#ShowConflicts() 26 | 27 | aug P4DiffLink 28 | au! 29 | au FileType * :if expand('') ==# 'diff' && exists('b:p4OrgFileName') | 30 | \ call perforceutils#SetupDiffLink() | 31 | \ endif 32 | aug END 33 | 34 | 35 | " Restore cpo. 36 | let &cpo = s:save_cpo 37 | unlet s:save_cpo 38 | 39 | " vim6:fdm=marker et sw=2 40 | -------------------------------------------------------------------------------- /pack/dist/start/alt/perforce/perforce/restor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Author: Hari Krishna Dara ( hari_vim at yahoo dot com ) 3 | # Last Change: 06-Jan-2004 @ 19:07 4 | # Requires: 5 | # - bash or ksh (tested on cygwin and MKS respectively). 6 | # - Info Zip for the -z option to work (comes with linux/cygwin). Download for 7 | # free from: 8 | # http://www.info-zip.org/ 9 | # Version: 1.1.0 10 | # Licence: This program is free software; you can redistribute it and/or 11 | # modify it under the terms of the GNU General Public License. 12 | # See http://www.gnu.org/copyleft/gpl.txt 13 | usage() 14 | { 15 | cat < 17 | The input package is the name of the backup directory or the archive file(with 18 | or without extension). 19 | END 20 | } 21 | 22 | inputType='' 23 | inputPackage='' 24 | verboseMode=1 25 | if [ -d $1 ]; then 26 | inputType='dir' 27 | inputPackage=$1 28 | elif [ -r $1.zip ]; then 29 | inputType='zip' 30 | inputPackage=$1.zip 31 | elif [ -r $1.tar.gz ]; then 32 | inputType='tar' 33 | inputPackage=$1.tar.gz 34 | tarOpt='z' 35 | elif [ -r $1.tar.bz2 ]; then 36 | inputType='tar' 37 | inputPackage=$1.tar.bz2 38 | tarOpt='j' 39 | elif [ -r $1.tar.Z ]; then 40 | inputType='tar' 41 | inputPackage=$1.tar.Z 42 | tarOpt='Z' 43 | elif [ -r $1.tar ]; then 44 | inputType='tar' 45 | inputPackage=$1.tar 46 | tarOpt='' 47 | elif [ -r $1 ]; then 48 | case $1 in 49 | *.zip) 50 | inputType='zip' 51 | ;; 52 | *.tar.gz) 53 | inputType='tar' 54 | tarOpt='z' 55 | ;; 56 | *.tar.bz2) 57 | inputType='tar' 58 | tarOpt='j' 59 | ;; 60 | *.tar.Z) 61 | inputType='tar' 62 | tarOpt='Z' 63 | ;; 64 | *.tar) 65 | inputType='tar' 66 | tarOpt='' 67 | ;; 68 | *) 69 | echo "$0: Unknown input package type." 70 | exit 1 71 | ;; 72 | esac 73 | inputPackage=$1 74 | else 75 | echo "$0: No input package found for $1" 76 | exit 1 77 | fi 78 | 79 | if [ $inputType = 'dir' ]; then 80 | listCmd="find $inputPackage -type f -print | sed -e 's;^$1/*;;'" 81 | copyCmd="cp" 82 | if [ $verboseMode -ne 0 ]; then 83 | copyCmd="$copyCmd -v" 84 | fi 85 | copyCmd="$copyCmd -r $inputPackage/* ." 86 | elif [ $inputType = 'zip' ]; then 87 | listCmd="unzip -l -qq $inputPackage | awk 'BEGIN{OFS=\"\"}{\$1=\"\"; \$2=\"\"; \$3=\"\"; print \$0}'" 88 | copyCmd="unzip" 89 | if [ $verboseMode -ne 1 ]; then 90 | copyCmd="$copyCmd -q" 91 | fi 92 | copyCmd="$copyCmd $inputPackage.zip" 93 | elif [ $inputType = 'tar' ]; then 94 | listCmd="tar -t${tarOpt}f $inputPackage" 95 | copyCmd="tar" 96 | if [ $verboseMode -ne 0 ]; then 97 | copyCmd="$copyCmd -v" 98 | fi 99 | copyCmd="$copyCmd -x${tarOpt}f $inputPackage" 100 | fi 101 | 102 | if [ $verboseMode -eq 1 ]; then 103 | echo "Opening files in Perforce for edit." 104 | fi 105 | discardOutput='' 106 | if [ $verboseMode -eq 0 ]; then 107 | discardOutput=' > /dev/null' 108 | fi 109 | #eval $listCmd | cat 110 | eval $listCmd | p4 -x - edit $discardOutput 111 | if [ $? -ne 0 ]; then 112 | echo "$0: There was an error opening files in Perforce for edit." 113 | echo "Make sure you are in the right directory and try again." 114 | exit 1 115 | fi 116 | 117 | if [ $verboseMode -eq 1 ]; then 118 | echo "$0: Copying files to the target directories." 119 | fi 120 | #echo $copyCmd 121 | eval $copyCmd 122 | if [ $? -ne 0 ]; then 123 | echo "$0: Error copying files." 124 | exit 1 125 | fi 126 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/00changelog.i: -------------------------------------------------------------------------------- 1 |  dummy changelog to prevent using the old repo layout -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/bookmarks: -------------------------------------------------------------------------------- 1 | e8b115e595d178f2cef8456d6130440be92888a8 master 2 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/branch: -------------------------------------------------------------------------------- 1 | default 2 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/cache/branch2-served: -------------------------------------------------------------------------------- 1 | e8b115e595d178f2cef8456d6130440be92888a8 97 2 | e8b115e595d178f2cef8456d6130440be92888a8 o default 3 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/dirstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/dirstate -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/hgrc: -------------------------------------------------------------------------------- 1 | [paths] 2 | default = https://bitbucket.org/ludovicchabant/vim-lawrencium 3 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/requires: -------------------------------------------------------------------------------- 1 | dotencode 2 | fncache 3 | revlogv1 4 | store 5 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/00changelog.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/00changelog.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/00manifest.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/00manifest.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/_r_e_a_d_m_e.markdown.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/_r_e_a_d_m_e.markdown.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/doc/lawrencium.txt.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/doc/lawrencium.txt.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/ftdetect/hgcommit.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/ftdetect/hgcommit.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/ftdetect/hgstatus.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/ftdetect/hgstatus.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/ftplugin/hglog.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/ftplugin/hglog.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/plugin/hglog.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/plugin/hglog.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/plugin/lawrencium.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/plugin/lawrencium.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/resources/_beautiful_soup.py.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/resources/_beautiful_soup.py.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/resources/_generate_hg_usage.py.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/resources/_generate_hg_usage.py.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/resources/hg__command__file__types.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/resources/hg__command__file__types.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/resources/hg__log.style.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/resources/hg__log.style.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/resources/hg__usage.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/resources/hg__usage.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hgannotate.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hgannotate.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hgcommit.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hgcommit.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hggraphlog.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hggraphlog.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hglog.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hglog.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hgqseries.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hgqseries.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hgstatus.vim.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/syntax/hgstatus.vim.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/~2ehgignore.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/~2ehgignore.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/data/~2ehgtags.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/data/~2ehgtags.i -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/fncache: -------------------------------------------------------------------------------- 1 | data/syntax/hggraphlog.vim.i 2 | data/resources/GenerateHgUsage.py.i 3 | data/resources/BeautifulSoup.py.i 4 | data/resources/hg_log.style.i 5 | data/ftdetect/hgstatus.vim.i 6 | data/plugin/lawrencium.vim.i 7 | data/syntax/hgcommit.vim.i 8 | data/doc/lawrencium.txt.i 9 | data/.hgtags.i 10 | data/.hgignore.i 11 | data/syntax/hglog.vim.i 12 | data/syntax/hgstatus.vim.i 13 | data/resources/hg_usage.vim.i 14 | data/README.markdown.i 15 | data/syntax/hgqseries.vim.i 16 | data/ftdetect/hgcommit.vim.i 17 | data/syntax/hgannotate.vim.i 18 | data/resources/hg_command_file_types.vim.i 19 | data/plugin/hglog.vim.i 20 | data/ftplugin/hglog.vim.i 21 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/phaseroots: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/phaseroots -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/undo: -------------------------------------------------------------------------------- 1 | 00changelog.i0 2 | 00manifest.i0 3 | data/.hgignore.i0 4 | data/.hgtags.i0 5 | data/README.markdown.i0 6 | data/doc/lawrencium.txt.i0 7 | data/ftdetect/hgcommit.vim.i0 8 | data/ftdetect/hgstatus.vim.i0 9 | data/ftplugin/hglog.vim.i0 10 | data/plugin/hglog.vim.i0 11 | data/plugin/lawrencium.vim.i0 12 | data/resources/BeautifulSoup.py.i0 13 | data/resources/GenerateHgUsage.py.i0 14 | data/resources/hg_command_file_types.vim.i0 15 | data/resources/hg_log.style.i0 16 | data/resources/hg_usage.vim.i0 17 | data/syntax/hgannotate.vim.i0 18 | data/syntax/hgcommit.vim.i0 19 | data/syntax/hggraphlog.vim.i0 20 | data/syntax/hglog.vim.i0 21 | data/syntax/hgqseries.vim.i0 22 | data/syntax/hgstatus.vim.i0 23 | fncache0 24 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/store/undo.phaseroots: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/store/undo.phaseroots -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/undo.bookmarks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/undo.bookmarks -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/undo.branch: -------------------------------------------------------------------------------- 1 | default -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/undo.desc: -------------------------------------------------------------------------------- 1 | 0 2 | pull 3 | https://bitbucket.org/ludovicchabant/vim-lawrencium 4 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hg/undo.dirstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisbra/vim_dotfiles/03f29cf1b6c7643788bc43dc35c788df753b6356/pack/dist/start/vim-lawrencium/.hg/undo.dirstate -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *.pyc 3 | doc/tags 4 | 5 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/.hgtags: -------------------------------------------------------------------------------- 1 | f535cda5d20e7a8e8ec5d9946bea4dbc630be7e1 0.3.0 2 | cac06d16dafcbdd139dd491132d85cd0c7ea8a0a 0.3.1 3 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/README.markdown: -------------------------------------------------------------------------------- 1 | 2 | Lawrencium 3 | ========== 4 | 5 | Lawrencium is a [Mercurial][] wrapper for [Vim][], inspired by Tim Pope's [Fugitive][]. 6 | 7 | 8 | Installation 9 | ------------ 10 | 11 | The recommended method to install Lawrencium is to use [Pathogen][], also from Tim Pope: 12 | 13 | cd ~/.vim/bundle 14 | hg clone https://bitbucket.org/ludovicchabant/vim-lawrencium 15 | 16 | You can then update the help tags with `:call pathogen#helptags()` and browse Lawrencium's help pages with `:help lawrencium`. 17 | 18 | 19 | Quick Start 20 | ----------- 21 | 22 | Open a file from one of your Mercurial repositories. 23 | 24 | :e ~/Work/Project1/src/foo.py 25 | 26 | Work on it for a bit, then open another file, this time using `Hgedit` and a 27 | repository-relative path: 28 | 29 | :Hgedit src/bar.py 30 | 31 | Take advantage of the auto-completion when typing the path! Work on that 32 | other file too, then compare it to the parent revision version: 33 | 34 | :Hgvdiff 35 | 36 | Continue working. At any moment, you can run a Mercurial command and get a 37 | quick glance at its output: 38 | 39 | :Hg log --limit 5 src/blah/bleh 40 | 41 | Note how auto-completion will help you with all the built-in commands and 42 | their options! Any other parameter will auto-complete with repository-relative 43 | paths. 44 | 45 | Once you're happy with your work, bring up the status window: 46 | 47 | :Hgstatus 48 | 49 | You can see the difference between modified files and their parent revision 50 | version easily by moving the cursor to the appropriate line and hitting 51 | . You can also do an `addremove` by using (use the selection mode 52 | to add/remove several files at once!). 53 | 54 | Now it's time to commit. While still in the status window, remove all mentions 55 | of files you don't want to commit, and hit . Write your commit message, 56 | go `:wq`, and you're done! You can check everything went fine: 57 | 58 | :Hg tip 59 | 60 | You can also commit faster with the `:Hgcommit` command of course! 61 | 62 | And that's it for now. Open the help file with `:help lawrencium`, and post 63 | your questions and problems in the [issue tracker][1] on BitBucket. 64 | 65 | 66 | [mercurial]: http://hg-scm.com 67 | [vim]: http://www.vim.org 68 | [fugitive]: https://github.com/tpope/vim-fugitive 69 | [pathogen]: https://github.com/tpope/vim-pathogen 70 | [1]: https://bitbucket.org/ludovicchabant/vim-lawrencium/issues 71 | 72 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/ftdetect/hgcommit.vim: -------------------------------------------------------------------------------- 1 | au BufRead,BufNewFile hg-editor-*.txt set filetype=hgcommit 2 | 3 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/ftdetect/hgstatus.vim: -------------------------------------------------------------------------------- 1 | au BufRead,BufNewFile hg-status-*.txt set filetype=hgstatus 2 | 3 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/ftplugin/hglog.vim: -------------------------------------------------------------------------------- 1 | " Vim filetype plugin file 2 | " Language: hg log output 3 | " Maintainer: Ludovic Chabant 4 | 5 | if exists("b:did_ftplugin") 6 | finish 7 | endif 8 | let b:did_ftplugin = 1 9 | 10 | let s:cpo_save = &cpo 11 | set cpo&vim 12 | 13 | let b:undo_ftplugin = "setlocal cole< cocu<" 14 | 15 | if has("conceal") 16 | setlocal cole=2 cocu=nc 17 | endif 18 | 19 | let &cpo = s:cpo_save 20 | unlet s:cpo_save 21 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/resources/GenerateHgUsage.py: -------------------------------------------------------------------------------- 1 | import re 2 | import urllib2 3 | from BeautifulSoup import BeautifulSoup 4 | 5 | # Load the documentation page. 6 | print "Loading HG documentation from selenic.com..." 7 | url = urllib2.urlopen("http://www.selenic.com/mercurial/hg.1.html") 8 | soup = BeautifulSoup(url) 9 | 10 | # Open the output file. 11 | output = 'hg_usage.vim' 12 | f = open(output, 'w') 13 | 14 | # A little header for people peeking in there. 15 | f.write("\" LAWRENCIUM - MERCURIAL USAGE\n") 16 | f.write("\" This file is generated automatically.\n") 17 | f.write("\n") 18 | 19 | # Start with the global options. 20 | f.write("let g:lawrencium_hg_options = [\n") 21 | for option in soup.find('div', id='options').findAll('span', {'class': 'option'}): 22 | f.write(" \\'%s',\n" % option.string) 23 | f.write(" \\]\n") 24 | f.write("\n") 25 | 26 | # Now get the usage for all commands. 27 | f.write("let g:lawrencium_hg_commands = {\n") 28 | for command in soup.find('div', id='commands').findAll('div', {'class': 'section'}): 29 | print " - %s" % format(command.h2.string) 30 | f.write(" \\'%s': [\n" % command.h2.string) 31 | option_table = command.find('table', { 'class': re.compile('option-list') }) 32 | if option_table: 33 | for option in option_table.findAll('span', { 'class': 'option'}): 34 | f.write(" \\'%s',\n" % option.string) 35 | f.write(" \\],\n") 36 | f.write(" \\}\n") 37 | f.write("\n") 38 | 39 | # Close the output file, and we're done. 40 | f.close() 41 | print "Done!" 42 | 43 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/resources/hg_command_file_types.vim: -------------------------------------------------------------------------------- 1 | " LAWRENCIUM - MERCURIAL COMMANDS FILE TYPES 2 | " 3 | if !exists('g:lawrencium_hg_commands_file_types') 4 | let g:lawrencium_hg_commands_file_types = {} 5 | endif 6 | 7 | let g:lawrencium_hg_commands_file_types.diff = 'diff' 8 | let g:lawrencium_hg_commands_file_types.glog = 'hggraphlog' 9 | 10 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/resources/hg_log.style: -------------------------------------------------------------------------------- 1 | changeset = '{rev}:{node|short}{bookmarks}{tags} {desc|firstline} (by {author|user}, {date|localdate|age})\n' 2 | 3 | start_bookmarks = ' ' 4 | bookmark = '+{bookmark}' 5 | 6 | start_tags = ' ' 7 | tag = '#{tag}' 8 | 9 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/syntax/hgannotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: hg annotate output 3 | " Maintainer: Ludovic Chabant 4 | " Filenames: 5 | 6 | if exists("b:current_syntax") 7 | finish 8 | endif 9 | 10 | syn case match 11 | 12 | syn match hgannotateAnnotation '\v[^\:]+\:'he=e-1 13 | syn match hgannotateAuthor '\v^[^ ]+' containedin=hgannotateAnnotation 14 | syn match hgannotateNumber '\v\s\d+\s'ms=s+1,me=e-1 containedin=hgannotateAnnotation 15 | syn match hgannotateChangeset '\v\s[a-f0-9]{12}\s'ms=s+1,me=e-1 containedin=hgannotateAnnotation 16 | syn match hgannotateDate '\v\s[0-9]{4}\-[0-9]{2}\-[0-9]{2}\:'ms=s+1,me=e-1 containedin=hgannotateAnnotation 17 | syn match hgannotateLongDate '\v\s\w{3} \w{3} \d\d \d\d\:\d\d\:\d\d \d{4} [\+\-]?\d{4}\:'ms=s+1,me=e-1 containedin=hgannotateAnnotation 18 | 19 | hi def link hgannotateAuthor Keyword 20 | hi def link hgannotateNumber Number 21 | hi def link hgannotateChangeset Identifier 22 | hi def link hgannotateDate PreProc 23 | hi def link hgannotateLongDate PreProc 24 | 25 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/syntax/hgcommit.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: hg commit file 3 | " Maintainer: Pierre Bourdon 4 | " Filenames: ^hg-editor-*.txt 5 | " Last Change: 2010 Jun 13 6 | 7 | " Some parts of the code by Dan LaMotte 8 | 9 | if exists("b:current_syntax") 10 | finish 11 | endif 12 | 13 | syn case match 14 | syn sync minlines=50 15 | 16 | if has("spell") 17 | syn spell toplevel 18 | endif 19 | 20 | syn match hgcommitFirstline "\%^.*" nextgroup=hgcommitBlank skipnl 21 | syn match hgcommitSummary "^.\{0,78\}" contained containedin=hgcommitFirstline nextgroup=hgcommitOverflow contains=@Spell 22 | syn match hgcommitOverflow ".*" contained contains=@Spell 23 | syn match hgcommitBlank "^HG:\@!.*" contained contains=@Spell 24 | 25 | syn match hgcommitComment "^HG:.*" 26 | 27 | syn match hgcommitOnBranch "\%(^HG: \)\@<=\ '" contained containedin=hgcommitComment nextgroup=hgcommitBranch 28 | syn match hgcommitBranch "[^']\+" contained 29 | syn match hgcommitAdded "\%(^HG: \)\@<=\" contained containedin=hgcommitComment nextgroup=hgcommitFile 30 | syn match hgcommitChanged "\%(^HG: \)\@<=\" contained containedin=hgcommitComment nextgroup=hgcommitFile 31 | syn match hgcommitRemoved "\%(^HG: \)\@<=\" contained containedin=hgcommitComment nextgroup=hgcommitFile 32 | syn match hgcommitFile " \S\+" contained containedin=hgcommitAdded,hgcommitChanged 33 | 34 | hi def link hgcommitSummary Keyword 35 | hi def link hgcommitOverflow Error 36 | hi def link hgcommitBlank Error 37 | 38 | hi def link hgcommitComment Comment 39 | hi def link hgcommitOnBranch Comment 40 | hi def link hgcommitBranch Special 41 | hi def link hgcommitOnBranchEnd Comment 42 | hi def link hgcommitAdded Type 43 | hi def link hgcommitChanged Type 44 | hi def link hgcommitRemoved Type 45 | hi def link hgcommitFile Constant 46 | 47 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/syntax/hggraphlog.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: hg graphlog output 3 | " Maintainer: Ludovic Chabant 4 | " Filenames: 5 | 6 | if exists("b:current_syntax") 7 | finish 8 | endif 9 | 10 | syn case match 11 | 12 | syn match hggraphlogBranch /^|\(\( .*\)\|$\)/he=s+1 13 | syn match hggraphlogBranchMerge /^|[\\\/]/ 14 | syn match hggraphlogNode /^o .*/he=s+1 15 | 16 | syn match hggraphlogBranch2 / |\(\( .*\)\|$\)/he=s+2 contained containedin=hggraphlogBranch,hggraphlogNode 17 | syn match hggraphlogBranch2Merge / |[\\\/]/ contained containedin=hggraphlogBranch 18 | syn match hggraphlogNode2 / o .*/he=s+2 contained containedin=hggraphlogBranch 19 | 20 | syn match hggraphlogBranch3 / | |\(\( .*\)\|$\)/ms=s+3,he=s+4 contained containedin=hggraphlogBranch2,hggraphlogNode2 21 | syn match hggraphlogBranch3Merge / | |[\\\/]/ms=s+3 contained containedin=hggraphlogBranch2 22 | syn match hggraphlogNode3 / | o .*/ms=s+3,he=s+4 contained containedin=hggraphlogBranch2 23 | 24 | syn match hggraphlogBranch4 / | | |\(\( .*\)\|$\)/ms=s+5,he=s+6 contained containedin=hggraphlogBranch3,hggraphlogNode3 25 | syn match hggraphlogBranch4Merge / | | |[\\\/]/ms=s+5 contained containedin=hggraphlogBranch3 26 | syn match hggraphlogNode4 / | | o .*/ms=s+5,he=s+6 contained containedin=hggraphlogBranch3 27 | 28 | syn match hggraphlogHead /^@\s/he=e-1 29 | 30 | hi def link hggraphlogBranch hlLevel1 31 | hi def link hggraphlogBranchMerge hlLevel1 32 | hi def link hggraphlogNode hlLevel1 33 | hi def link hggraphlogBranch2 hlLevel2 34 | hi def link hggraphlogBranch2Merge hlLevel2 35 | hi def link hggraphlogNode2 hlLevel2 36 | hi def link hggraphlogBranch3 hlLevel3 37 | hi def link hggraphlogBranch3Merge hlLevel3 38 | hi def link hggraphlogNode3 hlLevel3 39 | hi def link hggraphlogBranch4 hlLevel4 40 | hi def link hggraphlogBranch4Merge hlLevel4 41 | hi def link hggraphlogNode4 hlLevel4 42 | hi def link hggraphlogHead PreProc 43 | 44 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/syntax/hglog.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: hg log output 3 | " Maintainer: Ludovic Chabant 4 | " Filenames: 5 | 6 | if exists("b:current_syntax") 7 | finish 8 | endif 9 | 10 | syn case match 11 | 12 | syn match hglogRev '\v^[0-9]+' 13 | syn match hglogNode '\v:[a-f0-9]{6,} 'hs=s+1,me=e-1 14 | syn match hglogBookmark '\v \+[^ ]+ 'ms=s+1,me=e-1 contains=hglogBookmarkPlus 15 | syn match hglogTag '\v #[^ ]+ 'ms=s+1,me=e-1 contains=hglogTagSharp 16 | syn match hglogAuthorAndAge '\v\(by .+, .+\)$' 17 | 18 | syn match hglogBookmarkPlus '\v\+' contained conceal 19 | syn match hglogTagSharp '\v#' contained conceal 20 | 21 | hi def link hglogRev Identifier 22 | hi def link hglogNode PreProc 23 | hi def link hglogBookmark Statement 24 | hi def link hglogTag Constant 25 | hi def link hglogAuthorAndAge Comment 26 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/syntax/hgqseries.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: hg qseries 'augmented' output 3 | " Maintainer: Ludovic Chabant 4 | " Filenames: 5 | 6 | if exists("b:current_syntax") 7 | finish 8 | endif 9 | 10 | syn case match 11 | 12 | syn match hgqseriesApplied /^\*[^:]+: / 13 | syn match hgqseriesUnapplied /^[^\*].*: / 14 | 15 | hi def link hgqseriesApplied Identifier 16 | hi def link hgqseriesUnapplied Comment 17 | 18 | -------------------------------------------------------------------------------- /pack/dist/start/vim-lawrencium/syntax/hgstatus.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: hg status output 3 | " Maintainer: Ludovic Chabant 4 | " Filenames: ^hg-status-*.txt 5 | 6 | if exists("b:current_syntax") 7 | finish 8 | endif 9 | 10 | syn case match 11 | 12 | syn match hgstatusModified "^M\s.*" 13 | syn match hgstatusAdded "^A\s.*" 14 | syn match hgstatusRemoved "^R\s.*" 15 | syn match hgstatusClean "^C\s.*" 16 | syn match hgstatusMissing "^?\s.*" 17 | syn match hgstatusNotTracked "^!\s.*" 18 | syn match hgstatusIgnored "^I\s.*" 19 | 20 | hi def link hgstatusModified Identifier 21 | hi def link hgstatusAdded Statement 22 | hi def link hgstatusRemoved PreProc 23 | hi def link hgstatusClean Constant 24 | hi def link hgstatusMissing Error 25 | hi def link hgstatusNotTracked Todo 26 | hi def link hgstatusIgnored Ignore 27 | hi def link hgstatusFileName Constant 28 | 29 | -------------------------------------------------------------------------------- /plugin/ColorizerPlugin.vim: -------------------------------------------------------------------------------- 1 | " Plugin: Highlight Colornames and Values 2 | " Maintainer: Christian Brabandt 3 | " URL: http://www.github.com/chrisbra/color_highlight 4 | " Last Change: Thu, 15 Jan 2015 21:49:17 +0100 5 | " Licence: Vim License (see :h License) 6 | " Version: 0.11 7 | " GetLatestVimScripts: 3963 11 :AutoInstall: Colorizer.vim 8 | " 9 | " This plugin was inspired by the css_color.vim plugin from Nikolaus Hofer. 10 | " Changes made: - make terminal colors work more reliably and with all 11 | " color terminals 12 | " - performance improvements, coloring is almost instantenously 13 | " - detect rgb colors like this: rgb(R,G,B) 14 | " - detect hsl coloring: hsl(H,V,L) 15 | " - fix small bugs 16 | 17 | " Init some variables "{{{1 18 | " Plugin folklore "{{{2 19 | if v:version < 700 || exists("g:loaded_colorizer") || &cp 20 | finish 21 | endif 22 | let g:loaded_colorizer = 1 23 | 24 | let s:cpo_save = &cpo 25 | set cpo&vim 26 | 27 | " helper functions "{{{1 28 | fu! ColorHiArgs(A,L,P) 29 | return "syntax\nmatch\nnosyntax\nnomatch" 30 | endfu 31 | 32 | " define commands "{{{1 33 | command! -bang -range=% -nargs=? -complete=custom,ColorHiArgs ColorHighlight 34 | \ :call Colorizer#DoColor(, , , ) 35 | command! -bang -nargs=1 RGB2Term 36 | \ :call Colorizer#RGB2Term(, ) 37 | command! -nargs=1 Term2RGB :call Colorizer#Term2RGB() 38 | 39 | command! -bang ColorClear :call Colorizer#ColorOff() 40 | command! -bang ColorToggle :call Colorizer#ColorToggle() 41 | command! -nargs=1 HSL2RGB :call Colorizer#HSL2Term() 42 | command! ColorContrast :call Colorizer#SwitchContrast() 43 | command! ColorSwapFgBg :call Colorizer#SwitchFGBG() 44 | 45 | " define mappings "{{{1 46 | nnoremap Colorizer :ColorToggle 47 | xnoremap Colorizer :ColorHighlight 48 | nnoremap ColorContrast :ColorContrast 49 | xnoremap ColorContrast :ColorContrast 50 | nnoremap ColorFgBg :ColorSwapFgBg 51 | xnoremap ColorFgBg :ColorSwapFgBg 52 | 53 | if get(g:, 'colorizer_auto_map', 0) 54 | " only map, if the mapped keys are not yet taken by a different plugin 55 | " and the user hasn't mapped the function to different keys 56 | if empty(maparg('cC', 'n')) && empty(hasmapto('Colorizer', 'n')) 57 | nmap cC Colorizer 58 | endif 59 | if empty(maparg('cC', 'x')) && empty(hasmapto('Colorizer', 'x')) 60 | xmap cC Colorizer 61 | endif 62 | if empty(maparg('cT', 'n')) && empty(hasmapto('ColorContrast', 'n')) 63 | nmap cT ColorContrast 64 | endif 65 | if empty(maparg('cT', 'x')) && empty(hasmapto('ColorContrast', 'n')) 66 | xmap cT ColorContrast 67 | endif 68 | if empty(maparg('cF', 'n')) && empty(hasmapto('ColorFgBg', 'n')) 69 | nmap cF ColorFgBg 70 | endif 71 | if empty(maparg('cF', 'x')) && empty(hasmapto('ColorFgBg', 'x')) 72 | xmap cF ColorFgBg 73 | endif 74 | endif 75 | 76 | " Enable Autocommands "{{{1 77 | if exists("g:colorizer_auto_color") 78 | " Prevent autoloading 79 | exe "call Colorizer#AutoCmds(g:colorizer_auto_color)" 80 | endif 81 | 82 | if exists("g:colorizer_auto_filetype") 83 | " Setup some autocommands for specific filetypes. 84 | aug FT_ColorizerPlugin 85 | au! 86 | exe "au Filetype" g:colorizer_auto_filetype 87 | \ "call Colorizer#LocalFTAutoCmds(1)\| 88 | \ :ColorHighlight" 89 | aug END 90 | endif 91 | 92 | " Plugin folklore and Vim Modeline " {{{1 93 | let &cpo = s:cpo_save 94 | unlet s:cpo_save 95 | " vim: set foldmethod=marker et fdl=0: 96 | -------------------------------------------------------------------------------- /plugin/CopyFolds.vim: -------------------------------------------------------------------------------- 1 | function! CopyNonFolded() 2 | let lnum=1 3 | let buffer=[] 4 | while lnum <= line("$") 5 | if (foldclosed(lnum) == -1) 6 | let buffer += getline(lnum, lnum) 7 | let lnum += 1 8 | else 9 | let buffer += [ foldtextresult(lnum) ] 10 | let lnum = foldclosedend(lnum) + 1 11 | endif 12 | endwhile 13 | top new 14 | set bt=nofile 15 | call append(".",buffer) 16 | 0d_ 17 | endfu 18 | -------------------------------------------------------------------------------- /plugin/CustomFoldText.vim: -------------------------------------------------------------------------------- 1 | " Customized version of folded text, idea by 2 | " http://www.gregsexton.org/2011/03/improving-the-text-displayed-in-a-fold/ 3 | fu! CustomFoldText(string) "{{{1 4 | "get first non-blank line 5 | let fs = v:foldstart 6 | if getline(fs) =~ '^\s*$' 7 | let fs = nextnonblank(fs + 1) 8 | endif 9 | if fs > v:foldend 10 | let line = getline(v:foldstart) 11 | else 12 | let line = substitute(getline(fs), '\t', repeat(' ', &tabstop), 'g') 13 | endif 14 | let pat = matchstr(&l:cms, '^\V\.\{-}\ze%s\m') 15 | " remove leading comments from line 16 | let line = substitute(line, '^\s*'.pat.'\s*', '', '') 17 | " remove foldmarker from line 18 | let pat = '\%('. pat. '\)\?\s*'. split(&l:fmr, ',')[0]. '\s*\d\+' 19 | let line = substitute(line, pat, '', '') 20 | 21 | " let line = substitute(line, matchstr(&l:cms, 22 | " \ '^.\{-}\ze%s').'\?\s*'. split(&l:fmr,',')[0].'\s*\d\+', '', '') 23 | 24 | let w = get(g:, 'custom_foldtext_max_width', winwidth(0)) - &foldcolumn - (&number ? 8 : 0) 25 | let foldSize = 1 + v:foldend - v:foldstart 26 | let foldSizeStr = " " . foldSize . " lines " 27 | let foldLevelStr = '+'. v:folddashes 28 | let lineCount = line("$") 29 | if has("float") 30 | try 31 | let foldPercentage = printf("[%.1f", (foldSize*1.0)/lineCount*100) . "%] " 32 | catch /^Vim\%((\a\+)\)\=:E806/ " E806: Using Float as String 33 | let foldPercentage = printf("[of %d lines] ", lineCount) 34 | endtry 35 | endif 36 | if exists("*strwdith") 37 | let expansionString = repeat(a:string, w - strwidth(foldSizeStr.line.foldLevelStr.foldPercentage)) 38 | else 39 | let expansionString = repeat(a:string, w - strlen(substitute(foldSizeStr.line.foldLevelStr.foldPercentage, '.', 'x', 'g'))) 40 | endif 41 | return line . expansionString . foldSizeStr . foldPercentage . foldLevelStr 42 | endf 43 | 44 | set foldtext=CustomFoldText('.') 45 | -------------------------------------------------------------------------------- /plugin/DistractFreePlugin.vim: -------------------------------------------------------------------------------- 1 | " DistractFreePlugin - Plugin for creating WriteRoom like state in Vim 2 | " ------------------------------------------------------------- 3 | " Version: 0.5 4 | " Maintainer: Christian Brabandt 5 | " Last Change: Wed, 14 Aug 2013 22:36:39 +0200 6 | " Script: http://www.vim.org/scripts/script.php?script_id=4357 7 | " Copyright: (c) 2009-2014 by Christian Brabandt 8 | " 9 | " The VIM LICENSE applies to DistractFree.vim 10 | " (see |copyright|) except use "DistractFree.vim" 11 | " instead of "Vim". 12 | " No warranty, express or implied. 13 | " *** *** Use At-Your-Own-Risk! *** *** 14 | " GetLatestVimScripts: 4357 5 :AutoInstall: DistractFree.vim 15 | 16 | " Init: "{{{1 17 | let s:cpo= &cpo 18 | if exists("g:loaded_distract_free") || &cp 19 | finish 20 | endif 21 | set cpo&vim 22 | 23 | " Parse Version line 24 | let g:loaded_distract_free = matchstr(getline(3), '\.\zs\d\+') + 0 25 | 26 | " Define the Commands " {{{2 27 | command! -nargs=0 DistractFreeToggle call DistractFree#DistractFreeToggle() 28 | 29 | " Define the Mapping: "{{{2 30 | noremap DistractFreeToggle :DistractFreeToggle 31 | " If no mapping exists, map it to `W`. 32 | if !hasmapto( 'DistractFreeToggle' ) 33 | nmap W DistractFreeToggle 34 | endif 35 | 36 | " Restore: "{{{1 37 | let &cpo=s:cpo 38 | unlet s:cpo 39 | " vim: ts=4 sts=4 fdm=marker et com+=l\:\" 40 | -------------------------------------------------------------------------------- /plugin/NrrwRgn.vim: -------------------------------------------------------------------------------- 1 | " NrrwRgn.vim - Narrow Region plugin for Vim 2 | " ------------------------------------------------------------- 3 | " Version: 0.33 4 | " Maintainer: Christian Brabandt 5 | " Last Change: Thu, 15 Jan 2015 20:52:29 +0100 6 | " Script: http://www.vim.org/scripts/script.php?script_id=3075 7 | " Copyright: (c) 2009-2015 by Christian Brabandt 8 | " The VIM LICENSE applies to NrrwRgn.vim 9 | " (see |copyright|) except use "NrrwRgn.vim" 10 | " instead of "Vim". 11 | " No warranty, express or implied. 12 | " *** *** Use At-Your-Own-Risk! *** *** 13 | " GetLatestVimScripts: 3075 33 :AutoInstall: NrrwRgn.vim 14 | " 15 | " Init: {{{1 16 | let s:cpo= &cpo 17 | if exists("g:loaded_nrrw_rgn") || &cp 18 | finish 19 | endif 20 | set cpo&vim 21 | let g:loaded_nrrw_rgn = 1 22 | 23 | " Debug Setting 24 | let s:debug=0 25 | if s:debug 26 | exe "call nrrwrgn#Debug(1)" 27 | endif 28 | 29 | " ---------------------------------------------------------------------------- 30 | " Public Interface: {{{1 31 | 32 | " plugin functions "{{{2 33 | fun! NrrwRgnOp(type, ...) " {{{3 34 | " used for operator function mapping 35 | let sel_save = &selection 36 | let &selection = "inclusive" 37 | if a:0 " Invoked from Visual mode, use '< and '> marks. 38 | sil exe "normal! `<" . a:type . "`>y" 39 | elseif a:type == 'line' 40 | sil exe "normal! '[V']y" 41 | elseif a:type == 'block' 42 | sil exe "normal! `[\`]y" 43 | else 44 | sil exe "normal! `[v`]y" 45 | endif 46 | call nrrwrgn#NrrwRgn(visualmode(), '') 47 | let &selection = sel_save 48 | endfu 49 | 50 | " Define the Command aliases "{{{2 51 | com! -range -bang NRPrepare :,NRP 52 | com! -bang -range NarrowRegion :,NR 53 | com! -bang NRMulti :NRM 54 | com! -bang NarrowWindow :NW 55 | com! -bang NRLast :NRL 56 | 57 | " Define the actual Commands "{{{2 58 | com! -range -bang NR :, call nrrwrgn#NrrwRgn('',) 59 | com! -range -bang NRP :, call nrrwrgn#Prepare() 60 | com! -bang -range NRV :call nrrwrgn#NrrwRgn(visualmode(), ) 61 | com! NUD :call nrrwrgn#UnifiedDiff() 62 | com! -bang NW :exe ":" . line('w0') . ',' . line('w$') . "call nrrwrgn#NrrwRgn(0,)" 63 | com! -bang NRM :call nrrwrgn#NrrwRgnDoMulti() 64 | com! -bang NRL :call nrrwrgn#LastNrrwRgn() 65 | 66 | " Define the Mapping: "{{{2 67 | if !hasmapto('NrrwrgnDo') && !get(g:, 'nrrw_rgn_nomap_nr', 0) 68 | xmap nr NrrwrgnDo 69 | nmap nr NrrwrgnDo 70 | endif 71 | if !hasmapto('NrrwrgnBangDo') && !get(g:, 'nrrw_rgn_nomap_Nr', 0) 72 | xmap Nr NrrwrgnBangDo 73 | endif 74 | if !hasmapto('VisualNrrwRgn') 75 | xnoremap