The vim configuration resides in a dedicated repository now.
+++ /dev/null
-
-" {{{ vimrc.local
-if filereadable("/etc/vim/gvimrc")
- source /etc/vim/gvimrc
-endif
-" }}}
-
-
-set lines=25
-set columns=90
-
-au FileType tex set columns=110
-
-set cursorline
-set mousehide
-"set guioptions-=T
-
-set guifont=DejaVu\ Sans\ Mono\ 10,Monospace\ 10
-
-
-"" {{{ vimrc.local
-if filereadable($HOME . "/.gvimrc-local")
- source ~/.gvimrc-local
-endif
-" }}}
-
-
-
+++ /dev/null
-" pathogen.vim - path option manipulation
-" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Version: 1.2
-
-" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
-"
-" API is documented below.
-
-if exists("g:loaded_pathogen") || &cp
- finish
-endif
-let g:loaded_pathogen = 1
-
-" Split a path into a list.
-function! pathogen#split(path) abort " {{{1
- if type(a:path) == type([]) | return a:path | endif
- let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
- return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
-endfunction " }}}1
-
-" Convert a list to a path.
-function! pathogen#join(...) abort " {{{1
- if type(a:1) == type(1) && a:1
- let i = 1
- let space = ' '
- else
- let i = 0
- let space = ''
- endif
- let path = ""
- while i < a:0
- if type(a:000[i]) == type([])
- let list = a:000[i]
- let j = 0
- while j < len(list)
- let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
- let path .= ',' . escaped
- let j += 1
- endwhile
- else
- let path .= "," . a:000[i]
- endif
- let i += 1
- endwhile
- return substitute(path,'^,','','')
-endfunction " }}}1
-
-" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
-function! pathogen#legacyjoin(...) abort " {{{1
- return call('pathogen#join',[1] + a:000)
-endfunction " }}}1
-
-" Remove duplicates from a list.
-function! pathogen#uniq(list) abort " {{{1
- let i = 0
- let seen = {}
- while i < len(a:list)
- if has_key(seen,a:list[i])
- call remove(a:list,i)
- else
- let seen[a:list[i]] = 1
- let i += 1
- endif
- endwhile
- return a:list
-endfunction " }}}1
-
-" Returns a hash indicating which filetype features are enabled.
-function! pathogen#filetype() abort " {{{1
- redir => output
- silent filetype
- redir END
- let result = {}
- let result.detection = match(output,'detection:ON') >= 0
- let result.indent = match(output,'indent:ON') >= 0
- let result.plugin = match(output,'plugin:ON') >= 0
- return result
-endfunction " }}}1
-
-" \ on Windows unless shellslash is set, / everywhere else.
-function! pathogen#separator() abort " {{{1
- return !exists("+shellslash") || &shellslash ? '/' : '\'
-endfunction " }}}1
-
-" Convenience wrapper around glob() which returns a list.
-function! pathogen#glob(pattern) abort " {{{1
- let files = split(glob(a:pattern),"\n")
- return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
-endfunction "}}}1
-
-" Like pathogen#glob(), only limit the results to directories.
-function! pathogen#glob_directories(pattern) abort " {{{1
- return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
-endfunction "}}}1
-
-" Prepend all subdirectories of path to the rtp, and append all after
-" directories in those subdirectories.
-function! pathogen#runtime_prepend_subdirectories(path) " {{{1
- let sep = pathogen#separator()
- let before = pathogen#glob_directories(a:path.sep."*[^~]")
- let after = pathogen#glob_directories(a:path.sep."*[^~]".sep."after")
- let rtp = pathogen#split(&rtp)
- let path = expand(a:path)
- call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
- let &rtp = pathogen#join(pathogen#uniq(before + rtp + after))
- return &rtp
-endfunction " }}}1
-
-" For each directory in rtp, check for a subdirectory named dir. If it
-" exists, add all subdirectories of that subdirectory to the rtp, immediately
-" after the original directory. If no argument is given, 'bundle' is used.
-" Repeated calls with the same arguments are ignored.
-function! pathogen#runtime_append_all_bundles(...) " {{{1
- let sep = pathogen#separator()
- let name = a:0 ? a:1 : 'bundle'
- let list = []
- for dir in pathogen#split(&rtp)
- if dir =~# '\<after$'
- let list += pathogen#glob_directories(substitute(dir,'after$',name.sep.'*[^~]'.sep.'after','')) + [dir]
- else
- let list += [dir] + pathogen#glob_directories(dir.sep.name.sep.'*[^~]')
- endif
- endfor
- let &rtp = pathogen#join(pathogen#uniq(list))
- return 1
-endfunction
-
-" }}}1
-
-" Invoke :helptags on all non-$VIM doc directories in runtimepath.
-function! pathogen#helptags() " {{{1
- for dir in pathogen#split(&rtp)
- if dir[0 : strlen($VIM)-1] !=# $VIM && isdirectory(dir.'/doc') && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
- helptags `=dir.'/doc'`
- endif
- endfor
-endfunction " }}}1
-
-" vim:set ft=vim ts=8 sw=2 sts=2:
+++ /dev/null
-set background=dark
-
-hi clear
-
-if exists("syntax_on")
- syntax reset
-endif
-
-let colors_name = "shuber-wombat"
-
-
-" Vim >= 7.0 specific colors
-if version >= 700
- hi CursorLine guibg=#202020
- hi CursorLineNr guibg=#202020
- hi CursorColumn guibg=#2d2d2d
- hi ColorColumn guibg=#151515
- hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=bold
- hi Pmenu guifg=#f6f3e8 guibg=#444444
- hi PmenuSel guifg=#000000 guibg=#cae682
-endif
-
-" General colors
-hi Cursor guifg=black guibg=#87D7FF gui=none
-hi Normal guifg=white guibg=#000000 gui=none
-hi NonText guifg=#808080 guibg=#303030 gui=none
-hi LineNr guifg=#857b6f guibg=#202020 gui=none
-hi Search guifg=#404040 guibg=Yellow
-hi SpellBad guisp=firebrick
-hi StatusLine guifg=#f6f3e8 guibg=#666666 gui=italic
-hi StatusLineNC guifg=#857b6f guibg=#444444 gui=none
-hi VertSplit guifg=#444444 guibg=#444444 gui=none
-hi Folded guifg=#a0a8b0 guibg=#384048 gui=none
-hi FoldColumn guibg=#202020
-hi SignColumn guibg=#202020
-hi Title guifg=#f6f3e8 guibg=NONE gui=bold
-hi Visual guifg=#f6f3e8 guibg=#666044 gui=none
-hi SpecialKey guifg=#808080 guibg=#343434 gui=none
-
-" Syntax highlighting
-hi Comment guifg=#99968b gui=italic
-hi Todo guifg=#8f8f8f gui=italic
-hi Constant guifg=#e5786d gui=none
-hi String guifg=#95e454 gui=italic
-hi Identifier guifg=#cae682 gui=none
-hi Function guifg=#cae682 gui=none
-hi Type guifg=#cae682 gui=bold
-hi Statement guifg=#8ac6f2 gui=bold
-hi Keyword guifg=#8ac6f2 gui=none
-hi PreProc guifg=#e5786d gui=none
-hi Number guifg=#e5786d gui=none
-hi Special guifg=#cae682 gui=none
-
-hi mailQuoted1 guifg=#e5786d gui=italic
-hi mailQuoted2 guifg=#cae682 gui=none
-hi mailQuoted3 guifg=#8f8f8f gui=italic
-hi mailQuoted4 guifg=#e5786d gui=italic
-hi mailQuoted5 guifg=#cae682 gui=none
-hi mailQuoted6 guifg=#8f8f8f gui=italic
-hi mailHeader guifg=#8ac6f2
-hi mailHeaderKey guifg=#8ac6f2
-hi mailFrom guifg=#cae682 gui=bold
-
-hi BadWhitespace guibg=red
-hi diffAdded guifg=green
-hi diffRemoved guifg=red
-hi diffText guifg=violet
-hi diffChanged guifg=pink
-hi DiffAdd guifg=green guibg=#202020
-hi DiffChange guifg=pink guibg=#202020
-hi DiffDelete guifg=red guibg=#202020
+++ /dev/null
-" Vim colour scheme
-" Maintainer: Stefan Huber
-" Last Change: 05 Dez 2012
-" Version: 1.0
-"
-" This color scheme is based on sienna by Georg Dahn, version 1.6.
-
-set background=light
-if exists("syntax_on")
- syntax reset
-endif
-
-let g:colors_name = 'shuber'
-
-hi Normal gui=none guifg=Black guibg=White
-
-hi Cursor guifg=White guibg=Black
-hi CursorLine guibg=Grey90
-hi ColorColumn guibg=Grey95
-hi LineNr gui=none guifg=DarkGray
-hi NonText gui=bold guifg=DarkGray guibg=Grey95
-hi SpecialKey gui=none guifg=RoyalBlue4
-hi Title gui=bold guifg=Black
-hi Visual gui=bold guifg=Black guibg=LemonChiffon3
-
-hi FoldColumn gui=none guifg=Black guibg=Wheat2
-hi Folded gui=none guifg=Black guibg=Wheat1
-hi StatusLine gui=bold guifg=White guibg=Black
-hi StatusLineNC gui=none guifg=White guibg=DimGray
-hi VertSplit gui=none guifg=White guibg=DimGray
-hi Wildmenu gui=bold guifg=Black guibg=White
-
-hi Pmenu guibg=Grey65 guifg=Black gui=none
-hi PmenuSbar guibg=Grey50 guifg=fg gui=none
-hi PmenuSel guibg=Yellow guifg=Black gui=none
-hi PmenuThumb guibg=Grey75 guifg=fg gui=none
-
-hi IncSearch gui=none guifg=White guibg=DarkGoldenrod
-hi Search gui=none guifg=Black guibg=gold
-
-hi SpellBad ctermbg=DarkRed
-
-hi MoreMsg gui=bold guifg=ForestGreen
-hi Question gui=bold guifg=ForestGreen
-hi WarningMsg gui=bold guifg=Red
-
-hi Comment gui=italic guifg=gray60
-hi Error gui=none guifg=White guibg=Red
-hi Identifier gui=none guifg=Sienna4
-hi Special gui=none guifg=MediumPurple
-hi PreProc gui=none guifg=RoyalBlue3
-hi Todo gui=bold guifg=Black guibg=Yellow
-hi Type gui=bold guifg=RoyalBlue4
-hi Underlined gui=underline guifg=Blue
-
-hi Boolean gui=bold guifg=ForestGreen
-hi Constant gui=none guifg=OliveDrab
-hi Number gui=bold guifg=ForestGreen
-hi String gui=none guifg=ForestGreen
-
-hi Label gui=bold,underline guifg=Sienna4
-hi Statement gui=bold guifg=Sienna4
-
-hi htmlBold gui=bold
-hi htmlItalic gui=italic
-hi htmlUnderline gui=underline
-hi htmlBoldItalic gui=bold,italic
-hi htmlBoldUnderline gui=bold,underline
-hi htmlBoldUnderlineItalic gui=bold,underline,italic
-hi htmlUnderlineItalic gui=underline,italic
-
-hi mailQuoted1 guifg=SteelBlue3
-hi mailQuoted2 guifg=Sienna4
-hi mailQuoted3 guifg=ForestGreen
-hi mailQuoted4 guifg=MediumPurple
+++ /dev/null
-au BufRead,BufNewFile review_form_*.txt set filetype=easychair
+++ /dev/null
-au BufRead,BufNewFile *.INC set filetype=fortran
+++ /dev/null
-au BufRead,BufNewFile *.plt set filetype=gnuplot
-au BufRead,BufNewFile *.plot set filetype=gnuplot
-au BufRead,BufNewFile *.gnuplot set filetype=gnuplot
+++ /dev/null
-au BufRead,BufNewFile */.irssi/logs/*.log set filetype=irssilog
+++ /dev/null
-au BufRead,BufNewFile *.weechatlog set filetype=weechatlog
+++ /dev/null
-../.vimrc
\ No newline at end of file
+++ /dev/null
-" To use, save this file and type ":so %"
-" Optional: First enter ":let g:rgb_fg=1" to highlight foreground only.
-" Restore normal highlighting by typing ":e"
-setlocal nohlsearch
-call search('^" BEGIN_COLOR_LIST', 'e')
-while search('\w\+') > 0
- let w = expand('<cword>')
- if w == 'END_COLOR_LIST'
- break
- endif
- if exists('g:rgb_fg') && g:rgb_fg
- execute 'hi col_'.w.' guifg='.w.' guibg=NONE'
- else
- execute 'hi col_'.w.' guifg=black guibg='.w
- endif
- execute 'syn keyword col_'.w.' '.w.' contained containedin=vimLineComment'
-endwhile
-call search('^" BEGIN_COLOR_LIST')
-normal 0jzt
-
-" Following is from $VIMRUNTIME/rgb.txt with duplicate colors omitted.
-" BEGIN_COLOR_LIST
-" snow GhostWhite WhiteSmoke gainsboro FloralWhite OldLace linen
-" AntiqueWhite PapayaWhip BlanchedAlmond bisque PeachPuff NavajoWhite
-" moccasin cornsilk ivory LemonChiffon seashell honeydew MintCream azure
-" AliceBlue lavender LavenderBlush MistyRose white black DarkSlateGray
-" DimGray SlateGray LightSlateGray gray LightGray MidnightBlue navy
-" NavyBlue CornflowerBlue DarkSlateBlue SlateBlue MediumSlateBlue
-" LightSlateBlue MediumBlue RoyalBlue blue DodgerBlue DeepSkyBlue
-" SkyBlue LightSkyBlue SteelBlue LightSteelBlue LightBlue PowderBlue
-" PaleTurquoise DarkTurquoise MediumTurquoise turquoise cyan LightCyan
-" CadetBlue MediumAquamarine aquamarine DarkGreen DarkOliveGreen
-" DarkSeaGreen SeaGreen MediumSeaGreen LightSeaGreen PaleGreen
-" SpringGreen LawnGreen green chartreuse MediumSpringGreen GreenYellow
-" LimeGreen YellowGreen ForestGreen OliveDrab DarkKhaki khaki
-" PaleGoldenrod LightGoldenrodYellow LightYellow yellow gold
-" LightGoldenrod goldenrod DarkGoldenrod RosyBrown IndianRed SaddleBrown
-" sienna peru burlywood beige wheat SandyBrown tan chocolate firebrick
-" brown DarkSalmon salmon LightSalmon orange DarkOrange coral LightCoral
-" tomato OrangeRed red HotPink DeepPink pink LightPink PaleVioletRed
-" maroon MediumVioletRed VioletRed magenta violet plum orchid
-" MediumOrchid DarkOrchid DarkViolet BlueViolet purple MediumPurple
-" thistle snow1 snow2 snow3 snow4 seashell1 seashell2 seashell3
-" seashell4 AntiqueWhite1 AntiqueWhite2 AntiqueWhite3 AntiqueWhite4
-" bisque1 bisque2 bisque3 bisque4 PeachPuff1 PeachPuff2 PeachPuff3
-" PeachPuff4 NavajoWhite1 NavajoWhite2 NavajoWhite3 NavajoWhite4
-" LemonChiffon1 LemonChiffon2 LemonChiffon3 LemonChiffon4 cornsilk1
-" cornsilk2 cornsilk3 cornsilk4 ivory1 ivory2 ivory3 ivory4 honeydew1
-" honeydew2 honeydew3 honeydew4 LavenderBlush1 LavenderBlush2
-" LavenderBlush3 LavenderBlush4 MistyRose1 MistyRose2 MistyRose3
-" MistyRose4 azure1 azure2 azure3 azure4 SlateBlue1 SlateBlue2
-" SlateBlue3 SlateBlue4 RoyalBlue1 RoyalBlue2 RoyalBlue3 RoyalBlue4
-" blue1 blue2 blue3 blue4 DodgerBlue1 DodgerBlue2 DodgerBlue3
-" DodgerBlue4 SteelBlue1 SteelBlue2 SteelBlue3 SteelBlue4 DeepSkyBlue1
-" DeepSkyBlue2 DeepSkyBlue3 DeepSkyBlue4 SkyBlue1 SkyBlue2 SkyBlue3
-" SkyBlue4 LightSkyBlue1 LightSkyBlue2 LightSkyBlue3 LightSkyBlue4
-" SlateGray1 SlateGray2 SlateGray3 SlateGray4 LightSteelBlue1
-" LightSteelBlue2 LightSteelBlue3 LightSteelBlue4 LightBlue1 LightBlue2
-" LightBlue3 LightBlue4 LightCyan1 LightCyan2 LightCyan3 LightCyan4
-" PaleTurquoise1 PaleTurquoise2 PaleTurquoise3 PaleTurquoise4 CadetBlue1
-" CadetBlue2 CadetBlue3 CadetBlue4 turquoise1 turquoise2 turquoise3
-" turquoise4 cyan1 cyan2 cyan3 cyan4 DarkSlateGray1 DarkSlateGray2
-" DarkSlateGray3 DarkSlateGray4 aquamarine1 aquamarine2 aquamarine3
-" aquamarine4 DarkSeaGreen1 DarkSeaGreen2 DarkSeaGreen3 DarkSeaGreen4
-" SeaGreen1 SeaGreen2 SeaGreen3 SeaGreen4 PaleGreen1 PaleGreen2
-" PaleGreen3 PaleGreen4 SpringGreen1 SpringGreen2 SpringGreen3
-" SpringGreen4 green1 green2 green3 green4 chartreuse1 chartreuse2
-" chartreuse3 chartreuse4 OliveDrab1 OliveDrab2 OliveDrab3 OliveDrab4
-" DarkOliveGreen1 DarkOliveGreen2 DarkOliveGreen3 DarkOliveGreen4 khaki1
-" khaki2 khaki3 khaki4 LightGoldenrod1 LightGoldenrod2 LightGoldenrod3
-" LightGoldenrod4 LightYellow1 LightYellow2 LightYellow3 LightYellow4
-" yellow1 yellow2 yellow3 yellow4 gold1 gold2 gold3 gold4 goldenrod1
-" goldenrod2 goldenrod3 goldenrod4 DarkGoldenrod1 DarkGoldenrod2
-" DarkGoldenrod3 DarkGoldenrod4 RosyBrown1 RosyBrown2 RosyBrown3
-" RosyBrown4 IndianRed1 IndianRed2 IndianRed3 IndianRed4 sienna1 sienna2
-" sienna3 sienna4 burlywood1 burlywood2 burlywood3 burlywood4 wheat1
-" wheat2 wheat3 wheat4 tan1 tan2 tan3 tan4 chocolate1 chocolate2
-" chocolate3 chocolate4 firebrick1 firebrick2 firebrick3 firebrick4
-" brown1 brown2 brown3 brown4 salmon1 salmon2 salmon3 salmon4
-" LightSalmon1 LightSalmon2 LightSalmon3 LightSalmon4 orange1 orange2
-" orange3 orange4 DarkOrange1 DarkOrange2 DarkOrange3 DarkOrange4 coral1
-" coral2 coral3 coral4 tomato1 tomato2 tomato3 tomato4 OrangeRed1
-" OrangeRed2 OrangeRed3 OrangeRed4 red1 red2 red3 red4 DeepPink1
-" DeepPink2 DeepPink3 DeepPink4 HotPink1 HotPink2 HotPink3 HotPink4
-" pink1 pink2 pink3 pink4 LightPink1 LightPink2 LightPink3 LightPink4
-" PaleVioletRed1 PaleVioletRed2 PaleVioletRed3 PaleVioletRed4 maroon1
-" maroon2 maroon3 maroon4 VioletRed1 VioletRed2 VioletRed3 VioletRed4
-" magenta1 magenta2 magenta3 magenta4 orchid1 orchid2 orchid3 orchid4
-" plum1 plum2 plum3 plum4 MediumOrchid1 MediumOrchid2 MediumOrchid3
-" MediumOrchid4 DarkOrchid1 DarkOrchid2 DarkOrchid3 DarkOrchid4 purple1
-" purple2 purple3 purple4 MediumPurple1 MediumPurple2 MediumPurple3
-" MediumPurple4 thistle1 thistle2 thistle3 thistle4 gray0 gray1 gray2
-" gray3 gray4 gray5 gray6 gray7 gray8 gray9 gray10 gray11 gray12 gray13
-" gray14 gray15 gray16 gray17 gray18 gray19 gray20 gray21 gray22 gray23
-" gray24 gray25 gray26 gray27 gray28 gray29 gray30 gray31 gray32 gray33
-" gray34 gray35 gray36 gray37 gray38 gray39 gray40 gray41 gray42 gray43
-" gray44 gray45 gray46 gray47 gray48 gray49 gray50 gray51 gray52 gray53
-" gray54 gray55 gray56 gray57 gray58 gray59 gray60 gray61 gray62 gray63
-" gray64 gray65 gray66 gray67 gray68 gray69 gray70 gray71 gray72 gray73
-" gray74 gray75 gray76 gray77 gray78 gray79 gray80 gray81 gray82 gray83
-" gray84 gray85 gray86 gray87 gray88 gray89 gray90 gray91 gray92 gray93
-" gray94 gray95 gray96 gray97 gray98 gray99 gray100 DarkGray DarkBlue
-" DarkCyan DarkMagenta DarkRed LightGreen
-" END_COLOR_LIST
+++ /dev/null
-" Copyright (c) 1998-2006
-" Michael Sharpe <feline@irendi.com>
-"
-" We grant permission to use, copy modify, distribute, and sell this
-" software for any purpose without fee, provided that the above copyright
-" notice and this text are not removed. We make no guarantee about the
-" suitability of this software for any purpose and we are not liable
-" for any damages resulting from its use. Further, we are under no
-" obligation to maintain or extend this software. It is provided on an
-" "as is" basis without any expressed or implied warranty.
-
-" Directory & regex enhancements added by Bindu Wavell who is well known on
-" vim.sf.net
-"
-" Patch for spaces in files/directories from Nathan Stien (also reported by
-" Soeren Sonnenburg)
-
-" Do not load a.vim if is has already been loaded.
-if exists("loaded_alternateFile")
- finish
-endif
-if (v:progname == "ex")
- finish
-endif
-let loaded_alternateFile = 1
-
-let alternateExtensionsDict = {}
-
-" setup the default set of alternate extensions. The user can override in thier
-" .vimrc if the defaults are not suitable. To override in a .vimrc simply set a
-" g:alternateExtensions_<EXT> variable to a comma separated list of alternates,
-" where <EXT> is the extension to map.
-" E.g. let g:alternateExtensions_CPP = "inc,h,H,HPP,hpp"
-" let g:alternateExtensions_{'aspx.cs'} = "aspx"
-
-
-" This variable will be increased when an extension with greater number of dots
-" is added by the AddAlternateExtensionMapping call.
-let s:maxDotsInExtension = 1
-
-" Function : AddAlternateExtensionMapping (PRIVATE)
-" Purpose : simple helper function to add the default alternate extension
-" mappings.
-" Args : extension -- the extension to map
-" alternates -- comma separated list of alternates extensions
-" Returns : nothing
-" Author : Michael Sharpe <feline@irendi.com>
-function! <SID>AddAlternateExtensionMapping(extension, alternates)
- " This code does not actually work for variables like foo{'a.b.c.d.e'}
- "let varName = "g:alternateExtensions_" . a:extension
- "if (!exists(varName))
- " let g:alternateExtensions_{a:extension} = a:alternates
- "endif
-
- " This code handles extensions which contains a dot. exists() fails with
- " such names.
- "let v:errmsg = ""
- " FIXME this line causes ex to return 1 instead of 0 for some reason??
- "silent! echo g:alternateExtensions_{a:extension}
- "if (v:errmsg != "")
- "let g:alternateExtensions_{a:extension} = a:alternates
- "endif
-
- let g:alternateExtensionsDict[a:extension] = a:alternates
- let dotsNumber = strlen(substitute(a:extension, "[^.]", "", "g"))
- if s:maxDotsInExtension < dotsNumber
- let s:maxDotsInExtension = dotsNumber
- endif
-endfunction
-
-
-" Add all the default extensions
-" Mappings for C and C++
-call <SID>AddAlternateExtensionMapping('h',"c,cpp,cxx,cc,CC")
-call <SID>AddAlternateExtensionMapping('H',"C,CPP,CXX,CC")
-call <SID>AddAlternateExtensionMapping('hpp',"cpp,c")
-call <SID>AddAlternateExtensionMapping('HPP',"CPP,C")
-call <SID>AddAlternateExtensionMapping('c',"h")
-call <SID>AddAlternateExtensionMapping('C',"H")
-call <SID>AddAlternateExtensionMapping('cpp',"h,hpp")
-call <SID>AddAlternateExtensionMapping('CPP',"H,HPP")
-call <SID>AddAlternateExtensionMapping('cc',"h")
-call <SID>AddAlternateExtensionMapping('CC',"H,h")
-call <SID>AddAlternateExtensionMapping('cxx',"h")
-call <SID>AddAlternateExtensionMapping('CXX',"H")
-" Mappings for PSL7
-call <SID>AddAlternateExtensionMapping('psl',"ph")
-call <SID>AddAlternateExtensionMapping('ph',"psl")
-" Mappings for ADA
-call <SID>AddAlternateExtensionMapping('adb',"ads")
-call <SID>AddAlternateExtensionMapping('ads',"adb")
-" Mappings for lex and yacc files
-call <SID>AddAlternateExtensionMapping('l',"y,yacc,ypp")
-call <SID>AddAlternateExtensionMapping('lex',"yacc,y,ypp")
-call <SID>AddAlternateExtensionMapping('lpp',"ypp,y,yacc")
-call <SID>AddAlternateExtensionMapping('y',"l,lex,lpp")
-call <SID>AddAlternateExtensionMapping('yacc',"lex,l,lpp")
-call <SID>AddAlternateExtensionMapping('ypp',"lpp,l,lex")
-" Mappings for OCaml
-call <SID>AddAlternateExtensionMapping('ml',"mli")
-call <SID>AddAlternateExtensionMapping('mli',"ml")
-" ASP stuff
-call <SID>AddAlternateExtensionMapping('aspx.cs', 'aspx')
-call <SID>AddAlternateExtensionMapping('aspx.vb', 'aspx')
-call <SID>AddAlternateExtensionMapping('aspx', 'aspx.cs,aspx.vb')
-
-" Setup default search path, unless the user has specified
-" a path in their [._]vimrc.
-if (!exists('g:alternateSearchPath'))
- let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,sfr:../inc'
-endif
-
-" If this variable is true then a.vim will not alternate to a file/buffer which
-" does not exist. E.g while editing a.c and the :A will not swtich to a.h
-" unless it exists.
-if (!exists('g:alternateNoDefaultAlternate'))
- " by default a.vim will alternate to a file which does not exist
- let g:alternateNoDefaultAlternate = 0
-endif
-
-" If this variable is true then a.vim will convert the alternate filename to a
-" filename relative to the current working directory.
-" Feature by Nathan Huizinga
-if (!exists('g:alternateRelativeFiles'))
- " by default a.vim will not convert the filename to one relative to the
- " current working directory
- let g:alternateRelativeFiles = 0
-endif
-
-
-" Function : GetNthItemFromList (PRIVATE)
-" Purpose : Support reading items from a comma seperated list
-" Used to iterate all the extensions in an extension spec
-" Used to iterate all path prefixes
-" Args : list -- the list (extension spec, file paths) to iterate
-" n -- the extension to get
-" Returns : the nth item (extension, path) from the list (extension
-" spec), or "" for failure
-" Author : Michael Sharpe <feline@irendi.com>
-" History : Renamed from GetNthExtensionFromSpec to GetNthItemFromList
-" to reflect a more generic use of this function. -- Bindu
-function! <SID>GetNthItemFromList(list, n)
- let itemStart = 0
- let itemEnd = -1
- let pos = 0
- let item = ""
- let i = 0
- while (i != a:n)
- let itemStart = itemEnd + 1
- let itemEnd = match(a:list, ",", itemStart)
- let i = i + 1
- if (itemEnd == -1)
- if (i == a:n)
- let itemEnd = strlen(a:list)
- endif
- break
- endif
- endwhile
- if (itemEnd != -1)
- let item = strpart(a:list, itemStart, itemEnd - itemStart)
- endif
- return item
-endfunction
-
-" Function : ExpandAlternatePath (PRIVATE)
-" Purpose : Expand path info. A path with a prefix of "wdr:" will be
-" treated as relative to the working directory (i.e. the
-" directory where vim was started.) A path prefix of "abs:" will
-" be treated as absolute. No prefix or "sfr:" will result in the
-" path being treated as relative to the source file (see sfPath
-" argument).
-"
-" A prefix of "reg:" will treat the pathSpec as a regular
-" expression substitution that is applied to the source file
-" path. The format is:
-"
-" reg:<sep><pattern><sep><subst><sep><flag><sep>
-"
-" <sep> seperator character, we often use one of [/|%#]
-" <pattern> is what you are looking for
-" <subst> is the output pattern
-" <flag> can be g for global replace or empty
-"
-" EXAMPLE: 'reg:/inc/src/g/' will replace every instance
-" of 'inc' with 'src' in the source file path. It is possible
-" to use match variables so you could do something like:
-" 'reg:|src/\([^/]*\)|inc/\1||' (see 'help :substitute',
-" 'help pattern' and 'help sub-replace-special' for more details
-"
-" NOTE: a.vim uses ',' (comma) internally so DON'T use it
-" in your regular expressions or other pathSpecs unless you update
-" the rest of the a.vim code to use some other seperator.
-"
-" Args : pathSpec -- path component (or substitution patterns)
-" sfPath -- source file path
-" Returns : a path that can be used by AlternateFile()
-" Author : Bindu Wavell <bindu@wavell.net>
-function! <SID>ExpandAlternatePath(pathSpec, sfPath)
- let prfx = strpart(a:pathSpec, 0, 4)
- if (prfx == "wdr:" || prfx == "abs:")
- let path = strpart(a:pathSpec, 4)
- elseif (prfx == "reg:")
- let re = strpart(a:pathSpec, 4)
- let sep = strpart(re, 0, 1)
- let patend = match(re, sep, 1)
- let pat = strpart(re, 1, patend - 1)
- let subend = match(re, sep, patend + 1)
- let sub = strpart(re, patend+1, subend - patend - 1)
- let flag = strpart(re, strlen(re) - 2)
- if (flag == sep)
- let flag = ''
- endif
- let path = substitute(a:sfPath, pat, sub, flag)
- "call confirm('PAT: [' . pat . '] SUB: [' . sub . ']')
- "call confirm(a:sfPath . ' => ' . path)
- else
- let path = a:pathSpec
- if (prfx == "sfr:")
- let path = strpart(path, 4)
- endif
- let path = a:sfPath . "/" . path
- endif
- return path
-endfunction
-
-" Function : FindFileInSearchPath (PRIVATE)
-" Purpose : Searches for a file in the search path list
-" Args : filename -- name of the file to search for
-" pathList -- the path list to search
-" relPathBase -- the path which relative paths are expanded from
-" Returns : An expanded filename if found, the empty string otherwise
-" Author : Michael Sharpe (feline@irendi.com)
-" History : inline code written by Bindu Wavell originally
-function! <SID>FindFileInSearchPath(fileName, pathList, relPathBase)
- let filepath = ""
- let m = 1
- let pathListLen = strlen(a:pathList)
- if (pathListLen > 0)
- while (1)
- let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
- if (pathSpec != "")
- let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
- let fullname = path . "/" . a:fileName
- let foundMatch = <SID>BufferOrFileExists(fullname)
- if (foundMatch)
- let filepath = fullname
- break
- endif
- else
- break
- endif
- let m = m + 1
- endwhile
- endif
- return filepath
-endfunction
-
-" Function : FindFileInSearchPathEx (PRIVATE)
-" Purpose : Searches for a file in the search path list
-" Args : filename -- name of the file to search for
-" pathList -- the path list to search
-" relPathBase -- the path which relative paths are expanded from
-" count -- find the count'th occurence of the file on the path
-" Returns : An expanded filename if found, the empty string otherwise
-" Author : Michael Sharpe (feline@irendi.com)
-" History : Based on <SID>FindFileInSearchPath() but with extensions
-function! <SID>FindFileInSearchPathEx(fileName, pathList, relPathBase, count)
- let filepath = ""
- let m = 1
- let spath = ""
- let pathListLen = strlen(a:pathList)
- if (pathListLen > 0)
- while (1)
- let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
- if (pathSpec != "")
- let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
- if (spath != "")
- let spath = spath . ','
- endif
- let spath = spath . path
- else
- break
- endif
- let m = m + 1
- endwhile
- endif
-
- if (&path != "")
- if (spath != "")
- let spath = spath . ','
- endif
- let spath = spath . &path
- endif
-
- let filepath = findfile(a:fileName, spath, a:count)
- return filepath
-endfunction
-
-" Function : EnumerateFilesByExtension (PRIVATE)
-" Purpose : enumerates all files by a particular list of alternate extensions.
-" Args : path -- path of a file (not including the file)
-" baseName -- base name of the file to be expanded
-" extension -- extension whose alternates are to be enumerated
-" Returns : comma separated list of files with extensions
-" Author : Michael Sharpe <feline@irendi.com>
-function! EnumerateFilesByExtension(path, baseName, extension)
- let enumeration = ""
- let extSpec = ""
- let v:errmsg = ""
- silent! echo g:alternateExtensions_{a:extension}
- if (v:errmsg == "")
- let extSpec = g:alternateExtensions_{a:extension}
- endif
- if (extSpec == "")
- if (has_key(g:alternateExtensionsDict, a:extension))
- let extSpec = g:alternateExtensionsDict[a:extension]
- endif
- endif
- if (extSpec != "")
- let n = 1
- let done = 0
- while (!done)
- let ext = <SID>GetNthItemFromList(extSpec, n)
- if (ext != "")
- if (a:path != "")
- let newFilename = a:path . "/" . a:baseName . "." . ext
- else
- let newFilename = a:baseName . "." . ext
- endif
- if (enumeration == "")
- let enumeration = newFilename
- else
- let enumeration = enumeration . "," . newFilename
- endif
- else
- let done = 1
- endif
- let n = n + 1
- endwhile
- endif
- return enumeration
-endfunction
-
-" Function : EnumerateFilesByExtensionInPath (PRIVATE)
-" Purpose : enumerates all files by expanding the path list and the extension
-" list.
-" Args : baseName -- base name of the file
-" extension -- extension whose alternates are to be enumerated
-" pathList -- the list of paths to enumerate
-" relPath -- the path of the current file for expansion of relative
-" paths in the path list.
-" Returns : A comma separated list of paths with extensions
-" Author : Michael Sharpe <feline@irendi.com>
-function! EnumerateFilesByExtensionInPath(baseName, extension, pathList, relPathBase)
- let enumeration = ""
- let filepath = ""
- let m = 1
- let pathListLen = strlen(a:pathList)
- if (pathListLen > 0)
- while (1)
- let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
- if (pathSpec != "")
- let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
- let pe = EnumerateFilesByExtension(path, a:baseName, a:extension)
- if (enumeration == "")
- let enumeration = pe
- else
- let enumeration = enumeration . "," . pe
- endif
- else
- break
- endif
- let m = m + 1
- endwhile
- endif
- return enumeration
-endfunction
-
-" Function : DetermineExtension (PRIVATE)
-" Purpose : Determines the extension of a filename based on the register
-" alternate extension. This allow extension which contain dots to
-" be considered. E.g. foo.aspx.cs to foo.aspx where an alternate
-" exists for the aspx.cs extension. Note that this will only accept
-" extensions which contain less than 5 dots. This is only
-" implemented in this manner for simplicity...it is doubtful that
-" this will be a restriction in non-contrived situations.
-" Args : The path to the file to find the extension in
-" Returns : The matched extension if any
-" Author : Michael Sharpe (feline@irendi.com)
-" History : idea from Tom-Erik Duestad
-" Notes : there is some magic occuring here. The exists() function does not
-" work well when the curly brace variable has dots in it. And why
-" should it, dots are not valid in variable names. But the exists
-" function is wierd too. Lets say foo_c does exist. Then
-" exists("foo_c.e.f") will be true...even though the variable does
-" not exist. However the curly brace variables do work when the
-" variable has dots in it. E.g foo_{'c'} is different from
-" foo_{'c.d.e'}...and foo_{'c'} is identical to foo_c and
-" foo_{'c.d.e'} is identical to foo_c.d.e right? Yes in the current
-" implementation of vim. To trick vim to test for existence of such
-" variables echo the curly brace variable and look for an error
-" message.
-function! DetermineExtension(path)
- let mods = ":t"
- let i = 0
- while i <= s:maxDotsInExtension
- let mods = mods . ":e"
- let extension = fnamemodify(a:path, mods)
- if (has_key(g:alternateExtensionsDict, extension))
- return extension
- endif
- let v:errmsg = ""
- silent! echo g:alternateExtensions_{extension}
- if (v:errmsg == "")
- return extension
- endif
- let i = i + 1
- endwhile
- return ""
-endfunction
-
-" Function : AlternateFile (PUBLIC)
-" Purpose : Opens a new buffer by looking at the extension of the current
-" buffer and finding the corresponding file. E.g. foo.c <--> foo.h
-" Args : accepts one argument. If present it used the argument as the new
-" extension.
-" Returns : nothing
-" Author : Michael Sharpe <feline@irendi.com>
-" History : + When an alternate can't be found in the same directory as the
-" source file, a search path will be traversed looking for the
-" alternates.
-" + Moved some code into a separate function, minor optimization
-" + rework to favor files in memory based on complete enumeration of
-" all files extensions and paths
-function! AlternateFile(splitWindow, ...)
- let extension = DetermineExtension(expand("%:p"))
- let baseName = substitute(expand("%:t"), "\." . extension . '$', "", "")
- let currentPath = expand("%:p:h")
-
- if (a:0 != 0)
- let newFullname = currentPath . "/" . baseName . "." . a:1
- call <SID>FindOrCreateBuffer(newFullname, a:splitWindow, 0)
- else
- let allfiles = ""
- if (extension != "")
- let allfiles1 = EnumerateFilesByExtension(currentPath, baseName, extension)
- let allfiles2 = EnumerateFilesByExtensionInPath(baseName, extension, g:alternateSearchPath, currentPath)
-
- if (allfiles1 != "")
- if (allfiles2 != "")
- let allfiles = allfiles1 . ',' . allfiles2
- else
- let allfiles = allfiles1
- endif
- else
- let allfiles = allfiles2
- endif
- endif
-
- if (allfiles != "")
- let bestFile = ""
- let bestScore = 0
- let score = 0
- let n = 1
-
- let onefile = <SID>GetNthItemFromList(allfiles, n)
- let bestFile = onefile
- while (onefile != "" && score < 2)
- let score = <SID>BufferOrFileExists(onefile)
- if (score > bestScore)
- let bestScore = score
- let bestFile = onefile
- endif
- let n = n + 1
- let onefile = <SID>GetNthItemFromList(allfiles, n)
- endwhile
-
- if (bestScore == 0 && g:alternateNoDefaultAlternate == 1)
- echo "No existing alternate available"
- else
- call <SID>FindOrCreateBuffer(bestFile, a:splitWindow, 1)
- let b:AlternateAllFiles = allfiles
- endif
- else
- echo "No alternate file/buffer available"
- endif
- endif
-endfunction
-
-" Function : AlternateOpenFileUnderCursor (PUBLIC)
-" Purpose : Opens file under the cursor
-" Args : splitWindow -- indicates how to open the file
-" Returns : Nothing
-" Author : Michael Sharpe (feline@irendi.com) www.irendi.com
-function! AlternateOpenFileUnderCursor(splitWindow,...)
- let cursorFile = (a:0 > 0) ? a:1 : expand("<cfile>")
- let currentPath = expand("%:p:h")
- let openCount = 1
-
- let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
- if (fileName != "")
- call <SID>FindOrCreateBuffer(fileName, a:splitWindow, 1)
- let b:openCount = openCount
- let b:cursorFile = cursorFile
- let b:currentPath = currentPath
- else
- echo "Can't find file"
- endif
-endfunction
-
-" Function : AlternateOpenNextFile (PUBLIC)
-" Purpose : Opens the next file corresponding to the search which found the
-" current file
-" Args : bang -- indicates what to do if the current file has not been
-" saved
-" Returns : nothing
-" Author : Michael Sharpe (feline@irendi.com) www.irendi.com
-function! AlternateOpenNextFile(bang)
- let cursorFile = ""
- if (exists("b:cursorFile"))
- let cursorFile = b:cursorFile
- endif
-
- let currentPath = ""
- if (exists("b:currentPath"))
- let currentPath = b:currentPath
- endif
-
- let openCount = 0
- if (exists("b:openCount"))
- let openCount = b:openCount + 1
- endif
-
- if (cursorFile != "" && currentPath != "" && openCount != 0)
- let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
- if (fileName != "")
- call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
- let b:openCount = openCount
- let b:cursorFile = cursorFile
- let b:currentPath = currentPath
- else
- let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, 1)
- if (fileName != "")
- call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
- let b:openCount = 1
- let b:cursorFile = cursorFile
- let b:currentPath = currentPath
- else
- echo "Can't find next file"
- endif
- endif
- endif
-endfunction
-
-comm! -nargs=? -bang IH call AlternateOpenFileUnderCursor("n<bang>", <f-args>)
-comm! -nargs=? -bang IHS call AlternateOpenFileUnderCursor("h<bang>", <f-args>)
-comm! -nargs=? -bang IHV call AlternateOpenFileUnderCursor("v<bang>", <f-args>)
-comm! -nargs=? -bang IHT call AlternateOpenFileUnderCursor("t<bang>", <f-args>)
-comm! -nargs=? -bang IHN call AlternateOpenNextFile("<bang>")
-imap <Leader>ih <ESC>:IHS<CR>
-nmap <Leader>ih :IHS<CR>
-imap <Leader>is <ESC>:IHS<CR>:A<CR>
-nmap <Leader>is :IHS<CR>:A<CR>
-imap <Leader>ihn <ESC>:IHN<CR>
-nmap <Leader>ihn :IHN<CR>
-
-"function! <SID>PrintList(theList)
-" let n = 1
-" let oneFile = <SID>GetNthItemFromList(a:theList, n)
-" while (oneFile != "")
-" let n = n + 1
-" let oneFile = <SID>GetNthItemFromList(a:theList, n)
-" endwhile
-"endfunction
-
-" Function : NextAlternate (PUBLIC)
-" Purpose : Used to cycle through any other alternate file which existed on
-" the search path.
-" Args : bang (IN) - used to implement the AN vs AN! functionality
-" Returns : nothing
-" Author : Michael Sharpe <feline@irendi.com>
-function! NextAlternate(bang)
- if (exists('b:AlternateAllFiles'))
- let currentFile = expand("%")
- let n = 1
- let onefile = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
- while (onefile != "" && !<SID>EqualFilePaths(fnamemodify(onefile,":p"), fnamemodify(currentFile,":p")))
- let n = n + 1
- let onefile = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
- endwhile
-
- if (onefile != "")
- let stop = n
- let n = n + 1
- let foundAlternate = 0
- let nextAlternate = ""
- while (n != stop)
- let nextAlternate = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
- if (nextAlternate == "")
- let n = 1
- continue
- endif
- let n = n + 1
- if (<SID>EqualFilePaths(fnamemodify(nextAlternate, ":p"), fnamemodify(currentFile, ":p")))
- continue
- endif
- if (filereadable(nextAlternate))
- " on cygwin filereadable("foo.H") returns true if "foo.h" exists
- if (has("unix") && $WINDIR != "" && fnamemodify(nextAlternate, ":p") ==? fnamemodify(currentFile, ":p"))
- continue
- endif
- let foundAlternate = 1
- break
- endif
- endwhile
- if (foundAlternate == 1)
- let s:AlternateAllFiles = b:AlternateAllFiles
- "silent! execute ":e".a:bang." " . nextAlternate
- call <SID>FindOrCreateBuffer(nextAlternate, "n".a:bang, 0)
- let b:AlternateAllFiles = s:AlternateAllFiles
- else
- echo "Only this alternate file exists"
- endif
- else
- echo "Could not find current file in alternates list"
- endif
- else
- echo "No other alternate files exist"
- endif
-endfunction
-
-comm! -nargs=? -bang A call AlternateFile("n<bang>", <f-args>)
-comm! -nargs=? -bang AS call AlternateFile("h<bang>", <f-args>)
-comm! -nargs=? -bang AV call AlternateFile("v<bang>", <f-args>)
-comm! -nargs=? -bang AT call AlternateFile("t<bang>", <f-args>)
-comm! -nargs=? -bang AN call NextAlternate("<bang>")
-
-" Function : BufferOrFileExists (PRIVATE)
-" Purpose : determines if a buffer or a readable file exists
-" Args : fileName (IN) - name of the file to check
-" Returns : 2 if it exists in memory, 1 if it exists, 0 otherwise
-" Author : Michael Sharpe <feline@irendi.com>
-" History : Updated code to handle buffernames using just the
-" filename and not the path.
-function! <SID>BufferOrFileExists(fileName)
- let result = 0
-
- let lastBuffer = bufnr("$")
- let i = 1
- while i <= lastBuffer
- if <SID>EqualFilePaths(expand("#".i.":p"), a:fileName)
- let result = 2
- break
- endif
- let i = i + 1
- endwhile
-
- if (!result)
- let bufName = fnamemodify(a:fileName,":t")
- let memBufName = bufname(bufName)
- if (memBufName != "")
- let memBufBasename = fnamemodify(memBufName, ":t")
- if (bufName == memBufBasename)
- let result = 2
- endif
- endif
-
- if (!result)
- let result = bufexists(bufName) || bufexists(a:fileName) || filereadable(a:fileName)
- endif
- endif
-
- if (!result)
- let result = filereadable(a:fileName)
- endif
- return result
-endfunction
-
-" Function : FindOrCreateBuffer (PRIVATE)
-" Purpose : searches the buffer list (:ls) for the specified filename. If
-" found, checks the window list for the buffer. If the buffer is in
-" an already open window, it switches to the window. If the buffer
-" was not in a window, it switches to that buffer. If the buffer did
-" not exist, it creates it.
-" Args : filename (IN) -- the name of the file
-" doSplit (IN) -- indicates whether the window should be split
-" ("v", "h", "n", "v!", "h!", "n!", "t", "t!")
-" findSimilar (IN) -- indicate weather existing buffers should be
-" prefered
-" Returns : nothing
-" Author : Michael Sharpe <feline@irendi.com>
-" History : + bufname() was not working very well with the possibly strange
-" paths that can abound with the search path so updated this
-" slightly. -- Bindu
-" + updated window switching code to make it more efficient -- Bindu
-" Allow ! to be applied to buffer/split/editing commands for more
-" vim/vi like consistency
-" + implemented fix from Matt Perry
-function! <SID>FindOrCreateBuffer(fileName, doSplit, findSimilar)
- " Check to see if the buffer is already open before re-opening it.
- let FILENAME = escape(a:fileName, ' ')
- let bufNr = -1
- let lastBuffer = bufnr("$")
- let i = 1
- if (a:findSimilar)
- while i <= lastBuffer
- if <SID>EqualFilePaths(expand("#".i.":p"), a:fileName)
- let bufNr = i
- break
- endif
- let i = i + 1
- endwhile
-
- if (bufNr == -1)
- let bufName = bufname(a:fileName)
- let bufFilename = fnamemodify(a:fileName,":t")
-
- if (bufName == "")
- let bufName = bufname(bufFilename)
- endif
-
- if (bufName != "")
- let tail = fnamemodify(bufName, ":t")
- if (tail != bufFilename)
- let bufName = ""
- endif
- endif
- if (bufName != "")
- let bufNr = bufnr(bufName)
- let FILENAME = bufName
- endif
- endif
- endif
-
- if (g:alternateRelativeFiles == 1)
- let FILENAME = fnamemodify(FILENAME, ":p:.")
- endif
-
- let splitType = a:doSplit[0]
- let bang = a:doSplit[1]
- if (bufNr == -1)
- " Buffer did not exist....create it
- let v:errmsg=""
- if (splitType == "h")
- silent! execute ":split".bang." " . FILENAME
- elseif (splitType == "v")
- silent! execute ":vsplit".bang." " . FILENAME
- elseif (splitType == "t")
- silent! execute ":tab split".bang." " . FILENAME
- else
- silent! execute ":e".bang." " . FILENAME
- endif
- if (v:errmsg != "")
- echo v:errmsg
- endif
- else
-
- " Find the correct tab corresponding to the existing buffer
- let tabNr = -1
- " iterate tab pages
- for i in range(tabpagenr('$'))
- " get the list of buffers in the tab
- let tabList = tabpagebuflist(i + 1)
- let idx = 0
- " iterate each buffer in the list
- while idx < len(tabList)
- " if it matches the buffer we are looking for...
- if (tabList[idx] == bufNr)
- " ... save the number
- let tabNr = i + 1
- break
- endif
- let idx = idx + 1
- endwhile
- if (tabNr != -1)
- break
- endif
- endfor
- " switch the the tab containing the buffer
- if (tabNr != -1)
- execute "tabn ".tabNr
- endif
-
- " Buffer was already open......check to see if it is in a window
- let bufWindow = bufwinnr(bufNr)
- if (bufWindow == -1)
- " Buffer was not in a window so open one
- let v:errmsg=""
- if (splitType == "h")
- silent! execute ":sbuffer".bang." " . FILENAME
- elseif (splitType == "v")
- silent! execute ":vert sbuffer " . FILENAME
- elseif (splitType == "t")
- silent! execute ":tab sbuffer " . FILENAME
- else
- silent! execute ":buffer".bang." " . FILENAME
- endif
- if (v:errmsg != "")
- echo v:errmsg
- endif
- else
- " Buffer is already in a window so switch to the window
- execute bufWindow."wincmd w"
- if (bufWindow != winnr())
- " something wierd happened...open the buffer
- let v:errmsg=""
- if (splitType == "h")
- silent! execute ":split".bang." " . FILENAME
- elseif (splitType == "v")
- silent! execute ":vsplit".bang." " . FILENAME
- elseif (splitType == "t")
- silent! execute ":tab split".bang." " . FILENAME
- else
- silent! execute ":e".bang." " . FILENAME
- endif
- if (v:errmsg != "")
- echo v:errmsg
- endif
- endif
- endif
- endif
-endfunction
-
-" Function : EqualFilePaths (PRIVATE)
-" Purpose : Compares two paths. Do simple string comparison anywhere but on
-" Windows. On Windows take into account that file paths could differ
-" in usage of separators and the fact that case does not matter.
-" "c:\WINDOWS" is the same path as "c:/windows". has("win32unix") Vim
-" version does not count as one having Windows path rules.
-" Args : path1 (IN) -- first path
-" path2 (IN) -- second path
-" Returns : 1 if path1 is equal to path2, 0 otherwise.
-" Author : Ilya Bobir <ilya@po4ta.com>
-function! <SID>EqualFilePaths(path1, path2)
- if has("win16") || has("win32") || has("win64") || has("win95")
- return substitute(a:path1, "\/", "\\", "g") ==? substitute(a:path2, "\/", "\\", "g")
- else
- return a:path1 == a:path2
- endif
-endfunction
+++ /dev/null
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" CSCOPE settings for vim
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-"
-" This file contains some boilerplate settings for vim's cscope interface,
-" plus some keyboard mappings that I've found useful.
-"
-" USAGE:
-" -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a
-" 'plugin' directory in some other directory that is in your
-" 'runtimepath'.
-"
-" -- vim 5: Stick this file somewhere and 'source cscope.vim' it from
-" your ~/.vimrc file (or cut and paste it into your .vimrc).
-"
-" NOTE:
-" These key maps use multiple keystrokes (2 or 3 keys). If you find that vim
-" keeps timing you out before you can complete them, try changing your timeout
-" settings, as explained below.
-"
-" Happy cscoping,
-"
-" Jason Duell jduell@alumni.princeton.edu 2002/3/7
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-
-" This tests to see if vim was configured with the '--enable-cscope' option
-" when it was compiled. If it wasn't, time to recompile vim...
-if has("cscope")
-
- """"""""""""" Standard cscope/vim boilerplate
-
- " use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t'
- set cscopetag
-
- " check cscope for definition of a symbol before checking ctags: set to 1
- " if you want the reverse search order.
- set csto=0
-
- " add any cscope database in current directory
- if filereadable("cscope.out")
- cs add cscope.out
- " else add the database pointed to by environment variable
- elseif $CSCOPE_DB != ""
- cs add $CSCOPE_DB
- endif
-
- " show msg when any other cscope db added
- set cscopeverbose
-
-
- """"""""""""" My cscope/vim key mappings
- "
- " The following maps all invoke one of the following cscope search types:
- "
- " 's' symbol: find all references to the token under cursor
- " 'g' global: find global definition(s) of the token under cursor
- " 'c' calls: find all calls to the function name under cursor
- " 't' text: find all instances of the text under cursor
- " 'e' egrep: egrep search for the word under cursor
- " 'f' file: open the filename under cursor
- " 'i' includes: find files that include the filename under cursor
- " 'd' called: find functions that function under cursor calls
- "
- " Below are three sets of the maps: one set that just jumps to your
- " search result, one that splits the existing vim window horizontally and
- " diplays your search result in the new window, and one that does the same
- " thing, but does a vertical split instead (vim 6 only).
- "
- " I've used CTRL-\ and CTRL-@ as the starting keys for these maps, as it's
- " unlikely that you need their default mappings (CTRL-\'s default use is
- " as part of CTRL-\ CTRL-N typemap, which basically just does the same
- " thing as hitting 'escape': CTRL-@ doesn't seem to have any default use).
- " If you don't like using 'CTRL-@' or CTRL-\, , you can change some or all
- " of these maps to use other keys. One likely candidate is 'CTRL-_'
- " (which also maps to CTRL-/, which is easier to type). By default it is
- " used to switch between Hebrew and English keyboard mode.
- "
- " All of the maps involving the <cfile> macro use '^<cfile>$': this is so
- " that searches over '#include <time.h>" return only references to
- " 'time.h', and not 'sys/time.h', etc. (by default cscope will return all
- " files that contain 'time.h' as part of their name).
-
-
- " To do the first type of search, hit 'CTRL-\', followed by one of the
- " cscope search types above (s,g,c,t,e,f,i,d). The result of your cscope
- " search will be displayed in the current window. You can use CTRL-T to
- " go back to where you were before the search.
- "
-
- nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
- nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
- nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
-
-
- " Using 'CTRL-spacebar' (intepreted as CTRL-@ by vim) then a search type
- " makes the vim window split horizontally, with search result displayed in
- " the new window.
- "
- " (Note: earlier versions of vim may not have the :scs command, but it
- " can be simulated roughly via:
- " nmap <C-@>s <C-W><C-S> :cs find s <C-R>=expand("<cword>")<CR><CR>
-
- nmap <C-@>s :scs find s <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>g :scs find g <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>c :scs find c <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>t :scs find t <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>e :scs find e <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
- nmap <C-@>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
- nmap <C-@>d :scs find d <C-R>=expand("<cword>")<CR><CR>
-
-
- " Hitting CTRL-space *twice* before the search type does a vertical
- " split instead of a horizontal one (vim 6 and up only)
- "
- " (Note: you may wish to put a 'set splitright' in your .vimrc
- " if you prefer the new window on the right instead of the left
-
- nmap <C-@><C-@>s :vert scs find s <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@><C-@>g :vert scs find g <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@><C-@>c :vert scs find c <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@><C-@>t :vert scs find t <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@><C-@>e :vert scs find e <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@><C-@>f :vert scs find f <C-R>=expand("<cfile>")<CR><CR>
- nmap <C-@><C-@>i :vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
- nmap <C-@><C-@>d :vert scs find d <C-R>=expand("<cword>")<CR><CR>
-
-
- """"""""""""" key map timeouts
- "
- " By default Vim will only wait 1 second for each keystroke in a mapping.
- " You may find that too short with the above typemaps. If so, you should
- " either turn off mapping timeouts via 'notimeout'.
- "
- "set notimeout
- "
- " Or, you can keep timeouts, by uncommenting the timeoutlen line below,
- " with your own personal favorite value (in milliseconds):
- "
- "set timeoutlen=4000
- "
- " Either way, since mapping timeout settings by default also set the
- " timeouts for multicharacter 'keys codes' (like <F1>), you should also
- " set ttimeout and ttimeoutlen: otherwise, you will experience strange
- " delays as vim waits for a keystroke after you hit ESC (it will be
- " waiting to see if the ESC is actually part of a key code like <F1>).
- "
- "set ttimeout
- "
- " personally, I find a tenth of a second to work well for key code
- " timeouts. If you experience problems and have a slow terminal or network
- " connection, set it higher. If you don't set ttimeoutlen, the value for
- " timeoutlent (default: 1000 = 1 second, which is sluggish) is used.
- "
- "set ttimeoutlen=100
-
-endif
-
-
+++ /dev/null
-" guicolorscheme.vim: Convert GUI only color schems
-"
-" Maintainer: Aaron Griffin <aaron@archlinux.org>
-" Last Modified: Mon Feb 26 22:52:34 UTC 2007
-" Version: 1.2
-" URL: http://www.vim.org/script.php?script_id=39
-"
-" Convert a GUI-only colorscheme to support 88 and 256 color terminals
-" This should also work on the GUI, so using it 100% of the time, assuming
-" you always have a non 8/16 color terminal should work fine
-
-" conversion functions {{{
-" canibalized from desert256.vim
-
-function! s:greynum(x) "{{{
- if &t_Co == 88
- if a:x < 23
- return 0
- elseif a:x < 69
- return 1
- elseif a:x < 103
- return 2
- elseif a:x < 127
- return 3
- elseif a:x < 150
- return 4
- elseif a:x < 173
- return 5
- elseif a:x < 196
- return 6
- elseif a:x < 219
- return 7
- elseif a:x < 243
- return 8
- else
- return 9
- endif
- else
- if a:x < 14
- return 0
- else
- let l:n = (a:x - 8) / 10
- let l:m = (a:x - 8) % 10
- if l:m < 5
- return l:n
- else
- return l:n + 1
- endif
- endif
- endif
-endfunction "}}}
-function! s:greylvl(n) "{{{
- if &t_Co == 88
- if a:n == 0
- return 0
- elseif a:n == 1
- return 46
- elseif a:n == 2
- return 92
- elseif a:n == 3
- return 115
- elseif a:n == 4
- return 139
- elseif a:n == 5
- return 162
- elseif a:n == 6
- return 185
- elseif a:n == 7
- return 208
- elseif a:n == 8
- return 231
- else
- return 255
- endif
- else
- if a:n == 0
- return 0
- else
- return 8 + (a:n * 10)
- endif
- endif
-endfunction "}}}
-function! s:grey(n) "{{{
- if &t_Co == 88
- if a:n == 0
- return 16
- elseif a:n == 9
- return 79
- else
- return 79 + a:n
- endif
- else
- if a:n == 0
- return 16
- elseif a:n == 25
- return 231
- else
- return 231 + a:n
- endif
- endif
-endfunction "}}}
-
-function! s:rgbnum(x) "{{{
- if &t_Co == 88
- if a:x < 69
- return 0
- elseif a:x < 172
- return 1
- elseif a:x < 230
- return 2
- else
- return 3
- endif
- else
- if a:x < 75
- return 0
- else
- let l:n = (a:x - 55) / 40
- let l:m = (a:x - 55) % 40
- if l:m < 20
- return l:n
- else
- return l:n + 1
- endif
- endif
- endif
-endfunction "}}}
-function! s:rgblvl(n) "{{{
- if &t_Co == 88
- if a:n == 0
- return 0
- elseif a:n == 1
- return 139
- elseif a:n == 2
- return 205
- else
- return 255
- endif
- else
- if a:n == 0
- return 0
- else
- return 55 + (a:n * 40)
- endif
- endif
-endfunction "}}}
-function! s:rgb(r, g, b) "{{{
- if &t_Co == 88
- return 16 + (a:r * 16) + (a:g * 4) + a:b
- else
- return 16 + (a:r * 36) + (a:g * 6) + a:b
- endif
-endfunction "}}}
-
-function! s:color(r, g, b) "{{{
- " get the closest grey
- let l:gx = s:greynum(a:r)
- let l:gy = s:greynum(a:g)
- let l:gz = s:greynum(a:b)
-
- " get the closest color
- let l:x = s:rgbnum(a:r)
- let l:y = s:rgbnum(a:g)
- let l:z = s:rgbnum(a:b)
-
- let l:level = (a:r * a:r) + (a:g * a:g) + (a:b * a:b)
- if l:gx == l:gy && l:gy == l:gz
- " there are two possibilities
- let l:dgr = s:greylvl(l:gx)
- let l:dgg = s:greylvl(l:gy)
- let l:dgb = s:greylvl(l:gz)
- let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) - l:level
-
- let l:dr = s:rgblvl(l:gx)
- let l:dg = s:rgblvl(l:gy)
- let l:db = s:rgblvl(l:gz)
- let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) - l:level
-
- if l:dgrey < l:drgb
- " use the grey
- return s:grey(l:gx)
- else
- " use the color
- return s:rgb(l:x, l:y, l:z)
- endif
- else
- " only one possibility
- return s:rgb(l:x, l:y, l:z)
- endif
-endfunction "}}}
-function! s:cindex(rgb) "{{{
- "convert RRGGBB to a terminal (numeric) index
- let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
- let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
- let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
-
- return s:color(l:r, l:g, l:b)
-endfunction "}}}
-
-function! s:HL(group, fg, bg, attr) "{{{
- "The main highlight (HL) function
- exec "hi clear " . a:group
- if a:fg != ""
- exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . s:cindex(a:fg)
- endif
- if a:bg != ""
- exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . s:cindex(a:bg)
- endif
- if a:attr != ""
- exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
- endif
-endfunction "}}}
-
-"}}}
-
-" Completion Helpers {{{
-function! s:Colorscheme_Complete(A,L,P)
- let l:files = split(globpath(&runtimepath, "colors/" . a:A . "*"), "\n")
- let l:retlist = []
- for file in l:files
- let l:basename = substitute(file, ".*/", "", "")
- let l:basename = substitute(l:basename, "\.vim", "", "")
- call add(l:retlist, l:basename)
- endfor
- return l:retlist
-endfunction
-
-function! s:GetColorschemeFile(fname)
- let l:files = split(globpath(&runtimepath, "colors/" . a:fname . ".vim"), "\n")
- if len(l:files) == 0
- echoerr "Colorscheme ".a:fname." not found"
- return ""
- else
- return l:files[0]
- endif
-endfunction
-
-command! -complete=customlist,s:Colorscheme_Complete -nargs=1 GuiColorScheme :call s:GuiColorScheme("<args>")
-" }}}
-
-function! s:GuiColorScheme(fname)
- let l:file = s:GetColorschemeFile(a:fname)
- if l:file == ""
- return 1
- endif
-
- if has("gui_running")
- exec "colorscheme " . l:file
- return 0
- endif
-
- for line in readfile(l:file)
- if line =~ '\s*hi'
- let l:name = ""
- let l:fg = ""
- let l:bg = ""
- let l:attr = ""
-
- " get highlight name
- let l:start = match(line, "hi")
- let l:end = match(line, "[ \t]", l:start)
- let l:start = l:end +1
- let l:end = match(line, "[ \t]", l:start)
- let l:name = strpart(line, l:start, l:end - l:start)
-
- " strip foreground color
- let l:start = match(line, "guifg=")
- if l:start != -1
- let l:start = l:start + 6 "strlen(guifg=)
- let l:end = match(line, "[ \t]", l:start)
- if l:end == -1
- let l:fg = strpart(line, l:start)
- else
- let l:fg = strpart(line, l:start, l:end - l:start)
- endif
- if strpart(l:fg, 0, 1) == "#"
- let l:fg = strpart(l:fg, 1)
- endif
- endif
-
- " strip background color
- let l:start = match(line, "guibg=")
- if l:start != -1
- let l:start = l:start + 6 "strlen(guibg=)
- let l:end = match(line, "[ \t]", l:start)
- if l:end == -1
- let l:bg = strpart(line, l:start)
- else
- let l:bg = strpart(line, l:start, l:end - l:start)
- endif
- if strpart(l:bg, 0, 1) == "#"
- let l:bg = strpart(l:bg, 1)
- endif
- endif
-
- " strip attribute
- let l:start = match(line, "gui=")
- if l:start != -1
- let l:start = l:start + 4 "strlen(gui=)
- let l:end = match(line, "[ \t]", l:start)
- if l:end == -1
- let l:attr = strpart(line, l:start)
- else
- let l:attr = strpart(line, l:start, l:end - l:start)
- endif
- endif
-
- call s:HL(l:name, l:fg, l:bg, l:attr)
- endif
- endfor
-endfunction
-
-" vim:ft=vim:fdl=0:fdm=marker:ts=4:sw=4
+++ /dev/null
-# author: Heinz Hofbauer <hofbauer.heinz@gmx.net> (https://bitbucket.org/moebiusstrip/vimfiles)
-
-## PART 1 with optional fields
-
-# An article from a journal or magazine.
-snippet article
- @article{${1:key},
- author = {${2}},
- title = {${3}},
- journal = {${4}},
- year = {${5}},
- OPTvolume = {},
- OPTnumber = {},
- OPTpages = {},
- OPTmonth = {},
- OPTnote = {},
- OPTkey = {},
- }
-# A book with an explicit publisher.
-snippet book
- @book{${1:key},
- author = {${2}},
- editor = {${3}},
- title = {${4}},
- publisher = {${5}},
- year = {${6}},
- OPTvolume = {},
- OPTnumber = {},
- OPTseries = {},
- OPTaddress = {},
- OPTedition = {},
- OPTmonth = {},
- OPTnote = {},
- OPTkey = {},
- }
-# A work that is printed and bound, but without a named publisher or sponsoring institution.
-snippet booklet
- @booklet{${1:key},
- title = {${2}},
- OPTauthor = {},
- OPThowpublished = {},
- OPTaddress = {},
- OPTmonth = {},
- OPTyear = {},
- OPTnote = {},
- OPTkey = {},
- }
-# A part of a book, usually untitled. May be a chapter (or section or whatever) and/or a range of pages.
-snippet inbook
- @inbook{${1:key},
- author = {${2}},
- editor = {${3}},
- title = {${4}},
- chapter = {${5}},
- pages = {${6}},
- publisher = {${7}},
- year = {${8}},
- OPTvolume = {},
- OPTnumber = {},
- OPTseries = {},
- OPTtype = {},
- OPTaddress = {},
- OPTedition = {},
- OPTmonth = {},
- OPTnote = {},
- OPTkey = {},
- }
-# A part of a book having its own title.
-snippet incollection
- @incollection{${1:key},
- author = {${2}},
- title = {${3}},
- booktitle = {${4}},
- publisher = {${5}},
- year = {${6}},
- OPTeditor = {},
- OPTvolume = {},
- OPTnumber = {},
- OPTseries = {},
- OPTtype = {},
- OPTchapter = {},
- OPTpages = {},
- OPTaddress = {},
- OPTedition = {},
- OPTmonth = {},
- OPTnote = {},
- OPTkey = {},
- }
-# An article in a conference proceedings.
-snippet inproceedings
- @inproceedings{${1:key},
- author = {${2}},
- title = {${3}},
- booktitle = {${4}},
- year = {${5}},
- OPTeditor = {},
- OPTvolume = {},
- OPTnumber = {},
- OPTseries = {},
- OPTpages = {},
- OPTaddress = {},
- OPTmonth = {},
- OPTorganization = {},
- OPTpublisher = {},
- OPTnote = {},
- OPTkey = {},
- }
-# Technical documentation.
-snippet manual
- @manual{${1:key},
- title = {${2}},
- OPTauthor = {},
- OPTorganization = {},
- OPTaddress = {},
- OPTedition = {},
- OPTmonth = {},
- OPTyear = {},
- OPTnote = {},
- OPTkey = {},
- }
-# A Master's thesis.
-snippet mastersthesis
- @mastersthesis{${1:key},
- author = {${2}},
- title = {${3}},
- school = {${4}},
- year = {${5}},
- OPTtype = {},
- OPTaddress = {},
- OPTmonth = {},
- OPTnote = {},
- OPTkey = {},
- }
-# For use when nothing else fits.
-snippet misc
- @misc{${1:key},
- none = {${2}},
- OPTauthor = {},
- OPTtitle = {},
- OPThowpublished = {},
- OPTmonth = {},
- OPTyear = {},
- OPTnote = {},
- OPTkey = {},
- }
-# A Ph.D. thesis.
-snippet phdthesis
- @phdthesis{${1:key},
- author = {${2}},
- title = {${3}},
- school = {${4}},
- year = {${5}},
- OPTtype = {},
- OPTaddress = {},
- OPTmonth = {},
- OPTnote = {},
- OPTkey = {},
- }
-# The proceedings of a conference.
-snippet proceedings
- @proceedings{${1:key},
- title = {${2}},
- year = {${3}},
- OPTeditor = {},
- OPTvolume = {},
- OPTnumber = {},
- OPTseries = {},
- OPTaddress = {},
- OPTmonth = {},
- OPTpublisher = {},
- OPTorganization = {},
- OPTnote = {},
- OPTkey = {},
- }
-# A report published by a school or other institution, usually numbered within a series.
-snippet techreport
- @techreport{${1:key},
- author = {${2}},
- title = {${3}},
- institution = {${4}},
- year = {${5}},
- OPTtype = {},
- OPTnumber = {},
- OPTaddress = {},
- OPTmonth = {},
- OPTnote = {},
- OPTkey = {},
- }
-# A document having an author and title, but not formally published.
-snippet unpublished
- @unpublished{${1:key},
- author = {${2}},
- title = {${3}},
- note = {${4}},
- OPTmonth = {},
- OPTyear = {},
- OPTkey = {},
- }
-
-## PART 2 without optional fields (cleansuffix)
-
-# An article from a journal or magazine.
-snippet articleclean
- @article{${1:key},
- author = {${2}},
- title = {${3}},
- journal = {${4}},
- year = {${5}},
- }
-# A book with an explicit publisher.
-snippet bookclean
- @book{${1:key},
- author = {${2}},
- editor = {${3}},
- title = {${4}},
- publisher = {${5}},
- year = {${6}},
- }
-# A work that is printed and bound, but without a named publisher or sponsoring institution.
-snippet bookletclean
- @booklet{${1:key},
- title = {${2}},
- }
-# A part of a book, usually untitled. May be a chapter (or section or whatever) and/or a range of pages.
-snippet inbookclean
- @inbook{${1:key},
- author = {${2}},
- editor = {${3}},
- title = {${4}},
- chapter = {${5}},
- pages = {${6}},
- publisher = {${7}},
- year = {${8}},
- }
-# A part of a book having its own title.
-snippet incollectionclean
- @incollection{${1:key},
- author = {${2}},
- title = {${3}},
- booktitle = {${4}},
- publisher = {${5}},
- year = {${6}},
- }
-# An article in a conference proceedings.
-snippet inproceedingsclean
- @inproceedings{${1:key},
- author = {${2}},
- title = {${3}},
- booktitle = {${4}},
- year = {${5}},
- }
-# Technical documentation.
-snippet manualclean
- @manual{${1:key},
- title = {${2}},
- }
-# A Master's thesis.
-snippet mastersthesisclean
- @mastersthesis{${1:key},
- author = {${2}},
- title = {${3}},
- school = {${4}},
- year = {${5}},
- }
-# For use when nothing else fits.
-snippet miscclean
- @misc{${1:key},
- none = {${2}},
- }
-# A Ph.D. thesis.
-snippet phdthesisclean
- @phdthesis{${1:key},
- author = {${2}},
- title = {${3}},
- school = {${4}},
- year = {${5}},
- }
-# The proceedings of a conference.
-snippet proceedingsclean
- @proceedings{${1:key},
- title = {${2}},
- year = {${3}},
- }
-# A report published by a school or other institution, usually numbered within a series.
-snippet techreportclean
- @techreport{${1:key},
- author = {${2}},
- title = {${3}},
- institution = {${4}},
- year = {${5}},
- }
-# A document having an author and title, but not formally published.
-snippet unpublishedclean
- @unpublished{${1:key},
- author = {${2}},
- title = {${3}},
- note = {${4}},
- }
+++ /dev/null
-# Closing
-snippet kr
- Kind regards,
- Stefan Huber
-snippet br
- Best regards,
- Stefan Huber
-snippet yf
- Yours faithfully,
- Stefan Huber
-# signature
-snippet sig ist
- --
- `system('cat "$HOME/.mutt/signatures/ist.eml"')`
-# signature
-snippet sig cosy
- --
- `system('cat "$HOME/.mutt/signatures/cosy.eml"')`
-# signature
-snippet sig sbg
- --
- `system('cat "$HOME/.mutt/signatures/sbg.eml"')`
-# signature
-snippet sig jeging
- --
- `system('cat "$HOME/.mutt/signatures/jeging.eml"')`
+++ /dev/null
-# Figure
-snippet fig
- \begin{figure}[${4:tbh}]
- \centering
- \includegraphics{${1:figs/}}
- \caption{${2}}
- \label{${3:fig:}}
- \end{figure}
-# block
-snippet block
- \begin{block}{${1}}
- ${2}
- \end{block}
-# Frame
-snippet frame
- \begin{frame}
- \frametitle{${1}}
- \end{frame}
+++ /dev/null
-Funktionsgraphen
-Abszissenwerte
-Punktesammlung
-Maximalgrad
-Punktemenge
-Rauschens
-Teilschritten
-Interpolationsmodi
-Interpolationspunkte
-Teilintervalle
-ACOPOS
-verrauschtes
-Polynomgrenzen
-Funktionswerten
-Äquidistanz
-Maximalzahl
-Versine
-Stelldauer
-Beschleunigungsprofil
-Basisfunktionen
-Basisfunktion
-Adjazenzmatrix
-Knotengrad
-Kernkonzepte
-PintOS
-GeekOS
-hrwOS
-tarball
-x86
-Bochs
-POSIX
-stdout
-superblock
-configurate
-Bebalone
-Bewertungsfunktionen
-reele
-Gesamtbewertungsfunktion
-Bewertungsfunktion
-Spielsituationen
-Spielsituation
-Hadamarad
-Brunn
-Spielposition
-Zugbewertung
-Startpopulation
-Evolutionsläufe
-Brettgewichte
-Verlustsituationen
-Kugelanordnung
-Kugelanordnungen
-Kugelhaufen
-Kugelverteilung
-Spielbretts
-Zugbestimmung
-FlexRay
-Voronoi
-lemmata
-Borelmenge
-Apollonius
-CGAL
-genervt
-mitzuhelfen
-vordergründliche
-vordergründlich
-Vigneron
-Magisterarbeit
-Voronoidiagramme
-Voronoidiagrammen
-alii
-Aichholzer
-Aurenhammer
-Minkowski
-Voronoi
-steganography
-motorcylces
-PSLG
-isoline
-Computerwissenschaften
-FWF
-tetrahedrization
-tetrahedrizations
-Delaunay
-infimum
-Praxisanleiter
-Demaine
-O'Rourke
-Agarwal
-Chazelle
-simplices
-endmark
-DNSSEC
-endsyntax
-supremum
+++ /dev/null
-apices
-iff
-isoline
-Polytope
-polytope
-shellings
-inequation
-filesystem
-filesystems
-syscall
+++ /dev/null
-" Vim syntax file
-" Language: Easychair conference system review form
-" Maintainer: Stefan Huber
-"
-"
-" Changelog:
-" 2010-12-12: Initial version
-
-
-
-" Quit when a syntax file was already loaded
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
- finish
-endif
-
-
-
-syn region ascComment start="---" end="$"
-syn region ascSystem start="\*\*\*" end="$"
-
-
-hi def link ascComment Comment
-hi def link ascSystem Identifier
-
-
+++ /dev/null
-syn spell notoplevel
-syn match Constant "^\(\d\+-\d\+-\d\+\s\+\)\?\d\{2}:\d\{2}\(:\d\{2}\)\?"
-syn match Type " \* [-a-zA-Z0-9_|]*"
-syn match Label "<[ @~&+][-a-zA-Z0-9_|]*>"
-syn region Title start="^---" end="$"
-syn region Identifier start="-!-" end="$"
-syn region Comment start=":::" end="$"
+++ /dev/null
-" Vim syntax file
-" Language: Markdown
-" Maintainer: Ben Williams <benw@plasticboy.com>
-" URL: http://plasticboy.com/markdown-vim-mode/
-" Version: 9
-" Last Change: 2009 May 18
-" Remark: Uses HTML syntax file
-" Remark: I don't do anything with angle brackets (<>) because that would too easily
-" easily conflict with HTML syntax
-" TODO: Handle stuff contained within stuff (e.g. headings within blockquotes)
-
-
-" Read the HTML syntax to start with
-if version < 600
- so <sfile>:p:h/html.vim
-else
- runtime! syntax/html.vim
- unlet b:current_syntax
-endif
-
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
- finish
-endif
-
-" don't use standard HiLink, it will not work with included syntax files
-if version < 508
- command! -nargs=+ HtmlHiLink hi link <args>
-else
- command! -nargs=+ HtmlHiLink hi def link <args>
-endif
-
-syn spell toplevel
-syn case ignore
-syn sync linebreaks=1
-
-"additions to HTML groups
-syn region htmlBold start=/\\\@<!\(^\|\A\)\@=\*\@<!\*\*\*\@!/ end=/\\\@<!\*\@<!\*\*\*\@!\($\|\A\)\@=/ contains=@Spell,htmlItalic
-syn region htmlItalic start=/\\\@<!\(^\|\A\)\@=\*\@<!\*\*\@!/ end=/\\\@<!\*\@<!\*\*\@!\($\|\A\)\@=/ contains=htmlBold,@Spell
-syn region htmlBold start=/\\\@<!\(^\|\A\)\@=_\@<!___\@!/ end=/\\\@<!_\@<!___\@!\($\|\A\)\@=/ contains=htmlItalic,@Spell
-syn region htmlItalic start=/\\\@<!\(^\|\A\)\@=_\@<!__\@!/ end=/\\\@<!_\@<!__\@!\($\|\A\)\@=/ contains=htmlBold,@Spell
-
-" [link](URL) | [link][id] | [link][]
-syn region mkdLink matchgroup=mkdDelimiter start="\!\?\[" end="\]\ze\s*[[(]" contains=@Spell nextgroup=mkdURL,mkdID skipwhite
-syn region mkdID matchgroup=mkdDelimiter start="\[" end="\]" contained
-syn region mkdURL matchgroup=mkdDelimiter start="(" end=")" contained
-" mkd inline links: protocol optional user:pass@ sub/domain .com, .co.uk, etc optional port path/querystring/hash fragment
-" ------------ _____________________ --------------------------- ________________________ ----------------- __
-syntax match mkdInlineURL /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*/
-
-" Link definitions: [id]: URL (Optional Title)
-" TODO handle automatic links without colliding with htmlTag (<URL>)
-syn region mkdLinkDef matchgroup=mkdDelimiter start="^ \{,3}\zs\[" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite
-syn region mkdLinkDefTarget start="<\?\zs\S" excludenl end="\ze[>[:space:]\n]" contained nextgroup=mkdLinkTitle,mkdLinkDef skipwhite skipnl oneline
-syn region mkdLinkTitle matchgroup=mkdDelimiter start=+"+ end=+"+ contained
-syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained
-syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained
-
-"define Markdown groups
-syn match mkdLineContinue ".$" contained
-syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/
-syn match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-$/
-syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_$/
-syn match mkdRule /^\s*-\{3,}$/
-syn match mkdRule /^\s*\*\{3,5}$/
-syn match mkdListItem "^\s*[-*+]\s\+"
-syn match mkdListItem "^\s*\d\+\.\s\+"
-syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/
-syn match mkdLineBreak / \+$/
-syn region mkdCode start=/\\\@<!`/ end=/\\\@<!`/
-syn region mkdCode start=/\s*``[^`]*/ end=/[^`]*``\s*/
-syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell
-syn region mkdCode start="<pre[^>]*>" end="</pre>"
-syn region mkdCode start="<code[^>]*>" end="</code>"
-
-"HTML headings
-syn region htmlH1 start="^\s*#" end="\($\|#\+\)" contains=@Spell
-syn region htmlH2 start="^\s*##" end="\($\|#\+\)" contains=@Spell
-syn region htmlH3 start="^\s*###" end="\($\|#\+\)" contains=@Spell
-syn region htmlH4 start="^\s*####" end="\($\|#\+\)" contains=@Spell
-syn region htmlH5 start="^\s*#####" end="\($\|#\+\)" contains=@Spell
-syn region htmlH6 start="^\s*######" end="\($\|#\+\)" contains=@Spell
-syn match htmlH1 /^.\+\n=\+$/ contains=@Spell
-syn match htmlH2 /^.\+\n-\+$/ contains=@Spell
-
-
-
-" fold region for headings
-syn region mkdHeaderFold
- \ start="^\s*\z(#\+\)"
- \ skip="^\s*\z1#\+"
- \ end="^\(\s*#\)\@="
- \ fold contains=TOP
-
-" fold region for lists
-syn region mkdListFold
- \ start="^\z(\s*\)\*\z(\s*\)"
- \ skip="^\z1 \z2\s*[^#]"
- \ end="^\(.\)\@="
- \ fold contains=TOP
-
-syn sync fromstart
-setlocal foldmethod=syntax
-
-
-
-"highlighting for Markdown groups
-HtmlHiLink mkdString String
-HtmlHiLink mkdCode String
-HtmlHiLink mkdBlockquote Comment
-HtmlHiLink mkdLineContinue Comment
-HtmlHiLink mkdListItem Identifier
-HtmlHiLink mkdRule Identifier
-HtmlHiLink mkdLineBreak Todo
-HtmlHiLink mkdLink htmlLink
-HtmlHiLink mkdURL htmlString
-HtmlHiLink mkdInlineURL htmlLink
-HtmlHiLink mkdID Identifier
-HtmlHiLink mkdLinkDef mkdID
-HtmlHiLink mkdLinkDefTarget mkdURL
-HtmlHiLink mkdLinkTitle htmlString
-
-HtmlHiLink mkdDelimiter Delimiter
-
-let b:current_syntax = "mkd"
-
-delcommand HtmlHiLink
-" vim: ts=8
+++ /dev/null
-"=============================================================================
-" FILE: syntax/snippet.vim
-" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>(Modified)
-" Last Modified: 08 Nov 2009
-" Usage: Just source this file.
-" License: MIT license {{{
-" Permission is hereby granted, free of charge, to any person obtaining
-" a copy of this software and associated documentation files (the
-" "Software"), to deal in the Software without restriction, including
-" without limitation the rights to use, copy, modify, merge, publish,
-" distribute, sublicense, and/or sell copies of the Software, and to
-" permit persons to whom the Software is furnished to do so, subject to
-" the following conditions:
-"
-" The above copyright notice and this permission notice shall be included
-" in all copies or substantial portions of the Software.
-"
-" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-" }}}
-" Version: 1.5, for Vim 7.0
-"-----------------------------------------------------------------------------
-" ChangeLog: "{{{
-" 1.5:
-" - Deleted rank and condition.
-"
-" 1.4:
-" - Added condition.
-" - Implemented optional placeholder.
-"
-" 1.3:
-" - Added variable.
-"
-" 1.2:
-" - Added alias.
-" - Improved color.
-"
-" 1.1:
-" - Added delete.
-"
-" 1.0:
-" - Initial version.
-""}}}
-"-----------------------------------------------------------------------------
-" TODO: "{{{
-" - Nothing.
-""}}}
-" Bugs"{{{
-" -
-""}}}
-"=============================================================================
-
-if version < 700
- syntax clear
-elseif exists("b:current_syntax")
- finish
-endif
-
-syn region SnippetPrevWord start=+'+ end=+'+ contained
-syn region SnippetPrevWord start=+"+ end=+"+ contained
-syn region SnippetEval start=+`+ end=+`+ contained
-syn match SnippetWord '^\s\+.*$' contains=SnippetEval,SnippetExpand
-syn match SnippetExpand '\${\d\+\%(:.\{-}\)\?\\\@<!}' contained
-syn match SnippetVariable '\$\d\+' contained
-syn match SnippetComment '^#.*$'
-
-syn match SnippetKeyword '^\%(include\|snippet\|abbr\|prev_word\|delete\|alias\)' contained
-syn match SnippetPrevWords '^prev_word\s\+.*$' contains=SnippetPrevWord,SnippetKeyword
-syn match SnippetStatementName '^snippet\s.*$' contains=SnippetName,SnippetKeyword
-syn match SnippetName '\s\+.*$' contained
-syn match SnippetStatementAbbr '^abbr\s.*$' contains=SnippetAbbr,SnippetKeyword
-syn match SnippetAbbr '\s\+.*$' contained
-syn match SnippetStatementRank '^rank\s.*$' contains=SnippetRank,SnippetKeyword
-syn match SnippetRank '\s\+\d\+$' contained
-syn match SnippetStatementInclude '^include\s.*$' contains=SnippetInclude,SnippetKeyword
-syn match SnippetInclude '\s\+.*$' contained
-syn match SnippetStatementDelete '^delete\s.*$' contains=SnippetDelete,SnippetKeyword
-syn match SnippetDelete '\s\+.*$' contained
-syn match SnippetStatementAlias '^alias\s.*$' contains=SnippetAlias,SnippetKeyword
-syn match SnippetAlias '\s\+.*$' contained
-
-hi def link SnippetKeyword Statement
-hi def link SnippetPrevWord String
-hi def link SnippetName Identifier
-hi def link SnippetAbbr Normal
-hi def link SnippetEval Type
-hi def link SnippetWord String
-hi def link SnippetExpand Special
-hi def link SnippetVariable Special
-hi def link SnippetComment Comment
-hi def link SnippetInclude PreProc
-hi def link SnippetDelete PreProc
-hi def link SnippetAlias Identifier
-
-let b:current_syntax = "snippet"
+++ /dev/null
-syn spell notoplevel
-syn match Constant "^\(\d\+-\d\+-\d\+\s\+\)\?\d\{2}:\d\{2}\(:\d\{2}\)\?"
-syn match Type " \S\+ "
-syn region Comment start="\t--\t" end="$"
-syn region DiffAdded start=" ▬▬▶ " end="$"
-syn region DiffRemoved start=" ◀▬▬ " end="$"
+++ /dev/null
-" Purpose: My personal .vimrc
-" Author: Stefan Huber
-
-"profile start /tmp/profile.log
-"profile func *
-"profile file *
-
-set encoding=utf8
-set number
-set backspace=indent,eol,start
-
-set mouse=a
-
-set tagstack
-set grepprg=grep\ -nH\ $*
-set foldcolumn=1
-
-set incsearch
-set hlsearch
-
-set cursorline
-set laststatus=2
-set scrolloff=4
-
-set listchars=tab:»,trail:·,eol:$
-set virtualedit=block
-
-set autoindent
-set tabstop=4
-set shiftwidth=4
-set expandtab
-
-if version >= 703
- set spelllang=de_at,en
- set tabpagemax=20
- set colorcolumn=+1
-endif
-
-set wildmode=longest,list:longest
-
-set tags=./tags;/
-
-syntax on
-filetype plugin indent on
-
-runtime! autoload/plug.vim
-" Check if there is vim-plug installed
-if exists('g:loaded_plug')
- call plug#begin('~/.config/nvim/plugged')
- Plug 'Glench/Vim-Jinja2-Syntax'
- Plug 'LaTeX-Box-Team/LaTeX-Box'
- Plug 'benekastah/neomake'
- Plug 'vim-airline/vim-airline'
- Plug 'vim-airline/vim-airline-themes'
- Plug 'chrisbra/csv.vim'
- Plug 'craigemery/vim-autotag'
- Plug 'derekwyatt/vim-fswitch'
- Plug 'godlygeek/tabular'
- "Plug 'kien/ctrlp.vim'
- Plug 'junegunn/fzf'
- Plug 'majutsushi/tagbar'
- Plug 'mhinz/vim-signify'
- Plug 'msanders/snipmate.vim'
- Plug 'scrooloose/nerdcommenter'
- Plug 'scrooloose/nerdtree'
- " Plug 'scrooloose/syntastic'
- Plug 'sjl/splice.vim'
- Plug 'Shougo/deoplete.nvim'
- Plug 'suan/vim-instant-markdown'
- Plug 'StanAngeloff/php.vim'
- Plug 't4ku/marktag'
- Plug 'thinca/vim-fontzoom'
- Plug 'tpope/vim-ragtag'
- Plug 'vim-scripts/CSApprox'
- Plug 'vim-scripts/DetectIndent'
- Plug 'vim-scripts/git_patch_tags.vim'
- Plug 'vim-scripts/loremipsum'
- call plug#end()
-
- autocmd! BufWritePost,BufEnter * Neomake
-
-" If there is no vim-plug, try pathogen
-else
- runtime autoload/pathogen.vim
- if exists("g:loaded_pathogen")
- " Pathogen runtime path manipulation
- call pathogen#runtime_append_all_bundles()
- call pathogen#helptags()
- endif
-endif
-
-
-if has('nvim')
- set rtp^=/usr/share/vim/vimfiles
-else
- set nocompatible
-endif
-
-" Color settings
-if !has('nvim')
- set t_Co=256
-else
- let $NVIM_TUI_ENABLE_TRUE_COLOR=1
-endif
-let g:CSApprox_attr_map = { 'bold' : 'bold', 'italic' : 'underline', 'sp' : 'bg' }
-
-colorscheme shuber-wombat
-
-
-" Use the below highlight group when displaying bad whitespace is desired.
-highlight BadWhitespace ctermbg=red guibg=red
-" Make trailing whitespace be flagged as bad.
-au Filetype python,tex,c,cpp,cs,objc,java,vim syn match BadWhitespace /\s\+$/ containedin=ALL
-au Filetype python,tex,c,cpp,cs,objc,java,vim let g:airline#extensions#whitespace#enabled = 0
-
-
-" Detect indentation, but otherwise set expandtab
-if exists(":DetectIndent")
- au BufReadPost * :DetectIndent
-endif
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Airline
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-let g:airline_powerline_fonts = 0
-let g:airline_theme = 'wombat'
-
-let g:airline#extensions#tabline#enabled = 1
-let g:airline#extensions#tagbar#enabled = 0
-let g:airline#extensions#whitespace#enabled = 0
-let g:airline#extensions#branch#enabled = 1
-let g:airline#extensions#branch#use_vcscommand = 1
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Some macros
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-"Open current file with a specific program
-function OpenIn(prog)
- execute ":!" . a:prog . " % &"
-endfunction
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" key bindings
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-nmap <s-PageDown> :bn<CR>
-nmap <s-PageUp> :bp<CR>
-
-map <a-c> <plug>NERDCommenterToggle
-nmap <F10> :TagbarToggle<CR>
-
-"nmap <c-q> :q<CR>
-"nmap <c-s> :w<CR>
-"vmap <c-s> <Esc><c-s>gv
-"imap <c-s> <c-o><c-s>
-
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" NERDTree
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-nmap <F9> :NERDTreeToggle<CR>
-let g:NERDTreeDirArrows = 1
-let g:NERDTreeDirArrowExpandable = '▸'
-let g:NERDTreeDirArrowCollapsible = '▾'
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" fortran
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-"let fortran_free_source=1
-au BufNewFile *.f90 set fortran_free_source=1
-au Filetype fortran set cindent cst csto=0
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" C, C++, C#, objc, java
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-au Filetype c,cpp,cs,objc,java set cindent cst csto=0
-
-au Filetype c,cpp,cs,objc,java map <buffer> <F4> :cnext<CR>
-au Filetype c,cpp,cs,objc,java map <buffer> <S-F4> :cprevious<CR>
-
-au Filetype c,cpp,cs,objc set makeprg=make
-au Filetype c,cpp,cs,objc map <buffer> <F7> :make<CR>
-au Filetype java map <buffer> <F7> :!ant -f ../build.xml<CR>
-
-" If FSwitch exists
-runtime! plugin/fswitch.vim
-if exists(":FSHere")
- au Filetype c,cpp,objc map <buffer> <F11> :vsplit<CR>:FSRight<CR>
- au Filetype c,cpp,objc map <buffer> <S-F11> :FSHere<CR>
-
- " Substitute lib <-> include, otherwise take the same directory
- au BufEnter *.c* let b:fswitchlocs='reg:/lib/include/,rel:.'
- au BufEnter *.h* let b:fswitchlocs='reg:/include/lib/,rel:.'
- "au BufEnter *.c* let b:fswitchlocs='rel:.,rel:../inc*/**,rel:../../inc*/**'
-
- au BufEnter *.cpp,*.cc,*.cxx let b:fswitchdst='h,hxx,hpp,hh'
- au BufEnter *.h,*.hh,*.hxx let b:fswitchdst='cc,c,cxx,cpp'
-else
- au Filetype c,cpp,cs,objc,java map <buffer> <F11> :AS<CR>
- au Filetype c,cpp,cs,objc,java map <buffer> <S-F11> :A<CR>
-endif
-
-
-"Prepend the namespace to an identifier, e.g. 'std::' before 'map' excluding
-"those in C/C++ comments.
-function PrependCppNamespaceToIdent(ns, id)
-
- " To match Not to match
- "
- "|id |// id
- "| id |// /* */ id
- "|/* */ /* */ id |/* */ // id
- "|id /* */ |/* id
- "|*/ id | * id
- " |/* id */
- " |::id
- " |/**/ ::id
- " |#include <id>
- "
- " In order to not match '* id' it is assumed that multi-line comment lines
- " in the middle begin with a star.
-
- " If #include and // and /* and ^* and :: is not prepend:
- execute ':%s@\(\(#include\|\/\/\|\/\*\|^\s*\*[^/]\).*\|::\)\@<!\<' . a:id . '\>@' . a:ns . '::' . a:id . '@ge'
- " If #include and // and :: is not prepend, but */ is, and no further /* or // are found
- execute ':%s@\(\(#include\|\/\/\).*\)\@<!\*\/\(\/[^\/\*]\|[^\/]\)*\zs\(::\)\@<!\<' . a:id . '\>@' . a:ns . '::' . a:id . '@ge'
-
-endfunction
-
-"Prepend STL namespace 'std::' to several identifiers
-function PrependSTLNamespace()
- " This list of identifier is not complete, but adding all of them is too
- " much. We rather like to add identifieres that are 'typical' for C++.
- " Others, like 'move' are likely to not be C++ specific. In this cases the
- " user is asked to call PrependCppNamespaceToIdent by hand.
- let id = []
- let id = id +['cin', 'cout', 'cerr', 'endl']
- let id = id +['swap', 'sort', 'max', 'min']
- let id = id +['vector', 'deque', 'list', 'map', 'multimap', 'set']
- let id = id +['queue', 'stack', 'priority_queue']
- let id = id +['ostream', 'istream', 'sstream']
- let id = id +['pair', 'string']
-
- for i in id
- call PrependCppNamespaceToIdent("std", i)
- endfor
-endfunction
-
-function EscapeHexToChar()
- echo 'Call "x/Nxb addr" in GDB to print N bytes at addr'
- execute '%s/^.*://'
- execute '%s/\s*0x\(\x\x\)/\\x\1/g'
- execute '%s/^\(.*\)$/"\1"/'
-endfunction
-
-function InsertIncludeGuardsWithoutEndif()
- let gatename = substitute(expand("%:t"), "\\.", "_", "g") . '_' . strpart(system('pwgen -c 16 1'), 0, 16)
- execute "normal! i#ifndef " . gatename
- execute "normal! o#define " . gatename
-endfunction
-
-function AddIncludeGuards()
- execute "normal! Go#endif"
- execute "normal! gg"
- call InsertIncludeGuardsWithoutEndif()
-endfunction
-
-autocmd BufNewFile *.{h,hpp,hxx} call AddIncludeGuards()
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Text and mail
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-au Filetype text set textwidth=80
-au Filetype markddown set textwidth=80
-"According to thunderbirds settings
-au Filetype mail set textwidth=72
-au Filetype mail set expandtab
-
-"a and w reformat the paragraph automatically and a new paragraph
-"is indicated by lines not ending with white-space
-if version>=700
- au Filetype mail,text set fo+=n spell
-endif
-
-"Scissor line
-au Filetype mail syn match Statement /^\s*-*\s*>8\s*-*\s*$/
-au Filetype mail syn match Statement /^\s*-*\s*8<\s*-*\s*$/
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" PHP
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-"au Filetype php set fo=tcqn
-if version >= 700
- au Filetype php set spell
-endif
-
-au Filetype php set textwidth=80
-"au Filetype php set cindent
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" maxima
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-au BufRead,BufNewFile *.wxm set filetype=maxima
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" LaTeX
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-let g:LatexBox_split_side = "rightbelow"
-"let g:LatexBox_split_resize = 1
-let g:LatexBox_ref_pattern = '\c\\\a*ref\*\?\_\s*{'
-
-let g:tex_flavor = "latex"
-let g:LatexBox_output_type = "pdf"
-let g:LatexBox_viewer = "okular"
-let g:LatexBox_latexmk_async = 1
-let g:LatexBox_latexmk_preview_continuously = 1
-"let g:LatexBox_show_warnings = 0
-let g:LatexBox_quickfix = 4
-
-if version >= 700
- au Filetype tex set spell
-endif
-
-au BufRead,BufNewFile *.cls set filetype=tex
-au Filetype tex set textwidth=80
-au Filetype tex set shiftwidth=2
-au Filetype tex set smartindent
-" Override Tagbar Toggle with LatexBox TOC
-au Filetype tex nmap <buffer> <F10> :LatexTOCToggle<CR>
-au Filetype tex nmap <buffer> <F11> :LatexLabels<CR>
-
-
-"Remove Umlaute
-function TexTransUmlaute()
- execute ':%s/ü/\\\"u/ge'
- execute ':%s/Ü/\\\"U/&'
- execute ':%s/ö/\\\"o/&'
- execute ':%s/Ö/\\\"O/&'
- execute ':%s/ä/\\\"a/&'
- execute ':%s/Ä/\\\"A/&'
- execute ':%s/ß/\\\"s/&'
- execute ':%s/²/\^2/&'
-endfunction
-
-function FindWordRepeatings()
- execute '/\(\<\S\+\>\)\s\+\1\>'
-" let pos = search('\(\<\S\+\>\)\s\+\1\>', "cw")
-" call cursor(pos)
-endfunction
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" python
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-au Filetype python map <buffer> <F5> :!python % <CR>
-
-" vimrc file for following the coding standards specified in PEP 7 & 8.
-
-" Number of spaces that a pre-existing tab is equal to.
-" For the amount of space used for a new tab use shiftwidth.
-au Filetype python set shiftwidth=4
-au Filetype python set expandtab
-
-" Wrap text after a certain number of characters
-au Filetype python set textwidth=79
-
-let g:syntastic_python_checkers = ["pyflakes"]
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" XML, Ipe
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-"Opens the current file in ipe
-au BufRead,BufNewFile *.ipe set filetype=ipe
-au Filetype xml,ipe map <buffer> <M-o> :call OpenIn("ipe") <CR>
-
-au Filetype xml let g:tagbar_sort = 0
-let g:tagbar_type_xml = {
- \ 'ctagstype' : 'xml',
- \ 'kinds' : [
- \ 't:Tag'
- \ ]
-\ }
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" gnuplot
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-"Opens the current file in ipe
-au Filetype gnuplot map <buffer> <M-o> :call OpenIn("gnuplot -persist") <CR>
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" remind
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-au BufRead,BufNewFile */.remind/* set filetype=remind
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" vim-orgmode
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-au BufRead,BufNewFile *.org set filetype=org
-let g:org_todo_keywords=['TODO', 'FEEDBACK', 'VERIFY', '|', 'DONE', 'DELEGATED']
-let g:org_todo_keyword_faces = [['FEEDBACK', 'magenta'], ['TODO', 'yellow']]
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" markdown
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-let g:instant_markdown_autostart = 0
-let g:instant_markdown_slow = 1
-au Filetype markdown map <buffer> <F5> :InstantMarkdownPreview<CR>
-au Filetype markdown let g:tagbar_sort = 0
-
-let g:tagbar_type_markdown = {
- \ 'ctagstype' : 'markdown',
- \ 'kinds' : [
- \ 'h:Heading_L1',
- \ 'i:Heading_L2',
- \ 'k:Heading_L3'
- \ ]
-\ }
-
-if executable('marktag')
- let g:tagbar_type_markdown = {
- \ 'ctagstype' : 'markdown',
- \ 'ctagsbin' : 'marktag',
- \ 'kinds' : [
- \ 'h:header'
- \ ],
- \ 'sro' : '.',
- \ 'kind2scope' : {
- \ 'h' : 'header'
- \ },
- \ 'scope2kind' : {
- \ 'header' : 'h'
- \ }
- \ }
-end
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" deoplete
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-if has('nvim')
- let g:deoplete#enable_at_startup = 1
-end
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" youcompleteme
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
-let g:ycm_confirm_extra_conf = 0
-
-let g:ycm_min_num_of_chars_for_completion = 4
-let g:ycm_collect_identifiers_from_tags_files = 1
-let g:ycm_autoclose_preview_window_after_completion = 1
-
-let g:ycm_key_list_select_completion = ['<Down>']
-nnoremap <buffer> <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>
-
-let g:ycm_filetype_whitelist = { 'c' : 1, 'cpp' : 1, 'cs' : 1, 'objc' : 1, 'java' : 1, 'python' : 1 }
-
-"let g:ycm_server_use_vim_stdout = 1
-"let g:ycm_server_log_level = 'debug'
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" syntastic
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-let g:syntastic_mode_map = { 'mode' : 'active', 'active_filetypes' : [], 'passive_filetypes' : ['html'] }
-let g:ycm_show_diagnostics_ui = 0
-let g:syntastic_c_checkers = ["cppcheck"]
-let g:syntastic_cpp_checkers = g:syntastic_c_checkers
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" signify
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-let g:signify_vcs_list = ['git']
-
-
-
-
-if filereadable($HOME . "/.vimrc-local")
- source ~/.vimrc-local
-endif
-
-" Being able to load project specific vimrc files
-set exrc
-set secure
-
-
+++ /dev/null
-" Place your local settings here, i.e, the ones which are not shared among all
-" hosts and accounts.
-
-"set modeline
-"let g:airline_powerline_fonts = 1
\ No newline at end of file