This commit is contained in:
madsenco committed 2011-01-11 15:20:06 +01:00
1 parent ebffcbed5b
commit 38a03fe357
24 files changed
+2900 -14

No files matched your search

+3 -2
View File
@@ -40,6 +40,7 @@ if [ -n "$PS1" ] ;then
xargs -i svnlog '-{}' svn+ssh://ampsvn/srv/ampemb/trunk/embedded; }
svnst() { svn st "$@" | grep -v '^[X?]'; }
hgst() { hg st "$@" | grep -v '^[X?]'; }
lth() { ls -lat "$@" | head -20; }
alias open='kfmclient exec'
url() { kfmclient openURL "$*"; }
@@ -182,7 +183,7 @@ if [ -n "$PS1" ] ;then
if [[ -f /opt/toolchain/toolchain-setup ]] ;then
tt() { unset TOOLCHAIN_HOME ;. /opt/toolchain/toolchain-setup>/dev/null; }
untt() { unset CROSS_COMPILE ARCH TOOLCHAIN_PS1_LABEL TOOLCHAIN_HOME
untt() { unset CROSS_COMPILE ARCH TOOLCHAIN_PS1_LABEL
unalias make; }
tt; untt
fi
@@ -200,7 +201,7 @@ if [ -n "$PS1" ] ;then
for d in ~ $AMPROOT/{,arm9,arm9/agentframework/{,agents,libs},arm9/apps/{,drivers},arm9/utils,arm9/drivers} ~/{amplex,releases,src,abs,abs2} ;do
CDPATH=$CDPATH:$d
done
export LUA_CPATH="$AMPROOT/arm9/agentframework/lua/?.so"
export LUA_CPATH=";;$AMPROOT/arm9/agentframework/lua/?.so"
if [[ ! -n $noCD ]] ;then
echo $AMPROOT/arm9
cd $AMPROOT/arm9
+108
View File
@@ -0,0 +1,108 @@
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM linux-c
TERM mach-color
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM dtterm
TERM xterm
TERM xterm-color
TERM xterm-16color
TERM xterm-debian
TERM rxvt
TERM screen
TERM screen-w
TERM vt100
TERM Eterm
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 34 # directory
LINK 36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
FIFO 40;33 # pipe
SOCK 04;35 # socket
DOOR 04;35 # door
BLK 33;04 # block device driver
CHR 33;04 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file
# This is for files with execute permission:
EXEC 32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
.tar 31 # archives or compressed (red)
.tgz 31
.arj 31
.taz 31
.lzh 31
.zip 31
.z 31
.Z 31
.gz 31
.bz2 31
.deb 31
.rpm 31
.jar 31
# image formats
.jpg 35
.jpeg 35
.gif 35
.bmp 35
.pbm 35
.pgm 35
.ppm 35
.tga 35
.xbm 35
.xpm 35
.tif 35
.tiff 35
.png 35
.mov 35
.mpg 35
.mpeg 35
.avi 35
.fli 35
.gl 35
.dl 35
.xcf 35
.xwd 35
# audio formats
.ogg 35
.mp3 35
.wav 35
View File
Whitespace-only changes.
+2
View File
@@ -0,0 +1,2 @@
exe 'syn match luaOperator /||/'
+5
View File
@@ -0,0 +1,5 @@
augroup filetypedetect
au BufNewFile,BufRead *.mwiki setfiletype mediawiki
augroup END
+21
View File
@@ -0,0 +1,21 @@
setlocal encoding=utf-8
setlocal textwidth=0
setlocal linebreak
setlocal matchpairs+=<:>
setlocal showbreak=+\
nnoremap <buffer> k gk
nnoremap <buffer> j gj
nnoremap <buffer> <Up> gk
nnoremap <buffer> <Down> gj
nnoremap <buffer> 0 g0
nnoremap <buffer> ^ g^
nnoremap <buffer> $ g$
inoremap <buffer> <Up> <C-O>gk
inoremap <buffer> <Down> <C-O>gj
vnoremap <buffer> k gk
vnoremap <buffer> j gj
vnoremap <buffer> <Up> gk
vnoremap <buffer> <Down> gj
vnoremap <buffer> 0 g0
vnoremap <buffer> ^ g^
vnoremap <buffer> $ g$
+249
View File
@@ -0,0 +1,249 @@
" Vim script to work like "less"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Dec 05
" Avoid loading this file twice, allow the user to define his own script.
if exists("loaded_less")
finish
endif
let loaded_less = 1
" If not reading from stdin, skip files that can't be read.
" Exit if there is no file at all.
if argc() > 0
let s:i = 0
while 1
if filereadable(argv(s:i))
if s:i != 0
sleep 3
endif
break
endif
if isdirectory(argv(s:i))
echomsg "Skipping directory " . argv(s:i)
elseif getftime(argv(s:i)) < 0
echomsg "Skipping non-existing file " . argv(s:i)
else
echomsg "Skipping unreadable file " . argv(s:i)
endif
echo "\n"
let s:i = s:i + 1
if s:i == argc()
quit
endif
next
endwhile
endif
set nocp
syntax on
set so=0
set hlsearch
set incsearch
nohlsearch
" Don't remember file names and positions
set viminfo=
set nows
" Inhibit screen updates while searching
let s:lz = &lz
set lz
" Used after each command: put cursor at end and display position
if &wrap
noremap <SID>L L0:redraw<CR>:file<CR>
au VimEnter * normal! L0
else
noremap <SID>L Lg0:redraw<CR>:file<CR>
au VimEnter * normal! Lg0
endif
" When reading from stdin don't consider the file modified.
au VimEnter * set nomod
" Can't modify the text
set noma
" Give help
noremap h :call <SID>Help()<CR>
map H h
fun! s:Help()
echo "<Space> One page forward b One page backward"
echo "d Half a page forward u Half a page backward"
echo "<Enter> One line forward k One line backward"
echo "G End of file g Start of file"
echo "N% percentage in file"
echo "\n"
echo "/pattern Search for pattern ?pattern Search backward for pattern"
echo "n next pattern match N Previous pattern match"
echo "\n"
echo ":n<Enter> Next file :p<Enter> Previous file"
echo "\n"
echo "q Quit v Edit file"
let i = input("Hit Enter to continue")
endfun
" Scroll one page forward
noremap <script> <Space> :call <SID>NextPage()<CR><SID>L
map <C-V> <Space>
map f <Space>
map <C-F> <Space>
map z <Space>
map <Esc><Space> <Space>
fun! s:NextPage()
if line(".") == line("$")
if argidx() + 1 >= argc()
exe "normal! \<Esc>"
else
next
1
endif
else
exe "normal! \<C-F>"
endif
endfun
" Re-read file and page forward "tail -f"
map F :e<CR>G<SID>L:sleep 1<CR>F
" Scroll half a page forward
noremap <script> d <C-D><SID>L
map <C-D> d
" Scroll one line forward
noremap <script> <CR> <C-E><SID>L
map <C-N> <CR>
map e <CR>
map <C-E> <CR>
map j <CR>
map <C-J> <CR>
map <Down> <CR>
" Scroll one page backward
noremap <script> b <C-B><SID>L
map <C-B> b
map w b
map <Esc>v b
" Scroll half a page backward
noremap <script> u <C-U><SID>L
noremap <script> <C-U> <C-U><SID>L
" Scroll one line backward
noremap <script> k <C-Y><SID>L
map y k
map <C-Y> k
map <C-P> k
map <C-K> k
map <Up> k
" Redraw
noremap <script> r <C-L><SID>L
noremap <script> <C-R> <C-L><SID>L
noremap <script> R <C-L><SID>L
" Start of file
noremap <script> g gg<SID>L
map < g
map <Esc>< g
" End of file
noremap <script> G G<SID>L
map > G
map <Esc>> G
" Go to percentage
noremap <script> % %<SID>L
map p %
" Search
noremap <script> / H$:call <SID>Forward()<CR>/
if &wrap
noremap <script> ? H0:call <SID>Backward()<CR>?
else
noremap <script> ? Hg0:call <SID>Backward()<CR>?
endif
fun! s:Forward()
" Searching forward
noremap <script> n H$nzt<SID>L
if &wrap
noremap <script> N H0Nzt<SID>L
else
noremap <script> N Hg0Nzt<SID>L
endif
cnoremap <silent> <script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L
endfun
fun! s:Backward()
" Searching backward
if &wrap
noremap <script> n H0nzt<SID>L
else
noremap <script> n Hg0nzt<SID>L
endif
noremap <script> N H$Nzt<SID>L
cnoremap <silent> <script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L
endfun
call s:Forward()
" Quitting
noremap q :q<CR>
" Switch to editing (switch off less mode)
map v :silent call <SID>End()<CR>
fun! s:End()
set ma
if exists('s:lz')
let &lz = s:lz
endif
unmap h
unmap H
unmap <Space>
unmap <C-V>
unmap f
unmap <C-F>
unmap z
unmap <Esc><Space>
unmap F
unmap d
unmap <C-D>
unmap <CR>
unmap <C-N>
unmap e
unmap <C-E>
unmap j
unmap <Down>
unmap <C-J>
unmap b
unmap <C-B>
unmap w
unmap <Esc>v
unmap u
unmap <C-U>
unmap k
unmap <Up>
unmap y
unmap <C-Y>
unmap <C-P>
unmap <C-K>
unmap r
unmap <C-R>
unmap R
unmap g
unmap <
unmap <Esc><
unmap G
unmap >
unmap <Esc>>
unmap %
unmap p
unmap n
unmap N
unmap q
unmap v
unmap /
unmap ?
endfun
" vim: sw=2
+116
View File
@@ -0,0 +1,116 @@
" Author: fma fro Ron Aarons newfmgr.vim
let g:srcsmgrhelp= "|'o'pen, 'e'dit or 'r'eplace to edit\n|Common listing for: "
" Set up hook to Common buffers:
if 1
aug srcsmgr
au!
au BufReadPre,BufEnter CMN::*/* nested call SrcmgrReload(expand("%"))
au BufReadPre,BufEnter CMN::* nested call SrcmgrReload(expand("%"))
au BufReadPre,BufEnter GRP::* nested call SrcmgrReload(expand("%"))
au BufReadPre,BufEnter GLM::* nested call SrcmgrReload(expand("%"))
au BufReadPre,BufEnter GLW::* nested call SrcmgrReload(expand("%"))
aug END
endif
" This routine gets called when we 'edit' a directory
func! SrcmgrReload(name)
let g:vimedname = a:name
if ! exists("b:last") || (line("$")<=b:last)
call ResultsWindow('-NEW-', g:srcsmgrhelp.a:name, 'call SrcmgrInit()',
\ 'SrcmgrOnClick', 0, 'SrcmgrMap')
endif
endfunc
" This one gets called by the ResultsWindow routine on initializing the window
func! SrcmgrInit()
let b:vimedname = g:vimedname
if exists("b:last") && (line("$")>b:last)
exe (b:last+1).',$ delete _'
endif
if exists("g:CommonRes")
exe "put=g:CommonRes"
unlet g:CommonRes
else
if b:vimedname =~ "CMN::" | let Command = "Common "
elseif b:vimedname =~ "GRP::" | let Command = "Grep "
elseif b:vimedname =~ "GLM::" || b:vimedname =~ "GLW::"
if exists("g:GlimpsePath")
let Command = "glimpse-tt -H ".g:GlimpsePath." "
else
let Command = "Glimpse "
endif
if b:vimedname =~ "GLW::"
let Command = Command."-w "
endif
endif
exe "put=system(\\\"".Command."'".strpart(b:vimedname, 5, 1000)."'\\\")"
endif
set nomodified
syntax match MatchedPart /:.*/
syntax match PathPart1 "/[^/]*$"ms=s+1 contained
syntax match PathPart2 "/[^/:]*:"me=e-1,ms=s+1 contained
syntax match LeadPath "^/[^:]*"ms=s+1 contains=PathPart1,PathPart2
hi link MatchedPart Question
hi link PathPart1 Title
hi link PathPart2 Title
syntax match Hide /^|/ contained
syntax match Lead /^|.*/ contains=Hide
hi link Lead Directory
hi link Hide NonText
endfunc
" as does this, by ENTER or Dbl-click
func! SrcmgrOnClick(line)
call SrcmgrApply('e!')
endfunc
func! SrcmgrApply(what)
" get the file on which the line is
let path = substitute(getline("."), ":.*", '', '')
if path !~ '^\/'
let path = g:GlimpsePath.'/'.path
endif
if ! filereadable(path) && ! isdirectory(path)
return
endif
if b:vimedname !~ '^CMN::'
if &hlsearch == 0
aug srcsmgr
exe "au BufLeave ".path." set nohlsearch | au! srcsmgr BufLeave"
aug END
endif
set hlsearch
let @/ = strpart(b:vimedname, 5, 1000)
else
let @/ = "."
endif
if (a:what == 'new!') " create new window for file
exe 'new +/'.@/.' '.path
elseif (a:what =~ 'e!') " just edit the file
set nomodified
if a:what == 'e!!'
exe "bdelete ".bufnr("%")
endif
exe 'find +/'.@/.' '.path
else
echo 'SrcmgrApply: '.a:what.']'
endif
set readonly
endfunc
" turn special mappings on or off:
func! SrcmgrMap(on)
if a:on
nmap o :call SrcmgrApply('new!')<cr>
nmap e :call SrcmgrApply('e!')<cr>
nmap r :call SrcmgrApply('e!!')<cr>
else
unmap o
unmap e
unmap r
endif
endfunc
+173
View File
@@ -0,0 +1,173 @@
" File: increment.vim
" Author: Srinath Avadhanula
" Email: srinath@eecs.berkeley.edu
"
" This script provides a way to quickly create incremented lists (either
" increasing or decreasing) using the visual block mode.
"
" Synopsis:
" =========
" 1. Suppose you have a column of the following form:
" array(1) = 3;
" array(1) = 3;
" array(1) = 3;
" array(1) = 3;
" array(1) = 3;
" 2. Choose the column of '1's using Ctrl-V and then run the command Inc (you
" should see "'<,'>Inc" on the command line at this point)(if you do not
" have any other user commands starting with 'I', just I will suffice).
" This will tranform the text as:
" array(1) = 3; array(1) = 3;
" array(1) = 3; array(2) = 3;
" array(1) = 3; --> array(3) = 3;
" array(1) = 3; array(4) = 3;
" array(1) = 3; array(5) = 3;
" 3. You can then choose the column of '3's (again using Ctrl-V) and run the
" command "Inc 3" to generate another incremented list. This will
" generate:
" array(1) = 3; array(1) = 3;
" array(2) = 3; array(2) = 6;
" array(3) = 3; --> array(3) = 9;
" array(4) = 3; array(4) = 12;
" array(5) = 3; array(5) = 15;
"
"
" Note: increment.vim automatically pads the numbers in the the column
" with spaces in order to get them right aligned. This is useful in most
" cases, but for cases when this might be bad, use IncN which doesnt do
" any alignment.
"
" Commands:
" =========
" 1. Inc : generates a column of increasing numbers with RIGHT alignment.
" 2. IncN: generates a column of increasing numbers with NO alignment.
" 3. IncL: generates a column of increasing numbers with LEFT alignment
" 2. Inc : generates a column of increasing numbers with RIGHT alignment.
" 4. IncN: generates a column of increasing numbers with NO alignment.
" 6. IncL: generates a column of increasing numbers with LEFT alignment
"
" Tip:
" A mapping which goes well with this command is the following:
"
" vnoremap <c-a> :Inc<CR>
"
" With this mapping, select a column of numbers and press Ctrl-A, which will
" get them in increasing order. I use <c-a> because its similar to the <c-a>
" command in normal mode which increments the number under the cursor.
"
" Last Modification: Dec 17 2001 00:59:09
"===========================================================================
com! -ra -nargs=? Inc :call IncrementColumn(1,<args>)
com! -ra -nargs=? IncR :call IncrementColumn(2,<args>)
com! -ra -nargs=? IncN :call IncrementColumn(0,<args>)
com! -ra -nargs=? IncA :call IncrementColumn(11,<args>)
com! -ra -nargs=? IncAR :call IncrementColumn(12,<args>)
com! -ra -nargs=? IncAN :call IncrementColumn(10,<args>)
vnoremap <c-a> :Inc<CR>
"===========================================================================
function! StrRepeat(str, count)
let i = 1
let retStr = ""
while i <= a:count
let retStr = retStr.a:str
let i = i + 1
endwhile
return retStr
endfunction
" first argument is either 0 or 1 or 2 depending on whether padding with
" spaces is desired (pad = 1,2) or not. the second argument contains the
" counter increment. its optional. if not specified, its assumed to be 1.
function! IncrementColumn(pad, ...)
if a:0 == 0
let incr = 1
elseif a:0 == 1
let incr = a:1
else
return
end
let pad = a:pad
let addonly = 0
if pad >= 10
let addonly = 1
let pad = pad - 10
endif
let c1 = col("'<")
let c2 = col("'>")
let c1v = virtcol("'<")
let c2v = virtcol("'>")
let clen = c2v - c1v
if c1 > c2
let temp = c1
let c1 = c2
let c2 = temp
end
let r1 = line("'<")
let r2 = line("'>")
if r1 > r2
let temp = r1
let r1 = r2
let r2 = temp
end
exe r1
exe "let presNum = ".strpart(getline('.'), c1-1, clen+1)
let lastnum = presNum
if !addonly
let lastnum = lastnum + incr*(r2-r1)
endif
" a simple way to find the number of digits in a number (including decimal
" points, - signs etc).
let maxstrlen = strlen("".lastnum)
let r = r1
exe 'normal '.c1v.'|'
while (r <= r2)
let cnow = col(".")
let linebef = strpart(getline('.'), 0, cnow-1)
let lineaft = strpart(getline('.'), cnow+clen, 1000)
if addonly
exe "let presNum = ".strpart(getline('.'), cnow-1, clen+1)
let presNum = presNum + incr
endif
" find the number of padding spaces required for left/rigth alignment
if pad
let preslen = strlen("".presNum)
let padspace = StrRepeat(" ", maxstrlen - preslen)
else
let padspace = ""
end
" the final line is made up of
" 1. the part of the line before the number
" 2. the padding spaces.
" 3. the present number
" 4. the part of the line after the number
" the padding spaces are either before or after the current number
" depending on whether the pad argument is 1 or 2 (respectively).
if pad == 1
let lineset = linebef.padspace.presNum.lineaft
elseif pad == 2
let lineset = linebef.presNum.padspace.lineaft
else
let lineset = linebef.presNum.lineaft
end
call setline('.', lineset)
let presNum = presNum + incr
normal j
let r = r + 1
endwhile
normal `<
endfunction
+150
View File
@@ -0,0 +1,150 @@
" File: increment.vim
" Author: Srinath Avadhanula
" Email: srinath@eecs.berkeley.edu
"
" This script provides a way to quickly create incremented lists (either
" increasing or decreasing) using the visual block mode.
"
" Synopsis:
" =========
" 1. Suppose you have a column of the following form:
" array(1) = 3;
" array(1) = 3;
" array(1) = 3;
" array(1) = 3;
" array(1) = 3;
" 2. Choose the column of '1's using Ctrl-V and then run the command Inc (you
" should see "'<,'>Inc" on the command line at this point)(if you do not
" have any other user commands starting with 'I', just I will suffice).
" This will tranform the text as:
" array(1) = 3; array(1) = 3;
" array(1) = 3; array(2) = 3;
" array(1) = 3; --> array(3) = 3;
" array(1) = 3; array(4) = 3;
" array(1) = 3; array(5) = 3;
" 3. You can then choose the column of '3's (again using Ctrl-V) and run the
" command "Inc 3" to generate another incremented list. This will
" generate:
" array(1) = 3; array(1) = 3;
" array(2) = 3; array(2) = 6;
" array(3) = 3; --> array(3) = 9;
" array(4) = 3; array(4) = 12;
" array(5) = 3; array(5) = 15;
"
" Note: increment.vim automatically pads the numbers in the the column
" with spaces in order to get them right aligned. This is useful in most
" cases, but for cases when this might be bad, use IncN which doesnt do
" any alignment.
"
" Commands:
" =========
" 1. Inc : generates a column of increasing numbers with RIGHT alignment.
" 2. IncN: generates a column of increasing numbers with NO alignment.
" 3. IncL: generates a column of increasing numbers with LEFT alignment
"
" Tip:
" A mapping which goes well with this command is the following:
"
" vnoremap <c-a> :Inc<CR>
"
" With this mapping, select a column of numbers and press Ctrl-A, which will
" get them in increasing order. I use <c-a> because its similar to the <c-a>
" command in normal mode which increments the number under the cursor.
"
" Last Modification: Dec 17 2001 00:59:09
"===========================================================================
com! -ra -nargs=? Inc :call IncrementColumn(1,<args>)
com! -ra -nargs=? IncR :call IncrementColumn(2,<args>)
com! -ra -nargs=? IncN :call IncrementColumn(0,<args>)
"===========================================================================
function! StrRepeat(str, count)
let i = 1
let retStr = ""
while i <= a:count
let retStr = retStr.a:str
let i = i + 1
endwhile
return retStr
endfunction
" first argument is either 0 or 1 or 2 depending on whether padding with
" spaces is desired (pad = 1,2) or not. the second argument contains the
" counter increment. its optional. if not specified, its assumed to be 1.
function! IncrementColumn(pad, ...)
if a:0 == 0
let incr = 1
elseif a:0 == 1
let incr = a:1
else
return
end
let c1 = col("'<")
let c2 = col("'>")
let c1v = virtcol("'<")
let c2v = virtcol("'>")
let clen = c2v - c1v
if c1 > c2
let temp = c1
let c1 = c2
let c2 = temp
end
let r1 = line("'<")
let r2 = line("'>")
if r1 > r2
let temp = r1
let r1 = r2
let r2 = temp
end
exe r1
exe "let presNum = ".strpart(getline('.'), c1-1, clen+1)
let lastnum = presNum + incr*(r2-r1)
" a simple way to find the number of digits in a number (including decimal
" points, - signs etc).
let maxstrlen = strlen("".lastnum)
let r = r1
exe 'normal '.c1v.'|'
while (r <= r2)
let cnow = col(".")
let linebef = strpart(getline('.'), 0, cnow-1)
let lineaft = strpart(getline('.'), cnow+clen, 1000)
" find the number of padding spaces required for left/rigth alignment
if a:pad
let preslen = strlen("".presNum)
let padspace = StrRepeat(" ", maxstrlen - preslen)
else
let padspace = ""
end
" the final line is made up of
" 1. the part of the line before the number
" 2. the padding spaces.
" 3. the present number
" 4. the part of the line after the number
" the padding spaces are either before or after the current number
" depending on whether the pad argument is 1 or 2 (respectively).
if a:pad == 1
let lineset = linebef.padspace.presNum.lineaft
elseif a:pad == 2
let lineset = linebef.presNum.padspace.lineaft
else
let lineset = linebef.presNum.lineaft
end
call setline('.', lineset)
let presNum = presNum + incr
normal j
let r = r + 1
endwhile
normal `<
endfunction
+90
View File
@@ -0,0 +1,90 @@
" Vim global plugin for javadoc comment wrangling
" Maintainer: fm@amplex.dk
if exists("g:loaded_jdocConvert")
" finish
endif
let g:loaded_jdocConvert = 1
let s:save_cpo = &cpo
set cpo&vim
let &cpo = s:save_cpo
if !hasmapto('<Plug>jdocConvertCompact')
map <unique> <Leader>jc <Plug>jdocConvertCompact
endif
noremap <unique> <script> <Plug>jdocConvertCompact <SID>ConvertCompact
if !hasmapto('<Plug>jdocConvertHere')
map <unique> <Leader>jh <Plug>jdocConvertHere
endif
noremap <unique> <script> <Plug>jdocConvertHere <SID>ConvertHere
function! s:JdocConvert(type, rng1, rng2) range
let [rng1, rng2] = [a:rng1, a:rng2]
if rng2 < rng1
let [rng2,rng1] = [rng1,rng2]
end
let rng2 = max([rng1 + 3, rng2])
let inp = getline(rng1, rng2)
let out = []
let txt = []
let inside = -1
let did_subst = 0
let lead = ""
let lno = rng2 - rng1
for line in inp
if line =~ '^\s*/\*\*'
" Start jdoc
let inside = 1
let lead = substitute(line, '/\*\*.*$', "", "")
elseif line =~ '^\s*\* ' && inside > 0
" Inline jdoc
call add(txt, substitute(line, '^\s*\* ', "", ""))
elseif line =~ '^\s*\*/'
" End jdoc
let inside = 0
if a:type == 1
for l in txt
call add(out, lead.'/// '.l)
endfor
let txt = []
let did_subst = 1
end
elseif len(txt) > 0 && a:type == 2
" Place text on first
call add(out, line.' ///< '.txt[0])
call remove(txt, 0)
let did_subst = 1
if len(txt) > 0
let lead = repeat(" ", len(line)).' ///< '
for l in txt
call add(out, lead.l)
endfor
endif
let txt = []
else
" Copy over
call add(out, line)
endif
let lno += 1
endfor
if did_subst
exe rng1.",".rng2 " delete"
call append(rng1 - 1, out)
exe rng1 - 1 + len(out)
endif
endfunction
function! s:CallConvert(bang, l1, l2)
let type = a:bang == "!" ? 1 : 2
call s:JdocConvert(type, a:l1, a:l2)
endfunction
nnoremap <SID>ConvertCompact :call <SID>JdocConvert(1, line("."), line(".") + v:count1 - 1)<CR>
nnoremap <SID>ConvertHere :call <SID>JdocConvert(2, line("."), line(".") + v:count1 - 1)<CR>
vnoremap <SID>ConvertCompact :call <SID>JdocConvert(1, line("'<"), line("'>"))<CR>
vnoremap <SID>ConvertHere :call <SID>JdocConvert(2, line("'<"), line("'>"))<CR>
command! -bang -range JdocConvert :call s:CallConvert("<bang>", <line1>, <line2>)
let &cpo = s:save_cpo
File diff suppressed because it is too large. Load diff
+258
View File
@@ -0,0 +1,258 @@
" collection of misc code I find useful
" Author: Ron Aaron ron@mossbayeng.com
"
" 'if 0'ed' everything outside the StatusWindow stuff /fma
"
" last update: Sun Jul 11 14:42:38 1999
if 0
set nocp
let g:utils_package_loaded = 1
" define whatever this package does, here
func! SetIfBlank(var, value)
let value = a:value
if !exists(a:var)
if match(a:value, '^expand') >= 0
" expand it
exe 'let value=' a:value
let value=escape(value, '\')
endif
exe 'let ' a:var '= "'. value .'"'
endif
endfunc
command! -nargs=* SetIfBlank call SetIfBlank(<f-args>)
" convert a number or bool to a portion of the passed-in string
func! ValueToString(choices, value, bool)
let retval = '<unknown>'
" first, convert the 'value' to an index:
if (a:bool)
" boolean. 0 == 'n' == 'No' == 'false'
if a:value=~"[a-zA-Z]"
if ((a:value =~ "^[nN]o*") || (a:value=~"^[Ff][aA][lL][sS][eE]"))
let index = 0
else
let index = 1
endif
else
let index = !(a:value == 0)
endif
else
" force numeric.
let index = 0 + a:value
endif
" second, find the 'index'th string in 'choices', which should be a
" comma-delmited string
let x=0
let choice=a:choices
while 1
if (x == index) " that's our boy!
let ix = match(choice, ',')
" extract the string up till the comma
if ix == -1
let ix = 99999
endif
let retval = strpart(choice, 0, ix)
return retval
endif
" get next string part
let ix = match(choice, ',')
if ix == -1
" failed!
return retval
endif
let choice = strpart(choice, ix+1, 99999)
" bump counter
let x = x+1
endwhile
endfunc
" convert a number or bool to a portion of the passed-in string
func! BoolString(bool)
return ValueToString('no,yes', a:bool, 1)
endfunc
endif
func! Fnmunge(name)
let name = substitute(a:name,'[\\/ \t:]', '', 'g')
return name
endfunc
func! On_(true)
if a:true | return "no" | else | return "" | endif
endfunc
func! ResultsWindow (name,help,cmd,action,once,maps)
" turn off reporting
let rep=&report | let mo=On_(&more) | let ch=&ch | let te=On_(&terse)
set report=9999 nomore ch=3 hidden terse
let retval=0
if exists("b:origbuf")
let origbuf = b:origbuf
elseif a:name == '-NEW-'
let origbuf = bufnr(@#)
else
let origbuf = bufnr("")
endif
let b:samebuf=0
if (a:name == '')
let b:samebuf=1
% d _
elseif a:name == '-NEW-'
% d _
else
let name=g:home.'/'.Fnmunge(a:name)
exe 'new ' . name
endif
let b:origbuf = origbuf
let b:resultswindow=1
let b:action = a:action
let b:once = a:once
let b:maps = a:maps " additional map function (one parm: 1=on, 0=off)
0 put=a:help
let b:last = line("$") " save last line number
normal G
" fill in the buffer with something:
exe a:cmd
if v:shell_error < 0
if !b:samebuf
unlet b:resultswindow
bdelete!
endif
echo 'Problem executing command: ' . a:cmd . ':' . v:errmsg
return
endif
let last=line("$") " get new last line number...
if (b:last == last) || ((last ==(b:last+1)) && getline(last)=='') "nothing!!!
if !b:samebuf
unlet b:resultswindow
bdelete!
endif
elseif last == (b:last+1) " one more line
let b:once=1
call ResultsMap(1)
call ResultsAct(last)
let retval=1
else " more than one ... set up window
normal 1zt
" exe 'normal ' . b:last . 'j'
set nomod
let retval=2
call ResultsMap(1)
endif
exe "set ".mo."more ".te."terse"." ch=".ch." report=".rep
return retval
endfunc
func! ResultsAct (lineno)
if (a:lineno <= b:last) " in header
return
else
let line=escape(getline(a:lineno),"'\"")
let buffer=bufnr("")
let action=b:action
let origbuf = b:origbuf
let dodelete = b:once && !b:samebuf
"see if action is a function:
if exists("*".action)
" yes, so 'call'
let act='call '.action."('".line."')"
exe act
elseif (action != '')
" no, just exe
exe action . ' ' . line
endif
if dodelete
exe 'bdelete! '.buffer
let buffer=bufnr("")
" Reestablish alternate file
exe 'buffer '.origbuf
exe 'buffer '.buffer
endif
endif
endfunc
func! ResultsMap (on)
if (a:on)
map <cr> :call ResultsAct(line("."))<cr>
map <2-LeftMouse> <cr>
if (exists("b:maps") && b:maps != '')
exe 'call' b:maps . '(1)'
endif
else
if mapcheck("<cr>")!=''
unmap <2-LeftMouse>
unmap <cr>
endif
if (exists("b:maps") && b:maps != '')
exe 'call' b:maps . '(0)'
endif
endif
endfunc
aug ResultsWindow
au!
au BufEnter * :if exists("b:resultswindow")|:call ResultsMap(1)|:endif
au BufLeave * :if exists("b:resultswindow")|:call ResultsMap(0)|:endif
au VimLeavePre * :call ResultsCleanup()
aug END
func! ResultsCleanup()
let ix = 1
while ix <= bufnr("$")
" NOTE: 'getbufvar' is my enhancement, you need my patches!
if exists("*getbufvar") && getbufvar(ix,'resultswindow')
exe 'bd '.ix
elseif match(bufname(ix), '-results-') >= 0
exe 'bd '.ix
endif
let ix = ix + 1
endwhile
endfunc
if 0
" we need 'g:vimlocal', so create it if not present
if !exists("g:vimlocal")
let g:vimlocal = expand("~") . '/vimscripts'
endif
func! SourceIfReadable(filename)
let retcode=1
if filereadable(g:vimlocal . '/' . a:filename)
exe 'so ' . g:vimlocal . '/' . a:filename
elseif filereadable($VIM . '/' . a:filename)
exe 'so ' . $VIM . '/' . a:filename
elseif filereadable(a:filename)
exe 'so ' . a:filename
else
let retcode=0
endif
return retcode
endfunc
command! -nargs=1 Source call SourceIfReadable(<q-args>)
func! Require(package)
let shortname = fnamemodify(a:package, ':r')
if !exists("g:".shortname.'_package_loaded')
" loads 'package'. First looks in 'vimscripts'
if !SourceIfReadable(a:package)
echo "Error! Cannot load required package " . a:package
endif
endif
endfunc
command! -nargs=1 Require call Require(<q-args>)
SetIfBlank g:home expand("~")
endif
+23
View File
@@ -0,0 +1,23 @@
" pyclewn run time file
" Maintainer: <xdegaye at users dot sourceforge dot net>
"
" Configure VIM to be used with pyclewn and netBeans
"
" $Id: pyclewn.vim 16 2008-06-06 19:08:47Z xdegaye $
if exists("b:did_pyclewn")
finish
endif
let b:did_pyclewn = 1
" pyclewn version
let g:pyclewn_version = "pyclewn-0.5"
" enable balloon_eval
if has("balloon_eval")
set ballooneval
set balloondelay=100
endif
+7
View File
@@ -0,0 +1,7 @@
" my filetype file
if did_filetype()
finish
endif
if getline(1) =~ '^#!/bin/d\=ash'
call SetFileTypeSH("ksh") " defined in filetype.vim
endif
+17
View File
@@ -0,0 +1,17 @@
on
off
param
telenor
onboard
devicemanager
todo
msp
amplex
accessor
dk
CONFIG
TIMESTAMP
msg
deserialize
messageswitch
req
Binary file not shown.
+26
View File
@@ -0,0 +1,26 @@
" Vim syntax file
" Language: debugger variables window syntax file
" Maintainer: <xdegaye at users dot sourceforge dot net>
" Last Change: Oct 8 2007
" $Id: dbgvar.vim 2 2007-12-23 15:10:42Z xavier $
if exists("b:current_syntax")
finish
endif
syn region dbgVarChged display contained matchgroup=dbgIgnore start="={\*}"ms=s+1 end="$"
syn region dbgDeScoped display contained matchgroup=dbgIgnore start="={-}"ms=s+1 end="$"
syn region dbgVarUnChged display contained matchgroup=dbgIgnore start="={=}"ms=s+1 end="$"
syn match dbgItem display transparent "^.*$"
\ contains=dbgVarUnChged,dbgDeScoped,dbgVarChged,dbgVarNum
syn match dbgVarNum display contained "^\s*\d\+:"he=e-1
high def link dbgVarChged Special
high def link dbgDeScoped Comment
high def link dbgVarNum Identifier
high def link dbgIgnore Ignore
let b:current_syntax = "dbgvar"
+292
View File
@@ -0,0 +1,292 @@
" Wikipedia syntax file for Vim
" Published on Wikipedia in 2003-04 and declared authorless.
"
" Based on the HTML syntax file. Probably too closely based, in fact. There
" may well be name collisions everywhere, but ignorance is bliss, so they say.
"
" To do: plug-in support for downloading and uploading to the server.
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'html'
endif
if version < 508
command! -nargs=+ HtmlHiLink hi link <args>
else
command! -nargs=+ HtmlHiLink hi def link <args>
endif
syn case ignore
syn spell toplevel
set spell
" tags
syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar
syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1
syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN
"syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,@htmlArgCluster
syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
syn match htmlTagError contained "[^>]<"ms=s+1
" allowed tag names
syn keyword htmlTagName contained b i u font big small sub sup
syn keyword htmlTagName contained h1 h2 h3 h4 h5 h6 cite code em s strike strong tt var div center
syn keyword htmlTagName contained blockquote ol ul dl table caption pre
syn keyword htmlTagName contained ruby rt rb rp
syn keyword htmlTagName contained br p hr li dt dd
syn keyword htmlTagName contained table tr td th div blockquote ol ul
syn keyword htmlTagName contained dl font big small sub sup
syn keyword htmlTagName contained td th tr
syn keyword htmlTagName contained nowiki math
" allowed arg names
syn keyword htmlArg contained title align lang dir width height
syn keyword htmlArg contained bgcolor clear noshade
syn keyword htmlArg contained cite size face color
syn keyword htmlArg contained type start value compact
syn keyword htmlArg contained summary width border frame rules
syn keyword htmlArg contained cellspacing cellpadding valign char
syn keyword htmlArg contained charoff colgroup col span abbr axis
syn keyword htmlArg contained headers scope rowspan colspan
syn keyword htmlArg contained id class name style
" special characters
syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
" comments
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError
syn match htmlCommentError contained "[^><!]"
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
" HTML formatting
syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlComment,htmlLink
syn region htmlBold start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
syn region htmlBold start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
syn region htmlBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
syn region htmlBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlBoldItalicUnderline
syn region htmlBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlBoldItalicUnderline
syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop
syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop
syn region htmlBoldItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
syn region htmlUnderline start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
syn region htmlUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic
syn region htmlUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic
syn region htmlUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmUnderlineItalicBold
syn region htmlUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmUnderlineItalicBold
syn region htmlUnderlineItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop
syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop
syn region htmlItalic start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
syn region htmlItalic start="<em\>" end="</em>"me=e-5 contains=@htmlTop
syn region htmlItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlItalicBoldUnderline
syn region htmlItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlItalicBoldUnderline
syn region htmlItalicBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop
syn region htmlItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlItalicUnderlineBold
syn region htmlItalicUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
syn region htmlH1 start="<h1\>" end="</h1>"me=e-5 contains=@htmlTop
syn region htmlH2 start="<h2\>" end="</h2>"me=e-5 contains=@htmlTop
syn region htmlH3 start="<h3\>" end="</h3>"me=e-5 contains=@htmlTop
syn region htmlH4 start="<h4\>" end="</h4>"me=e-5 contains=@htmlTop
syn region htmlH5 start="<h5\>" end="</h5>"me=e-5 contains=@htmlTop
syn region htmlH6 start="<h6\>" end="</h6>"me=e-5 contains=@htmlTop
syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,cssStyle
syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment
" wiki formatting
"syn region wikiItalic start="\([^']\|\_^\)''[^']"hs=s+1 end="[^']''\([^']\|\_$\)"he=e-1 skip="<nowiki>.*</nowiki>" contains=wikiLink,wikiItalicBold
"syn region wikiBold start="\([^']\|\_^\)'''[^']" end="[^']'''\([^']\|\_$\)" skip="<nowiki>.*</nowiki>" contains=wikiLink,wikiBoldItalic
"syn region wikiBoldItalic contained start="\([^']\|\_^\)''[^']" end="[^']''\([^']\|\_$\)" skip="<nowiki>.*</nowiki>" contains=wikiLink
"syn region wikiItalicBold contained start="\([^']\|\_^\)'''[^']" end="[^']'''\([^']\|\_$\)" skip="<nowiki>.*</nowiki>" contains=wikiLink
"syn region wikiBoldAndItalic start="'''''" end="'''''" skip="<nowiki>.*</nowiki>" contains=wikiLink
syn region wikiItalic start=+'\@<!'''\@!+ end=+''+ contains=@Spell,wikiLink,wikiItalicBold
syn region wikiBold start=+'''+ end=+'''+ contains=@Spell,wikiLink,wikiBoldItalic
syn region wikiBoldAndItalic start=+'''''+ end=+'''''+ contains=@Spell,wikiLink
syn region wikiBoldItalic contained start=+'\@<!'''\@!+ end=+''+ contains=@Spell,wikiLink
syn region wikiItalicBold contained start=+'''+ end=+'''+ contains=@Spell,wikiLink
syn region wikiH1 start="^=" end="=" skip="<nowiki>.*</nowiki>" oneline contains=@Spell,wikiLink
syn region wikiH2 start="^==" end="==" skip="<nowiki>.*</nowiki>" oneline contains=@Spell,wikiLink
syn region wikiH3 start="^===" end="===" skip="<nowiki>.*</nowiki>" oneline contains=@Spell,wikiLink
syn region wikiH4 start="^====" end="====" skip="<nowiki>.*</nowiki>" oneline contains=@Spell,wikiLink
syn region wikiH5 start="^=====" end="=====" skip="<nowiki>.*</nowiki>" oneline contains=@Spell,wikiLink
syn region wikiH6 start="^======" end="======" skip="<nowiki>.*</nowiki>" oneline contains=@Spell,wikiLink
syn region wikiLink start="\[\[" end="\]\]\(s\|'s\|es\|ing\|\)" skip="<nowiki>.*</nowiki>" oneline contains=wikiLink
syn region wikiLink start="\[http:" end="\]" skip="<nowiki>.*</nowiki>" oneline
syn region wikiLink start="\[https:" end="\]" skip="<nowiki>.*</nowiki>" oneline
syn region wikiLink start="\[ftp:" end="\]" skip="<nowiki>.*</nowiki>" oneline
syn region wikiLink start="\[gopher:" end="\]" skip="<nowiki>.*</nowiki>" oneline
syn region wikiLink start="\[news:" end="\]" skip="<nowiki>.*</nowiki>" oneline
syn region wikiLink start="\[mailto:" end="\]" skip="<nowiki>.*</nowiki>" oneline
syn region wikiTemplate start="{{" end="}}" skip="<nowiki>.*</nowiki>"
syn match wikiParaFormatChar /^[\:|\*|;|#]\+/
syn match wikiParaFormatChar /^-----*/
syn match wikiPre /^\ .*$/
syn include @TeX syntax/tex.vim
syntax region wikiTeX matchgroup=htmlTag start="<math>" end="</math>" skip="<nowiki>.*</nowiki>" contains=@TeX
syntax region wikiRef matchgroup=htmlTag start="<ref>" end="</ref>" skip="<nowiki>.*</nowiki>"
" HTML highlighting
HtmlHiLink htmlTag Function
HtmlHiLink htmlEndTag Identifier
HtmlHiLink htmlArg Type
HtmlHiLink htmlTagName htmlStatement
HtmlHiLink htmlSpecialTagName Exception
HtmlHiLink htmlValue String
HtmlHiLink htmlSpecialChar Special
HtmlHiLink htmlH1 Title
HtmlHiLink htmlH2 htmlH1
HtmlHiLink htmlH3 htmlH2
HtmlHiLink htmlH4 htmlH3
HtmlHiLink htmlH5 htmlH4
HtmlHiLink htmlH6 htmlH5
HtmlHiLink htmlHead PreProc
HtmlHiLink htmlTitle Title
HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBold htmlBoldUnderline
HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderline htmlUnderlineItalic
HtmlHiLink htmlItalicBold htmlBoldItalic
HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic
HtmlHiLink htmlSpecial Special
HtmlHiLink htmlSpecialChar Special
HtmlHiLink htmlString String
HtmlHiLink htmlStatement Statement
HtmlHiLink htmlComment Comment
HtmlHiLink htmlCommentPart Comment
HtmlHiLink htmlValue String
HtmlHiLink htmlCommentError htmlError
HtmlHiLink htmlTagError htmlError
HtmlHiLink htmlEvent javaScript
HtmlHiLink htmlError Error
HtmlHiLink htmlCssStyleComment Comment
HtmlHiLink htmlCssDefinition Special
" The default highlighting.
if version >= 508 || !exists("did_html_syn_inits")
if version < 508
let did_html_syn_inits = 1
endif
HtmlHiLink htmlTag Function
HtmlHiLink htmlEndTag Identifier
HtmlHiLink htmlArg Type
HtmlHiLink htmlTagName htmlStatement
HtmlHiLink htmlSpecialTagName Exception
HtmlHiLink htmlValue String
HtmlHiLink htmlSpecialChar Special
if !exists("html_no_rendering")
HtmlHiLink htmlH1 Title
HtmlHiLink htmlH2 htmlH1
HtmlHiLink htmlH3 htmlH2
HtmlHiLink htmlH4 htmlH3
HtmlHiLink htmlH5 htmlH4
HtmlHiLink htmlH6 htmlH5
HtmlHiLink htmlHead PreProc
HtmlHiLink htmlTitle Title
HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBold htmlBoldUnderline
HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderline htmlUnderlineItalic
HtmlHiLink htmlItalicBold htmlBoldItalic
HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic
HtmlHiLink htmlLink Underlined
if !exists("html_my_rendering")
hi def htmlBold term=bold cterm=bold gui=bold
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
hi def htmlUnderline term=underline cterm=underline gui=underline
hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
hi def htmlItalic term=italic cterm=italic gui=italic
endif
endif
HtmlHiLink htmlPreStmt PreProc
HtmlHiLink htmlPreError Error
HtmlHiLink htmlPreProc PreProc
HtmlHiLink htmlPreAttr String
HtmlHiLink htmlPreProcAttrName PreProc
HtmlHiLink htmlPreProcAttrError Error
HtmlHiLink htmlSpecial Special
HtmlHiLink htmlSpecialChar Special
HtmlHiLink htmlString String
HtmlHiLink htmlStatement Statement
HtmlHiLink htmlComment Comment
HtmlHiLink htmlCommentPart Comment
HtmlHiLink htmlValue String
HtmlHiLink htmlCommentError htmlError
HtmlHiLink htmlTagError htmlError
HtmlHiLink htmlEvent javaScript
HtmlHiLink htmlError Error
HtmlHiLink javaScript Special
HtmlHiLink javaScriptExpression javaScript
HtmlHiLink htmlCssStyleComment Comment
HtmlHiLink htmlCssDefinition Special
endif
" wiki highlighting
HtmlHiLink wikiItalic htmlItalic
HtmlHiLink wikiBold htmlBold
HtmlHiLink wikiBoldItalic htmlBoldItalic
HtmlHiLink wikiItalicBold htmlBoldItalic
HtmlHiLink wikiBoldAndItalic htmlBoldItalic
HtmlHiLink wikiH1 htmlH1
HtmlHiLink wikiH2 htmlH2
HtmlHiLink wikiH3 htmlH3
HtmlHiLink wikiH4 htmlH4
HtmlHiLink wikiH5 htmlH5
HtmlHiLink wikiH6 htmlH6
HtmlHiLink wikiLink Underlined
HtmlHiLink wikiTemplate Special
HtmlHiLink wikiParaFormatChar Special
HtmlHiLink wikiPre Constant
HtmlHiLink wikiRef Comment
let b:current_syntax = "html"
delcommand HtmlHiLink
if main_syntax == 'html'
unlet main_syntax
endif
+57
View File
@@ -0,0 +1,57 @@
" Vim syntax file
" Language: SVN commit file
" Maintainer: Ben Collins <bcollins@debian.org>
" URL: XXX
" Last Change: Tue Oct 22 00:22:19 EDT 2002
" Based on the similar CVS commit file syntax
" Place this file as ~/.vim/syntax/svn.vim
"
" Then add the following lines to ~/.vimrc
"
" au BufNewFile,BufRead svn-commit.* setf svn
" 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
syn cluster svnChange contains=svnAdd,svnDel,svnMod,svnProp
syn match svnLine /^--This line, and those below, will be ignored--$/ skipwhite skipnl skipempty nextgroup=@svnChange
syn match svnAdd /^A[M ] .*$/ contained skipwhite skipnl skipempty nextgroup=@svnChange
syn match svnDel /^D[M ] .*$/ contained skipwhite skipnl skipempty nextgroup=@svnChange
syn match svnMod /^M[M ] .*$/ contained skipwhite skipnl skipempty nextgroup=@svnChange
syn match svnProp /^_[M ] .*$/ contained skipwhite skipnl skipempty nextgroup=@svnChange
"The following is the old SVN template format markings
"
"syn region svnLine start="^SVN:" end="$" contains=svnAdd,svnDel,svnMod
"syn match svnAdd contained " [A_][ A] .*"
"syn match svnDel contained " [D_][ D] .*"
"syn match svnMod contained " [M_][ M] .*"
" 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_svn_syn_inits")
if version < 508
let did_svn_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink svnAdd Structure
HiLink svnDel SpecialChar
HiLink svnMod PreProc
HiLink svnProp Keyword
HiLink svnLine Comment
delcommand HiLink
endif
let b:current_syntax = "svn"
+93
View File
@@ -0,0 +1,93 @@
" Vim syntax file
" Language: SVN log file
" Maintainer: Adam Lazur <adam@lazur.org>
" URL: XXX
" Last Change: $Date: 2005-04-16 23:27:24 -0400 (Sat, 16 Apr 2005) $
" 1) Place this file in ~/.vim/syntax
"
" 2a) Then add the following lines to ~/.vimrc
"
" au BufNewFile,BufRead svn-log.* setf svn
"
" 2b) Or for autodetection, make a ~/.vim/scripts.vim with the following:
"
" if did_filetype() " filetype already set...
" finish " ...then don't do these checks
" endif
" if getline(1) =~ /^-\{72}$/
" setfiletype svnlog
" endif
" 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
syn match svnLogSeparator /^-\{72}$/ skipwhite skipnl skipempty nextgroup=svnRevision
syn cluster svnLogInfoLine contains=svnRevision,svnLogUser,@svnLogDate,svnLogLines,svnLogInfoSeparator
syn match svnRevision /[r:]\d\+/ contained
syn match svnLogUser /\S\+/ contained
syn match svnLogInfoSeparator /|/ skipwhite nextgroup=@svnLogInfoLine
syn cluster svnLogDate contains=svnLogDateStamp,svnLogDateHuman
syn match svnLogDateStamp /\d\{4}-\d\d-\d\d \d\d:\d\d:\d\d -\d\{4}/ skipwhite nextgroup=svnLogDateHuman
syn match svnLogDateHuman /(.\D\{3} \d\d \D\{3} \d\{4})/he=e-1,hs=s+1 skipwhite nextgroup=svnLogInfoSeparator
syn match svnLogLines /\d\+ lines\?/ skipnl nextgroup=svnChangedPaths,svnLogComment
" Changed paths highlighting
syn region svnChangedPaths start=/^Changed paths:$/ end=/^$/ transparent contains=svnChangeLine,svnChange nextgroup=svnLogComment
syn match svnChangeLine /^Changed paths:$/ skipwhite skipnl skipempty contained nextgroup=@svnChange
syn cluster svnChange contains=svnChangeAdd,svnChangeDel,svnChangeMod,svnChangeCopy
syn match svnChangeDel /^ D .\+$/ contained skipnl nextgroup=@svnChange
syn match svnChangeMod /^ M .\+$/ contained skipnl nextgroup=@svnChange
syn match svnChangeAdd /^ A [^ ]\+/ contained skipnl nextgroup=@svnChange
syn match svnChangeCopy /^ A [^ ]* (from [^)]\+)$/ contained skipnl nextgroup=@svnChange contains=svnRevision
" The comment is a region, we're cheating and swallowing the next
" svnLogSeparator, but we add a contains to it'll highlight okay (breaks
" comments containing svnLogSeparator... but that shouldn't be super common)
syn region svnLogComment start=/\n/ end=/^-\{72}$/ skipnl keepend nextgroup=svnRevision contains=svnLogSeparator
" 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_svnlog_syn_inits")
if version < 508
let did_svnlog_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink svnLogSeparator Comment
HiLink svnLogInfoSeparator Comment
HiLink svnRevision Label
HiLink svnLogUser Normal
HiLink svnLogDateStamp Comment
HiLink svnLogDateHuman Comment
HiLink svnLogLines Comment
HiLink svnLogComment Normal
HiLink svnChangeLine Comment
HiLink svnChangeAdd Identifier
HiLink svnChangeDel WarningMsg
HiLink svnChangeMod PreProc
HiLink svnChangeCopy SpecialKey
delcommand HiLink
endif
let b:current_syntax = "svnlog"
+32
View File
@@ -0,0 +1,32 @@
" Setup my own color preferences for syntax highlighting
if &background == "dark"
hi Comment term=bold ctermfg=Cyan guifg=#80a0ff
hi Type term=underline ctermfg=Magenta guifg=#ffa0a0
hi Special term=bold ctermfg=LightRed guifg=Orange
hi Identifier term=underline cterm=bold ctermfg=Cyan guifg=#40ffff
hi Statement term=bold ctermfg=Yellow guifg=#ffff60 gui=bold
hi PreProc term=underline ctermfg=LightBlue guifg=#ff80ff
hi Constant term=underline ctermfg=LightGreen guifg=#60ff60 gui=bold
hi Ignore ctermfg=black guifg=bg
else
hi Comment term=bold ctermfg=DarkBlue guifg=DarkBlue
hi Type term=underline ctermfg=Brown gui=NONE guifg=DarkRed
hi Special term=bold ctermfg=DarkMagenta guifg=DarkMagenta
hi Identifier term=underline ctermfg=DarkCyan guifg=DarkCyan
hi Statement term=bold ctermfg=DarkRed cterm=bold guifg=DarkRed gui=bold
hi PreProc term=underline ctermfg=DarkMagenta guifg=DarkMagenta
hi Constant term=underline ctermfg=DarkGreen guifg=DarkGreen gui=italic
hi Ignore ctermfg=white guifg=bg
hi NonText ctermfg=white
hi! link NonText Ignore
endif
hi Error term=reverse ctermbg=Red ctermfg=White guibg=Red guifg=White
hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Blue guibg=Yellow
hi SpellBad ctermbg=NONE ctermfg=Red cterm=underline
hi SpellCap ctermbg=NONE ctermfg=Blue cterm=underline
hi SpellRare ctermbg=NONE ctermfg=Magenta cterm=underline
hi SpellLocal ctermbg=NONE ctermfg=Cyan cterm=underline
hi MatchParen ctermbg=NONE ctermfg=Cyan cterm=underline
"au! Syntax postscr source /usr/local2/share/vim/syntax/postscr.vim
+3 -4
View File
@@ -8,6 +8,8 @@
"
" My .vimrc file
"
set nocompatible " TODO: Why did the default change for 7.3 vs 7.2
if has("win32")
" Use CCI standard setup. This happens automatically on UNIX
if filereadable($VIM . "/vimrc")
@@ -85,7 +87,7 @@ else
else
set directory=/var/preserve//
if has("gui_running")
set guifont=fixed
let &guifont="Bitstream Vera Sans Mono 8"
else
" Uncomment line below to use :emenu. Adds ~1 second to startup time
" source $VIMRUNTIME/menu.vim
@@ -125,9 +127,6 @@ else
cmap <Esc>[1;2~ <C-P>
endif
endif
if has("gui_running")
let &guifont="Bitstream Vera Sans Mono 10"
endif
endif
if has("gui_running")
+13 -8
View File
@@ -2,6 +2,9 @@
" Extra vim stuff
"
map `h <Plug>jdocConvertHere
map `c <Plug>jdocConvertCompact
nmap <F2> :call SetCHdr()<CR>
map gy "*y
@@ -10,12 +13,14 @@ map g]p "*]p
map g[P "*[P
function! SetCHdr()
call append(0, ["/*",
\ " $Id$",
\ " (C) Copyright ".strftime("%Y")." Amplex, ".$USER."@amplex.dk",
\ "",
\ " ABSTRACT: ",
\ "*/"])
call append(0, ["/**",
\ " * @file ".strpart(bufname("%"), strridx(bufname("%"), "/")+1),
\ " * ABSTRACT HERE << ",
\ " *",
\ " * $Id$",
\ " *",
\ " * (C) Copyright ".strftime("%Y")." Amplex, ".$USER."@amplex.dk",
\ " */"])
call append(line('$'), ["", "// vim: set sw=3 sts=3 et:"])
normal 5G$
set sw=3 sts=3 et
@@ -52,7 +57,7 @@ autocmd Private FileType sh call TextEnableCodeSnip('lua', '--LUA--', '--EOF--')
nmap gmd :Glimpse NodeType.<C-R><C-W><CR>
let vimrcdir = expand("<sfile>:h")."/dot/usr/vim"
let vimrcdir = expand("<sfile>:h").".vim/macros"
func! CciPostLoad(Pattern, File)
augroup CciAutoLoad
exe "autocmd BufNewFile ".a:Pattern "source ".g:vimrcdir."/".a:File
@@ -64,7 +69,7 @@ endfunc
call CciPostLoad("GLM::*", "srcmgr.vim")
call CciPostLoad("GLW::*", "srcmgr.vim")
delfunction CciPostLoad
exe "source ".expand("<sfile>:h")."/dot/usr/vim/"."utils.vim"
"exe "source ".expand("<sfile>:h")."/dot/usr/vim/"."utils.vim"
"exe "source ".expand("<sfile>:h")."/dot/usr/vim/"."newfmgr.vim"
nmap gG :call OpenSpec("GLW::<C-R><C-W>")<CR>