monochromatic

monochromatic blog: http://blog.z3bra.org
git clone git://z3bra.org/monochromatic
Log | Files | Refs

commit 43c05f70141bfbcae96b99980c23fc9237088a04
parent fe49eb5a2192ee643bbe4aaf6ab6bf874b8ee3ac
Author: Willy Goiffon <w.goiffon@gmail.com>
Date:   Sat, 10 Aug 2013 13:08:33 +0200

vim helper for the blog

Diffstat:
tools/blog.vim | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/tools/blog.vim b/tools/blog.vim @@ -0,0 +1,27 @@ +" +" blog.vim +" +" +" collection of functions, binding, etc... to automate blog editing and make it +" easier. +" + +" insert current date preceded by &mdash at the end of the current line +fu! Date() + norm mz + exe append(line("."), "&mdash; ".strftime("%d %B, %Y")) + norm 'zJ +endf +nmap <leader>d :call Date()<CR> + +fu! EscapeHTML() + silent! s/</\&lt;/g + silent! s/>/\&gt;/g + silent! s/"/\&quot;/g +endf + +" love that... +ab -- &mdash; +ab < &lt; +ab > &gt; +