[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Mon Dec 6 16:47:18 2004 -->
- <!--x-from-r13: nyynaarny ng oryyfbhgu.arg (Oyyna @rny) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] indent script problems -->
- <li><em>date</em>: Mon Dec 6 16:47:18 2004</li>
- <li><em>from</em>: allanneal at bellsouth.net (Allan Neal)</li>
- <li><em>in-reply-to</em>: <<a href="msg00250.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00221.html">[email protected]</a>> <<a href="msg00248.html">[email protected]</a>> <<a href="msg00250.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] indent script problems</li>
" File Name: ledger.vim (indent file)
" Maintainer: Allan Neal
" Original Date: 04/12/04 10:55:20
" Last Update: 06/12/04 14:55:12
" Description: Indent the ledger file the in compliance with the ledger syntax
" highlighting file. Entry is flush left and all accounts are indented one ts
" Only load of no other is loaded
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=LedgerIndent()
" Only define the funtion once
if exists("*LedgerIndent")
finish
endif
function LedgerIndent()
let lnum = prevnonblank(v:lnum - 1)
let ind = 0
if lnum == 0
return 0
endif
if indent(lnum) != 0 && getline(v:lnum - 1) !~ '^$'
return -1
endif
if getline(lnum) =~ '^\d\{1,2}\/\d\{1,2}' || getline(lnum) =~ '^\d{4}\/\d\{1,2}\/\d\{1,2}'
let ind = ind + &sw
endif
return ind
endfunction
" vim:sw=4
>
> --
> Until later, Geoffrey
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
--
__^__ __^__
( ___ )----------------------------------------( ___ )
| / | "Engineers aren't boring people, | \ |
| / | we just get excited about boring things" | \ |
|___| --Anon |___|
(_____)----------------------------------------(_____)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00221" href="msg00221.html">[ale] indent script problems</a></strong>
<ul><li><em>From:</em> allanneal at bellsouth.net (Allan Neal)</li></ul></li>
<li><strong><a name="00248" href="msg00248.html">[ale] indent script problems</a></strong>
<ul><li><em>From:</em> allanneal at bellsouth.net (Allan Neal)</li></ul></li>
<li><strong><a name="00250" href="msg00250.html">[ale] indent script problems</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00250.html">[ale] indent script problems</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00252.html">[ale] Resources for making family oriented slide shows</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00250.html">[ale] indent script problems</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00222.html">[ale] Resources for making family oriented slide shows</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00251"><strong>Date</strong></a></li>
<li><a href="threads.html#00251"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>