diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..85a00f5 --- /dev/null +++ b/Rakefile @@ -0,0 +1,22 @@ +HOME = ENV['HOME'] +DEST = "#{HOME}/.vim/personal" +SRC = "ftplugin" + +directory DEST + +task :default => :install + +desc "Hardlink snippets into the ~/.vim/personal directory" +task :install => DEST do + run "cp -avl #{SRC} #{DEST}/" +end + +desc "Remove obsolete from and copy new snippets to ~/.vim/personal" +task :sync => :install do + run "rsync -ri --delete #{SRC} #{DEST}/" +end + +def run(cmd) + puts cmd + system cmd +end diff --git a/ftplugin/eruby/eruby.xpt.vim b/ftplugin/eruby/eruby.xpt.vim index 8af27d2..ebb48fa 100644 --- a/ftplugin/eruby/eruby.xpt.vim +++ b/ftplugin/eruby/eruby.xpt.vim @@ -49,7 +49,13 @@ XSET target=Echo('') <%= link_to `link^, `target^ %> XPT link_to_img synonym=ltim " <%= link_to image... -`:link_to({'link' : ':it:'}):^ +`:link_to({ 'link' : ':it:' }):^ + +XPT lta +`:li({ 'content' : ':link_to:' }):^ + +XPT enav synonym=nave,nav5 +`:nav({ ':lia:' : ':lta:' }):^ XPT form_for synonym=ff " <% form_for @model do... <% form_for `@obj^ do |`f^| -%> diff --git a/ftplugin/html/html.xpt.vim b/ftplugin/html/html.xpt.vim index 3e4a05c..c777237 100644 --- a/ftplugin/html/html.xpt.vim +++ b/ftplugin/html/html.xpt.vim @@ -4,7 +4,6 @@ XPTemplate priority=personal let s:f = g:XPTfuncs() -XPTvar $blank ' ' XPTvar $js_dir 'javascripts' XPTvar $css_dir 'stylesheets' XPTvar $jq_ver '1.4.2.min' @@ -32,7 +31,7 @@ XPT doctype " -XPT doctype5 " +XPT doctype5 synonym=doc5 " XPT charset " -XPT ul abbr alias=_tagAttr "