Skip to content
Browse files

dotfilez\!

  • Loading branch information...
0 parents commit 587dd21234727b0504d07f9686eb6974302716a2 @mislav committed May 11, 2008
Showing with 24,278 additions and 0 deletions.
  1. +112 −0 bash_aliases
  2. +7 −0 bash_logout
  3. +67 −0 bashrc
  4. +9 −0 gemrc
  5. +16 −0 gitconfig
  6. +4 −0 gitignore
  7. +26 −0 gitk
  8. +17 −0 install.rb
  9. +133 −0 irbrc
  10. +21 −0 profile
  11. +3 −0 rails-plugin-sources
  12. +15 −0 railsrc
  13. +50 −0 sake
  14. +3 −0 vim/.gitignore
  15. +9 −0 vim/after/ftplugin/actionscript_snippets.vim
  16. +17 −0 vim/after/ftplugin/asp_snippets.vim
  17. +50 −0 vim/after/ftplugin/c_snippets.vim
  18. +30 −0 vim/after/ftplugin/css_snippets.vim
  19. +61 −0 vim/after/ftplugin/django_model_snippets.vim
  20. +32 −0 vim/after/ftplugin/django_template_snippets.vim
  21. +14 −0 vim/after/ftplugin/f-script_snippets.vim
  22. +9 −0 vim/after/ftplugin/haskell_snippets.vim
  23. +62 −0 vim/after/ftplugin/html_snippets.vim
  24. +52 −0 vim/after/ftplugin/java_snippets.vim
  25. +10 −0 vim/after/ftplugin/javascript_snippets.vim
  26. +13 −0 vim/after/ftplugin/latex_snippets.vim
  27. +9 −0 vim/after/ftplugin/logo_snippets.vim
  28. +10 −0 vim/after/ftplugin/markdown_snippets.vim
  29. +14 −0 vim/after/ftplugin/movable type_snippets.vim
  30. +56 −0 vim/after/ftplugin/objc_snippets.vim
  31. +26 −0 vim/after/ftplugin/ocaml_snippets.vim
  32. +23 −0 vim/after/ftplugin/perl_snippets.vim
  33. +30 −0 vim/after/ftplugin/php_snippets.vim
  34. +19 −0 vim/after/ftplugin/phpdoc_snippets.vim
  35. +14 −0 vim/after/ftplugin/propel_snippets.vim
  36. +87 −0 vim/after/ftplugin/python_snippets.vim
  37. +54 −0 vim/after/ftplugin/rails_snippets.vim
  38. +32 −0 vim/after/ftplugin/ruby_snippets.vim
  39. +12 −0 vim/after/ftplugin/sh_snippets.vim
  40. +19 −0 vim/after/ftplugin/slate_snippets.vim
  41. +35 −0 vim/after/ftplugin/smarty_snippets.vim
  42. +21 −0 vim/after/ftplugin/symfony_snippets.vim
  43. +14 −0 vim/after/ftplugin/tcl_snippets.vim
  44. +13 −0 vim/after/ftplugin/template_toolkit_snippets.vim
  45. +13 −0 vim/after/ftplugin/tex_snippets.vim
  46. +48 −0 vim/after/ftplugin/xhtml_snippets.vim
  47. +243 −0 vim/after/syntax/css-color.vim
  48. +1,954 −0 vim/autoload/genutils.vim
  49. +434 −0 vim/autoload/lookupfile.vim
  50. +4,381 −0 vim/autoload/rails.vim
  51. +802 −0 vim/autoload/rubycomplete.vim
  52. +110 −0 vim/colors/chela_light.vim
  53. +105 −0 vim/colors/desert.vim
  54. +102 −0 vim/colors/midnight2.vim
  55. +227 −0 vim/colors/moria.vim
  56. +131 −0 vim/colors/oceandeep.vim
  57. +538 −0 vim/colors/ps_color.vim
  58. +92 −0 vim/colors/pyte.vim
  59. +67 −0 vim/colors/vibrantink.vim
  60. +172 −0 vim/colors/vividchalk.vim
  61. +41 −0 vim/compiler/eruby.vim
  62. +68 −0 vim/compiler/ruby.vim
  63. +35 −0 vim/compiler/rubyunit.vim
  64. +475 −0 vim/doc/EnhancedCommentify.txt
  65. +697 −0 vim/doc/lookupfile.txt
  66. +657 −0 vim/doc/ps_color.txt
  67. +1,132 −0 vim/doc/rails.txt
  68. +307 −0 vim/doc/snippets_emu.txt
  69. +224 −0 vim/doc/surround.txt
  70. +698 −0 vim/doc/vcscommand.txt
  71. +14 −0 vim/ftdetect/ruby.vim
  72. +101 −0 vim/ftplugin/eruby.vim
  73. +70 −0 vim/ftplugin/git.vim
  74. +1 −0 vim/ftplugin/ocaml_enhcomm.vim
  75. +6 −0 vim/ftplugin/php_enhcomm.vim
  76. +230 −0 vim/ftplugin/ruby.vim
  77. +73 −0 vim/indent/eruby.vim
  78. +373 −0 vim/indent/ruby.vim
  79. +1,579 −0 vim/plugin/EnhancedCommentify.vim
  80. +447 −0 vim/plugin/SimpleFold.vim
  81. +996 −0 vim/plugin/genutils.vim
  82. +558 −0 vim/plugin/lookupfile.vim
  83. +525 −0 vim/plugin/pastie.vim
  84. +364 −0 vim/plugin/rails.vim
  85. +863 −0 vim/plugin/snippetsEmu.vim
  86. +631 −0 vim/plugin/surround.vim
  87. +66 −0 vim/plugin/twitter.py
  88. +48 −0 vim/plugin/twitter.vim
  89. +1,181 −0 vim/plugin/vcscommand.vim
  90. +394 −0 vim/plugin/vcscvs.vim
  91. +258 −0 vim/plugin/vcssvk.vim
  92. +289 −0 vim/plugin/vcssvn.vim
  93. +1 −0 vim/spell/en.utf-8.add
  94. +45 −0 vim/syntax/CVSAnnotate.vim
  95. +42 −0 vim/syntax/SVKAnnotate.vim
  96. +40 −0 vim/syntax/SVNAnnotate.vim
Sorry, we could not display the entire diff because it was too big.
112 bash_aliases
@@ -0,0 +1,112 @@
+# Some useful aliases
+# vi:filetype=sh:
+alias aliases='vim ~/.bash_aliases && source ~/.bash_aliases'
+
+# Function which adds an alias to the current shell and to
+# the ~/.bash_aliases file.
+add-alias ()
+{
+ local name=$1 value="$2"
+ echo "alias $name='$value'" >> ~/.bash_aliases
+ eval "alias $name='$value'"
+ alias $name
+}
+
+#######
+# git #
+#######
+alias gl='git pull'
+alias gp='git push'
+alias gd='git diff'
+alias gc='git commit -v'
+alias gca='git commit -v -a'
+alias gb='git branch -v'
+
+function gco {
+ if [ -z "$1" ]; then
+ git checkout master
+ else
+ git checkout $1
+ fi
+}
+
+function st {
+ if [ -d ".svn" ]; then
+ svn status
+ else
+ git status
+ fi
+}
+
+#######
+# SVN #
+#######
+alias sup='svn up' # trust me 3 chars makes a different
+# alias sstu='svn st -u' # remote repository changes
+# alias scom='svn commit' # commit
+alias svnclear='find . -name .svn -print0 | xargs -0 rm -rf' # removes all .svn folders from directory recursively
+alias svnaddall='svn status | grep "^\?" | awk "{print \$2}" | xargs svn add' # adds all unadded files
+
+########
+# RUBY #
+########
+# use readline, completion and require rubygems by default for irb
+alias irb='irb --simple-prompt -r irb/completion -rubygems'
+
+# really awesome function, use: cdgem <gem name>, cd's into your gems directory
+# and opens gem that best matches the gem name provided
+function cdgem {
+ cd /usr/lib/ruby/gems/1.8/gems/
+ cd `ls | grep $1 | sort | tail -1`
+}
+function gemdoc {
+ firefox /usr/lib/ruby/gems/1.8/doc/`ls /usr/lib/ruby/gems/1.8/doc | grep $1 | sort | tail -1`/rdoc/index.html
+}
+
+alias qri='qri -w 106'
+alias fri='fri -w 106'
+
+#########
+# RAILS #
+#########
+alias ss='script/server' # start up the beast
+alias sr='kill -USR2 `cat tmp/pids/mongrel.pid`' # restart detached Mongrel
+alias sst='kill `cat tmp/pids/mongrel.pid`' # restart detached Mongrel
+alias sc='script/console'
+alias a='autotest -rails' # makes autotesting even quicker
+
+# see http://railstips.org/2007/5/31/even-edgier-than-edge-rails
+function edgie() {
+ ruby ~/projects/rails/rails/railties/bin/rails $1 && cd $1 && ln -s ~/projects/rails/rails vendor/rails
+}
+
+########
+# misc #
+########
+
+alias texclean='rm -f *.toc *.aux *.log *.cp *.fn *.tp *.vr *.pg *.ky'
+alias clean='echo -n "Really clean this directory?";
+ read yorn;
+ if test "$yorn" = "y"; then
+ rm -f \#* *~ .*~ *.bak .*.bak *.tmp .*.tmp core a.out;
+ echo "Cleaned.";
+ else
+ echo "Not cleaned.";
+ fi'
+alias h='history'
+alias j="jobs -l"
+alias l="ls -lah"
+alias ll="ls -l"
+alias la='ls -A'
+# alias pu="pushd"
+# alias po="popd"
+
+#
+# Csh compatability:
+#
+alias unsetenv=unset
+function setenv () {
+ export $1="$2"
+}
+
+########
7 bash_logout
@@ -0,0 +1,7 @@
+# ~/.bash_logout: executed by bash(1) when login shell exits.
+
+# when leaving the console clear the screen to increase privacy
+
+if [ "$SHLVL" = 1 ]; then
+ [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
+fi
67 bashrc
@@ -0,0 +1,67 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+# don't put duplicate lines in the history. See bash(1) for more options
+export HISTCONTROL=ignoredups
+
+export EDITOR=vim
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# make less more friendly for non-text input files, see lesspipe(1)
+[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
+
+# set variable identifying the chroot you work in (used in the prompt below)
+if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
+ debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# Comment in the above and uncomment this below for a color prompt
+# PS1='\e[mwork:\e[0;31m\w\e[m \e[1;37m# '
+PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\h\[\033[00m\]:\[\e[0;31m\]\w\[\e[m\]$(__git_ps1 " (%s)") $ '
+# PS1=' $ '
+
+# If this is an xterm set the title to user@host:dir
+case "$TERM" in
+xterm*|rxvt*)
+ PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
+ ;;
+*)
+ ;;
+esac
+
+# Alias definitions.
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+# enable color support of ls and also add handy aliases
+if [ "$TERM" != "dumb" ]; then
+ eval "`dircolors -b`"
+ alias ls='ls --color=auto'
+ alias grep='grep --color=auto'
+ #alias dir='ls --color=auto --format=vertical'
+ #alias vdir='ls --color=auto --format=long'
+fi
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+fi
+
+# svk
+if [ -f ~/.svk/completion.sh ]; then
+ . ~/.svk/completion.sh
+fi
+
+if [ -f ~/bin/sake-completion ]; then
+ complete -C ~/bin/sake-completion -o default sake
+fi
9 gemrc
@@ -0,0 +1,9 @@
+---
+:update_sources: true
+:verbose: true
+:bulk_threshold: 1000
+:sources:
+- http://gems.rubyforge.org
+- http://gems.github.com
+:benchmark: false
+:backtrace: false
16 gitconfig
@@ -0,0 +1,16 @@
+[user]
+ name = Mislav Marohnić
+ email = mislav.marohnic@gmail.com
+[apply]
+ whitespace = nowarn
+[alias]
+ co = checkout
+[color]
+ diff = auto
+ status = auto
+ branch = auto
+[core]
+ excludesfile = /home/mislav/.gitignore
+ editor = vim -c 'set ft=diff'
+[mirror]
+ summary = true
4 gitignore
@@ -0,0 +1,4 @@
+.*.sw?
+.svn
+*.pdf
+.DS_Store
26 gitk
@@ -0,0 +1,26 @@
+set mainfont {Helvetica 10}
+set textfont {Courier 10}
+set uifont {Helvetica 10 bold}
+set tabstop 2
+set findmergefiles 0
+set maxgraphpct 50
+set maxwidth 16
+set cmitmode patch
+set wrapcomment none
+set showneartags 1
+set showlocalchanges 1
+set datetimeformat {%Y-%m-%d %H:%M:%S}
+set bgcolor white
+set fgcolor black
+set colors {green red blue magenta darkgrey brown orange}
+set diffcolors {red "#00a000" blue}
+set diffcontext 3
+set selectbgcolor gray85
+set geometry(main) 1197x812+23+55
+set geometry(topwidth) 1193
+set geometry(topheight) 285
+set geometry(pwsash0) "719 2"
+set geometry(pwsash1) "959 2"
+set geometry(botwidth) 759
+set geometry(botheight) 507
+set permviews {}
17 install.rb
@@ -0,0 +1,17 @@
+#!/usr/bin/env ruby
+
+# from http://errtheblog.com/posts/89-huba-huba
+
+home = ENV['HOME']
+
+Dir.chdir File.dirname(__FILE__) do
+ dotfiles_dir = Dir.pwd.sub(home + '/', '')
+
+ Dir['*'].each do |file|
+ next if file == 'install.rb'
+ target = File.join(home, ".#{file}")
+ unless File.exist? target
+ system %[ln -vsf #{File.join(dotfiles_dir, file)} #{target}]
+ end
+ end
+end
133 irbrc
@@ -0,0 +1,133 @@
+#!/usr/bin/ruby
+require 'irb/completion'
+IRB.conf[:AUTO_INDENT] = true
+require 'pp'
+require 'rubygems'
+
+# students.map_by_first_name
+# require 'map_by_method'
+# 6.to_article
+#require 'to_activerecord' # warnings with Rails 2.0.2
+# 'foo'.what?('FOO')
+require 'what_methods'
+# User.find(:all).map &its.contacts.map(&its.last_name.capitalize)
+require 'methodphitamine'
+
+load File.dirname(__FILE__) + '/.railsrc' if $0 == 'irb' && ENV['RAILS_ENV']
+
+def time(times = 1)
+ ret = nil
+ Benchmark.bm { |x| x.report { times.times { ret = yield } } }
+ ret
+end
+
+if defined? Benchmark
+ class Benchmark::ReportProxy
+ def initialize(bm, iterations)
+ @bm = bm
+ @iterations = iterations
+ @queue = []
+ end
+
+ def method_missing(method, *args, &block)
+ args.unshift(method.to_s + ':')
+ @bm.report(*args) do
+ @iterations.times { block.call }
+ end
+ end
+ end
+
+ def compare(times = 1, label_width = 12)
+ Benchmark.bm(label_width) do |x|
+ yield Benchmark::ReportProxy.new(x, times)
+ end
+ end
+end
+
+# require 'wirble'
+# Wirble.init
+# Wirble.colorize
+
+require 'irb/completion'
+
+module Kernel
+ private
+ def r(arg)
+ puts `fri "#{arg}"`
+ end
+end
+
+class Object
+ def puts_ri_documentation_for(obj, meth)
+ case self
+ when Module
+ candidates = ancestors.map{|klass| "#{klass}::#{meth}"}
+ candidates.concat(class << self; ancestors end.map{|k| "#{k}##{meth}"})
+ else
+ candidates = self.class.ancestors.map{|klass| "#{klass}##{meth}"}
+ end
+ candidates.each do |candidate|
+ #puts "TRYING #{candidate}"
+ desc = `qri '#{candidate}'`
+ unless desc.chomp == "nil"
+ # uncomment to use ri (and some patience)
+ #desc = `ri -T '#{candidate}' 2>/dev/null`
+ #unless desc.empty?
+ puts desc
+ return true
+ end
+ end
+ false
+ end
+ private :puts_ri_documentation_for
+
+ def method_missing(meth, *args, &block)
+ if md = /ri_(.*)/.match(meth.to_s)
+ unless puts_ri_documentation_for(self,md[1])
+ "Ri doesn't know about ##{meth}"
+ end
+ else
+ super
+ end
+ end
+
+ def ri_(meth)
+ unless puts_ri_documentation_for(self,meth.to_s)
+ "Ri doesn't know about ##{meth}"
+ end
+ end
+end
+
+RICompletionProc = proc{|input|
+ bind = IRB.conf[:MAIN_CONTEXT].workspace.binding
+ case input
+ when /(\s*(.*)\.ri_)(.*)/
+ pre = $1
+ receiver = $2
+ meth = $3 ? /\A#{Regexp.quote($3)}/ : /./ #}
+ begin
+ candidates = eval("#{receiver}.methods", bind).map do |m|
+ case m
+ when /[A-Za-z_]/; m
+ else # needs escaping
+ %{"#{m}"}
+ end
+ end
+ candidates = candidates.grep(meth)
+ candidates.map{|s| pre + s }
+ rescue Exception
+ candidates = []
+ end
+ when /([A-Z]\w+)#(\w*)/ #}
+ klass = $1
+ meth = $2 ? /\A#{Regexp.quote($2)}/ : /./
+ candidates = eval("#{klass}.instance_methods(false)", bind)
+ candidates = candidates.grep(meth)
+ candidates.map{|s| "'" + klass + '#' + s + "'"}
+ else
+ IRB::InputCompletor::CompletionProc.call(input)
+ end
+}
+#Readline.basic_word_break_characters= " \t\n\"\\'`><=;|&{("
+Readline.basic_word_break_characters= " \t\n\\><=;|&"
+Readline.completion_proc = RICompletionProc
21 profile
@@ -0,0 +1,21 @@
+# ~/.profile: executed by the command interpreter for login shells.
+# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
+# exists.
+# see /usr/share/doc/bash/examples/startup-files for examples.
+# the files are located in the bash-doc package.
+
+# the default umask is set in /etc/profile
+#umask 022
+
+# if running bash
+if [ -n "$BASH_VERSION" ]; then
+ # include .bashrc if it exists
+ if [ -f ~/.bashrc ]; then
+ . ~/.bashrc
+ fi
+fi
+
+# set PATH so it includes user's private bin if it exists
+if [ -d ~/bin ] ; then
+ PATH=~/bin:"${PATH}"
+fi
3 rails-plugin-sources
@@ -0,0 +1,3 @@
+http://dev.rubyonrails.com/svn/rails/plugins/
+svn://errtheblog.com/svn/plugins/
+http://svn.techno-weenie.net/projects/plugins/
15 railsrc
@@ -0,0 +1,15 @@
+#!/usr/bin/ruby
+# log to
+def l(stream = STDOUT)
+ ActiveRecord::Base.logger = Logger.new(stream)
+ ActiveRecord::Base.clear_active_connections!
+ "logger reset!"
+end
+
+# def method_missing(method, *args, &block)
+# User.find_by_login(method.to_s) || super
+# end
+
+def sql(query)
+ ActiveRecord::Base.connection.select_all(query)
+end
50 sake
@@ -0,0 +1,50 @@
+desc 'Install the plugin in vendor/plugins/will_paginate'
+task 'will_paginate:install' do
+ require("fileutils")
+ wp_dir = "vendor/plugins/will_paginate"
+ begin
+ FileUtils.mkdir(wp_dir)
+ rescue Errno::EEXIST
+ $stderr.puts("#{wp_dir} already exists: updating ...")
+ end
+ url = "http://github.com/mislav/will_paginate/tarball/master"
+ system("wget -nv #{url} -O- | tar xzv -C #{wp_dir} --strip 1")
+end
+
+desc 'Add an external project as a sub-tree'
+task 'git:subtree:add' do
+ require("readline")
+ name = (print("Remote Name? ")
+ Readline.readline.chomp)
+ url = (print("Git Repo Url? ")
+ Readline.readline.chomp)
+ `git remote add #{name} #{url}`
+ `git config remote.#{name}.fetch refs/heads/*:refs/remotes/#{name}/*`
+ `git config --add remote.#{name}.fetch refs/tags/*:refs/remotes/#{name}/tags/*`
+ `git config remote.#{name}.tagopt --no-tags`
+ `git fetch #{name}`
+end
+
+desc 'Merge a sub-tree into your project'
+task 'git:subtree:merge' do
+ require("readline")
+ name = (print("Remote Name? ")
+ Readline.readline.chomp)
+ branch = (print("Remote Branch? ")
+ Readline.readline.chomp)
+ dest = (print("Destination? ")
+ Readline.readline.chomp)
+ `git merge -s ours --no-commit #{name}/#{branch}`
+ `git read-tree --prefix=#{dest} -u #{name}/#{branch}`
+ `git commit -m \"Merge branch '#{branch}' of #{name}\"`
+end
+
+desc 'Pull (fetch & merge) into an existing sub-tree'
+task 'git:subtree:pull' do
+ require("readline")
+ name = (print("Remote Name? ")
+ Readline.readline.chomp)
+ branch = (print("Remote Branch? ")
+ Readline.readline.chomp)
+ `git pull -s subtree #{name} #{branch}`
+end
3 vim/.gitignore
@@ -0,0 +1,3 @@
+/doc/tags
+/spell/*.spl
+/vim*
9 vim/after/ftplugin/actionscript_snippets.vim
@@ -0,0 +1,9 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet dm duplicateMovieClip(".st."target".et.", ".st."newName".et.", ".st."depth".et.");"
17 vim/after/ftplugin/asp_snippets.vim
@@ -0,0 +1,17 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet rr Response.Redirect(".st."to".et.")".st.et.""
+exec "Snippet app Application(\"".st.et."\")".st.et.""
+exec "Snippet forin For ".st."var".et." in ".st."array".et."<CR><Tab>".st.et."<CR>Next<CR>".st.et.""
+exec "Snippet ifelse If ".st."condition".et." Then<CR><Tab>".st.et."<CR>Else<CR><Tab>".st.et."<CR>End if<CR>".st.et.""
+exec "Snippet rw Response.Write ".st.et.""
+exec "Snippet sess Session(\"".st.et."\")".st.et.""
+exec "Snippet rf Request.Form(\"".st.et."\")".st.et.""
+exec "Snippet rq Request.QueryString(\"".st.et."\")".st.et.""
+exec "Snippet while While ".st."NOT".et." ".st."condition".et."<CR><Tab>".st.et."<CR>Wend<CR>".st.et.""
50 vim/after/ftplugin/c_snippets.vim
@@ -0,0 +1,50 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+function! Count(haystack, needle)
+ let counter = 0
+ let index = match(a:haystack, a:needle)
+ while index > -1
+ let counter = counter + 1
+ let index = match(a:haystack, a:needle, index+1)
+ endwhile
+ return counter
+endfunction
+
+function! CArgList(count)
+ " This returns a list of empty tags to be used as
+ " argument list placeholders for the call to printf
+ let st = g:snip_start_tag
+ let et = g:snip_end_tag
+ if a:count == 0
+ return ""
+ else
+ return repeat(', '.st.et, a:count)
+ endif
+endfunction
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet do do<CR>{<CR><Tab>".st.et."<CR>} while (".st.et.");"
+exec "Snippet readfile std::vector<uint8_t> v;<CR>if(FILE* fp = fopen(\"".st."filename".et."\", \"r\"))<CR>{<CR><Tab>uint8_t buf[1024];<CR><Tab>while(size_t len = fread(buf, 1, sizeof(buf), fp))<CR><Tab>v.insert(v.end(), buf, buf + len);<CR><Tab>fclose(fp);<CR>}<CR>".st.et
+exec "Snippet beginend ".st."v".et.".begin(), ".st."v".et.".end()".st.et
+exec "Snippet once #ifndef _".st."file:substitute(expand('%'),'\\(.\\)','\\u\\1','g')".et."_<CR><CR>#define _".st."file".et."_<CR><CR>".st.et."<CR><CR>#endif /* _".st."file".et."_ */<CR>".st.et
+exec "Snippet class class ".st."name".et."<CR>{<CR>public:<CR>".st."name".et." (".st."arguments".et.");<CR>virtual ~".st."name".et."();<CR><CR>private:<CR>".st.":D('/* data */')".et."<CR>};<CR>".st.et
+" TODO This is a good one but I can't quite work out the syntax yet
+exec "Snippet printf printf(\"".st."\"%s\"".et."\\n\"".st."\"%s\":CArgList(Count(@z, '%[^%]'))".et.");<CR>".st.et
+exec "Snippet vector std::vector<".st."char".et."> v".st.et.";"
+exec "Snippet struct struct ".st."name".et."<CR>{<CR>".st.":D('/* data */')".et."<CR>};<CR>".st.et
+exec "Snippet template template <typename ".st."_InputIter".et."><CR>".st.et
+" TODO this one as well. Wish I knew more C
+" Snippet namespace namespace ${1:${TM_FILENAME/(.*?)\\..*/\\L$1/}}\n{\n\t$0\n};<CR>.st.et
+exec "Snippet namespace namespace ".st.":substitute(expand('%'),'.','\\l&', 'g')".et."<CR>{<CR>".st.et."<CR>};<CR>".st.et
+exec "Snippet map std::map<".st."key".et.", ".st."value".et."> map".st.et.";<CR>".st.et
+exec "Snippet mark #if 0<CR><CR>".st.":D('#pragma mark -<CR><CR>'}#pragma mark ".st.et."<CR><CR>#endif<CR><CR>".st.et
+exec "Snippet if if(".st.et.")<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet main int main (int argc, char const* argv[])<CR>{<CR>".st.et."<CR>return 0;<CR>}<CR>".st.et
+exec "Snippet Inc #include <".st.":D('.h')".et."><CR>".st.et
+exec "Snippet inc #include \"".st.et.".h\""
+exec "Snippet for for( ".st.":D('unsigned int')".et." ".st."i".et." = ".st.":D('0')".et."; ".st."i".et." < ".st."count".et."; ".st."i".et." += ".st.":D('1')".et.")<CR>{<CR>".st.et."<CR>}<CR>".st.et
30 vim/after/ftplugin/css_snippets.vim
@@ -0,0 +1,30 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet visibility ".st.":D('visible/hidden/collapse')".et.";".st.et
+exec "Snippet list list-style-image: url(".st.et.");".st.et
+exec "Snippet text text-shadow: rgb(".st.":D('255')".et.", ".st.":D('255')".et.", ".st.":D('255')".et.", ".st.":D('10px')".et." ".st.":D('10px')".et." ".st.":D('2px')".et.";".st.et." "
+exec "Snippet overflow overflow: ".st.":D('visible/hidden/scroll/auto')".et.";".st.et
+exec "Snippet white white-space: ".st.":D('normal/pre/nowrap')".et.";".st.et
+exec "Snippet clear cursor: url(".st.et.");".st.et
+exec "Snippet margin padding-top: ".st.":D('20px')".et.";".st.et
+exec "Snippet background background #".st.":D('DDD')".et." url(".st.et.") ".st.":D('repeat/repeat-x/repeat-y/no-repeat')".et." ".st.":D('scroll/fixed')".et." top left/top center/top right/center left/center center/center right/bottom left/bottom center/bottom right/x% y%/x-pos y-pos')".et.";".st.et
+exec "Snippet word word-spaceing: ".st.":D('10px')".et.";".st.et
+exec "Snippet z z-index: ".st.et.";".st.et
+exec "Snippet vertical vertical-align: ".st.":D('baseline/sub/super/top/text-top/middle/bottom/text-bottom/length/%')".et.";".st.et
+exec "Snippet marker marker-offset: ".st.":D('10px')".et.";".st.et
+exec "Snippet cursor cursor: ".st.":D('default/auto/crosshair/pointer/move/*-resize/text/wait/help')".et.";".st.et
+exec "Snippet border border-right: ".st.":D('1')".et."px ".st.":D('solid')".et." #".st.":D('999')".et.";".st.et
+exec "Snippet display display: block;".st.et
+exec "Snippet padding padding: ".st.":D('20px')".et." ".st.":D('0px')".et.";".st.et
+exec "Snippet letter letter-spacing: ".st.et."em;".st.et
+exec "Snippet color color: rgb(".st.":D('255')".et.", ".st.":D('255')".et.", ".st.":D('255')".et.");".st.et
+exec "Snippet font font-weight: ".st.":D('normal/bold')".et.";".st.et
+exec "Snippet position position: ".st.":D('static/relative/absolute/fixed')".et.";".st.et
+exec "Snippet direction direction: ".st.":D('ltr|rtl')".et.";".st.et
+exec "Snippet float float: ".st.":D('left/right/none')".et.";".st.et
61 vim/after/ftplugin/django_model_snippets.vim
@@ -0,0 +1,61 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+function! Count(haystack, needle)
+ let counter = 0
+ let index = match(a:haystack, a:needle)
+ while index > -1
+ let counter = counter + 1
+ let index = match(a:haystack, a:needle, index+1)
+ endwhile
+ return counter
+endfunction
+
+function! DjangoArgList(count)
+ " This needs to be Python specific as print expects a
+ " tuple and an empty tuple looks like this (,) so we'll need to make a
+ " special case for it
+ let st = g:snip_start_tag
+ let et = g:snip_end_tag
+ if a:count == 0
+ return "()"
+ else
+ return '('.repeat(st.et.', ', a:count).')'
+ endif
+endfunction
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet mmodel class ".st.et."(models.Model):<CR><Tab>\"\"\"".st.":D('model description')".et."\"\"\"<CR><Tab>".st.et." = ".st.et."<CR><CR><Tab>class Admin:<CR><Tab><Tab>pass<CR><CR><Tab>def __str__(self):<CR><Tab><Tab>return \"".st."s".et."\" % ".st."s:DjangoArgList(Count(@z, '%[^%]'))".et."<CR>".st.et
+exec "Snippet mauto models.AutoField(".st.et.")".st.et
+exec "Snippet mbool models.BooleanField()".st.et
+exec "Snippet mchar models.CharField(maxlength=".st."50".et.st.et.")".st.et
+exec "Snippet mcsi models.CommaSeparatedIntegerField(maxlength=".st."50".et.st.et.")".st.et
+exec "Snippet mdate models.DateField(".st.et.")".st.et
+exec "Snippet mdatet models.DateTimeField(".st.et.")".st.et
+exec "Snippet memail models.EmailField(".st.et.")".st.et
+exec "Snippet mfile models.FileField(upload_to=\"".st.et."\"".st.et.")".st.et
+exec "Snippet mfilep models.FilePathField(path=\"".st.et."\"".st.et.")".st.et
+exec "Snippet mfloat models.FloatField(max_digits=".st.et.", decimal_places=".st.et.")".st.et
+exec "Snippet mimage models.ImageField(".st.et.")".st.et
+exec "Snippet mint models.IntegerField(".st.et.")".st.et
+exec "Snippet mipadd models.IPAddressField(".st.et.")".st.et
+exec "Snippet mnull models.NullBooleanField()".st.et
+exec "Snippet mphone models.PhoneNumberField(".st.et.")".st.et
+exec "Snippet mpint models.PositiveIntegerField(".st.et.")".st.et
+exec "Snippet mspint models.PositiveSmallIntegerField(".st.et.")".st.et
+exec "Snippet mslug models.SlugField(".st.et.")".st.et
+exec "Snippet msint models.SmallIntegerField(".st.et.")".st.et
+exec "Snippet mtext models.TextField(".st.et.")".st.et
+exec "Snippet mtime models.TimeField(".st.et.")".st.et
+exec "Snippet murl models.URLField(verify_exists=".st."True".et.st.et.")".st.et
+exec "Snippet muss models.USStateField(".st.et.")".st.et
+exec "Snippet mxml models.XMLField(schema_path=\"".st.et."\"".st.et.")".st.et
+exec "Snippet mfor models.ForeignKey(".st.et.")".st.et
+exec "Snippet mm2o models.ForeignKey(".st.et.")".st.et
+exec "Snippet mm2m models.ManyToManyField(".st.et.")".st.et
+exec "Snippet mo2o models.OneToOneField(".st.et.")".st.et
+exec "Snippet mman models.Manager()".st.et
32 vim/after/ftplugin/django_template_snippets.vim
@@ -0,0 +1,32 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet {{ {% templatetag openvariable %}".st.et
+exec "Snippet }} {% templatetag closevariable %}".st.et
+exec "Snippet {% {% templatetag openblock %}".st.et
+exec "Snippet %} {% templatetag closeblock %}".st.et
+exec "Snippet now {% now \"".st.et."\" %}".st.et
+exec "Snippet firstof {% firstof ".st.et." %}".st.et
+exec "Snippet ifequal {% ifequal ".st.et." ".st.et." %}<CR><Tab>".st.et."<CR>{% endifequal %}<CR>".st.et
+exec "Snippet ifchanged {% ifchanged %}".st.et."{% endifchanged %}".st.et
+exec "Snippet regroup {% regroup ".st.et." by ".st.et." as ".st.et." %}".st.et
+exec "Snippet extends {% extends \"".st.et."\" %}<CR>".st.et
+exec "Snippet filter {% filter ".st.et." %}<CR><Tab>".st.et."<CR>{% endfilter %}".st.et
+exec "Snippet block {% block ".st.et." %}<CR><Tab>".st.et."<CR>{% endblock %}<CR>".st.et
+exec "Snippet cycle {% cycle ".st.et." as ".st.et." %}".st.et
+exec "Snippet if {% if ".st.et." %}<CR><Tab>".st.et."<CR>{% endif %}<CR>".st.et
+exec "Snippet debug {% debug %}<CR>".st.et
+exec "Snippet ifnotequal {% ifnotequal ".st.et." ".st.et." %}<CR><Tab>".st.et."<CR>{% endifnotequal %}<CR>".st.et
+exec "Snippet include {% include ".st.et." %}<CR>".st.et
+exec "Snippet comment {% comment %}<CR><Tab>".st.et."<CR>{% endcomment %}<CR>".st.et
+exec "Snippet for {% for ".st.et." in ".st.et." %}<CR><Tab>".st.et."<CR>{% endfor %}<CR>".st.et
+exec "Snippet ssi {% ssi ".st.et." ".st.":D('parsed')".et." %}".st.et
+exec "Snippet widthratio {% widthratio ".st.":D('this_value')".et." ".st.":D('max_value')".et." ".st.":D('100')".et." %}".st.et
+exec "Snippet load {% load ".st.et." %}<CR>".st.et
+" Field snippet contributed by Alex Pounds
+exec "Snippet field <p><label for=\"id_".st."fieldname".et."\">".st."fieldlabel".et.":</label> {{ form.".st."fieldname".et." }}<CR>{% if form.".st."fieldname".et.".errors %}*** {{ form.".st."fieldname".et.".errors|join:\", \" }} {% endif %}</p>".st.et
14 vim/after/ftplugin/f-script_snippets.vim
@@ -0,0 +1,14 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet tbd to:".st.et." by:".st.et." do:[ ".st.":D(':i')".et." |<CR><Tab>".st.et."<CR>].".st.et
+exec "Snippet it ifTrue:[<CR><Tab>".st.et."<CR>].".st.et
+exec "Snippet ift ifFalse:[<CR><Tab>".st.et."<CR>] ifTrue:[<CR><Tab>".st.et."<CR>].".st.et
+exec "Snippet itf ifTrue:[<CR><Tab>".st.et."<CR>] ifFalse:[<CR><Tab>".st.et."<CR>].".st.et
+exec "Snippet td to:".st.et." do:[".st.et." ".st.":D(':i')".et." |<CR><Tab>".st.et."<CR>].".st.et
+exec "Snippet if ifFalse:[<CR><Tab>".st.et."<CR>].".st.et
9 vim/after/ftplugin/haskell_snippets.vim
@@ -0,0 +1,9 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet mod module: ".st.":D('Main')".et." where<CR><Tab>".st.et
62 vim/after/ftplugin/html_snippets.vim
@@ -0,0 +1,62 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+function! Onload()
+ let st = g:snip_start_tag
+ let et = g:snip_end_tag
+ return 'onload="'.st.et.'"'
+endfunction
+
+function! Id()
+ let st = g:snip_start_tag
+ let et = g:snip_end_tag
+ return ' id="'.st.et.'"'
+endfunction
+
+function! Cellspacing()
+ let st = g:snip_start_tag
+ let et = g:snip_end_tag
+ let cd = g:snip_elem_delim
+ return ' cellspacing="'.st.cd."D('5')".et.'"'
+endfunction
+
+function! FileNoExt()
+ return substitute(expand('%'), '\(.*\)\..*$', '\1','')
+endfunction
+
+function! Target()
+ let st = g:snip_start_tag
+ let et = g:snip_end_tag
+ return ' target="'.st.et.'"'
+endfunction
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet doctype <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"<CR><TAB>\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\"><CR>".st.et
+exec "Snippet doc4s <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"<CR>\"http://www.w3.org/TR/html4/strict.dtd\"><CR>".st.et
+exec "Snippet doc4t <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"<CR>\"http://www.w3.org/TR/html4/loose.dtd\"><CR>".st.et
+exec "Snippet doc4f <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\"<CR>\"http://www.w3.org/TR/html4/frameset.dtd\"><CR>".st.et
+exec "Snippet docxs <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Strict//EN\"<CR>\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><CR>".st.et
+exec "Snippet docxt <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Transitional//EN\"<CR>\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><CR>".st.et
+exec "Snippet docxf <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Frameset//EN\"<CR>\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\"><CR>".st.et
+exec "Snippet head <head><CR><TAB><meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" /><CR><TAB><title>".st.":substitute(expand('%'),'\\(.*\\)\\..*$','\\1','')".et."</title><CR><TAB>".st.et."<CR></head><CR>".st.et
+exec "Snippet script <script type=\"text/javascript\" language=\"javascript\" charset=\"utf-8\"><CR>// <![CDATA[<CR><TAB>".st.et."<CR>// ]]><CR></script><CR>".st.et
+exec "Snippet title <title>".st.":substitute(expand('%'),'\\(.*\\)\\..*$','\\1','')".et."</title>"
+exec "Snippet body <body id=\"".st.":FileNoExt()".et."\" ".st.":Onload()".et."<CR>".st.et."<CR></body><CR>".st.et
+exec "Snippet scriptsrc <script src=\"".st.et."\" type=\"text/javascript\" language=\"".st.":D('javascript')".et."\" charset=\"".st.":D('utf-8')".et."\"></script><CR>".st.et
+exec "Snippet textarea <textarea name=\"".st.":D('Name')".et."\" rows=\"".st.":D('8')".et."\" cols=\"".st.":D'(40')".et."\">".st.et."</textarea><CR>".st.et
+exec "Snippet meta <meta name=\"".st.":D('name')".et."\" content=\"".st.":D('content')".et."\" /><CR>".st.et
+exec "Snippet movie <object width=\"".st.et."\" height=\"".st.et."\"<CR>classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"<CR>codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\"><CR><Tab><param name=\"src\"<CR>value=\"".st.et."\" /><CR><Tab><param name=\"controller\" value=\"".st.et."\" /><CR><param name=\"autoplay\" value=\"".st.et."\" /><CR><Tab><embed src=\"".st.":D('movie.mov')".et."\"<CR><Tab>width=\"".st.":D('320')".et."\" height=\"".st."D('240')".et."\"<CR><Tab>controller=\"".st.":D('true')".et."\" autoplay=\"".st.":D('true')".et."\"<CR><Tab><Tab>scale=\"tofit\" cache=\"true\"<CR><Tab><Tab>pluginspage=\"http://www.apple.com/quicktime/download/\"<CR><Tab>/><CR></object><CR>".st.et
+exec "Snippet div <div".st.":Id()".et."><CR>".st.et."<CR></div><CR>".st.et
+exec "Snippet mailto <a href=\"mailto:".st.et."?subject=".st.":D('feedback')".et."\">".st.":D('email me')".et."</a>".st.et
+exec "Snippet table <table border=\"".st.":D('0')".et."\"".st.":Cellspacing()".et." cellpadding=\"".st.":D('5')".et."\"><CR><Tab><tr><th><:D('Header')".et."</th></tr><CR><Tab><tr><td>".st.et."</td></tr><CR></table>"
+exec "Snippet link <link rel=\"".st.":D('stylesheet')".et."\" href=\"".st.":D('/css/master.css')".et."\" type=\"text/css\" media=\"".st.":D('screen')".et."\" title=\"".st.et."\" charset=\"".st.":D('utf-8')".et."\" />"
+exec "Snippet form <form action=\"".st.":D(FileNoExt().'_submit')".et."\" method=\"".st.":D('get')".et."\"><CR><Tab>".st.et."<CR><CR><Tab><p><input type=\"submit\" value=\"Continue &rarr;\" /></p><CR></form><CR>".st.et
+exec "Snippet ref <a href=\"".st.et."\">".st.et."</a>".st.et
+exec "Snippet h1 <h1 id=\"".st.et."\">".st.et."</h1>".st.et
+exec "Snippet input <input type=\"".st.":D('text/submit/hidden/button')".et."\" name=\"".st.et."\" value=\"".st.et."\" ".st.et."/>".st.et
+exec "Snippet style <style type=\"text/css\" media=\"screen\"><CR>/* <![CDATA[ */<CR><Tab>".st.et."<CR>/* ]]> */<CR></style><CR>".st.et
+exec "Snippet base <base href=\"".st.et."\"".st.":Target()".et." />".st.et
52 vim/after/ftplugin/java_snippets.vim
@@ -0,0 +1,52 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+function! UpFirst()
+ return substitute(@z,'.','\u&','')
+endfunction
+
+function! JavaTestFileName(type)
+ let filepath = expand('%:p')
+ let filepath = substitute(filepath, '/','.','g')
+ let filepath = substitute(filepath, '^.\(:\\\)\?','','')
+ let filepath = substitute(filepath, '\','.','g')
+ let filepath = substitute(filepath, ' ','','g')
+ let filepath = substitute(filepath, '.*test.','','')
+ if a:type == 1
+ let filepath = substitute(filepath, '.[A-Za-z]*.java','','g')
+ elseif a:type == 2
+ let filepath = substitute(filepath, 'Tests.java','','')
+ elseif a:type == 3
+ let filepath = substitute(filepath, '.*\.\([A-Za-z]*\).java','\1','g')
+ elseif a:type == 4
+ let filepath = substitute(filepath, 'Tests.java','','')
+ let filepath = substitute(filepath, '.*\.\([A-Za-z]*\).java','\1','g')
+ elseif a:type == 5
+ let filepath = substitute(filepath, 'Tests.java','','')
+ let filepath = substitute(filepath, '.*\.\([A-Za-z]*\).java','\1','g')
+ let filepath = substitute(filepath, '.','\l&','')
+ endif
+
+ return filepath
+endfunction
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet method // {{{ ".st."method".et."<CR>/**<CR> * ".st.et."<CR> */<CR>public ".st."return".et." ".st."method".et."() {<CR>".st.et."}<CR>// }}}<CR>".st.et
+exec "Snippet jps private static final ".st."string".et." ".st.et." = \"".st.et."\";<CR>".st.et
+exec "Snippet jtc try {<CR>".st.et."<CR>} catch (".st.et." e) {<CR>".st.et."<CR>} finally {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet jlog /** Logger for this class and subclasses. */<CR><CR>protected final Log log = LogFactory.getLog(getClass());<CR>".st.et
+exec "Snippet jpv private ".st."string".et." ".st.et.";<CR><CR>".st.et
+exec "Snippet bean // {{{ set".st."fieldName:UpFirst()".et."<CR>/**<CR> * Setter for ".st."fieldName".et.".<CR> * @param new".st."fieldName:UpFirst()".et." new value for ".st."fieldName".et."<CR> */<CR>public void set".st."fieldName:UpFirst()".et."(".st."String".et." new".st."fieldName:UpFirst()".et.") {<CR>".st."fieldName".et." = new".st."fieldName:UpFirst()".et.";<CR>}<CR>// }}}<CR><CR>// {{{ get".st."fieldName:UpFirst()".et."<CR>/**<CR> * Getter for ".st."fieldName".et.".<CR> * @return ".st."fieldName".et." */<CR>public ".st."String".et." get".st."fieldName:UpFirst()".et."() {<CR>return ".st."fieldName".et.";<CR>}<CR>// }}}<CR>".st.et
+exec "Snippet jwh while (".st.et.") { // ".st.et."<CR><CR>".st.et."<CR><CR>}<CR>".st.et
+exec "Snippet sout System.out.println(\"".st.et."\");".st.et
+exec "Snippet jtest package ".st."j:JavaTestFileName(1)".et."<CR><CR>import junit.framework.TestCase;<CR>import ".st."j:JavaTestFileName(2)".et.";<CR><CR>/**<CR> * ".st."j:JavaTestFileName(3)".et."<CR> *<CR> * @author ".st.et."<CR> * @since ".st.et."<CR> */<CR>public class ".st."j:JavaTestFileName(3)".et." extends TestCase {<CR><CR>private ".st."j:JavaTestFileName(4)".et." ".st."j:JavaTestFileName(5)".et.";<CR><CR>public ".st."j:JavaTestFileName(4)".et." get".st."j:JavaTestFileName(4)".et."() { return this.".st."j:JavaTestFileName(5)".et."; }<CR>public void set".st."j:JavaTestFileName(4)".et."(".st."j:JavaTestFileName(4)".et." ".st."j:JavaTestFileName(5)".et.") { this.".st."j:JavaTestFileName(5)".et." = ".st."j:JavaTestFileName(5)".et."; }<CR><CR>public void test".st.et."() {<CR>".st.et."<CR>}<CR>}<CR>".st.et
+exec "Snippet jif if (".st.et.") { // ".st.et."<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet jelse if (".st.et.") { // ".st.et."<CR><CR>".st.et."<CR><CR>} else { // ".st.et."<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet jpm /**<CR> * ".st.et."<CR> *<CR> * @param ".st.et." ".st.et."<CR> * ".st.":D('@return')".et." ".st.et."<CR> */<CR>private ".st."void".et." ".st.et."(".st."String".et." ".st.et.") {<CR><CR>".st.et."<CR><CR>}<CR>".st.et
+exec "Snippet main public main static void main(String[] ars) {<CR>".st."\"System.exit(0)\"".et.";<CR>}<CR>".st.et
+exec "Snippet jpum /**<CR> * ".st.et."<CR> *<CR> * @param ".st.et." ".st.et."<CR> *".st.":D('@return')".et." ".st.et."<CR> */<CR>public ".st."void".et." ".st.et."(".st."String".et." ".st.et.") {<CR><CR>".st.et."<CR><CR>}<CR>".st.et
+exec "Snippet jcout <c:out value=\"${".st.et."}\" />".st.et
10 vim/after/ftplugin/javascript_snippets.vim
@@ -0,0 +1,10 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet proto ".st."className".et.".prototype.".st."methodName".et." = function(".st.et.")<CR>{<CR>".st.et."<CR>};<CR>".st.et
+exec "Snippet fun function ".st."functionName".et." (".st.et.")<CR>{<CR>".st.et."<CR>}<CR>".st.et
13 vim/after/ftplugin/latex_snippets.vim
@@ -0,0 +1,13 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet sub \\subsection{".st."name".et."}\\label{sub:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et
+exec "Snippet $$ \\[<CR>".st.et."<CR>\\]<CR>".st.et
+exec "Snippet ssub \\subsubsection{".st."name".et."}\\label{ssub:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et
+exec "Snippet itd \\item[".st."desc".et."] ".st.et
+exec "Snippet sec \\section{".st."name".et."}\\label{sec:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et
9 vim/after/ftplugin/logo_snippets.vim
@@ -0,0 +1,9 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet to to ".st."name".et." ".st."argument".et."<CR>".st.et."<CR>end<CR>".st.et
10 vim/after/ftplugin/markdown_snippets.vim
@@ -0,0 +1,10 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet img ![".st."altText".et."](".st."SRC".et.")".st.et
+exec "Snippet link [".st."desc".et."](".st."HREF".et.")".st.et
14 vim/after/ftplugin/movable type_snippets.vim
@@ -0,0 +1,14 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet cat <$MTCategoryDescription$>".st.et
+exec "Snippet blog <$MTBlogName$>".st.et
+exec "Snippet archive <$MTArchiveFile$>".st.et
+exec "Snippet cal <MTCalendarIfEntries<CR>".st.et."<CR></MTCalendarIfEntries><CR>".st.et
+exec "Snippet entry <$MTEntryMore$>".st.et
+exec "Snippet entries <MTEntriesHeader><CR>".st.et."<CR></MTEntriesHeader><CR>".st.et
56 vim/after/ftplugin/objc_snippets.vim
@@ -0,0 +1,56 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+function! UpFirst()
+ return substitute(@z,'.','\u&','')
+endfunction
+
+function! Count(haystack, needle)
+ let counter = 0
+ let index = match(a:haystack, a:needle)
+ while index > -1
+ let counter = counter + 1
+ let index = match(a:haystack, a:needle, index+1)
+ endwhile
+ return counter
+endfunction
+
+function! ObjCArgList(count)
+ " This needs to be Python specific as print expects a
+ " tuple and an empty tuple looks like this (,) so we'll need to make a
+ " special case for it
+ let st = g:snip_start_tag
+ let et = g:snip_end_tag
+
+ if a:count == 0
+ return st.et
+ else
+ return st.et.repeat(', '.st.et, a:count)
+ endif
+endfunction
+
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet cat @interface ".st."NSObject".et." (".st."Category".et.")<CR><CR>@end<CR><CR><CR>@implementation ".st."NSObject".et." (".st."Category".et.")<CR><CR>".st.et."<CR><CR>@end<CR>".st.et
+exec "Snippet delacc - (id)delegate;<CR><CR>- (void)setDelegate:(id)delegate;<CR>".st.et
+exec "Snippet ibo IBOutlet ".st."NSSomeClass".et." *".st."someClass".et.";<CR>".st.et
+exec "Snippet dict NSMutableDictionary *".st."dict".et." = [NSMutableDictionary dictionary];<CR>".st.et
+exec "Snippet Imp #import <".st.et.".h><CR>".st.et
+exec "Snippet objc @interface ".st."class".et." : ".st."NSObject".et."<CR>{<CR>}<CR>@end<CR><CR>@implementation ".st."class".et."<CR>- (id)init<CR>{<CR>self = [super init]; <CR>if (self != nil)<CR>{<CR>".st.et."<CR>}<CR>return self;<CR>}<CR>@end<CR>".st.et
+exec "Snippet imp #import \"".st.et.".h\"<CR>".st.et
+exec "Snippet bez NSBezierPath *".st."path".et." = [NSBezierPath bezierPath];<CR>".st.et
+exec "Snippet acc - (".st."\"unsigned int\"".et.")".st."thing".et."<CR>{<CR>return ".st."fThing".et.";<CR>}<CR><CR>- (void)set".st."thing:UpFirst()".et.":(".st."\"unsigned int\"".et.")new".st."thing:UpFirst()".et."<CR>{<CR>".st."fThing".et." = new".st."thing:UpFirst()".et.";<CR>}<CR>".st.et
+exec "Snippet format [NSString stringWithFormat:@\"".st.et."\", ".st.et."]".st.et
+exec "Snippet focus [self lockFocus];<CR><CR>".st.et."<CR><CR>[self unlockFocus];<CR>".st.et
+exec "Snippet setprefs [[NSUserDefaults standardUserDefaults] setObject:".st."object".et." forKey:".st."key".et."];<CR>".st.et
+exec "Snippet log NSLog(@\"%s".st."s".et."\", ".st."s:ObjCArgList(Count(@z, '%[^%]'))".et.");".st.et
+exec "Snippet gsave [NSGraphicsContext saveGraphicsState];<CR>".st.et."<CR>[NSGraphicsContext restoreGraphicsState];<CR>".st.et
+exec "Snippet forarray for(unsigned int index = 0; index < [".st."array".et." count]; index += 1)<CR>{<CR>".st."id".et."object = [".st."array".et." objectAtIndex:index];<CR>".st.et."<CR>}".st.et
+exec "Snippet classi @interface ".st."ClassName".et." : ".st."NSObject".et."<CR><CR>{".st.et."<CR><CR>}<CR><CR>".st.et."<CR><CR>@end<CR>".st.et
+exec "Snippet array NSMutableArray *".st."array".et." = [NSMutableArray array];".st.et
+exec "Snippet getprefs [[NSUserDefaults standardUserDefaults] objectForKey:<key>];".st.et
+exec "Snippet cati @interface ".st."NSObject".et." (".st."Category".et.")<CR><CR>".st.et."<CR><CR>@end<CR>".st.et
26 vim/after/ftplugin/ocaml_snippets.vim
@@ -0,0 +1,26 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet Queue Queue.fold ".st.":D('(fun b v ->)')".et." ".st."base".et." ".st."q".et."<CR>".st.et
+exec "Snippet Nativeint Nativeint.abs ".st."ni".et.st.et
+exec "Snippet Printexc Printexc.print ".st."fn".et." ".st."x".et.st.et
+exec "Snippet Sys Sys.Signal_ignore".st.et
+exec "Snippet Hashtbl Hashtbl.iter ".st.":D('(fun k v -> )')".et." ".st."h".et.st.et
+exec "Snippet Array Array.map ".st.":D('(fun a -> )')".et." ".st."arr".et.st.et
+exec "Snippet Printf Printf.fprintf ".st."buf".et." \"".st."format".et."\" ".st."args".et.st.et
+exec "Snippet Stream Stream.iter ".st.":D('(fun x -> )')".et." ".st."stream".et.st.et
+exec "Snippet Buffer Buffer.add_channel ".st."buf".et." ".st."ic".et." ".st."len".et.st.et
+exec "Snippet Int32 Int32.abs ".st."i32".et.st.et
+exec "Snippet List List.rev_map ".st.":D('(fun x -> )')".et." ".st."lst".et.st.et
+exec "Snippet Scanf Scanf.bscaf ".st."sbuf".et." \"".st."format".et."\" ".st."f".et.st.et
+exec "Snippet Int64 Int64.abs ".st."i64".et.st.et
+exec "Snippet Map Map.Make ".st.":D('(Ord : OrderedType)')".et.st.et
+exec "Snippet String String.iter ".st.":D('(fun c -> )')".et." ".st."str".et.st.et
+exec "Snippet Genlex Genlex.make_lexer ".st."\"tok_lst\"".et." ".st."\"char_stream\"".et.st.et
+exec "Snippet for for ".st."i}".et." = ".st.et." to ".st.et." do<CR>".st.et."<CR>done<CR>".st.et
+exec "Snippet Stack Stack.iter ".st.":D('(fun x -> )')".et." ".st."stk".et.st.et
23 vim/after/ftplugin/perl_snippets.vim
@@ -0,0 +1,23 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet sub sub ".st."FunctionName".et." {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet class package ".st."ClassName".et.";<CR><CR>".st.":D('use base qw(')".et.st."ParentClass".et.st.et.";<CR><CR>}sub new {<CR>my \$class = shift;<CR>\$class = ref \$class if ref \$class;<CR>my $self = bless {}, \$class;<CR>\$self;<CR>}<CR><CR>1;<CR>".st.et
+exec "Snippet xfore ".st."expression".et." foreach @".st."array".et.";".st.et
+exec "Snippet xwhile ".st."expression".et." while ".st."condition".et.";".st.et
+exec "Snippet xunless ".st."expression".et." unless ".st."condition".et.";".st.et
+exec "Snippet slurp my $".st."var".et.";<CR><CR>{ local $/ = undef; local *FILE; open FILE, \"<".st."file".et."\"; $".st."var".et." = <FILE>; close FILE }".st.et
+exec "Snippet if if (".st.et.") {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet unless unless (".st.et.") {<CR>".st."2".et."<CR>}<CR>".st.et
+exec "Snippet ifee if (".st.et.") {<CR>".st."2".et."<CR>} elsif (".st.et.") {<CR>".st.et."<CR>} else {<CR>".st.et."}<CR>}<CR>".st.et
+exec "Snippet ife if (".st.et.") {<CR>".st.et."<CR>} else {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet for for (my \$".st."var".et." = 0; \$".st."var".et." < ".st."expression".et."; \$".st."var".et."++) {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet fore foreach my \$".st."var".et." (@".st."array".et.") {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet eval eval {<CR>".st.et."<CR>};<CR>if ($@) {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet while while (".st.et.") {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet xif ".st."expression".et." if ".st."condition".et.";".st.et
30 vim/after/ftplugin/php_snippets.vim
@@ -0,0 +1,30 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet elseif elseif ( ".st."condition".et." )<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet do do<CR>{<CR>".st.et."<CR><CR>} while ( ".st.":D('$a <= 10')".et." );<CR>".st.et
+exec "Snippet reql require_once( '".st."file".et."' );<CR>".st.et
+exec "Snippet if? $".st."retVal".et." = ( ".st."condition".et." ) ? ".st."a".et." : ".st."b".et." ;<CR>".st.et
+exec "Snippet php <?php<CR><CR>".st.et."<CR><CR>?>"
+exec "Snippet switch switch ( ".st."variable".et." )<CR>{<CR>case '".st."value".et."':<CR>".st.et."<CR>break;<CR><CR>".st.et."<CR><CR>default:<CR>".st.et."<CR>break;<CR>}<CR>".st.et
+exec "Snippet class #doc<CR>#classname:".st."ClassName".et."<CR>#scope:".st."PUBLIC".et."<CR>#<CR>#/doc<CR><CR>class ".st."ClassName".et." ".st."extendsAnotherClass".et."<CR>{<CR>#internal variables<CR><CR>#Constructor<CR>function __construct ( ".st."argument".et.")<CR>{<CR>".st.et."<CR>}<CR>###<CR><CR>}<CR>###".st.et
+exec "Snippet incll include_once( '".st."file".et."' );".st.et
+exec "Snippet incl include( '".st."file".et."' );".st.et
+exec "Snippet foreach foreach( $".st."variable".et." as $".st."key".et." => $".st."value".et." )<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet ifelse if ( ".st."condition".et." )<CR>{<CR>".st.et."<CR>}<CR>else<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet $_ $_REQUEST['".st."variable".et."']<CR>".st.et
+exec "Snippet case case '".st."variable".et."':<CR>".st.et."<CR>break;<CR>".st.et
+exec "Snippet print print \"".st."string".et."\"".st.et.";".st.et."<CR>".st.et
+exec "Snippet function ".st."public".et."function ".st."FunctionName".et." (".st.et.")<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet if if ( ".st."condition".et." )<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet else else<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet array $".st."arrayName".et." = array( '".st.et."',".st.et." );".st.et
+exec "Snippet -globals $GLOBALS['".st."variable".et."']".st.et.st."something".et.st.et.";<CR>".st.et
+exec "Snippet req require( '".st."file".et."' );<CR>".st.et
+exec "Snippet for for ( $".st."i".et."=".st.et."; $".st."i".et." < ".st.et."; $".st."i".et."++ )<CR>{ <CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet while while ( ".st.et." )<CR>{<CR>".st.et."<CR>}<CR>".st.et
19 vim/after/ftplugin/phpdoc_snippets.vim
@@ -0,0 +1,19 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet doc_d /**<CR>* ".st."undocumentedConstant".et."<CR>**/<CR>define(".st.et.", ".st.et.");".st.et."<CR>".st.et
+exec "Snippet doc_vp /**<CR>* ".st."undocumentedClassVariable".et."<CR>*<CR>* @var ".st."string".et.st.et."<CR>**/".st.et."<CR>"
+exec "Snippet doc_f /**<CR>* ".st."undocumentedFunction".et."<CR>*<CR>* @return ".st."void".et."<CR>* @author ".st.et."<CR>**/<CR>".st.et."function ".st.et."(".st.et.")<CR>{".st.et."<CR>}<CR>".st.et
+exec "Snippet doc_s /**<CR>* ".st."undocumentedFunction".et."<CR>*<CR>* @return ".st."void".et."<CR>* @author ".st.et."<CR>**/<CR>".st.et."function ".st.et."(".st.et.");<CR>".st.et
+exec "Snippet doc_h /**<CR>* ".st.et."<CR>*<CR>* @author ".st.et."<CR>* @version $Id$<CR>* @copyright ".st.et.", ".st.et."<CR>* @package ".st."default".et."<CR>**/<CR><CR>/**<CR>* Define DocBlock<CR>**/<CR><CR>".st.et
+exec "Snippet doc_fp /**<CR>* ".st."undocumentedFunction".et."<CR>*<CR>* @return ".st."void".et."<CR>* @author ".st.et."<CR>**/".st.et."<CR>"
+exec "Snippet doc_i /**<CR>* ".st."undocumentedClass".et."<CR>*<CR>* @package ".st."default".et."<CR>* @author ".st.et."<CR>**/<CR>interface ".st.et."<CR>{".st.et."<CR>} // END interface ".st.et."<CR>".st.et
+exec "Snippet doc_fp /**<CR>* ".st."undocumentedConstant".et.st.et."<CR>**/".st.et."<CR>".st.et
+exec "Snippet doc_v /**<CR>* ".st."undocumentedClassVariable".et."<CR>*<CR>* @var ".st."string".et."<CR>**/<CR><var> $".st.et.";".st.et."<CR>".st.et
+exec "Snippet doc_cp /**<CR>* ".st."undocumentedClass".et."<CR>*<CR>* @package ".st."default".et."<CR>* @author ".st.et."<CR>**/".st.et
+exec "Snippet doc_c /**<CR>* ".st."undocumentedClass".et."<CR>*<CR>* @package ".st."default".et."<CR>* @author ".st.et."<CR>**/<CR>".st."class".et."class ".st."a".et."<CR>{".st.et."<CR>} // END ".st."class".et."class ".st."a".et."<CR>".st.et
14 vim/after/ftplugin/propel_snippets.vim
@@ -0,0 +1,14 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet <i <index name=\"".st."key".et."_index\"><CR><index-column name=\"".st."key".et."\" /><CR></index><CR>".st.et
+exec "Snippet <t <table name=\"".st."name".et."\" ".st.et."><CR>".st.et."<CR></table><CR>".st.et
+exec "Snippet <u <unique name=\"unique_".st."key".et."\"><CR><unique-column name=\"".st."key".et."\" /><CR></unique><CR>".st.et
+exec "Snippet <c <column name=\"".st."name".et."\" type=\"".st."type".et."\" ".st.et." /><CR>".st.et
+exec "Snippet <p <column name=\"".st."id".et."\" type=\"".st."integer".et."\" required=\"true\" primaryKey=\"true\" autoincrement=\"true\" /><CR>".st.et
+exec "Snippet <f <foreign-key foreignTable=\"".st."table".et."\"><CR><reference local=\"".st."table".et."_id\" foreign=\"<id>\"/><CR></foreign-key><CR>".st.et
87 vim/after/ftplugin/python_snippets.vim
@@ -0,0 +1,87 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+" Updates to PyInit and PyInitVars provided by grayrest.
+function! PyInit(text)
+ if a:text != "args"
+ return ', '.join(split(a:text,'\s*,\s*'),', ')
+ else
+ return ''
+ endif
+endfunction
+
+function! PyRemDefVal(text)
+ return substitute(a:text,'=.*','','g')
+endfunction
+
+function! PyInitVars(text)
+ if a:text != "args"
+ let text = substitute(a:text,'\*\*\?\k\+','','g')
+ let text = substitute(text,'=.\{-},','','g')
+ let text = substitute(text,'=.\{-}$','','g')
+ let text = substitute(text,',',' ','g')
+
+ if &expandtab
+ let tabs = indent(".")/&shiftwidth
+ let tabstr = repeat(' ',&shiftwidth)
+ else
+ let tabs = indent(".")/&tabstop
+ let tabstr = '\t'
+ endif
+ let tab_text = repeat(tabstr,tabs)
+ return join(map(split(text),'"self.".v:val." = ".v:val'),'\n'.tab_text)
+ else
+ return "pass"
+ endif
+endfunction
+
+function! Count(haystack, needle)
+ let counter = 0
+ let index = match(a:haystack, a:needle)
+ while index > -1
+ let counter = counter + 1
+ let index = match(a:haystack, a:needle, index+1)
+ endwhile
+ return counter
+endfunction
+
+function! PyArgList(count)
+ " This needs to be Python specific as print expects a
+ " tuple and an empty tuple looks like this (,) so we'll need to make a
+ " special case for it
+ let st = g:snip_start_tag
+ let et = g:snip_end_tag
+
+ if a:count == 0
+ return "()"
+ else
+ return '('.repeat(st.et.', ', a:count).')'
+ endif
+endfunction
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+" Note to users: The following method of defininf snippets is to allow for
+" changes to the default tags.
+" Feel free to define your own as so:
+" Snippet mysnip This is the expansion text.<{}>
+" There is no need to use exec if you are happy to hardcode your own start and
+" end tags
+
+exec "Snippet pf print \"".st."s".et."\" % ".st."s:PyArgList(Count(@z, '%[^%]'))".et."<CR>".st.et
+exec "Snippet get def get".st."name".et."(self): return self._".st."name".et."<CR>".st.et
+exec "Snippet classi class ".st."ClassName".et." (".st."object".et."):<CR><CR><Tab>def __init__(self".st."args:PyInit(@z)".et."):<CR><Tab><Tab>".st."args:PyInitVars(@z)".et."<CR><CR><Tab><Tab>".st.et
+exec "Snippet set def set".st."name".et."(self, ".st."newValue".et."):<CR><Tab>self._".st."name".et." = ".st."newValue:PyRemDefVal(@z)".et."<CR>".st.et
+"exec "Snippet . self.".st.et
+exec "Snippet def def ".st."fname".et."(".st."self".et."):<CR><Tab>".st."pass".et."<CR>".st.et
+" Contributed by Panos
+exec "Snippet ifn if __name__ == '__main__':<CR><Tab>".st.et
+" Contributed by Kib2
+exec "Snippet bc \"\"\"".st."description".et."\"\"\"<CR>".st.et
+exec "Snippet lc # ".st."linecomment".et."<CR>".st.et
+exec "Snippet sbl1 #!/usr/bin/env python<CR># -*- coding: Latin-1 -*-<CR>".st.et
+exec "Snippet kfor for ".st."variable".et." in ".st."ensemble".et.":<CR><Tab>".st."pass".et."<CR>".st.et
+exec "Snippet cm ".st."class".et." = classmethod(".st."class".et.")<CR>".st.et
54 vim/after/ftplugin/rails_snippets.vim
@@ -0,0 +1,54 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet mrnt rename_table \"".st."oldTableName".et."\", \"".st."newTableName".et."\"".st.et
+exec "Snippet rfu render :file => \"".st."filepath".et."\", :use_full_path => ".st."false".et.st.et
+exec "Snippet rns render :nothing => ".st."true".et.", :status => ".st.":D('401')".et.st.et
+exec "Snippet ri render :inline => \"".st.":D(\"<%= 'hello' %".et."\")>\"".st.et
+exec "Snippet rt render :text => \"".st.et."\"".st.et
+exec "Snippet mcc t.column \"".st."title".et."\", :".st."string".et.st.et
+exec "Snippet rpl render :partial => \"".st."item".et."\", :locals => { :".st."name".et." => \"".st."value".et."\"".st.et." }".st.et
+exec "Snippet rea redirect_to :action => \"".st."index".et."\"".st.et
+exec "Snippet rtlt render :text => \"".st.et."\", :layout => ".st."true".et.st.et
+exec "Snippet ft <%= form_tag :action => \"".st."update".et."\" %>".st.et
+exec "Snippet forin <% for ".st."item".et." in ".st.":D('@items')".et." %><CR><%= ".st."item".et.".".st."name".et." %><CR><% end %><CR>".st.et
+exec "Snippet lia <%= link_to \"".st.et."\", :action => \"".st."index".et."\" %>".st.et
+exec "Snippet rl render :layout => \"".st."layoutname".et."\"".st.et
+exec "Snippet ra render :action => \"".st."action".et."\"".st.et
+exec "Snippet mrnc rename_column \"".st."table".et."\", \"".st."oldColumnName".et."\", \"".st."newColumnName".et."\"".st.et
+exec "Snippet mac add_column \"".st."table".et."\", \"".st."column".et."\", :".st."string".et.st.et
+exec "Snippet rpc render :partial => \"".st."item".et."\", :collection => ".st."items".et.st.et
+exec "Snippet rec redirect_to :controller => \"".st."items".et."\"".st.et
+exec "Snippet rn render :nothing => ".st."true".et.st.et
+exec "Snippet lic <%= link_to \"".st.et."\", :controller => \"".st.et."\" %>".st.et
+exec "Snippet rpo render :partial => \"".st."item".et."\", :object => ".st."object".et.st.et
+exec "Snippet rts render :text => \"".st.et."\", :status => ".st.":D('401')".et.st.et
+exec "Snippet rcea render_component :action => \"".st."index".et."\"".st.et
+exec "Snippet recai redirect_to :controller => \"".st."items".et."\", :action => \"".st."show".et."\", :id => ".st.":D('@item')".et.st.et
+exec "Snippet mcdt create_table \"".st."table".et."\" do |t|<CR>".st.et."<CR>end<CR>".st.et."<CR>".st.et
+exec "Snippet ral render :action => \"".st."action".et."\", :layout => \"".st."layoutname".et."\"".st.et
+exec "Snippet rit render :inline => \"".st.et."\", :type => ".st.":D(':rxml')".et.st.et
+exec "Snippet rceca render_component :controller => \"".st."items".et."\", :action => \"".st."index".et."\"".st.et
+exec "Snippet licai <%= link_to \"".st.et."\", :controller => \"".st."items".et."\", :action => \"".st."edit".et."\", :id => ".st.":D('@item')".et." %>".st.et
+exec "Snippet verify verify :only => [:".st.et."], :method => :post, :render => {:status => 500, :text => \"use HTTP-POST\"}".st.et
+exec "Snippet mdt drop_table \"".st."table".et."\"".st.et
+exec "Snippet rp render :partial => \"".st."item".et."\"".st.et
+exec "Snippet rcec render_component :controller => \"".st."items".et."\"".st.et
+exec "Snippet mrc remove_column \"".st."table".et."\", \"".st."column".et."\"".st.et
+exec "Snippet mct create_table \"".st."table".et."\" do |t|<CR>".st.et."<CR>end<CR>".st.et
+exec "Snippet flash flash[:".st."notice".et."] = \"".st.et."\"".st.et
+exec "Snippet rf render :file => \"".st."filepath".et."\"".st.et
+exec "Snippet lica <%= link_to \"".st.et."\", :controller => \"".st."items".et."\", :action => \"".st."index".et."\" %>".st.et
+exec "Snippet liai <%= link_to \"".st.et."\", :action => \"".st."edit".et."\", :id => ".st.":D('@item')".et." %>".st.et
+exec "Snippet reai redirect_to :action => \"".st."show".et."\", :id => ".st.":D('@item')".et.st.et
+exec "Snippet logi logger.info \"".st.et."\"".st.et
+exec "Snippet marc add_column \"".st."table".et."\", \"".st."column".et."\", :".st."string".et."<CR><CR>".st.et."<CR>".st.et
+exec "Snippet rps render :partial => \"".st."item".et."\", :status => ".st.":D('500')".et.st.et
+exec "Snippet ril render :inline => \"".st.et."\", :locals => { ".st.":D(':name')".et." => \"".st."value".et."\"".st.et." }".st.et
+exec "Snippet rtl render :text => \"".st.et."\", :layout => \"".st.et."\"".st.et
+exec "Snippet reca redirect_to :controller => \"".st."items".et."\", :action => \"".st."list".et."\"".st.et
32 vim/after/ftplugin/ruby_snippets.vim
@@ -0,0 +1,32 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet do do<CR><Tab>".st.et."<CR>end<CR>".st.et
+exec "Snippet class class ".st."className".et."<CR><Tab>".st.et."<CR>end<CR>".st.et
+exec "Snippet begin begin<CR><Tab>".st.et."<CR>rescue ".st."Exception".et." => ".st."e".et."<CR>".st.et."end<CR>".st.et
+exec "Snippet each_with_index0 each_with_index do |".st."element".et.", ".st."index".et."|<CR><Tab>".st."element".et.".".st.et."<CR>end<CR>".st.et
+exec "Snippet collect collect { |".st."element".et."| ".st."element".et.".".st.et." }<CR><Tab>".st.et
+exec "Snippet forin for ".st."element".et." in ".st."collection".et."<CR><Tab>>".st."element".et.".".st.et."<CR>end<CR>".st.et
+exec "Snippet doo do |".st."object".et."|<CR>".st.et."<CR>end<CR>".st.et
+exec "Snippet : :".st."key".et." => \"".st."value".et."\"".st.et."<CR>".st.et
+exec "Snippet def def ".st."methodName".et."<CR><Tab>".st.et."<CR>end<CR>".st.et
+exec "Snippet case case ".st."object".et."<CR><Tab>when ".st."condition".et."<CR>".st.et."<CR>end<CR>".st.et
+exec "Snippet collecto collect do |".st."element".et."|<CR><Tab>".st."element".et.".".st.et."<CR>end<CR>".st.et
+exec "Snippet each each { |".st."element".et."| ".st."element".et.".".st.et." }<CR>".st.et
+exec "Snippet each_with_index each_with_index { |".st."element".et.", ".st."idx".et."| ".st."element".et.".".st.et." }<CR>".st.et
+exec "Snippet if if ".st."condition".et."<CR><Tab>".st.et."<CR>end<CR>".st.et
+exec "Snippet eacho each do |".st."element".et."|<CR><Tab>".st."element".et.".".st.et."<CR>end<CR>".st.et
+exec "Snippet unless unless ".st."condition".et."<CR><Tab>".st.et."<CR>end<CR>".st.et
+exec "Snippet ife if ".st."condition".et."<CR><Tab>".st.et."<CR>else<CR><Tab>".st.et."<CR>end<CR>".st.et
+exec "Snippet when when ".st."condition".et."<CR>".st.et
+exec "Snippet selecto select do |".st."element".et."|<CR><Tab>".st."element".et.".".st.et."<CR>end<CR>".st.et
+exec "Snippet injecto inject(".st."object".et.") do |".st."injection".et.", ".st."element".et."| <CR><Tab>".st.et."<CR>end<CR>".st.et
+exec "Snippet reject { |".st."element".et."| ".st."element".et.".".st.et." }<CR>".st.et
+exec "Snippet rejecto reject do |".st."element".et."| <CR><Tab>".st."element".et.".".st.et."<CR>end<CR>".st.et
+exec "Snippet inject inject(".st."object".et.") { |".st."injection".et.", ".st."element".et."| ".st.et." }<CR>".st.et
+exec "Snippet select select { |".st."element".et."| ".st."element".et.".".st.et." }<CR>".st.et
12 vim/after/ftplugin/sh_snippets.vim
@@ -0,0 +1,12 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+"Snippet !env #!/usr/bin/env ${1:${TM_SCOPE/(?:source|.*)\\.(\\w+).*/$1/}}
+exec "Snippet if if [[ ".st."condition".et." ]]; then<CR>".st.et."<CR>fi".st.et
+exec "Snippet elif elif [[ ".st."condition".et." ]]; then<CR>".st.et
+exec "Snippet for for (( ".st."i".et." = ".st.et."; ".st."i".et." ".st.et."; ".st."i".et.st.et." )); do<CR>".st.et."<CR>done".st.et
19 vim/after/ftplugin/slate_snippets.vim
@@ -0,0 +1,19 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet do do: [| :".st."each".et."| ".st.et."]<CR>".st.et
+exec "Snippet proto define: #".st."NewName".et." &parents: {".st."parents".et."} &slots: {".st."slotSpecs".et."}.<CR>".st.et
+exec "Snippet ifte ".st."condition".et." ifTrue: [".st.et.":then] ifFalse: [".st.et.":else]<CR>".st.et
+exec "Snippet collect collect: [| :".st."each".et."| ".st.et."]<CR>".st.et
+exec "Snippet if ".st."condition".et." ifTrue: [".st.et.":then]".st.et
+exec "Snippet until [".st."condition".et."] whileFalse: [".st.et.":body]".st.et
+exec "Snippet reject reject: [| :".st."each".et."| ".st.et."]<CR>".st.et
+exec "Snippet dowith doWithIndex: [| :".st."each".et." :".st."index".et." | ".st.et."]<CR>".st.et
+exec "Snippet select select: [| :".st."each".et."| ".st.et."]".st.et
+exec "Snippet while [".st."condition".et."] whileTrue: [".st.et.":body]".st.et
+exec "Snippet inject inject: ".st."object".et." [| :".st."injection".et.", :".st."each".et."| ".st.et."]".st.et
35 vim/after/ftplugin/smarty_snippets.vim
@@ -0,0 +1,35 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet {cycle {cycle values=\"#SELSTART#".st."foo".et.",".st."bar".et."#SELEND#\" name=\"default\" print=true advance=true delimiter=\",\" assign=varname }<CR>".st.et
+exec "Snippet |regex_replace |regex_replace:\"".st."regex".et."\":\"".st.et."\"".st.et
+exec "Snippet {counter {counter name=\"#INSERTION#\" start=1 skip=1 direction=\"up\" print=true<CR>assign=\"foo\" }<CR><CR>{counter}<CR>".st.et
+exec "Snippet {eval {eval var=\"#SELSTART#{template_format}#SELEND#\" assign=varname} <CR>".st.et
+"Snippet |date_format |date_format:"${1:strftime() formatting}" <CR><{}>
+exec "Snippet |truncate |truncate:".st.":D('80')".et.":".st.et.":".st."false".et.""
+exec "Snippet {if {if ".st."varname".et.st.et."<CR>\"".st."foo".et."\"}<CR><CR>{* $varname can also be a php call *}<CR><CR>".st.et."<CR><CR>{/if}<CR>".st.et
+"Snippet |string_format |string_format:"${1:sprintf formatting}" <CR><{}>
+exec "Snippet {assign {assign var=".st.et." value=\"".st.et."\"}".st.et
+exec "Snippet {foreach {foreach from=".st."varname".et." item=i [key=k name=\"\"] }<CR><CR>".st.et."<CR><CR>{/foreach}<CR><CR>".st.et
+exec "Snippet {capture {capture name=#INSERTION#}<CR><CR>#SELECT#<CR><CR>{/capture}<CR>".st.et
+exec "Snippet |wordwrap |wordwrap:".st.":D('80')".et.":\"".st.et."\":".st.et
+exec "Snippet |spacify |spacify:\"".st.et."\"".st.et." "
+exec "Snippet |default |default:\"".st.et."\"".st.et
+exec "Snippet {debug {debug output=\"#SELSTART#".st.et."#SELEND#\" }".st.et
+exec "Snippet |replace |replace:\"".st."needle".et."\":\"".st.et."\"".st.et
+exec "Snippet {include {include file=\"".st.et."\" [assign=varname foo=\"bar\"] }".st.et
+exec "Snippet |escape |escape:\"".st.et."\"".st.et
+exec "Snippet {strip {strip}<CR>".st.et."<CR>{/strip}".st.et
+exec "Snippet {math {math equation=\"".st.et."\" assign=".st.et." ".st.et."}".st.et
+exec "Snippet {config_load {config_load file=\"#INSERTION#\" [section=\"\" scope=\"local|parent|global\"] }".st.et
+exec "Snippet |cat |cat:\"".st.et."\"".st.et
+exec "Snippet {insert {insert name=\"insert_".st.et."\" [assign=varname script=\"foo.php\" foo=\"bar\"] }".st.et
+exec "Snippet {fetch {fetch file=\"#SELSTART#http:// or file#SELEND#\" assign=varname}".st.et
+exec "Snippet {literal {literal}<CR><CR>".st.et."<CR><CR>{/literal}".st.et
+exec "Snippet {include_php {include_php file=\"".st.et."\" [once=true]}".st.et
+exec "Snippet |strip |strip:[\"".st.et."\"]".st.et
21 vim/after/ftplugin/symfony_snippets.vim
@@ -0,0 +1,21 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet image_tag image_tag('".st."imageName".et."'".st.et.")".st.et
+exec "Snippet get public function get".st.et." ()<CR>{<CR>return $this->".st.et.";<CR>}<CR><CR>".st.et
+exec "Snippet link_to link_to('".st."linkName".et."', '".st."moduleName".et."/".st."actionName".et.st.et."')".st.et
+exec "Snippet sexecute public function execute<Action>()<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet set public function set".st.et." ($".st.et.")<CR>{<CR>$this->".st.et." = ".st.et.";<CR>}<CR><CR>".st.et
+exec "Snippet execute /**<CR>* ".st."className".et."<CR>*<CR>*/<CR>public function execute<Action>()<CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet tforeach <?php foreach ($".st."variable".et." as $".st."key".et.st.et."): ?><CR>".st.et."<CR><?php endforeach ?><CR>".st.et
+exec "Snippet getparam $this->getRequestParameter('".st."id".et."')".st.et
+exec "Snippet div <div".st.et."><CR>".st.et."<CR></div>".st.et
+exec "Snippet tif <?php if (".st."condition".et."): ?><CR>".st.et."<CR><?php endif ?><CR>".st.et
+exec "Snippet setget public function set".st."var".et." (".st."arg".et.")<CR>{<CR>$this->".st."arg".et." = ".st."arg".et.";<CR>}<CR><CR>public function get".st."var".et." ()<CR>{<CR>return $this->".st."var".et.";<CR>}<CR><CR>".st.et
+exec "Snippet echo <?php echo ".st.et." ?>".st.et
+exec "Snippet tfor <?php for($".st."i".et." = ".st.et."; $".st."i".et." <= ".st.et."; $".st."i".et."++): ?><CR>".st.et."<CR><?php endfor ?><CR>".st.et
14 vim/after/ftplugin/tcl_snippets.vim
@@ -0,0 +1,14 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet switch switch".st.et." -- $".st."var".et." {<CR>".st."match".et." {<CR>".st.et."<CR>}<CR>default<CR>{".st.et."}<CR>}<CR>".st.et
+exec "Snippet foreach foreach ".st."var".et." $".st."list".et." {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet proc proc ".st."name".et." {".st."args".et."} <CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet if if {".st."condition".et."} {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet for for {".st."i".et." {".st.et."} {".st.et."} {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet while while {".st."condition".et."} {<CR>".st.et."<CR>}<CR>".st.et
13 vim/after/ftplugin/template_toolkit_snippets.vim
@@ -0,0 +1,13 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet wrap [% WRAPPER ".st."template".et." %]<CR>".st.et."<CR>[% END %]<CR>".st.et
+exec "Snippet if [% IF ".st."condition".et." %]<CR>".st.et."<CR>[% ELSE %]<CR>".st.et."<CR>[% END %]<CR>".st.et
+exec "Snippet unl [% UNLESS ".st."condition".et." %]<CR>".st.et."<CR>[% END %]<CR>".st.et
+exec "Snippet inc [% INCLUDE ".st."template".et." %]<CR>".st.et
+exec "Snippet for [% FOR ".st."var".et." IN ".st."set".et." %]<CR>".st.et."<CR>[% END %]".st.et
13 vim/after/ftplugin/tex_snippets.vim
@@ -0,0 +1,13 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet sub \\subsection{".st."name".et."}\\label{sub:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et
+exec "Snippet $$ \\[<CR>".st.et."<CR>\\]<CR>".st.et
+exec "Snippet ssub \\subsubsection{".st."name".et."}\\label{ssub:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et
+exec "Snippet itd \\item[".st."desc".et."] ".st.et
+exec "Snippet sec \\section{".st."name".et."}\\label{sec:".st."name:substitute(@z,'.','\\l&','g')".et."<CR>".st.et
48 vim/after/ftplugin/xhtml_snippets.vim
@@ -0,0 +1,48 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet doctype <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"<CR>\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><CR>".st.et
+exec "Snippet aref <a href=\"".st.et."\" id=\"".st.et."\" title=\"".st.et."\">".st.et."</a>".st.et
+exec "Snippet head <head><CR>".st.et."<CR></head>".st.et
+exec "Snippet script <script type=\"text/javascript\" language=\"<javascript>\" charset=\"".st.":D('utf-8')".et."\"><CR>// <![CDATA[<CR>".st.et."<CR>// ]]><CR></script>".st.et
+exec "Snippet html <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"".st."en".et."\"<CR>lang=\"".st."en".et."\"><CR>".st.et."<CR></html>"
+exec "Snippet h3 <h3>".st.et."</h3>".st.et
+exec "Snippet h4 <h4>".st.et."</h4>".st.et
+exec "Snippet h5 <h5>".st.et."</h5>".st.et
+exec "Snippet h6 <h6>".st.et."</h6>".st.et
+exec "Snippet fieldset <fieldset><CR>".st.et."<CR></fieldset>".st.et
+exec "Snippet noscript <noscript><CR>".st.et."<CR></noscript>".st.et
+exec "Snippet ul <ul ".st.et."><CR>".st.et."<CR></ul>".st.et
+exec "Snippet xml <?xml version=\"1.0\" encoding=\"iso-8859-1\"?><CR><CR>".st.et
+exec "Snippet body <body id=\"".st.et."\" ".st.et."><CR>".st.et."<CR></body>".st.et
+exec "Snippet legend <legend align=\"".st.et."\" accesskey=\"".st.et."\"><CR>".st.et."<CR></legend>".st.et
+exec "Snippet title <title>".st."PageTitle".et."</title>".st.et
+exec "Snippet scriptsrc <script src=\"".st.et."\" type=\"text/javascript\" language=\"<javascript>\" charset=\"".st.":D('utf-8')".et."\"></script>".st.et
+exec "Snippet img <img src=\"".st.et."\" alt=\"".st.et."\" class=\"".st.et."\" />".st.et
+exec "Snippet option <option label=\"".st."label".et."\" value=\"".st."value".et."\" ".st.et."></option> ".st.et
+exec "Snippet optgroup <optgroup label=\"".st."Label".et."\"><CR>".st.et."<CR></optgroup>".st.et
+exec "Snippet meta <meta name=\"".st."name".et."\" content=\"".st."content".et."\" />".st.et
+exec "Snippet td <td".st.et.">".st.et."</td>".st.et
+exec "Snippet dt <dt>".st.et."<CR></dt><CR><dd></dd>".st.et
+exec "Snippet tfoot <tfoot><CR>".st.et."<CR></tfoot>".st.et
+exec "Snippet div <!-- begin div.<id> --><CR><div id=\"".st."id".et."\"><CR>".st.et."<CR></div><CR><!-- end div.".st."id".et." --><CR>".st.et
+exec "Snippet ol <ol ".st.et."><CR>".st.et."<CR></ol>".st.et
+exec "Snippet txtarea <textarea id=\"".st."ID".et."\" name=\"".st."Name".et."\" rows=\"".st.et."\" cols=\"".st.et."\" tabindex=\"".st.et."\" ".st.et.">".st.et."</textarea>".st.et
+exec "Snippet mailto <a href=\"mailto:".st.et."?subject=".st.et."\">".st.et."</a>".st.et
+exec "Snippet table <table summary=\"".st."Summary".et."\" class=\"".st."className".et."\" width=\"".st.":D('100%')".et."\" cellspacing=\"".st.et."\" cellpadding=\"".st.et."\" border=\"".st.et."\"><CR>".st.et."<CR></table>".st.et
+exec "Snippet hint <span class=\"hint\">".st.et."</span>".st.et
+exec "Snippet link <link rel=\"".st."stylesheet".et."\" href=\"".st.et."\" type=\"text/css\" media=\"".st."screen".et."\" title=\"".st.et."\" charset=\"".st.":D('utf-8')".et."\" />".st.et
+exec "Snippet form <form action=\"".st."urlToGoTo".et."\" method=\"".st."get".et."\" id=\"".st."formID".et."\" name=\"".st."formName".et."\"><CR>".st.et."<CR></form>".st.et
+exec "Snippet tr <tr ".st.et."><CR>".st.et."<CR></tr>".st.et
+exec "Snippet label <label for=\"".st."inputItem".et."\">".st.et."</label>".st.et
+exec "Snippet image <img src=\"".st.et."\" alt=\"".st.et."\" width=\"".st.et."\" height=\"".st.et."\" ".st.et."/>"
+exec "Snippet input <input name=\"".st.et."\" id=\"".st.et."\" type=\"radio\" value=\"".st."defaultValue".et."\" tabindex=\"".st.et."\" ".st.et." />".st.et
+exec "Snippet select <select id=\"".st."ID".et."\" name=\"".st."Name".et."\" size=\"".st.et."\" tabindex=\"".st.et."\" ".st.et."><CR>".st.et."<CR></select><CR>".st.et
+exec "Snippet style <style type=\"text/css\" media=\"".st."screen".et."\"><CR>/* <![CDATA[ */<CR>".st.et."<CR>/* ]]> */<CR></style><CR>".st.et
+exec "Snippet div.header <!-- Begin HeaderDiv:: --><CR><div id=\"HeaderDiv\"><CR><!--logo in background --><CR><h1><CompanyName></h1><CR></div><CR><!-- End HeaderDiv:: --><CR>".st.et
+exec "Snippet base <base href=\"".st.et."\" ".st.et."/>".st.et
243 vim/after/syntax/css-color.vim
@@ -0,0 +1,243 @@
+" Language: Colored CSS Color Preview
+" Maintainer: Niklas Hofer <niklas+vim@lanpartei.de>
+" URL: svn://lanpartei.de/vimrc/after/syntax/css.vim
+" Last Change: 2008 Feb 12
+" Licence: No Warranties. Do whatever you want with this. But please tell me!
+" Version: 0.6
+
+function! s:FGforBG(bg)
+ " takes a 6hex color code and returns a matching color that is visible
+ let pure = substitute(a:bg,'^#','','')
+ let r = eval('0x'.pure[0].pure[1])
+ let g = eval('0x'.pure[2].pure[3])
+ let b = eval('0x'.pure[4].pure[5])
+ if r*30 + g*59 + b*11 > 12000
+ return '#000000'
+ else
+ return '#ffffff'
+ end
+endfunction
+
+function! s:SetMatcher(clr,pat)
+ let group = 'cssColor'.substitute(a:clr,'^#','','')
+ redir => s:currentmatch
+ silent! exe 'syn list '.group
+ redir END
+ if s:currentmatch !~ a:pat.'\/'
+ exe 'syn match '.group.' /'.a:pat.'\>/ contained'
+ exe 'syn cluster cssColors add='.group
+ exe 'hi '.group.' guifg='.s:FGforBG(a:clr)
+ exe 'hi '.group.' guibg='.a:clr
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! s:SetNamedColor(clr,name)
+ let group = 'cssColor'.substitute(a:clr,'^#','','')
+ exe 'syn keyword '.group.' '.a:name.' contained'
+ exe 'syn cluster cssColors add='.group
+ exe 'hi '.group.' guifg='.s:FGforBG(a:clr)
+ exe 'hi '.group.' guibg='.a:clr
+ return 23
+endfunction
+
+function! s:PreviewCSSColorInLine(where)
+ " TODO use cssColor matchdata
+ let foundcolor = matchstr( getline(a:where), '#[0-9A-Fa-f]\{3,6\}\>' )
+ let color = ''
+ if foundcolor != ''
+ if foundcolor =~ '#\x\{6}$'
+ let color = foundcolor
+ elseif foundcolor =~ '#\x\{3}$'
+ let color = substitute(foundcolor, '\(\x\)\(\x\)\(\x\)', '\1\1\2\2\3\3', '')
+ else
+ let color = ''
+ endif
+ if color != ''
+ return s:SetMatcher(color,foundcolor)
+ else
+ return 0
+ endif
+ else
+ return 0
+ endif
+endfunction
+
+if has("gui_running")
+ " HACK modify cssDefinition to add @cssColors to its contains
+ redir => s:olddef
+ silent! syn list cssDefinition
+ redir END
+ if s:olddef != ''
+ let s:b = strridx(s:olddef,'matchgroup')
+ if s:b != -1
+ exe 'syn region cssDefinition '.strpart(s:olddef,s:b).',@cssColors'
+ endif
+ endif
+
+ " w3c Colors
+ let i = s:SetNamedColor('#800000', 'maroon')
+ let i = s:SetNamedColor('#ff0000', 'red')
+ let i = s:SetNamedColor('#ffA500', 'orange')
+ let i = s:SetNamedColor('#ffff00', 'yellow')
+ let i = s:SetNamedColor('#808000', 'olive')
+ let i = s:SetNamedColor('#800080', 'purple')
+ let i = s:SetNamedColor('#ff00ff', 'fuchsia')
+ let i = s:SetNamedColor('#ffffff', 'white')
+ let i = s:SetNamedColor('#00ff00', 'lime')
+ let i = s:SetNamedColor('#008000', 'green')
+ let i = s:SetNamedColor('#000080', 'navy')
+ let i = s:SetNamedColor('#0000ff', 'blue')
+ let i = s:SetNamedColor('#00ffff', 'aqua')
+ let i = s:SetNamedColor('#008080', 'teal')
+ let i = s:SetNamedColor('#000000', 'black')
+ let i = s:SetNamedColor('#c0c0c0', 'silver')
+ let i = s:SetNamedColor('#808080', 'gray')
+
+ " extra colors
+ let i = s:SetNamedColor('#F0F8FF','AliceBlue')
+ let i = s:SetNamedColor('#FAEBD7','AntiqueWhite')
+ let i = s:SetNamedColor('#7FFFD4','Aquamarine')
+ let i = s:SetNamedColor('#F0FFFF','Azure')
+ let i = s:SetNamedColor('#F5F5DC','Beige')
+ let i = s:SetNamedColor('#FFE4C4','Bisque')
+ let i = s:SetNamedColor('#FFEBCD','BlanchedAlmond')
+ let i = s:SetNamedColor('#8A2BE2','BlueViolet')
+ let i = s:SetNamedColor('#A52A2A','Brown')
+ let i = s:SetNamedColor('#DEB887','BurlyWood')
+ let i = s:SetNamedColor('#5F9EA0','CadetBlue')
+ let i = s:SetNamedColor('#7FFF00','Chartreuse')
+ let i = s:SetNamedColor('#D2691E','Chocolate')
+ let i = s:SetNamedColor('#FF7F50','Coral')
+ let i = s:SetNamedColor('#6495ED','CornflowerBlue')
+ let i = s:SetNamedColor('#FFF8DC','Cornsilk')
+ let i = s:SetNamedColor('#DC143C','Crimson')
+ let i = s:SetNamedColor('#00FFFF','Cyan')
+ let i = s:SetNamedColor('#00008B','DarkBlue')
+ let i = s:SetNamedColor('#008B8B','DarkCyan')
+ let i = s:SetNamedColor('#B8860B','DarkGoldenRod')
+ let i = s:SetNamedColor('#A9A9A9','DarkGray')
+ let i = s:SetNamedColor('#A9A9A9','DarkGrey')
+ let i = s:SetNamedColor('#006400','DarkGreen')
+ let i = s:SetNamedColor('#BDB76B','DarkKhaki')
+ let i = s:SetNamedColor('#8B008B','DarkMagenta')
+ let i = s:SetNamedColor('#556B2F','DarkOliveGreen')
+ let i = s:SetNamedColor('#FF8C00','Darkorange')
+ let i = s:SetNamedColor('#9932CC','DarkOrchid')
+ let i = s:SetNamedColor('#8B0000','DarkRed')
+ let i = s:SetNamedColor('#E9967A','DarkSalmon')
+ let i = s:SetNamedColor('#8FBC8F','DarkSeaGreen')
+ let i = s:SetNamedColor('#483D8B','DarkSlateBlue')
+ let i = s:SetNamedColor('#2F4F4F','DarkSlateGray')
+ let i = s:SetNamedColor('#2F4F4F','DarkSlateGrey')
+ let i = s:SetNamedColor('#00CED1','DarkTurquoise')
+ let i = s:SetNamedColor('#9400D3','DarkViolet')
+ let i = s:SetNamedColor('#FF1493','DeepPink')
+ let i = s:SetNamedColor('#00BFFF','DeepSkyBlue')
+ let i = s:SetNamedColor('#696969','DimGray')
+ let i = s:SetNamedColor('#696969','DimGrey')
+ let i = s:SetNamedColor('#1E90FF','DodgerBlue')
+ let i = s:SetNamedColor('#B22222','FireBrick')
+ let i = s:SetNamedColor('#FFFAF0','FloralWhite')
+ let i = s:SetNamedColor('#228B22','ForestGreen')
+ let i = s:SetNamedColor('#DCDCDC','Gainsboro')
+ let i = s:SetNamedColor('#F8F8FF','GhostWhite')
+ let i = s:SetNamedColor('#FFD700','Gold')
+ let i = s:SetNamedColor('#DAA520','GoldenRod')
+ let i = s:SetNamedColor('#808080','Grey')
+ let i = s:SetNamedColor('#ADFF2F','GreenYellow')
+ let i = s:SetNamedColor('#F0FFF0','HoneyDew')
+ let i = s:SetNamedColor('#FF69B4','HotPink')
+ let i = s:SetNamedColor('#CD5C5C','IndianRed')
+ let i = s:SetNamedColor('#4B0082','Indigo')
+ let i = s:SetNamedColor('#FFFFF0','Ivory')
+ let i = s:SetNamedColor('#F0E68C','Khaki')
+ let i = s:SetNamedColor('#E6E6FA','Lavender')
+ let i = s:SetNamedColor('#FFF0F5','LavenderBlush')
+ let i = s:SetNamedColor('#7CFC00','LawnGreen')
+ let i = s:SetNamedColor('#FFFACD','LemonChiffon')
+ let i = s:SetNamedColor('#ADD8E6','LightBlue')
+ let i = s:SetNamedColor('#F08080','LightCoral')
+ let i = s:SetNamedColor('#E0FFFF','LightCyan')
+ let i = s:SetNamedColor('#FAFAD2','LightGoldenRodYellow')
+ let i = s:SetNamedColor('#D3D3D3',