*** empty log message ***
This commit is contained in:
parent
1895ae6653
commit
219492564c
2 changed files with 46 additions and 1 deletions
|
|
@ -123,4 +123,5 @@ all-clean: maintainer-clean
|
|||
.gdb_history gmon.out h out TAGS ledger valexpr .deps \
|
||||
build AUTHORS COPYING INSTALL Makefile aclocal.m4 autom4te \
|
||||
acconf.h acconf.h.in config.guess config.sub configure \
|
||||
depcomp install-sh missing stamp texinfo.tex Makefile.in
|
||||
depcomp install-sh missing stamp texinfo.tex Makefile.in \
|
||||
results.out
|
||||
|
|
|
|||
44
ledger.vim
Normal file
44
ledger.vim
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
" Vim syntax file
|
||||
" filetype: ledger
|
||||
" Version: 0.0.2
|
||||
" by Wolfgang Oertl; Use according to the terms of the GPL>=2.
|
||||
" Revision history
|
||||
" 2005-02-05 first version (partly copied from ledger.vim 0.0.1)
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_sytax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" for debugging
|
||||
syntax clear
|
||||
|
||||
" region: a normal transaction
|
||||
syn region transNorm start=/^\d/ skip=/^\s/ end=/^/ fold keepend transparent contains=transDate
|
||||
syn match transDate /^\d\S\+/ contained
|
||||
syn match Comment /^;.*$/
|
||||
" highlight default link transNorm Question
|
||||
highlight default link Comment SpecialKey
|
||||
highlight default link transDate Question
|
||||
|
||||
" folding: how to represent a transaction in one line.
|
||||
function! MyFoldText()
|
||||
let line = strpart(getline(v:foldstart), 0, 65)
|
||||
let line2 = getline(v:foldstart+1)
|
||||
let line2 = substitute(line2, ".* ", "", "")
|
||||
let pad_len = 80 - strlen(line) - strlen(line2)
|
||||
if (pad_len < 0) then
|
||||
pad_len = 0
|
||||
endif
|
||||
let pad = strpart(" ", 0, pad_len)
|
||||
return line . pad . line2
|
||||
endfunction
|
||||
set foldtext=MyFoldText()
|
||||
set foldmethod=syntax
|
||||
|
||||
" syncinc is easy: search for the first transaction.
|
||||
syn sync clear
|
||||
syn sync match ledgerSync grouphere transNorm "^\d"
|
||||
|
||||
let b:current_syntax = "ledger"
|
||||
Loading…
Add table
Reference in a new issue