remove old vim config
This commit is contained in:
parent
0a0043d84d
commit
e87c3a04c9
18
.gitmodules
vendored
18
.gitmodules
vendored
@ -1,18 +0,0 @@
|
|||||||
[submodule "vim/bundle/vim-airline"]
|
|
||||||
path = vim/bundle/vim-airline
|
|
||||||
url = https://github.com/vim-airline/vim-airline.git
|
|
||||||
[submodule "vim/bundle/vim-bad-whitespace"]
|
|
||||||
path = vim/bundle/vim-bad-whitespace
|
|
||||||
url = https://github.com/bitc/vim-bad-whitespace
|
|
||||||
[submodule "vim/bundle/tabular"]
|
|
||||||
path = vim/bundle/tabular
|
|
||||||
url = https://github.com/godlygeek/tabular.git
|
|
||||||
[submodule "vim/bundle/ctrlp.vim"]
|
|
||||||
path = vim/bundle/ctrlp.vim
|
|
||||||
url = https://github.com/ctrlpvim/ctrlp.vim.git
|
|
||||||
[submodule "vim/bundle/vim-airline-themes"]
|
|
||||||
path = vim/bundle/vim-airline-themes
|
|
||||||
url = https://github.com/vim-airline/vim-airline-themes.git
|
|
||||||
[submodule "vim/bundle/tmuxline.vim"]
|
|
||||||
path = vim/bundle/tmuxline.vim
|
|
||||||
url = https://github.com/edkolev/tmuxline.vim.git
|
|
11
install.sh
11
install.sh
@ -10,11 +10,6 @@ else
|
|||||||
path="https://bitbucket.org/ftpd/dotfiles.git"
|
path="https://bitbucket.org/ftpd/dotfiles.git"
|
||||||
fi
|
fi
|
||||||
git clone $path ~/.dotfiles
|
git clone $path ~/.dotfiles
|
||||||
cd ~/.dotfiles
|
|
||||||
rm -rf ~/.vim/bundle/*
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
cd ~/.dotfiles
|
|
||||||
|
|
||||||
# zsh
|
# zsh
|
||||||
mkdir ~/.zsh
|
mkdir ~/.zsh
|
||||||
@ -31,9 +26,9 @@ touch ~/.zshrc.local
|
|||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
|
|
||||||
# vim
|
# vim
|
||||||
ln -sf ~/.dotfiles/vim ~/.vim
|
#ln -sf ~/.dotfiles/vim ~/.vim
|
||||||
ln -sf ~/.vim/rcfiles/vimrc ~/.vimrc
|
#ln -sf ~/.vim/rcfiles/vimrc ~/.vimrc
|
||||||
ln -sf ~/.vim/rcfiles/gvimrc ~/.gvimrc
|
#ln -sf ~/.vim/rcfiles/gvimrc ~/.gvimrc
|
||||||
|
|
||||||
# .gitignore
|
# .gitignore
|
||||||
ln -sf ~/.dotfiles/gitignore ~/.gitignore
|
ln -sf ~/.dotfiles/gitignore ~/.gitignore
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
" -----------------------------------------------------------------------------
|
|
||||||
" File: gruvbox.vim
|
|
||||||
" Description: Retro groove color scheme for Airline
|
|
||||||
" Author: morhetz <morhetz@gmail.com>
|
|
||||||
" Source: https://github.com/morhetz/gruvbox
|
|
||||||
" Last Modified: 22 Aug 2014
|
|
||||||
" -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
let g:airline#themes#gruvbox#palette = {}
|
|
||||||
|
|
||||||
function! airline#themes#gruvbox#refresh()
|
|
||||||
|
|
||||||
let M0 = airline#themes#get_highlight('Identifier')
|
|
||||||
let accents_group = airline#themes#get_highlight('Special')
|
|
||||||
let modified_group = [M0[0], '', M0[2], '', '']
|
|
||||||
let warning_group = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
|
|
||||||
|
|
||||||
let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['StatusLineNC', 'bg'])
|
|
||||||
let s:N2 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['StatusLineNC', 'fg'])
|
|
||||||
let s:N3 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['CursorLine', 'bg'])
|
|
||||||
let g:airline#themes#gruvbox#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
|
|
||||||
let g:airline#themes#gruvbox#palette.normal_modified = { 'airline_c': modified_group }
|
|
||||||
let g:airline#themes#gruvbox#palette.normal.airline_warning = warning_group
|
|
||||||
let g:airline#themes#gruvbox#palette.normal_modified.airline_warning = warning_group
|
|
||||||
|
|
||||||
let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Identifier', 'fg'])
|
|
||||||
let s:I2 = s:N2
|
|
||||||
let s:I3 = airline#themes#get_highlight2(['Normal', 'fg'], ['StatusLineNC', 'fg'])
|
|
||||||
let g:airline#themes#gruvbox#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
|
|
||||||
let g:airline#themes#gruvbox#palette.insert_modified = g:airline#themes#gruvbox#palette.normal_modified
|
|
||||||
let g:airline#themes#gruvbox#palette.insert.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
|
||||||
let g:airline#themes#gruvbox#palette.insert_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
|
||||||
|
|
||||||
let s:R1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Structure', 'fg'])
|
|
||||||
let s:R2 = s:I2
|
|
||||||
let s:R3 = s:I3
|
|
||||||
let g:airline#themes#gruvbox#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
|
|
||||||
let g:airline#themes#gruvbox#palette.replace_modified = g:airline#themes#gruvbox#palette.normal_modified
|
|
||||||
let g:airline#themes#gruvbox#palette.replace.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
|
||||||
let g:airline#themes#gruvbox#palette.replace_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
|
||||||
|
|
||||||
let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
|
|
||||||
let s:V2 = s:N2
|
|
||||||
let s:V3 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLine', 'fg'])
|
|
||||||
let g:airline#themes#gruvbox#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
|
|
||||||
let g:airline#themes#gruvbox#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] }
|
|
||||||
let g:airline#themes#gruvbox#palette.visual.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
|
||||||
let g:airline#themes#gruvbox#palette.visual_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
|
||||||
|
|
||||||
let s:IA = airline#themes#get_highlight2(['TabLine', 'fg'], ['CursorLine', 'bg'])
|
|
||||||
let g:airline#themes#gruvbox#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
|
|
||||||
let g:airline#themes#gruvbox#palette.inactive_modified = { 'airline_c': modified_group }
|
|
||||||
|
|
||||||
let g:airline#themes#gruvbox#palette.accents = { 'red': accents_group }
|
|
||||||
|
|
||||||
let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg'])
|
|
||||||
let g:airline#themes#gruvbox#palette.tabline = {
|
|
||||||
\ 'airline_tab': s:N2,
|
|
||||||
\ 'airline_tabsel': s:N1,
|
|
||||||
\ 'airline_tabtype': s:V1,
|
|
||||||
\ 'airline_tabfill': s:TF,
|
|
||||||
\ 'airline_tabhid': s:IA,
|
|
||||||
\ 'airline_tabmod': s:I1
|
|
||||||
\ }
|
|
||||||
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call airline#themes#gruvbox#refresh()
|
|
||||||
|
|
||||||
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:
|
|
@ -1,250 +0,0 @@
|
|||||||
" pathogen.vim - path option manipulation
|
|
||||||
" Maintainer: Tim Pope <http://tpo.pe/>
|
|
||||||
" Version: 2.0
|
|
||||||
|
|
||||||
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
|
|
||||||
"
|
|
||||||
" For management of individually installed plugins in ~/.vim/bundle (or
|
|
||||||
" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc
|
|
||||||
" prior to `filetype plugin indent on` is the only other setup necessary.
|
|
||||||
"
|
|
||||||
" The API is documented inline below. For maximum ease of reading,
|
|
||||||
" :set foldmethod=marker
|
|
||||||
|
|
||||||
if exists("g:loaded_pathogen") || &cp
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let g:loaded_pathogen = 1
|
|
||||||
|
|
||||||
" Point of entry for basic default usage. Give a directory name to invoke
|
|
||||||
" pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path
|
|
||||||
" to invoke pathogen#runtime_prepend_subdirectories(). Afterwards,
|
|
||||||
" pathogen#cycle_filetype() is invoked.
|
|
||||||
function! pathogen#infect(...) abort " {{{1
|
|
||||||
let source_path = a:0 ? a:1 : 'bundle'
|
|
||||||
if source_path =~# '[\\/]'
|
|
||||||
call pathogen#runtime_prepend_subdirectories(source_path)
|
|
||||||
else
|
|
||||||
call pathogen#runtime_append_all_bundles(source_path)
|
|
||||||
endif
|
|
||||||
call pathogen#cycle_filetype()
|
|
||||||
endfunction " }}}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 (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
|
|
||||||
call remove(a:list,i)
|
|
||||||
elseif a:list[i] ==# ''
|
|
||||||
let i += 1
|
|
||||||
let empty = 1
|
|
||||||
else
|
|
||||||
let seen[a:list[i]] = 1
|
|
||||||
let i += 1
|
|
||||||
endif
|
|
||||||
endwhile
|
|
||||||
return a:list
|
|
||||||
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
|
|
||||||
|
|
||||||
" Turn filetype detection off and back on again if it was already enabled.
|
|
||||||
function! pathogen#cycle_filetype() " {{{1
|
|
||||||
if exists('g:did_load_filetypes')
|
|
||||||
filetype off
|
|
||||||
filetype on
|
|
||||||
endif
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" Checks if a bundle is 'disabled'. A bundle is considered 'disabled' if
|
|
||||||
" its 'basename()' is included in g:pathogen_disabled[]' or ends in a tilde.
|
|
||||||
function! pathogen#is_disabled(path) " {{{1
|
|
||||||
if a:path =~# '\~$'
|
|
||||||
return 1
|
|
||||||
elseif !exists("g:pathogen_disabled")
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
let sep = pathogen#separator()
|
|
||||||
return index(g:pathogen_disabled, strpart(a:path, strridx(a:path, sep)+1)) != -1
|
|
||||||
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 = filter(pathogen#glob_directories(a:path.sep."*"), '!pathogen#is_disabled(v:val)')
|
|
||||||
let after = filter(pathogen#glob_directories(a:path.sep."*".sep."after"), '!pathogen#is_disabled(v:val[0:-7])')
|
|
||||||
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'
|
|
||||||
if "\n".s:done_bundles =~# "\\M\n".name."\n"
|
|
||||||
return ""
|
|
||||||
endif
|
|
||||||
let s:done_bundles .= name . "\n"
|
|
||||||
let list = []
|
|
||||||
for dir in pathogen#split(&rtp)
|
|
||||||
if dir =~# '\<after$'
|
|
||||||
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name,'').sep.'*[^~]'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
|
|
||||||
else
|
|
||||||
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name.sep.'*[^~]'), '!pathogen#is_disabled(v:val)')
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
let &rtp = pathogen#join(pathogen#uniq(list))
|
|
||||||
return 1
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
let s:done_bundles = ''
|
|
||||||
" }}}1
|
|
||||||
|
|
||||||
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
|
|
||||||
function! pathogen#helptags() " {{{1
|
|
||||||
let sep = pathogen#separator()
|
|
||||||
for dir in pathogen#split(&rtp)
|
|
||||||
if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.sep.'doc') == 2 && !empty(filter(split(glob(dir.sep.'doc'.sep.'*'),"\n>"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags'))
|
|
||||||
helptags `=dir.'/doc'`
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
command! -bar Helptags :call pathogen#helptags()
|
|
||||||
|
|
||||||
" Like findfile(), but hardcoded to use the runtimepath.
|
|
||||||
function! pathogen#runtime_findfile(file,count) "{{{1
|
|
||||||
let rtp = pathogen#join(1,pathogen#split(&rtp))
|
|
||||||
let file = findfile(a:file,rtp,a:count)
|
|
||||||
if file ==# ''
|
|
||||||
return ''
|
|
||||||
else
|
|
||||||
return fnamemodify(file,':p')
|
|
||||||
endif
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" Backport of fnameescape().
|
|
||||||
function! pathogen#fnameescape(string) " {{{1
|
|
||||||
if exists('*fnameescape')
|
|
||||||
return fnameescape(a:string)
|
|
||||||
elseif a:string ==# '-'
|
|
||||||
return '\-'
|
|
||||||
else
|
|
||||||
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
|
|
||||||
endif
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
function! s:find(count,cmd,file,lcd) " {{{1
|
|
||||||
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
|
|
||||||
let file = pathogen#runtime_findfile(a:file,a:count)
|
|
||||||
if file ==# ''
|
|
||||||
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
|
|
||||||
elseif a:lcd
|
|
||||||
let path = file[0:-strlen(a:file)-2]
|
|
||||||
execute 'lcd `=path`'
|
|
||||||
return a:cmd.' '.pathogen#fnameescape(a:file)
|
|
||||||
else
|
|
||||||
return a:cmd.' '.pathogen#fnameescape(file)
|
|
||||||
endif
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
function! s:Findcomplete(A,L,P) " {{{1
|
|
||||||
let sep = pathogen#separator()
|
|
||||||
let cheats = {
|
|
||||||
\'a': 'autoload',
|
|
||||||
\'d': 'doc',
|
|
||||||
\'f': 'ftplugin',
|
|
||||||
\'i': 'indent',
|
|
||||||
\'p': 'plugin',
|
|
||||||
\'s': 'syntax'}
|
|
||||||
if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
|
|
||||||
let request = cheats[a:A[0]].a:A[1:-1]
|
|
||||||
else
|
|
||||||
let request = a:A
|
|
||||||
endif
|
|
||||||
let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*'
|
|
||||||
let found = {}
|
|
||||||
for path in pathogen#split(&runtimepath)
|
|
||||||
let path = expand(path, ':p')
|
|
||||||
let matches = split(glob(path.sep.pattern),"\n")
|
|
||||||
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
|
|
||||||
call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]')
|
|
||||||
for match in matches
|
|
||||||
let found[match] = 1
|
|
||||||
endfor
|
|
||||||
endfor
|
|
||||||
return sort(keys(found))
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>,0)
|
|
||||||
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0)
|
|
||||||
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1)
|
|
||||||
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1)
|
|
||||||
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1)
|
|
||||||
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1)
|
|
||||||
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1)
|
|
||||||
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1)
|
|
||||||
|
|
||||||
" vim:set ft=vim ts=8 sw=2 sts=2:
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit cd99e43613202d56b2adfc8f9bd216734a9601fd
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 00e1e7fcdbc6d753e0bc8043e0d2546fa81bf367
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 1e638ef6b2673130db123f25b1ae1160c5289bb8
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 1dc8eac3d232bdcc7941deb47f300ac79e344873
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 796478723c01a275269b96f63ee5cd5b44a342f4
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 51aca6d383fe277627794e1b84f7d2a93cbd4c18
|
|
File diff suppressed because it is too large
Load Diff
@ -1,95 +0,0 @@
|
|||||||
" ----------------------------------------------------------------------------
|
|
||||||
" Vim color file
|
|
||||||
" Maintainer: John-Paul Bader <contact@smyck.org>
|
|
||||||
" Last Change: 2012 April
|
|
||||||
" License: Beer Ware
|
|
||||||
" ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Reset Highlighting
|
|
||||||
hi clear
|
|
||||||
if exists("syntax_on")
|
|
||||||
syntax reset
|
|
||||||
endif
|
|
||||||
|
|
||||||
set background=dark
|
|
||||||
set linespace=3
|
|
||||||
|
|
||||||
let g:colors_name = "smyck"
|
|
||||||
|
|
||||||
hi Normal cterm=none ctermbg=none ctermfg=15 gui=none guibg=#282828 guifg=#F7F7F7
|
|
||||||
hi LineNr cterm=none ctermbg=none ctermfg=8 gui=none guibg=#282828 guifg=#8F8F8F
|
|
||||||
hi StatusLine cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#5D5D5D guifg=#FBFBFB
|
|
||||||
hi StatusLineNC cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#5D5D5D guifg=#FBFBFB
|
|
||||||
hi Search cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7
|
|
||||||
hi IncSearch cterm=none ctermbg=3 ctermfg=8 gui=none guibg=#F6DC69 guifg=#8F8F8F
|
|
||||||
hi ColumnMargin cterm=none ctermbg=0 gui=none guibg=#000000
|
|
||||||
hi Error cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
|
|
||||||
hi ErrorMsg cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
|
|
||||||
hi Folded cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#3B3B3B guifg=#90AB41
|
|
||||||
hi FoldColumn cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#3B3B3B guifg=#90AB41
|
|
||||||
hi NonText cterm=bold ctermbg=none ctermfg=8 gui=bold guifg=#8F8F8F
|
|
||||||
hi ModeMsg cterm=bold ctermbg=none ctermfg=10 gui=none
|
|
||||||
hi Pmenu cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#8F8F8F guifg=#F7F7F7
|
|
||||||
hi PmenuSel cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
|
|
||||||
hi PmenuSbar cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
|
|
||||||
hi SpellBad cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
|
|
||||||
hi SpellCap cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
|
|
||||||
hi SpellRare cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
|
|
||||||
hi SpellLocal cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
|
|
||||||
hi Visual cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
|
|
||||||
hi Directory cterm=none ctermbg=none ctermfg=4 gui=none guibg=#242424 guifg=#88CCE7
|
|
||||||
hi SpecialKey cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F
|
|
||||||
hi DiffAdd cterm=bold ctermbg=2 ctermfg=15
|
|
||||||
hi DiffChange cterm=bold ctermbg=4 ctermfg=15
|
|
||||||
hi DiffDelete cterm=bold ctermbg=1 ctermfg=15
|
|
||||||
hi DiffText cterm=bold ctermbg=3 ctermfg=8
|
|
||||||
hi MatchParen cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7
|
|
||||||
hi CursorLine cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242
|
|
||||||
hi CursorColumn cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242
|
|
||||||
hi Title cterm=none ctermbg=none ctermfg=4 gui=none guifg=#88CCE7
|
|
||||||
|
|
||||||
" ----------------------------------------------------------------------------
|
|
||||||
" Syntax Highlighting
|
|
||||||
" ----------------------------------------------------------------------------
|
|
||||||
hi Keyword cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
|
|
||||||
hi Comment cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F
|
|
||||||
hi Delimiter cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7
|
|
||||||
hi Identifier cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
|
|
||||||
hi Structure cterm=none ctermbg=none ctermfg=12 gui=none guifg=#9DEEF2
|
|
||||||
hi Ignore cterm=none ctermbg=none ctermfg=8 gui=none guifg=bg
|
|
||||||
hi Constant cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
|
|
||||||
hi PreProc cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
|
|
||||||
hi Type cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
|
|
||||||
hi Statement cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
|
|
||||||
hi Special cterm=none ctermbg=none ctermfg=6 gui=none guifg=#d7d7d7
|
|
||||||
hi String cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69
|
|
||||||
hi Number cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69
|
|
||||||
hi Underlined cterm=none ctermbg=none ctermfg=magenta gui=underline guibg=#272727
|
|
||||||
hi Symbol cterm=none ctermbg=none ctermfg=9 gui=none guifg=#FAB1AB
|
|
||||||
hi Method cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7
|
|
||||||
hi Interpolation cterm=none ctermbg=none ctermfg=6 gui=none guifg=#2EB5C1
|
|
||||||
|
|
||||||
" Erlang
|
|
||||||
hi link erlangAtom Keyword
|
|
||||||
hi link erlangBitType Keyword
|
|
||||||
|
|
||||||
hi link rubyBeginend Keyword
|
|
||||||
hi link rubyClass Keyword
|
|
||||||
hi link rubyModule Keyword
|
|
||||||
hi link rubyKeyword Keyword
|
|
||||||
hi link rubyOperator Method
|
|
||||||
hi link rubyIdentifier Keyword
|
|
||||||
hi link rubyClassVariable Symbol
|
|
||||||
hi link rubyInstanceVariable Constant
|
|
||||||
hi link rubyGlobalVariable Constant
|
|
||||||
hi link rubyClassVariable Method
|
|
||||||
hi link rubyConstant Constant
|
|
||||||
hi link rubySymbol Symbol
|
|
||||||
hi link rubyFunction Constant
|
|
||||||
hi link rubyControl Keyword
|
|
||||||
hi link rubyConditional Keyword
|
|
||||||
hi link rubyInterpolation Interpolation
|
|
||||||
hi link rubyInterpolationDelimiter Interpolation
|
|
||||||
hi link rubyRailsMethod Method
|
|
||||||
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
" detect puppet filetype
|
|
||||||
au BufRead,BufNewFile *.pp set filetype=puppet
|
|
@ -1,94 +0,0 @@
|
|||||||
" Vim filetype plugin
|
|
||||||
" Language: Puppet
|
|
||||||
" Maintainer: Todd Zullinger <tmz@pobox.com>
|
|
||||||
" Last Change: 2009 Aug 19
|
|
||||||
" vim: set sw=4 sts=4:
|
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let b:did_ftplugin = 1
|
|
||||||
|
|
||||||
if !exists("no_plugin_maps") && !exists("no_puppet_maps")
|
|
||||||
if !hasmapto("<Plug>AlignRange")
|
|
||||||
map <buffer> <LocalLeader>= <Plug>AlignRange
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
noremap <buffer> <unique> <script> <Plug>AlignArrows :call <SID>AlignArrows()<CR>
|
|
||||||
noremap <buffer> <unique> <script> <Plug>AlignRange :call <SID>AlignRange()<CR>
|
|
||||||
|
|
||||||
iabbrev => =><C-R>=<SID>AlignArrows('=>')<CR>
|
|
||||||
iabbrev +> +><C-R>=<SID>AlignArrows('+>')<CR>
|
|
||||||
|
|
||||||
if exists('*s:AlignArrows')
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
let s:arrow_re = '[=+]>'
|
|
||||||
let s:selector_re = '[=+]>\s*\$.*\s*?\s*{\s*$'
|
|
||||||
|
|
||||||
function! s:AlignArrows(op)
|
|
||||||
let cursor_pos = getpos('.')
|
|
||||||
let lnum = line('.')
|
|
||||||
let line = getline(lnum)
|
|
||||||
if line !~ s:arrow_re
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
let pos = stridx(line, a:op)
|
|
||||||
let start = lnum
|
|
||||||
let end = lnum
|
|
||||||
let pnum = lnum - 1
|
|
||||||
while 1
|
|
||||||
let pline = getline(pnum)
|
|
||||||
if pline !~ s:arrow_re || pline =~ s:selector_re
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
let start = pnum
|
|
||||||
let pnum -= 1
|
|
||||||
endwhile
|
|
||||||
let cnum = end
|
|
||||||
while 1
|
|
||||||
let cline = getline(cnum)
|
|
||||||
if cline !~ s:arrow_re ||
|
|
||||||
\ (indent(cnum) != indent(cnum+1) && getline(cnum+1) !~ '\s*}')
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
let end = cnum
|
|
||||||
let cnum += 1
|
|
||||||
endwhile
|
|
||||||
call s:AlignSection(start, end)
|
|
||||||
let cursor_pos[2] = stridx(getline('.'), a:op) + strlen(a:op) + 1
|
|
||||||
call setpos('.', cursor_pos)
|
|
||||||
return ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:AlignRange() range
|
|
||||||
call s:AlignSection(a:firstline, a:lastline)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" AlignSection and AlignLine are from the vim wiki:
|
|
||||||
" http://vim.wikia.com/wiki/Regex-based_text_alignment
|
|
||||||
function! s:AlignSection(start, end)
|
|
||||||
let extra = 1
|
|
||||||
let sep = s:arrow_re
|
|
||||||
let maxpos = 0
|
|
||||||
let section = getline(a:start, a:end)
|
|
||||||
for line in section
|
|
||||||
let pos = match(line, ' *'.sep)
|
|
||||||
if maxpos < pos
|
|
||||||
let maxpos = pos
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
call map(section, 's:AlignLine(v:val, sep, maxpos, extra)')
|
|
||||||
call setline(a:start, section)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:AlignLine(line, sep, maxpos, extra)
|
|
||||||
let m = matchlist(a:line, '\(.\{-}\) \{-}\('.a:sep.'.*\)')
|
|
||||||
if empty(m)
|
|
||||||
return a:line
|
|
||||||
endif
|
|
||||||
let spaces = repeat(' ', a:maxpos - strlen(m[1]) + a:extra)
|
|
||||||
return m[1] . spaces . m[2]
|
|
||||||
endfunction
|
|
@ -1,76 +0,0 @@
|
|||||||
" Vim indent file
|
|
||||||
" Language: Puppet
|
|
||||||
" Maintainer: Todd Zullinger <tmz@pobox.com>
|
|
||||||
" Last Change: 2009 Aug 19
|
|
||||||
" vim: set sw=4 sts=4:
|
|
||||||
|
|
||||||
if exists("b:did_indent")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let b:did_indent = 1
|
|
||||||
|
|
||||||
setlocal autoindent smartindent
|
|
||||||
setlocal indentexpr=GetPuppetIndent()
|
|
||||||
setlocal indentkeys+=0],0)
|
|
||||||
|
|
||||||
if exists("*GetPuppetIndent")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Check if a line is part of an include 'block', e.g.:
|
|
||||||
" include foo,
|
|
||||||
" bar,
|
|
||||||
" baz
|
|
||||||
function! s:PartOfInclude(lnum)
|
|
||||||
let lnum = a:lnum
|
|
||||||
while lnum
|
|
||||||
let lnum = lnum - 1
|
|
||||||
let line = getline(lnum)
|
|
||||||
if line !~ ',$'
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
if line =~ '^\s*include\s\+[^,]\+,$'
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
endwhile
|
|
||||||
return 0
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:OpenBrace(lnum)
|
|
||||||
call cursor(a:lnum, 1)
|
|
||||||
return searchpair('{\|\[\|(', '', '}\|\]\|)', 'nbW')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! GetPuppetIndent()
|
|
||||||
let pnum = prevnonblank(v:lnum - 1)
|
|
||||||
if pnum == 0
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
let line = getline(v:lnum)
|
|
||||||
let pline = getline(pnum)
|
|
||||||
let ind = indent(pnum)
|
|
||||||
|
|
||||||
if pline =~ '^\s*#'
|
|
||||||
return ind
|
|
||||||
endif
|
|
||||||
|
|
||||||
if pline =~ '\({\|\[\|(\|:\)$'
|
|
||||||
let ind += &sw
|
|
||||||
elseif pline =~ ';$' && pline !~ '[^:]\+:.*[=+]>.*'
|
|
||||||
let ind -= &sw
|
|
||||||
elseif pline =~ '^\s*include\s\+.*,$'
|
|
||||||
let ind += &sw
|
|
||||||
endif
|
|
||||||
|
|
||||||
if pline !~ ',$' && s:PartOfInclude(pnum)
|
|
||||||
let ind -= &sw
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Match } }, }; ] ]: )
|
|
||||||
if line =~ '^\s*\(}\(,\|;\)\?$\|]:\?$\|)\)'
|
|
||||||
let ind = indent(s:OpenBrace(v:lnum))
|
|
||||||
endif
|
|
||||||
|
|
||||||
return ind
|
|
||||||
endfunction
|
|
@ -1,339 +0,0 @@
|
|||||||
" Vim global plugin for Star Wars crawls
|
|
||||||
" Maintainer: Damian Conway
|
|
||||||
" License: This file is placed in the public domain.
|
|
||||||
|
|
||||||
"######################################################################
|
|
||||||
"## ##
|
|
||||||
"## To use: ##
|
|
||||||
"## ##
|
|
||||||
"## :SWTC <filename> ##
|
|
||||||
"## ##
|
|
||||||
"## See file 'intro.swtc' for the crawl-specification syntax ##
|
|
||||||
"## ##
|
|
||||||
"######################################################################
|
|
||||||
|
|
||||||
|
|
||||||
" If already loaded, we're done...
|
|
||||||
if exists("loaded_SWcrawl")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let loaded_SWcrawl = 1
|
|
||||||
|
|
||||||
" Preserve external compatibility options, then enable full vim compatibility...
|
|
||||||
let s:save_cpo = &cpo
|
|
||||||
set cpo&vim
|
|
||||||
|
|
||||||
" Set up the actual colon command...
|
|
||||||
command! -nargs=1 -complete=file SWTC call SWcrawl(<f-args>)
|
|
||||||
|
|
||||||
|
|
||||||
" Implementation....
|
|
||||||
|
|
||||||
let s:CRAWL_SPEED = 1 "(lines per second)
|
|
||||||
let s:STAR_DENSITY = 50 "(pixels per star, i.e. 1 star per STAR_DENSITY pixels)
|
|
||||||
let s:STARFIELD_HEIGHT = 2 "(screens deep)
|
|
||||||
|
|
||||||
let s:LOGO_LINE1 = '^\s*\[\zs.*\ze\]\s*$'
|
|
||||||
let s:LOGO_LINE2 = '^\s*\[\[\zs.*\ze\]\]\s*$'
|
|
||||||
let s:LOGO_LINE3 = '^\s*\[\[\[\zs.*\ze\]\]\]\s*$'
|
|
||||||
let s:LOGO_LINE4 = '^\s*\[\[\[\[\zs.*\ze\]\]\]\]\s*$'
|
|
||||||
let s:CENTRED_CRAWL_LINE = '^\s*[>]\s*\zs.\{-}\ze\s*[<]\s*$'
|
|
||||||
let s:CRAWL_LINE = '^\s*[|]\s*\zs.\{-}\ze\s*[|]\s*$'
|
|
||||||
let s:PREFACE_LINE = '^\s*\zs.\{-}\ze\s*$'
|
|
||||||
|
|
||||||
highlight SWC_PREFACE ctermfg=cyan
|
|
||||||
highlight SWC_FADE_LIGHT ctermfg=cyan
|
|
||||||
highlight SWC_FADE_DARK ctermfg=blue
|
|
||||||
highlight SWC_LOGO ctermfg=yellow cterm=bold
|
|
||||||
highlight SWC_CRAWL ctermfg=yellow
|
|
||||||
highlight SWC_STAR ctermfg=white
|
|
||||||
highlight SWC_BLACK ctermfg=black ctermbg=black
|
|
||||||
|
|
||||||
let s:PREFACE_POS = { 'x': 10, 'y': 5 }
|
|
||||||
|
|
||||||
function! SWcrawl (textsource)
|
|
||||||
" Load preface, logo, and text to be crawled...
|
|
||||||
let preface = []
|
|
||||||
let logo1 = []
|
|
||||||
let logo2 = []
|
|
||||||
let logo3 = []
|
|
||||||
let logo4 = []
|
|
||||||
let crawl = []
|
|
||||||
let centred = []
|
|
||||||
let max_crawl_width = 0
|
|
||||||
for nextline in readfile(a:textsource)
|
|
||||||
" Ignore blank lines...
|
|
||||||
if nextline =~ '^\s*$'
|
|
||||||
continue
|
|
||||||
|
|
||||||
" Lines in [...] are logo components...
|
|
||||||
elseif nextline =~ s:LOGO_LINE4
|
|
||||||
let logo4 += [ matchstr(nextline, s:LOGO_LINE4) ]
|
|
||||||
elseif nextline =~ s:LOGO_LINE3
|
|
||||||
let logo3 += [ matchstr(nextline, s:LOGO_LINE3) ]
|
|
||||||
elseif nextline =~ s:LOGO_LINE2
|
|
||||||
let logo2 += [ matchstr(nextline, s:LOGO_LINE2) ]
|
|
||||||
elseif nextline =~ s:LOGO_LINE1
|
|
||||||
let logo1 += [ matchstr(nextline, s:LOGO_LINE1) ]
|
|
||||||
|
|
||||||
" Lines in |...| are crawl components...
|
|
||||||
elseif nextline =~ s:CRAWL_LINE
|
|
||||||
let next_crawl = matchstr(nextline, s:CRAWL_LINE)
|
|
||||||
if strlen(next_crawl) > max_crawl_width
|
|
||||||
let max_crawl_width = strlen(substitute(next_crawl,'\s\+',' ','g'))
|
|
||||||
endif
|
|
||||||
let crawl += [ next_crawl ]
|
|
||||||
let centred += [ 0 ]
|
|
||||||
|
|
||||||
" Lines in >...< are centred crawl components...
|
|
||||||
elseif nextline =~ s:CENTRED_CRAWL_LINE
|
|
||||||
let next_crawl = matchstr(nextline, s:CENTRED_CRAWL_LINE)
|
|
||||||
if strlen(next_crawl) > max_crawl_width
|
|
||||||
let max_crawl_width = strlen(substitute(next_crawl,'\s\+',' ','g'))
|
|
||||||
endif
|
|
||||||
let crawl += [ next_crawl ]
|
|
||||||
let centred += [ 1 ]
|
|
||||||
|
|
||||||
" Anything else is preface...
|
|
||||||
else
|
|
||||||
let preface += [ substitute(matchstr(nextline, s:PREFACE_LINE), "^\s*", repeat(" ",s:PREFACE_POS.x), '') ]
|
|
||||||
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
|
|
||||||
" Ensure all logos available...
|
|
||||||
let logo1 = len(logo1) ? logo1 : ["YOUR", "LOGO", "HERE"]
|
|
||||||
let logo2 = len(logo2) ? logo2 : copy(logo1)
|
|
||||||
let logo3 = len(logo3) ? logo3 : copy(logo2)
|
|
||||||
let logo4 = len(logo4) ? logo4 : copy(logo3)
|
|
||||||
|
|
||||||
" Save current buffer for final transition effect...
|
|
||||||
let original_buffer = getline(1,'$')
|
|
||||||
|
|
||||||
" Switch to a new buffer...
|
|
||||||
let prev_matches = getmatches()
|
|
||||||
enew!
|
|
||||||
let b:WIN = { 'x' : winwidth(0), 'y' : winheight(0) }
|
|
||||||
call setline(1, repeat([""], b:WIN.y + 1))
|
|
||||||
|
|
||||||
" And hide annoyances...
|
|
||||||
set lcs=
|
|
||||||
let old_rulerformat = &rulerformat
|
|
||||||
let &rulerformat="%#SWC_BLACK#%l"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
" Generate starfield...
|
|
||||||
let stars = SWC_gen_stars()
|
|
||||||
|
|
||||||
" Clear screen...
|
|
||||||
call setline(1, repeat([""], s:STARFIELD_HEIGHT * b:WIN.y) + original_buffer)
|
|
||||||
redraw
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
" Start with preface...
|
|
||||||
call matchadd('SWC_PREFACE', '.', 100)
|
|
||||||
call setline(s:PREFACE_POS.y, preface)
|
|
||||||
echo ""
|
|
||||||
redraw
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
" Clean up...
|
|
||||||
call clearmatches()
|
|
||||||
call setline(s:PREFACE_POS.y, repeat([""], len(preface)))
|
|
||||||
echo ""
|
|
||||||
redraw
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
" Then show logo receding at centre of screen...
|
|
||||||
call clearmatches()
|
|
||||||
call matchadd('SWC_BLACK', '*', 102)
|
|
||||||
call matchadd('SWC_STAR', '\s\zs[.]\ze\s', 101)
|
|
||||||
call matchadd('SWC_LOGO', '.', 100)
|
|
||||||
call SWC_draw_logo(logo1)
|
|
||||||
call SWC_paint_stars(stars)
|
|
||||||
echo ""
|
|
||||||
redraw
|
|
||||||
sleep 3
|
|
||||||
|
|
||||||
" Push it away...
|
|
||||||
call setline(1, repeat([""], b:WIN.y))
|
|
||||||
call SWC_draw_logo(logo2)
|
|
||||||
call SWC_paint_stars(stars)
|
|
||||||
echo ""
|
|
||||||
redraw
|
|
||||||
sleep 500m
|
|
||||||
|
|
||||||
call setline(1, repeat([""], b:WIN.y))
|
|
||||||
call SWC_draw_logo(logo3)
|
|
||||||
call SWC_paint_stars(stars)
|
|
||||||
echo ""
|
|
||||||
redraw
|
|
||||||
sleep 500m
|
|
||||||
|
|
||||||
call setline(1, repeat([""], b:WIN.y))
|
|
||||||
call SWC_draw_logo(logo4)
|
|
||||||
call SWC_paint_stars(stars)
|
|
||||||
echo ""
|
|
||||||
redraw
|
|
||||||
sleep 500m
|
|
||||||
|
|
||||||
|
|
||||||
" Clean up...
|
|
||||||
call clearmatches()
|
|
||||||
call matchadd('SWC_STAR', '\s\zs[.]\ze\s', 101)
|
|
||||||
call setline(1, repeat([""], b:WIN.y))
|
|
||||||
call SWC_paint_stars(stars)
|
|
||||||
echo ""
|
|
||||||
redraw
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
" Run crawl...
|
|
||||||
call clearmatches()
|
|
||||||
call matchadd('SWC_CRAWL', '.', 100)
|
|
||||||
call matchadd('SWC_STAR', '\s\zs[.]\ze\s', 101)
|
|
||||||
for offset_from_bottom in range(1, len(crawl) + b:WIN.y)
|
|
||||||
let crawl_line = offset_from_bottom < b:WIN.y ? 0 : offset_from_bottom - b:WIN.y + 1
|
|
||||||
for screen_line in range(1, b:WIN.y)
|
|
||||||
if screen_line >= b:WIN.y - offset_from_bottom && crawl_line < len(crawl)
|
|
||||||
let padded_line = SWC_pad(crawl[crawl_line], screen_line, centred[crawl_line], max_crawl_width)
|
|
||||||
call setline(screen_line, padded_line)
|
|
||||||
let crawl_line += 1
|
|
||||||
else
|
|
||||||
call setline(screen_line, "")
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
call SWC_paint_stars(stars)
|
|
||||||
echo ""
|
|
||||||
redraw
|
|
||||||
exec 'sleep ' . s:trunc(1000/s:CRAWL_SPEED) . 'm'
|
|
||||||
if getchar(0) || offset_from_bottom > len(crawl) && padded_line !~ '\S'
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
|
|
||||||
" Pan starfield down...
|
|
||||||
call matchadd('SWC_FADE_DARK', '[^.]', 200)
|
|
||||||
sleep 200m
|
|
||||||
for offset_from_top in range(1, s:STARFIELD_HEIGHT * b:WIN.y)
|
|
||||||
1delete
|
|
||||||
redraw
|
|
||||||
exec 'sleep ' . (200 - 2 * offset_from_top) . 'm'
|
|
||||||
endfor
|
|
||||||
sleep 200m
|
|
||||||
|
|
||||||
|
|
||||||
" Switch back to previous buffer and restore normal highlighting...
|
|
||||||
edit! #
|
|
||||||
call setmatches(prev_matches)
|
|
||||||
let &rulerformat = old_rulerformat
|
|
||||||
redraw
|
|
||||||
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function s:trunc (n)
|
|
||||||
return str2nr(string( a:n ))
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SWC_draw_logo (logo)
|
|
||||||
let logo = copy(a:logo)
|
|
||||||
|
|
||||||
" Find centre for logo...
|
|
||||||
let logo_width = 0
|
|
||||||
for line in logo
|
|
||||||
if strlen(line) > logo_width
|
|
||||||
let logo_width = strlen(line)
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
let logo_pos_x = (b:WIN.x - logo_width) / 2
|
|
||||||
let logo_pos_y = (b:WIN.y - len(logo)) / 2
|
|
||||||
|
|
||||||
" Move logo to centre...
|
|
||||||
call map(logo, "repeat(' ', logo_pos_x) . v:val")
|
|
||||||
|
|
||||||
" Draw logo
|
|
||||||
call setline(logo_pos_y, logo)
|
|
||||||
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SWC_pad (text, y_pos, centred, max_text_width)
|
|
||||||
|
|
||||||
" Does this need padding???
|
|
||||||
let words = split(a:text, '\s\+')
|
|
||||||
if len(words) < 1
|
|
||||||
return a:text
|
|
||||||
endif
|
|
||||||
|
|
||||||
" How many unpadded characters are there???
|
|
||||||
let unpadded_width = 0
|
|
||||||
for word in words
|
|
||||||
let unpadded_width += strlen(word)
|
|
||||||
endfor
|
|
||||||
|
|
||||||
" How much padding is needed???
|
|
||||||
let rel_y = (2.0 * a:y_pos / b:WIN.y) - 1.0
|
|
||||||
let stretched_width = s:trunc( a:max_text_width + rel_y * (b:WIN.x - a:max_text_width) )
|
|
||||||
let required_padding = max([ 0, stretched_width - unpadded_width ])
|
|
||||||
let indent = (b:WIN.x - stretched_width) / 2
|
|
||||||
let gap_count = len(words) - 1
|
|
||||||
|
|
||||||
" Is this a last line???
|
|
||||||
let tight = a:centred || strlen(a:text) < 0.9 * a:max_text_width
|
|
||||||
|
|
||||||
" Insert padding...
|
|
||||||
if a:y_pos >= b:WIN.y/2
|
|
||||||
let min_padding_needed_for = gap_count
|
|
||||||
if tight
|
|
||||||
let min_pad_per_gap = max([ 1, s:trunc(rel_y * 6.0) ])
|
|
||||||
else
|
|
||||||
let min_pad_per_gap = max([ 1, required_padding / gap_count ])
|
|
||||||
let leftover_padding = required_padding - gap_count * min_pad_per_gap
|
|
||||||
let min_padding_needed_for = min([ gap_count, gap_count - leftover_padding ])
|
|
||||||
endif
|
|
||||||
let padded_text = join(words[0 : min_padding_needed_for], repeat(" ", min_pad_per_gap))
|
|
||||||
\ . repeat(" ", min_pad_per_gap+1)
|
|
||||||
\ . join(words[min_padding_needed_for+1 : -1], repeat(" ", min_pad_per_gap+1))
|
|
||||||
let padded_text = substitute(padded_text, '\s*$', '', '')
|
|
||||||
|
|
||||||
" Or remove chars (in the distance)...
|
|
||||||
elseif a:text =~ '\S'
|
|
||||||
" let delta = s:trunc( 8.0 * (b:WIN.y/2 - a:y_pos) )
|
|
||||||
" let greeked_len = max([ 0, strlen(substitute(a:text, '^\s*\|\s*$', '', 'g')) - delta ])
|
|
||||||
let greeked_len = tight ? stretched_width * (unpadded_width + gap_count) / a:max_text_width : stretched_width
|
|
||||||
let padded_text = repeat('~', greeked_len)
|
|
||||||
|
|
||||||
" Or ignore it...
|
|
||||||
else
|
|
||||||
let padded_text = ""
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Indent to centre...
|
|
||||||
let padded_text = substitute(padded_text, '\s*$', '', '')
|
|
||||||
let max_ever_padding = b:WIN.x - a:max_text_width
|
|
||||||
let indent = a:centred ? (b:WIN.x - strlen(padded_text))/2
|
|
||||||
\ : indent
|
|
||||||
return repeat(" ", indent) . padded_text
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SWC_gen_stars ()
|
|
||||||
let star_count = b:WIN.x * s:STARFIELD_HEIGHT * b:WIN.y / s:STAR_DENSITY
|
|
||||||
let stars = []
|
|
||||||
for n in range(star_count)
|
|
||||||
let x = RandomNumber(b:WIN.x) + 1
|
|
||||||
let y = RandomNumber(s:STARFIELD_HEIGHT * b:WIN.y) + 1
|
|
||||||
let stars += [{'y':y,'x':x}]
|
|
||||||
endfor
|
|
||||||
return stars
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SWC_paint_stars (stars)
|
|
||||||
let max_x = b:WIN.x
|
|
||||||
for star in a:stars
|
|
||||||
let line = strpart(getline(star.y) . repeat(" ", max_x), 0, max_x)
|
|
||||||
let line = substitute(line, '\s\zs\%'.(star.x-1).'c\s\ze\s', '.', '')
|
|
||||||
call setline(star.y, line)
|
|
||||||
endfor
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Restore previous external compatibility options
|
|
||||||
let &cpo = s:save_cpo
|
|
@ -1,111 +0,0 @@
|
|||||||
" Vim global plugin for automating response to swapfiles
|
|
||||||
" Maintainer: Damian Conway
|
|
||||||
" License: This file is placed in the public domain.
|
|
||||||
|
|
||||||
"#############################################################
|
|
||||||
"## ##
|
|
||||||
"## Note that this plugin only works for Vim sessions ##
|
|
||||||
"## running in Terminal on MacOS X. And only if your ##
|
|
||||||
"## Vim configuration includes: ##
|
|
||||||
"## ##
|
|
||||||
"## set title titlestring= ##
|
|
||||||
"## ##
|
|
||||||
"## See below for the two functions that would have to be ##
|
|
||||||
"## rewritten to port this plugin to other OS's. ##
|
|
||||||
"## ##
|
|
||||||
"#############################################################
|
|
||||||
|
|
||||||
|
|
||||||
" If already loaded, we're done...
|
|
||||||
if exists("loaded_autoswap_mac")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let loaded_autoswap_mac = 1
|
|
||||||
|
|
||||||
" Preserve external compatibility options, then enable full vim compatibility...
|
|
||||||
let s:save_cpo = &cpo
|
|
||||||
set cpo&vim
|
|
||||||
|
|
||||||
" Invoke the behaviour whenever a swapfile is detected...
|
|
||||||
"
|
|
||||||
augroup AutoSwap_Mac
|
|
||||||
autocmd!
|
|
||||||
autocmd SwapExists * call AS_M_HandleSwapfile(expand('<afile>:p'))
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
|
|
||||||
" The automatic behaviour...
|
|
||||||
"
|
|
||||||
function! AS_M_HandleSwapfile (filename)
|
|
||||||
|
|
||||||
" Is file already open in another Vim session in some other Terminal window???
|
|
||||||
let active_window = AS_M_DetectActiveWindow(a:filename)
|
|
||||||
|
|
||||||
" If so, go there instead and terminate this attempt to open the file...
|
|
||||||
if (strlen(active_window) > 0)
|
|
||||||
call AS_M_DelayedMsg('Switched to existing session in another window')
|
|
||||||
call AS_M_SwitchToActiveWindow(active_window)
|
|
||||||
let v:swapchoice = 'q'
|
|
||||||
|
|
||||||
" Otherwise, if swapfile is older than file itself, just get rid of it...
|
|
||||||
elseif getftime(v:swapname) < getftime(a:filename)
|
|
||||||
call AS_M_DelayedMsg("Old swapfile detected...and deleted")
|
|
||||||
call delete(v:swapname)
|
|
||||||
let v:swapchoice = 'e'
|
|
||||||
|
|
||||||
" Otherwise, open file read-only...
|
|
||||||
else
|
|
||||||
call AS_M_DelayedMsg("Swapfile detected...opening read-only")
|
|
||||||
let v:swapchoice = 'o'
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Print a message after the autocommand completes
|
|
||||||
" (so you can see it, but don't have to hit <ENTER> to continue)...
|
|
||||||
"
|
|
||||||
function! AS_M_DelayedMsg (msg)
|
|
||||||
" A sneaky way of injecting a message when swapping into the new buffer...
|
|
||||||
augroup AutoSwap_Mac_Msg
|
|
||||||
autocmd!
|
|
||||||
" Print the message on finally entering the buffer...
|
|
||||||
autocmd BufWinEnter * echohl WarningMsg
|
|
||||||
exec 'autocmd BufWinEnter * echon "\r'.printf("%-60s", a:msg).'"'
|
|
||||||
autocmd BufWinEnter * echohl NONE
|
|
||||||
|
|
||||||
" And then remove these autocmds, so it's a "one-shot" deal...
|
|
||||||
autocmd BufWinEnter * augroup AutoSwap_Mac_Msg
|
|
||||||
autocmd BufWinEnter * autocmd!
|
|
||||||
autocmd BufWinEnter * augroup END
|
|
||||||
augroup END
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
"#################################################################
|
|
||||||
"## ##
|
|
||||||
"## Rewrite the following two functions to port this plugin ##
|
|
||||||
"## to other operating systems. ##
|
|
||||||
"## ##
|
|
||||||
"#################################################################
|
|
||||||
|
|
||||||
" Return an identifier for a terminal window already editing the named file
|
|
||||||
" (Should either return a string identifying the active window,
|
|
||||||
" or else return an empty string to indicate "no active window")...
|
|
||||||
"
|
|
||||||
function! AS_M_DetectActiveWindow (filename)
|
|
||||||
let shortname = fnamemodify(a:filename,":t")
|
|
||||||
let active_window = system('osascript -e ''tell application "Terminal" to every window whose (name begins with "'.shortname.' " and name ends with "VIM")''')
|
|
||||||
let active_window = substitute(active_window, '^window id \d\+\zs\_.*', '', '')
|
|
||||||
return (active_window =~ 'window' ? active_window : "")
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Switch to terminal window specified...
|
|
||||||
"
|
|
||||||
function! AS_M_SwitchToActiveWindow (active_window)
|
|
||||||
call system('osascript -e ''tell application "VIM" to set frontmost of '.a:active_window.' to true''')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Restore previous external compatibility options
|
|
||||||
let &cpo = s:save_cpo
|
|
@ -1 +0,0 @@
|
|||||||
set guifont=Input\ Mono
|
|
@ -1,65 +0,0 @@
|
|||||||
version 7.4
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
set encoding=utf-8
|
|
||||||
set background=dark
|
|
||||||
colorscheme smyck
|
|
||||||
hi BadWhitespace ctermbg=red guibg=red
|
|
||||||
|
|
||||||
set t_Co=256
|
|
||||||
set gdefault
|
|
||||||
set nobackup
|
|
||||||
set nodigraph
|
|
||||||
set incsearch
|
|
||||||
set nohlsearch
|
|
||||||
set nojoinspaces
|
|
||||||
set nocompatible
|
|
||||||
set nowritebackup
|
|
||||||
|
|
||||||
set title
|
|
||||||
set number
|
|
||||||
"set showcmd "show combo command as you type it in the bottom right corner
|
|
||||||
set noshowmode "don't show what mode
|
|
||||||
set ruler laststatus=2 "show rulers for buffers and the status line even if there's only 1 file
|
|
||||||
set clipboard+=unnamed "the same clipboard is used for Visual mode
|
|
||||||
set ignorecase smartcase "when searching, match case only when at least one char is upper
|
|
||||||
set backspace=eol,start,indent "make backspace work between lines and with indentation
|
|
||||||
set winminheight=0 "Allow windows to get fully squashed
|
|
||||||
set scrolloff=5 "start scrolling 10 lines before the end of the buffer
|
|
||||||
set cursorline "highlight current line
|
|
||||||
set cursorcolumn "highlight current column
|
|
||||||
|
|
||||||
set shiftwidth=2 tabstop=2 softtabstop=2 expandtab "by default, Tab moves by 2 spaces
|
|
||||||
set shiftround "tabbing and detabbing also uses shiftwidth
|
|
||||||
set autoindent "keep current indent state when starting a new line
|
|
||||||
set matchpairs+=(:),{:},[:],<:>,':',":" "join these pairs of characters; useful for highlighting and jumping between with %
|
|
||||||
set bs=2
|
|
||||||
|
|
||||||
nmap <tab> w
|
|
||||||
nmap
:wq!
|
|
||||||
nmap <BS>
|
|
||||||
|
|
||||||
map <leader>b <Esc>:set cc=79<CR>
|
|
||||||
map <leader>nb <Esc>:set cc=0<CR>
|
|
||||||
map <leader>n <Esc>:set nonumber!<CR>
|
|
||||||
map <leader>\ <Esc>:setlocal nospell<CR>
|
|
||||||
map <leader>pl <Esc>:setlocal spell spelllang=pl<CR>
|
|
||||||
map <leader>en <Esc>:setlocal spell spelllang=en_gb<CR>
|
|
||||||
map <leader>p <Esc>:set paste!<CR>
|
|
||||||
|
|
||||||
call pathogen#runtime_append_all_bundles()
|
|
||||||
|
|
||||||
nnoremap n nzzzv
|
|
||||||
nnoremap N Nzzzv¬
|
|
||||||
|
|
||||||
au BufRead,BufNewFile *.pp
|
|
||||||
\ set filetype=puppet
|
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
let g:airline_theme = 'powerlineish'
|
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
let g:airline#extensions#tabline#left_sep = ''
|
|
||||||
let g:airline#extensions#tabline#left_alt_sep = ''
|
|
||||||
let g:airline#extensions#tabline#right_sep = ''
|
|
||||||
let g:airline#extensions#tabline#right_alt_sep = ''
|
|
Binary file not shown.
Binary file not shown.
@ -1,9 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>404 Not Found</title>
|
|
||||||
</head><body>
|
|
||||||
<h1>Not Found</h1>
|
|
||||||
<p>The requested URL /pub/vim/runtime/spell/pl.utf-8.sug was not found on this server.</p>
|
|
||||||
<hr>
|
|
||||||
<address>Apache/2.2.3 (CentOS) Server at ftp.vim.org Port 80</address>
|
|
||||||
</body></html>
|
|
@ -1,115 +0,0 @@
|
|||||||
" puppet syntax file
|
|
||||||
" Filename: puppet.vim
|
|
||||||
" Language: puppet configuration file
|
|
||||||
" Maintainer: Luke Kanies <luke@madstop.com>
|
|
||||||
" URL:
|
|
||||||
" Last Change:
|
|
||||||
" Version:
|
|
||||||
"
|
|
||||||
|
|
||||||
" Copied from the cfengine, ruby, and perl syntax files
|
|
||||||
" For version 5.x: Clear all syntax items
|
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
|
||||||
if version < 600
|
|
||||||
syntax clear
|
|
||||||
elseif exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
" match class/definition/node declarations
|
|
||||||
syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe
|
|
||||||
syn keyword puppetDefType class define node inherits contained
|
|
||||||
syn region puppetDefArguments start="(" end=")" contained contains=puppetArgument,puppetString
|
|
||||||
syn match puppetArgument "\w\+" contained
|
|
||||||
syn match puppetArgument "\$\w\+" contained
|
|
||||||
syn match puppetArgument "'[^']+'" contained
|
|
||||||
syn match puppetArgument '"[^"]+"' contained
|
|
||||||
syn match puppetDefName "\w\+" contained
|
|
||||||
syn match puppetNodeRe "/.*/" contained
|
|
||||||
|
|
||||||
" match 'foo' in 'class foo { ...'
|
|
||||||
" match 'foo::bar' in 'class foo::bar { ...'
|
|
||||||
" match 'Foo::Bar' in 'Foo::Bar["..."]
|
|
||||||
"FIXME: "Foo-bar" doesn't get highlighted as expected, although "foo-bar" does.
|
|
||||||
syn match puppetInstance "[A-Za-z0-9_-]\+\(::[A-Za-z0-9_-]\+\)*\s*{" contains=puppetTypeName,puppetTypeDefault
|
|
||||||
syn match puppetInstance "[A-Z][a-z_-]\+\(::[A-Z][a-z_-]\+\)*\s*[[{]" contains=puppetTypeName,puppetTypeDefault
|
|
||||||
syn match puppetInstance "[A-Z][a-z_-]\+\(::[A-Z][a-z_-]\+\)*\s*<\?<|" contains=puppetTypeName,puppetTypeDefault
|
|
||||||
syn match puppetTypeName "[a-z]\w*" contained
|
|
||||||
syn match puppetTypeDefault "[A-Z]\w*" contained
|
|
||||||
|
|
||||||
" match 'foo' in 'foo => "bar"'
|
|
||||||
syn match puppetParam "\w\+\s*[=+]>" contains=puppetParamName
|
|
||||||
syn match puppetParamName "\w\+" contained
|
|
||||||
|
|
||||||
" match 'present' in 'ensure => present'
|
|
||||||
" match '2755' in 'mode => 2755'
|
|
||||||
" don't match 'bar' in 'foo => bar'
|
|
||||||
syn match puppetParam "\w\+\s*[=+]>\s*[a-z0-9]\+" contains=puppetParamString,puppetParamName
|
|
||||||
syn match puppetParamString "[=+]>\s*\w\+" contains=puppetParamKeyword,puppetParamSpecial,puppetParamDigits contained
|
|
||||||
syn keyword puppetParamKeyword present absent purged latest installed running stopped mounted unmounted role configured file directory link contained
|
|
||||||
syn keyword puppetParamSpecial true false undef contained
|
|
||||||
syn match puppetParamDigits "[0-9]\+"
|
|
||||||
|
|
||||||
" match 'template' in 'content => template("...")'
|
|
||||||
syn match puppetParam "\w\+\s*[=+]>\s*\w\+\s*(" contains=puppetFunction,puppetParamName
|
|
||||||
" statements
|
|
||||||
syn region puppetFunction start="^\s*\(alert\|crit\|debug\|emerg\|err\|fail\|include\|info\|notice\|realize\|require\|search\|tag\|warning\)\s*(" end=")" contained contains=puppetString
|
|
||||||
" rvalues
|
|
||||||
syn region puppetFunction start="^\s*\(defined\|file\|fqdn_rand\|generate\|inline_template\|regsubst\|sha1\|shellquote\|split\|sprintf\|tagged\|template\|versioncmp\)\s*(" end=")" contained contains=puppetString
|
|
||||||
|
|
||||||
syn match puppetVariable "$[a-zA-Z0-9_:]\+"
|
|
||||||
syn match puppetVariable "${[a-zA-Z0-9_:]\+}"
|
|
||||||
|
|
||||||
" match anything between simple/double quotes.
|
|
||||||
" don't match variables if preceded by a backslash.
|
|
||||||
syn region puppetString start=+'+ skip=+\\\\\|\\'+ end=+'+
|
|
||||||
syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable,puppetNotVariable
|
|
||||||
syn match puppetString "/[^/]*/"
|
|
||||||
syn match puppetNotVariable "\\$\w\+" contained
|
|
||||||
syn match puppetNotVariable "\\${\w\+}" contained
|
|
||||||
|
|
||||||
syn keyword puppetKeyword import inherits include
|
|
||||||
syn keyword puppetControl case default if else elsif
|
|
||||||
syn keyword puppetSpecial true false undef
|
|
||||||
|
|
||||||
" comments last overriding everything else
|
|
||||||
syn match puppetComment "\s*#.*$" contains=puppetTodo
|
|
||||||
syn region puppetComment start="/\*" end="\*/" contains=puppetTodo extend
|
|
||||||
syn keyword puppetTodo TODO NOTE FIXME XXX BUG HACK contained
|
|
||||||
|
|
||||||
" Define the default highlighting.
|
|
||||||
" For version 5.7 and earlier: only when not done already
|
|
||||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
||||||
if version >= 508 || !exists("did_puppet_syn_inits")
|
|
||||||
if version < 508
|
|
||||||
let did_puppet_syn_inits = 1
|
|
||||||
command -nargs=+ HiLink hi link <args>
|
|
||||||
else
|
|
||||||
command -nargs=+ HiLink hi def link <args>
|
|
||||||
endif
|
|
||||||
|
|
||||||
HiLink puppetVariable Identifier
|
|
||||||
HiLink puppetType Identifier
|
|
||||||
HiLink puppetKeyword Define
|
|
||||||
HiLink puppetComment Comment
|
|
||||||
HiLink puppetString String
|
|
||||||
HiLink puppetParamKeyword String
|
|
||||||
HiLink puppetParamDigits String
|
|
||||||
HiLink puppetNotVariable String
|
|
||||||
HiLink puppetParamSpecial Special
|
|
||||||
HiLink puppetSpecial Special
|
|
||||||
HiLink puppetTodo Todo
|
|
||||||
HiLink puppetControl Statement
|
|
||||||
HiLink puppetDefType Define
|
|
||||||
HiLink puppetDefName Type
|
|
||||||
HiLink puppetNodeRe Type
|
|
||||||
HiLink puppetTypeName Statement
|
|
||||||
HiLink puppetTypeDefault Type
|
|
||||||
HiLink puppetParamName Identifier
|
|
||||||
HiLink puppetArgument Identifier
|
|
||||||
HiLink puppetFunction Function
|
|
||||||
|
|
||||||
delcommand HiLink
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax = "puppet"
|
|
Loading…
Reference in New Issue
Block a user