tomkersten-vixploder 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +105 -0
- data/PostInstall.txt +21 -0
- data/README.rdoc +131 -0
- data/Rakefile +21 -0
- data/bin/256colors2.pl +63 -0
- data/bin/colortest +365 -0
- data/bin/vixplode +10 -0
- data/lib/dotfiles/aliases +30 -0
- data/lib/dotfiles/gvimrc +20 -0
- data/lib/dotfiles/vim/.VimballRecord +2 -0
- data/lib/dotfiles/vim/after/ftplugin/actionscript_snippets.vim +9 -0
- data/lib/dotfiles/vim/after/ftplugin/aspvbs_snippets.vim +17 -0
- data/lib/dotfiles/vim/after/ftplugin/c_snippets.vim +58 -0
- data/lib/dotfiles/vim/after/ftplugin/css_snippets.vim +30 -0
- data/lib/dotfiles/vim/after/ftplugin/django_model_snippets.vim +61 -0
- data/lib/dotfiles/vim/after/ftplugin/django_template_snippets.vim +32 -0
- data/lib/dotfiles/vim/after/ftplugin/f-script_snippets.vim +14 -0
- data/lib/dotfiles/vim/after/ftplugin/haskell_snippets.vim +9 -0
- data/lib/dotfiles/vim/after/ftplugin/html_snippets.vim +57 -0
- data/lib/dotfiles/vim/after/ftplugin/java_snippets.vim +52 -0
- data/lib/dotfiles/vim/after/ftplugin/javascript_snippets.vim +10 -0
- data/lib/dotfiles/vim/after/ftplugin/latex_snippets.vim +13 -0
- data/lib/dotfiles/vim/after/ftplugin/logo_snippets.vim +9 -0
- data/lib/dotfiles/vim/after/ftplugin/markdown_snippets.vim +10 -0
- data/lib/dotfiles/vim/after/ftplugin/movable_type_snippets.vim +14 -0
- data/lib/dotfiles/vim/after/ftplugin/objc_snippets.vim +53 -0
- data/lib/dotfiles/vim/after/ftplugin/ocaml_snippets.vim +26 -0
- data/lib/dotfiles/vim/after/ftplugin/perl_snippets.vim +23 -0
- data/lib/dotfiles/vim/after/ftplugin/php_snippets.vim +30 -0
- data/lib/dotfiles/vim/after/ftplugin/phpdoc_snippets.vim +19 -0
- data/lib/dotfiles/vim/after/ftplugin/propel_snippets.vim +14 -0
- data/lib/dotfiles/vim/after/ftplugin/python_snippets.vim +202 -0
- data/lib/dotfiles/vim/after/ftplugin/rails_snippets.vim +54 -0
- data/lib/dotfiles/vim/after/ftplugin/ruby_snippets.vim +32 -0
- data/lib/dotfiles/vim/after/ftplugin/sh_snippets.vim +12 -0
- data/lib/dotfiles/vim/after/ftplugin/slate_snippets.vim +19 -0
- data/lib/dotfiles/vim/after/ftplugin/smarty_snippets.vim +35 -0
- data/lib/dotfiles/vim/after/ftplugin/symfony_snippets.vim +21 -0
- data/lib/dotfiles/vim/after/ftplugin/tcl_snippets.vim +14 -0
- data/lib/dotfiles/vim/after/ftplugin/template_toolkit_snippets.vim +13 -0
- data/lib/dotfiles/vim/after/ftplugin/tex_snippets.vim +13 -0
- data/lib/dotfiles/vim/after/ftplugin/xhtml_snippets.vim +48 -0
- data/lib/dotfiles/vim/autoload/fakeclip.vim +253 -0
- data/lib/dotfiles/vim/autoload/rails.vim +4377 -0
- data/lib/dotfiles/vim/autoload/rubycomplete.vim +802 -0
- data/lib/dotfiles/vim/colors/inkpot.vim +212 -0
- data/lib/dotfiles/vim/colors/ir_black.vim +212 -0
- data/lib/dotfiles/vim/colors/ir_black_mod.vim +213 -0
- data/lib/dotfiles/vim/colors/railscasts.vim +100 -0
- data/lib/dotfiles/vim/colors/rubyblue.vim +74 -0
- data/lib/dotfiles/vim/colors/twilight.vim +75 -0
- data/lib/dotfiles/vim/colors/twilight2.vim +74 -0
- data/lib/dotfiles/vim/colors/wombat256.vim +302 -0
- data/lib/dotfiles/vim/compiler/eruby.vim +41 -0
- data/lib/dotfiles/vim/compiler/ruby.vim +68 -0
- data/lib/dotfiles/vim/compiler/rubyunit.vim +35 -0
- data/lib/dotfiles/vim/doc/NERD_tree.txt +1235 -0
- data/lib/dotfiles/vim/doc/fakeclip.txt +190 -0
- data/lib/dotfiles/vim/doc/matchit.txt +406 -0
- data/lib/dotfiles/vim/doc/project.txt +710 -0
- data/lib/dotfiles/vim/doc/rails.txt +1123 -0
- data/lib/dotfiles/vim/doc/snippets_emu.txt +354 -0
- data/lib/dotfiles/vim/doc/surround.txt +218 -0
- data/lib/dotfiles/vim/doc/tags +433 -0
- data/lib/dotfiles/vim/filetype.vim +13 -0
- data/lib/dotfiles/vim/ftdetect/gist.vim +3 -0
- data/lib/dotfiles/vim/ftdetect/ruby.vim +14 -0
- data/lib/dotfiles/vim/ftplugin/eruby.vim +101 -0
- data/lib/dotfiles/vim/ftplugin/ruby.vim +230 -0
- data/lib/dotfiles/vim/indent/eruby.vim +73 -0
- data/lib/dotfiles/vim/indent/ruby.vim +373 -0
- data/lib/dotfiles/vim/plugin/NERD_tree.vim +3536 -0
- data/lib/dotfiles/vim/plugin/comments.vim +321 -0
- data/lib/dotfiles/vim/plugin/fakeclip.vim +174 -0
- data/lib/dotfiles/vim/plugin/fuzzyfinder.vim +1676 -0
- data/lib/dotfiles/vim/plugin/fuzzyfinder_textmate.vim +150 -0
- data/lib/dotfiles/vim/plugin/gist.vim +241 -0
- data/lib/dotfiles/vim/plugin/gitdiff.vim +141 -0
- data/lib/dotfiles/vim/plugin/matchit.vim +812 -0
- data/lib/dotfiles/vim/plugin/mru.vim +787 -0
- data/lib/dotfiles/vim/plugin/rails.vim +310 -0
- data/lib/dotfiles/vim/plugin/rspec.vim +12 -0
- data/lib/dotfiles/vim/plugin/snippets.vim +17 -0
- data/lib/dotfiles/vim/plugin/snippetsEmu.vim +973 -0
- data/lib/dotfiles/vim/plugin/supertab.vim +531 -0
- data/lib/dotfiles/vim/plugin/surround.vim +632 -0
- data/lib/dotfiles/vim/ref_vimrc +80 -0
- data/lib/dotfiles/vim/ruby/fuzzy_file_finder.rb +353 -0
- data/lib/dotfiles/vim/syntax/eruby.vim +85 -0
- data/lib/dotfiles/vim/syntax/haml.vim +113 -0
- data/lib/dotfiles/vim/syntax/mkd.vim +86 -0
- data/lib/dotfiles/vim/syntax/ruby.vim +324 -0
- data/lib/dotfiles/vim/syntax/sass.vim +93 -0
- data/lib/dotfiles/vimrc +269 -0
- data/lib/vixplode/cli.rb +73 -0
- data/lib/vixploder.rb +6 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/vixplode_cli_spec.rb +15 -0
- data/spec/vixploder_spec.rb +7 -0
- data/tasks/rspec.rake +21 -0
- metadata +202 -8
data/bin/vixplode
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Subversion
|
2
|
+
alias up='svn up --ignore-externals'
|
3
|
+
|
4
|
+
# Git
|
5
|
+
#alias gd='git diff | opendiff'
|
6
|
+
alias gst='git status'
|
7
|
+
alias gl='git pull'
|
8
|
+
alias gp='git push'
|
9
|
+
alias gc='git commit -v'
|
10
|
+
alias gca='git commit -v -a'
|
11
|
+
alias gb='git branch'
|
12
|
+
alias gba='git branch -a'
|
13
|
+
alias ga='git add'
|
14
|
+
alias g='git'
|
15
|
+
|
16
|
+
# Common command aliases
|
17
|
+
alias vil='vi $_'
|
18
|
+
|
19
|
+
# Rails
|
20
|
+
alias ss='./script/server --debugger'
|
21
|
+
alias sas='./script/autospec'
|
22
|
+
alias sc='./script/console'
|
23
|
+
alias sg='./script/generate'
|
24
|
+
|
25
|
+
# Textmate alias that will be rmeoved after we determine that it
|
26
|
+
# is inferior to vim/vi
|
27
|
+
alias mr='mate app config db features lib public test spec vendor/plugins vendor/gems'
|
28
|
+
|
29
|
+
# Load ~/.local_aliases file if it exists & is readable
|
30
|
+
[ -r ~/.local_aliases ] && . ~/.local_aliases
|
data/lib/dotfiles/gvimrc
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
colorscheme railscasts
|
2
|
+
|
3
|
+
set guioptions-=T "Hide the toolbar
|
4
|
+
|
5
|
+
" set window size
|
6
|
+
set lines=50
|
7
|
+
set columns=150
|
8
|
+
|
9
|
+
"-------- Local Overrides
|
10
|
+
"If you have options you'd like to override locally for
|
11
|
+
"some reason (don't want to store something in a
|
12
|
+
"publicly-accessible repository, machine-specific settings, etc.),
|
13
|
+
"you can create a '.local_gvimrc' file in your home directory
|
14
|
+
"(ie: ~/.local_gvimrc) and it will be 'sourced' here and override
|
15
|
+
"any settings in this file.
|
16
|
+
"
|
17
|
+
"NOTE: YOU MAY NOT WANT TO ADD ANY LINES BELOW THIS
|
18
|
+
if filereadable(expand('~/.local_gvimrc'))
|
19
|
+
source ~/.local_gvimrc
|
20
|
+
end
|
@@ -0,0 +1,2 @@
|
|
1
|
+
snippy_plugin.vba: call delete('/Users/njackson/.vim/plugin/snippetsEmu.vim')|call delete('/Users/njackson/.vim/doc/snippets_emu.txt')
|
2
|
+
snippy_bundles.vba: call delete('/Users/njackson/.vim/after/ftplugin/actionscript_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/aspvbs_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/c_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/css_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/django_model_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/django_template_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/f-script_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/haskell_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/html_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/java_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/javascript_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/latex_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/logo_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/markdown_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/movable_type_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/objc_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/ocaml_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/perl_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/php_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/phpdoc_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/propel_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/python_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/rails_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/ruby_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/sh_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/slate_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/smarty_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/symfony_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/tcl_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/template_toolkit_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/tex_snippets.vim')|call delete('/Users/njackson/.vim/after/ftplugin/xhtml_snippets.vim')
|
@@ -0,0 +1,17 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
let st = g:snip_start_tag
|
6
|
+
let et = g:snip_end_tag
|
7
|
+
let cd = g:snip_elem_delim
|
8
|
+
|
9
|
+
exec "Snippet rr Response.Redirect(".st."to".et.")".st.et.""
|
10
|
+
exec "Snippet app Application(\"".st.et."\")".st.et.""
|
11
|
+
exec "Snippet forin For ".st."var".et." in ".st."array".et."<CR>".st.et."<CR>Next<CR>".st.et.""
|
12
|
+
exec "Snippet ifelse If ".st."condition".et." Then<CR>".st.et."<CR>Else<CR>".st.et."<CR>End if<CR>".st.et.""
|
13
|
+
exec "Snippet rw Response.Write ".st.et.""
|
14
|
+
exec "Snippet sess Session(\"".st.et."\")".st.et.""
|
15
|
+
exec "Snippet rf Request.Form(\"".st.et."\")".st.et.""
|
16
|
+
exec "Snippet rq Request.QueryString(\"".st.et."\")".st.et.""
|
17
|
+
exec "Snippet while While ".st."NOT".et." ".st."condition".et."<CR>".st.et."<CR>Wend<CR>".st.et.""
|
@@ -0,0 +1,58 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
function! Count(haystack, needle)
|
6
|
+
let counter = 0
|
7
|
+
let index = match(a:haystack, a:needle)
|
8
|
+
while index > -1
|
9
|
+
let counter = counter + 1
|
10
|
+
let index = match(a:haystack, a:needle, index+1)
|
11
|
+
endwhile
|
12
|
+
return counter
|
13
|
+
endfunction
|
14
|
+
|
15
|
+
function! CArgList(count)
|
16
|
+
" This returns a list of empty tags to be used as
|
17
|
+
" argument list placeholders for the call to printf
|
18
|
+
let st = g:snip_start_tag
|
19
|
+
let et = g:snip_end_tag
|
20
|
+
if a:count == 0
|
21
|
+
return ""
|
22
|
+
else
|
23
|
+
return repeat(', '.st.et, a:count)
|
24
|
+
endif
|
25
|
+
endfunction
|
26
|
+
|
27
|
+
function! CMacroName(filename)
|
28
|
+
let name = a:filename
|
29
|
+
let name = substitute(name, '\.','_','g')
|
30
|
+
let name = substitute(name, '\(.\)','\u\1','g')
|
31
|
+
return name
|
32
|
+
endfunction
|
33
|
+
|
34
|
+
let st = g:snip_start_tag
|
35
|
+
let et = g:snip_end_tag
|
36
|
+
let cd = g:snip_elem_delim
|
37
|
+
|
38
|
+
exec "Snippet do do<CR>{<CR>".st.et."<CR>} while (".st.et.");".st.et
|
39
|
+
exec "Snippet readfile std::vector<uint8_t> v;<CR>if(FILE* fp = fopen(\"".st."filename".et."\", \"r\"))<CR>{<CR>uint8_t buf[1024];<CR>while(size_t len = fread(buf, 1, sizeof(buf), fp))<CR>v.insert(v.end(), buf, buf + len);<CR>fclose(fp);<CR>}<CR>".st.et
|
40
|
+
exec "Snippet beginend ".st."v".et.".begin(), ".st."v".et.".end()".st.et
|
41
|
+
exec "Snippet once #ifndef ``CMacroName(expand('%'))``_<CR><CR>#define ``CMacroName(expand('%'))``_<CR><CR>".st.et."<CR><CR>#endif /* ``CMacroName(expand('%'))``_ */<CR>"
|
42
|
+
"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
|
43
|
+
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.et."<CR>};<CR>".st.et
|
44
|
+
" TODO This is a good one but I can't quite work out the syntax yet
|
45
|
+
exec "Snippet printf printf(\"".st."\"%s\"".et."\\n\"".st."\"%s\":CArgList(Count(@z, '%[^%]'))".et.");<CR>".st.et
|
46
|
+
exec "Snippet vector std::vector<".st."char".et."> v".st.et.";"
|
47
|
+
exec "Snippet struct struct ".st."name".et."<CR>{<CR>".st.et."<CR>};<CR>".st.et
|
48
|
+
exec "Snippet template template <typename ".st."_InputIter".et."><CR>".st.et
|
49
|
+
" TODO this one as well. Wish I knew more C
|
50
|
+
" Snippet namespace namespace ${1:${TM_FILENAME/(.*?)\\..*/\\L$1/}}\n{\n\t$0\n};<CR>.st.et
|
51
|
+
exec "Snippet namespace namespace ".st.":substitute(expand('%'),'.','\\l&', 'g')".et."<CR>{<CR>".st.et."<CR>};<CR>".st.et
|
52
|
+
exec "Snippet map std::map<".st."key".et.", ".st."value".et."> map".st.et.";<CR>".st.et
|
53
|
+
exec "Snippet mark #if 0<CR><CR>".st.et."<CR><CR>#endif<CR><CR>".st.et
|
54
|
+
exec "Snippet if if(".st.et.")<CR>{<CR>".st.et."<CR>}<CR>".st.et
|
55
|
+
exec "Snippet main int main (int argc, char const* argv[])<CR>{<CR>".st.et."<CR>return 0;<CR>}<CR>".st.et
|
56
|
+
exec "Snippet Inc #include <".st.et."><CR>".st.et
|
57
|
+
exec "Snippet inc #include \"".st.et.".h\"".st.et
|
58
|
+
exec "Snippet for for( ".st.et." ".st."i".et." = ".st.et."; ".st."i".et." < ".st."count".et."; ".st."i".et." += ".st.et.")<CR>{<CR>".st.et."<CR>}<CR>".st.et
|
@@ -0,0 +1,30 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
let st = g:snip_start_tag
|
6
|
+
let et = g:snip_end_tag
|
7
|
+
let cd = g:snip_elem_delim
|
8
|
+
|
9
|
+
exec "Snippet visibility ".st.et.";".st.et
|
10
|
+
exec "Snippet list list-style-image: url(".st.et.");".st.et
|
11
|
+
exec "Snippet text text-shadow: rgb(".st.et.", ".st.et.", ".st.et.", ".st.et." ".st.et." ".st.et.";".st.et
|
12
|
+
exec "Snippet overflow overflow: ".st.et.";".st.et
|
13
|
+
exec "Snippet white white-space: ".st.et.";".st.et
|
14
|
+
exec "Snippet clear cursor: url(".st.et.");".st.et
|
15
|
+
exec "Snippet margin padding-top: ".st.et.";".st.et
|
16
|
+
exec "Snippet background background #".st.et." url(".st.et.") ".st.et." ".st.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
|
17
|
+
exec "Snippet word word-spaceing: ".st.et.";".st.et
|
18
|
+
exec "Snippet z z-index: ".st.et.";".st.et
|
19
|
+
exec "Snippet vertical vertical-align: ".st.et.";".st.et
|
20
|
+
exec "Snippet marker marker-offset: ".st.et.";".st.et
|
21
|
+
exec "Snippet cursor cursor: ".st.et.";".st.et
|
22
|
+
exec "Snippet border border-right: ".st.et."px ".st.et." #".st.et.";".st.et
|
23
|
+
exec "Snippet display display: block;".st.et
|
24
|
+
exec "Snippet padding padding: ".st.et." ".st.et.";".st.et
|
25
|
+
exec "Snippet letter letter-spacing: ".st.et."em;".st.et
|
26
|
+
exec "Snippet color color: rgb(".st.et.", ".st.et.", ".st.et.");".st.et
|
27
|
+
exec "Snippet font font-weight: ".st.et.";".st.et
|
28
|
+
exec "Snippet position position: ".st.et.";".st.et
|
29
|
+
exec "Snippet direction direction: ".st.et.";".st.et
|
30
|
+
exec "Snippet float float: ".st.et.";".st.et
|
@@ -0,0 +1,61 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
function! Count(haystack, needle)
|
6
|
+
let counter = 0
|
7
|
+
let index = match(a:haystack, a:needle)
|
8
|
+
while index > -1
|
9
|
+
let counter = counter + 1
|
10
|
+
let index = match(a:haystack, a:needle, index+1)
|
11
|
+
endwhile
|
12
|
+
return counter
|
13
|
+
endfunction
|
14
|
+
|
15
|
+
function! DjangoArgList(count)
|
16
|
+
" This needs to be Python specific as print expects a
|
17
|
+
" tuple and an empty tuple looks like this (,) so we'll need to make a
|
18
|
+
" special case for it
|
19
|
+
let st = g:snip_start_tag
|
20
|
+
let et = g:snip_end_tag
|
21
|
+
if a:count == 0
|
22
|
+
return "()"
|
23
|
+
else
|
24
|
+
return '('.repeat(st.et.', ', a:count).')'
|
25
|
+
endif
|
26
|
+
endfunction
|
27
|
+
|
28
|
+
let st = g:snip_start_tag
|
29
|
+
let et = g:snip_end_tag
|
30
|
+
let cd = g:snip_elem_delim
|
31
|
+
|
32
|
+
exec "Snippet mmodel class ".st.et."(models.Model):<CR>\"\"\"".st.et."\"\"\"<CR>".st.et." = ".st.et."<CR><CR>class Admin:<CR>pass<CR><CR>def __str__(self):<CR>return \"".st."s".et."\" % ".st."s:DjangoArgList(Count(@z, '%[^%]'))".et."<CR>".st.et
|
33
|
+
exec "Snippet mauto models.AutoField(".st.et.")".st.et
|
34
|
+
exec "Snippet mbool models.BooleanField()".st.et
|
35
|
+
exec "Snippet mchar models.CharField(maxlength=".st."50".et.st.et.")".st.et
|
36
|
+
exec "Snippet mcsi models.CommaSeparatedIntegerField(maxlength=".st."50".et.st.et.")".st.et
|
37
|
+
exec "Snippet mdate models.DateField(".st.et.")".st.et
|
38
|
+
exec "Snippet mdatet models.DateTimeField(".st.et.")".st.et
|
39
|
+
exec "Snippet memail models.EmailField(".st.et.")".st.et
|
40
|
+
exec "Snippet mfile models.FileField(upload_to=\"".st.et."\"".st.et.")".st.et
|
41
|
+
exec "Snippet mfilep models.FilePathField(path=\"".st.et."\"".st.et.")".st.et
|
42
|
+
exec "Snippet mfloat models.FloatField(max_digits=".st.et.", decimal_places=".st.et.")".st.et
|
43
|
+
exec "Snippet mimage models.ImageField(".st.et.")".st.et
|
44
|
+
exec "Snippet mint models.IntegerField(".st.et.")".st.et
|
45
|
+
exec "Snippet mipadd models.IPAddressField(".st.et.")".st.et
|
46
|
+
exec "Snippet mnull models.NullBooleanField()".st.et
|
47
|
+
exec "Snippet mphone models.PhoneNumberField(".st.et.")".st.et
|
48
|
+
exec "Snippet mpint models.PositiveIntegerField(".st.et.")".st.et
|
49
|
+
exec "Snippet mspint models.PositiveSmallIntegerField(".st.et.")".st.et
|
50
|
+
exec "Snippet mslug models.SlugField(".st.et.")".st.et
|
51
|
+
exec "Snippet msint models.SmallIntegerField(".st.et.")".st.et
|
52
|
+
exec "Snippet mtext models.TextField(".st.et.")".st.et
|
53
|
+
exec "Snippet mtime models.TimeField(".st.et.")".st.et
|
54
|
+
exec "Snippet murl models.URLField(verify_exists=".st."True".et.st.et.")".st.et
|
55
|
+
exec "Snippet muss models.USStateField(".st.et.")".st.et
|
56
|
+
exec "Snippet mxml models.XMLField(schema_path=\"".st.et."\"".st.et.")".st.et
|
57
|
+
exec "Snippet mfor models.ForeignKey(".st.et.")".st.et
|
58
|
+
exec "Snippet mm2o models.ForeignKey(".st.et.")".st.et
|
59
|
+
exec "Snippet mm2m models.ManyToManyField(".st.et.")".st.et
|
60
|
+
exec "Snippet mo2o models.OneToOneField(".st.et.")".st.et
|
61
|
+
exec "Snippet mman models.Manager()".st.et
|
@@ -0,0 +1,32 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
let st = g:snip_start_tag
|
6
|
+
let et = g:snip_end_tag
|
7
|
+
let cd = g:snip_elem_delim
|
8
|
+
|
9
|
+
exec "Snippet {{ {% templatetag openvariable %}".st.et
|
10
|
+
exec "Snippet }} {% templatetag closevariable %}".st.et
|
11
|
+
exec "Snippet {% {% templatetag openblock %}".st.et
|
12
|
+
exec "Snippet %} {% templatetag closeblock %}".st.et
|
13
|
+
exec "Snippet now {% now \"".st.et."\" %}".st.et
|
14
|
+
exec "Snippet firstof {% firstof ".st.et." %}".st.et
|
15
|
+
exec "Snippet ifequal {% ifequal ".st.et." ".st.et." %}<CR>".st.et."<CR>{% endifequal %}<CR>".st.et
|
16
|
+
exec "Snippet ifchanged {% ifchanged %}".st.et."{% endifchanged %}".st.et
|
17
|
+
exec "Snippet regroup {% regroup ".st.et." by ".st.et." as ".st.et." %}".st.et
|
18
|
+
exec "Snippet extends {% extends \"".st.et."\" %}<CR>".st.et
|
19
|
+
exec "Snippet filter {% filter ".st.et." %}<CR>".st.et."<CR>{% endfilter %}".st.et
|
20
|
+
exec "Snippet block {% block ".st.et." %}<CR>".st.et."<CR>{% endblock %}<CR>".st.et
|
21
|
+
exec "Snippet cycle {% cycle ".st.et." as ".st.et." %}".st.et
|
22
|
+
exec "Snippet if {% if ".st.et." %}<CR>".st.et."<CR>{% endif %}<CR>".st.et
|
23
|
+
exec "Snippet debug {% debug %}<CR>".st.et
|
24
|
+
exec "Snippet ifnotequal {% ifnotequal ".st.et." ".st.et." %}<CR>".st.et."<CR>{% endifnotequal %}<CR>".st.et
|
25
|
+
exec "Snippet include {% include ".st.et." %}<CR>".st.et
|
26
|
+
exec "Snippet comment {% comment %}<CR>".st.et."<CR>{% endcomment %}<CR>".st.et
|
27
|
+
exec "Snippet for {% for ".st.et." in ".st.et." %}<CR>".st.et."<CR>{% endfor %}<CR>".st.et
|
28
|
+
exec "Snippet ssi {% ssi ".st.et." ".st.et." %}".st.et
|
29
|
+
exec "Snippet widthratio {% widthratio ".st.et." ".st.et." ".st.et." %}".st.et
|
30
|
+
exec "Snippet load {% load ".st.et." %}<CR>".st.et
|
31
|
+
" Field snippet contributed by Alex Pounds
|
32
|
+
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
|
@@ -0,0 +1,14 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
let st = g:snip_start_tag
|
6
|
+
let et = g:snip_end_tag
|
7
|
+
let cd = g:snip_elem_delim
|
8
|
+
|
9
|
+
exec "Snippet tbd to:".st.et." by:".st.et." do:[ ".st.et." |<CR>".st.et."<CR>].".st.et
|
10
|
+
exec "Snippet it ifTrue:[<CR>".st.et."<CR>].".st.et
|
11
|
+
exec "Snippet ift ifFalse:[<CR>".st.et."<CR>] ifTrue:[<CR>".st.et."<CR>].".st.et
|
12
|
+
exec "Snippet itf ifTrue:[<CR>".st.et."<CR>] ifFalse:[<CR>".st.et."<CR>].".st.et
|
13
|
+
exec "Snippet td to:".st.et." do:[".st.et." ".st.et." |<CR>".st.et."<CR>].".st.et
|
14
|
+
exec "Snippet if ifFalse:[<CR>".st.et."<CR>].".st.et
|
@@ -0,0 +1,57 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
let st = g:snip_start_tag
|
6
|
+
let et = g:snip_end_tag
|
7
|
+
let cd = g:snip_elem_delim
|
8
|
+
|
9
|
+
function! SelectDoctype()
|
10
|
+
let st = g:snip_start_tag
|
11
|
+
let et = g:snip_end_tag
|
12
|
+
let cd = g:snip_elem_delim
|
13
|
+
let dt = inputlist(['Select doctype:',
|
14
|
+
\ '1. HTML 4.01',
|
15
|
+
\ '2. HTML 4.01 Transitional',
|
16
|
+
\ '3. HTML 4.01 Frameset',
|
17
|
+
\ '4. XHTML 1.0 Frameset',
|
18
|
+
\ '5. XHTML Strict',
|
19
|
+
\ '6. XHTML Transitional',
|
20
|
+
\ '7. XHTML Frameset'])
|
21
|
+
let dts = {1: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n\"http://www.w3.org/TR/html4/strict.dtd\">\n".st.et,
|
22
|
+
\ 2: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n".st.et,
|
23
|
+
\ 3: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\"\n\"http://www.w3.org/TR/html4/frameset.dtd\">\n".st.et,
|
24
|
+
\ 4: "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n".st.et,
|
25
|
+
\ 5: "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Strict//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n".st.et,
|
26
|
+
\ 6: "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Transitional//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n".st.et,
|
27
|
+
\ 7: "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Frameset//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n".st.et}
|
28
|
+
|
29
|
+
return dts[dt]
|
30
|
+
endfunction
|
31
|
+
|
32
|
+
exec "Snippet doct ``SelectDoctype()``"
|
33
|
+
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
|
34
|
+
exec "Snippet doc4s <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"<CR>\"http://www.w3.org/TR/html4/strict.dtd\"><CR>".st.et
|
35
|
+
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
|
36
|
+
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
|
37
|
+
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
|
38
|
+
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
|
39
|
+
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
|
40
|
+
exec "Snippet head <head><CR><meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" /><CR><title>".st.et."</title><CR>".st.et."<CR></head><CR>".st.et
|
41
|
+
exec "Snippet script <script type=\"text/javascript\" language=\"javascript\" charset=\"utf-8\"><CR>// <![CDATA[<CR><TAB>".st.et."<CR>// ]]><CR></script><CR>".st.et
|
42
|
+
exec "Snippet title <title>".st.et."</title>"
|
43
|
+
exec "Snippet body <body id=\"".st.et."\" ".st.et."><CR>".st.et."<CR></body><CR>".st.et
|
44
|
+
exec "Snippet scriptsrc <script src=\"".st.et."\" type=\"text/javascript\" language=\"".st.et."\" charset=\"".st.et."\"></script><CR>".st.et
|
45
|
+
exec "Snippet textarea <textarea name=\"".st.et."\" rows=\"".st.et."\" cols=\"".st.et."\">".st.et."</textarea><CR>".st.et
|
46
|
+
exec "Snippet meta <meta name=\"".st.et."\" content=\"".st.et."\" /><CR>".st.et
|
47
|
+
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><param name=\"src\"<CR>value=\"".st.et."\" /><CR><param name=\"controller\" value=\"".st.et."\" /><CR><param name=\"autoplay\" value=\"".st.et."\" /><CR><embed src=\"".st.et."\"<CR>width=\"".st.et."\" height=\"".st.et."\"<CR>controller=\"".st.et."\" autoplay=\"".st.et."\"<CR>scale=\"tofit\" cache=\"true\"<CR>pluginspage=\"http://www.apple.com/quicktime/download/\"<CR>/><CR></object><CR>".st.et
|
48
|
+
exec "Snippet div <div ".st.et."><CR>".st.et."<CR></div><CR>".st.et
|
49
|
+
exec "Snippet mailto <a href=\"mailto:".st.et."?subject=".st.et."\">".st.et."</a>".st.et
|
50
|
+
exec "Snippet table <table border=\"".st.et."\"".st.et." cellpadding=\"".st.et."\"><CR><tr><th>".st.et."</th></tr><CR><tr><td>".st.et."</td></tr><CR></table>"
|
51
|
+
exec "Snippet link <link rel=\"".st.et."\" href=\"".st.et."\" type=\"text/css\" media=\"".st.et."\" title=\"".st.et."\" charset=\"".st.et."\" />"
|
52
|
+
exec "Snippet form <form action=\"".st.et."\" method=\"".st.et."\"><CR>".st.et."<CR><CR><p><input type=\"submit\" value=\"Continue →\" /></p><CR></form><CR>".st.et
|
53
|
+
exec "Snippet ref <a href=\"".st.et."\">".st.et."</a>".st.et
|
54
|
+
exec "Snippet h1 <h1 id=\"".st.et."\">".st.et."</h1>".st.et
|
55
|
+
exec "Snippet input <input type=\"".st.et."\" name=\"".st.et."\" value=\"".st.et."\" ".st.et."/>".st.et
|
56
|
+
exec "Snippet style <style type=\"text/css\" media=\"screen\"><CR>/* <![CDATA[ */<CR>".st.et."<CR>/* ]]> */<CR></style><CR>".st.et
|
57
|
+
exec "Snippet base <base href=\"".st.et."\"".st.et." />".st.et
|
@@ -0,0 +1,52 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
function! UpFirst()
|
6
|
+
return substitute(@z,'.','\u&','')
|
7
|
+
endfunction
|
8
|
+
|
9
|
+
function! JavaTestFileName(type)
|
10
|
+
let filepath = expand('%:p')
|
11
|
+
let filepath = substitute(filepath, '/','.','g')
|
12
|
+
let filepath = substitute(filepath, '^.\(:\\\)\?','','')
|
13
|
+
let filepath = substitute(filepath, '\','.','g')
|
14
|
+
let filepath = substitute(filepath, ' ','','g')
|
15
|
+
let filepath = substitute(filepath, '.*test.','','')
|
16
|
+
if a:type == 1
|
17
|
+
let filepath = substitute(filepath, '.[A-Za-z]*.java','','g')
|
18
|
+
elseif a:type == 2
|
19
|
+
let filepath = substitute(filepath, 'Tests.java','','')
|
20
|
+
elseif a:type == 3
|
21
|
+
let filepath = substitute(filepath, '.*\.\([A-Za-z]*\).java','\1','g')
|
22
|
+
elseif a:type == 4
|
23
|
+
let filepath = substitute(filepath, 'Tests.java','','')
|
24
|
+
let filepath = substitute(filepath, '.*\.\([A-Za-z]*\).java','\1','g')
|
25
|
+
elseif a:type == 5
|
26
|
+
let filepath = substitute(filepath, 'Tests.java','','')
|
27
|
+
let filepath = substitute(filepath, '.*\.\([A-Za-z]*\).java','\1','g')
|
28
|
+
let filepath = substitute(filepath, '.','\l&','')
|
29
|
+
endif
|
30
|
+
|
31
|
+
return filepath
|
32
|
+
endfunction
|
33
|
+
|
34
|
+
let st = g:snip_start_tag
|
35
|
+
let et = g:snip_end_tag
|
36
|
+
let cd = g:snip_elem_delim
|
37
|
+
|
38
|
+
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
|
39
|
+
exec "Snippet jps private static final ".st."string".et." ".st.et." = \"".st.et."\";<CR>".st.et
|
40
|
+
exec "Snippet jtc try {<CR>".st.et."<CR>} catch (".st.et." e) {<CR>".st.et."<CR>} finally {<CR>".st.et."<CR>}<CR>".st.et
|
41
|
+
exec "Snippet jlog /** Logger for this class and subclasses. */<CR><CR>protected final Log log = LogFactory.getLog(getClass());<CR>".st.et
|
42
|
+
exec "Snippet jpv private ".st."string".et." ".st.et.";<CR><CR>".st.et
|
43
|
+
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
|
44
|
+
exec "Snippet jwh while (".st.et.") { // ".st.et."<CR><CR>".st.et."<CR><CR>}<CR>".st.et
|
45
|
+
exec "Snippet sout System.out.println(\"".st.et."\");".st.et
|
46
|
+
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
|
47
|
+
exec "Snippet jif if (".st.et.") { // ".st.et."<CR>".st.et."<CR>}<CR>".st.et
|
48
|
+
exec "Snippet jelse if (".st.et.") { // ".st.et."<CR><CR>".st.et."<CR><CR>} else { // ".st.et."<CR>".st.et."<CR>}<CR>".st.et
|
49
|
+
exec "Snippet jpm /**<CR> * ".st.et."<CR> *<CR> * @param ".st.et." ".st.et."<CR> * ".st.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
|
50
|
+
exec "Snippet main public main static void main(String[] ars) {<CR>".st."\"System.exit(0)\"".et.";<CR>}<CR>".st.et
|
51
|
+
exec "Snippet jpum /**<CR> * ".st.et."<CR> *<CR> * @param ".st.et." ".st.et."<CR> *".st.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
|
52
|
+
exec "Snippet jcout <c:out value=\"${".st.et."}\" />".st.et
|
@@ -0,0 +1,10 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
let st = g:snip_start_tag
|
6
|
+
let et = g:snip_end_tag
|
7
|
+
let cd = g:snip_elem_delim
|
8
|
+
|
9
|
+
exec "Snippet proto ".st."className".et.".prototype.".st."methodName".et." = function(".st.et.")<CR>{<CR>".st.et."<CR>};<CR>".st.et
|
10
|
+
exec "Snippet fun function ".st."functionName".et." (".st.et.")<CR>{<CR><Tab>".st.et."<CR><BS>}<CR>".st.et
|
@@ -0,0 +1,13 @@
|
|
1
|
+
if !exists('loaded_snippet') || &cp
|
2
|
+
finish
|
3
|
+
endif
|
4
|
+
|
5
|
+
let st = g:snip_start_tag
|
6
|
+
let et = g:snip_end_tag
|
7
|
+
let cd = g:snip_elem_delim
|
8
|
+
|
9
|
+
exec "Snippet sub \\subsection{".st."name".et."}\\label{sub:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et
|
10
|
+
exec "Snippet $$ \\[<CR>".st.et."<CR>\\]<CR>".st.et
|
11
|
+
exec "Snippet ssub \\subsubsection{".st."name".et."}\\label{ssub:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et
|
12
|
+
exec "Snippet itd \\item[".st."desc".et."] ".st.et
|
13
|
+
exec "Snippet sec \\section{".st."name".et."}\\label{sec:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et
|