summaryrefslogtreecommitdiff
path: root/.vim/aftersyntax.vim
blob: f74003c304016a251160eece86fab2443e0cfd47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
" aftersyntax.vim:
"   Author: 	Charles E. Campbell, Jr.
"   Date:		Jul 02, 2004
"   Version:	1
"
"   1. Just rename this file (to something like c.vim)
"   2. Put it into .vim/after/syntax
"   3. Then any *.vim files in the subdirectory
"      .vim/after/syntax/name-of-file/
"      will be sourced

" ---------------------------------------------------------------------
" source in all files in the after/syntax/c directory
let ft       = expand("<sfile>:t:r")
let s:synlist= glob(expand("<sfile>:h")."/".ft."/*.vim")
"call Decho("ft<".ft."> synlist<".s:synlist.">")

while s:synlist != ""
 if s:synlist =~ '\n'
  let s:synfile = substitute(s:synlist,'\n.*$','','e')
  let s:synlist = substitute(s:synlist,'^.\{-}\n\(.*\)$','\1','e')
  else
  let s:synfile = s:synlist
  let s:synlist = ""
 endif

" call Decho("sourcing <".s:synfile.">")
 exe "so ".s:synfile
endwhile

" cleanup
unlet s:synlist
if exists("s:synfile")
 unlet s:synfile
endif
-16/+16 2014-04-24dmenu: check for empty instead of ret codeJason A. Donenfeld1-1/+1 2014-04-24tests: sed doesn't like escaped chars on non-gnuJason A. Donenfeld1-1/+1 2014-04-24tests: run from anywhereJason A. Donenfeld13-4/+16 2014-04-24Turns out aliases were a bad idea.Jason A. Donenfeld14-95/+92 2014-04-24Make gpg_opts an array.Jason A. Donenfeld1-12/+12 2014-04-24Shellcheck errors.Jason A. Donenfeld1-6/+6 2014-04-24tests: todo updateJason A. Donenfeld1-25/+0