tomkersten-vixploder 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +105 -0
  3. data/PostInstall.txt +21 -0
  4. data/README.rdoc +131 -0
  5. data/Rakefile +21 -0
  6. data/bin/256colors2.pl +63 -0
  7. data/bin/colortest +365 -0
  8. data/bin/vixplode +10 -0
  9. data/lib/dotfiles/aliases +30 -0
  10. data/lib/dotfiles/gvimrc +20 -0
  11. data/lib/dotfiles/vim/.VimballRecord +2 -0
  12. data/lib/dotfiles/vim/after/ftplugin/actionscript_snippets.vim +9 -0
  13. data/lib/dotfiles/vim/after/ftplugin/aspvbs_snippets.vim +17 -0
  14. data/lib/dotfiles/vim/after/ftplugin/c_snippets.vim +58 -0
  15. data/lib/dotfiles/vim/after/ftplugin/css_snippets.vim +30 -0
  16. data/lib/dotfiles/vim/after/ftplugin/django_model_snippets.vim +61 -0
  17. data/lib/dotfiles/vim/after/ftplugin/django_template_snippets.vim +32 -0
  18. data/lib/dotfiles/vim/after/ftplugin/f-script_snippets.vim +14 -0
  19. data/lib/dotfiles/vim/after/ftplugin/haskell_snippets.vim +9 -0
  20. data/lib/dotfiles/vim/after/ftplugin/html_snippets.vim +57 -0
  21. data/lib/dotfiles/vim/after/ftplugin/java_snippets.vim +52 -0
  22. data/lib/dotfiles/vim/after/ftplugin/javascript_snippets.vim +10 -0
  23. data/lib/dotfiles/vim/after/ftplugin/latex_snippets.vim +13 -0
  24. data/lib/dotfiles/vim/after/ftplugin/logo_snippets.vim +9 -0
  25. data/lib/dotfiles/vim/after/ftplugin/markdown_snippets.vim +10 -0
  26. data/lib/dotfiles/vim/after/ftplugin/movable_type_snippets.vim +14 -0
  27. data/lib/dotfiles/vim/after/ftplugin/objc_snippets.vim +53 -0
  28. data/lib/dotfiles/vim/after/ftplugin/ocaml_snippets.vim +26 -0
  29. data/lib/dotfiles/vim/after/ftplugin/perl_snippets.vim +23 -0
  30. data/lib/dotfiles/vim/after/ftplugin/php_snippets.vim +30 -0
  31. data/lib/dotfiles/vim/after/ftplugin/phpdoc_snippets.vim +19 -0
  32. data/lib/dotfiles/vim/after/ftplugin/propel_snippets.vim +14 -0
  33. data/lib/dotfiles/vim/after/ftplugin/python_snippets.vim +202 -0
  34. data/lib/dotfiles/vim/after/ftplugin/rails_snippets.vim +54 -0
  35. data/lib/dotfiles/vim/after/ftplugin/ruby_snippets.vim +32 -0
  36. data/lib/dotfiles/vim/after/ftplugin/sh_snippets.vim +12 -0
  37. data/lib/dotfiles/vim/after/ftplugin/slate_snippets.vim +19 -0
  38. data/lib/dotfiles/vim/after/ftplugin/smarty_snippets.vim +35 -0
  39. data/lib/dotfiles/vim/after/ftplugin/symfony_snippets.vim +21 -0
  40. data/lib/dotfiles/vim/after/ftplugin/tcl_snippets.vim +14 -0
  41. data/lib/dotfiles/vim/after/ftplugin/template_toolkit_snippets.vim +13 -0
  42. data/lib/dotfiles/vim/after/ftplugin/tex_snippets.vim +13 -0
  43. data/lib/dotfiles/vim/after/ftplugin/xhtml_snippets.vim +48 -0
  44. data/lib/dotfiles/vim/autoload/fakeclip.vim +253 -0
  45. data/lib/dotfiles/vim/autoload/rails.vim +4377 -0
  46. data/lib/dotfiles/vim/autoload/rubycomplete.vim +802 -0
  47. data/lib/dotfiles/vim/colors/inkpot.vim +212 -0
  48. data/lib/dotfiles/vim/colors/ir_black.vim +212 -0
  49. data/lib/dotfiles/vim/colors/ir_black_mod.vim +213 -0
  50. data/lib/dotfiles/vim/colors/railscasts.vim +100 -0
  51. data/lib/dotfiles/vim/colors/rubyblue.vim +74 -0
  52. data/lib/dotfiles/vim/colors/twilight.vim +75 -0
  53. data/lib/dotfiles/vim/colors/twilight2.vim +74 -0
  54. data/lib/dotfiles/vim/colors/wombat256.vim +302 -0
  55. data/lib/dotfiles/vim/compiler/eruby.vim +41 -0
  56. data/lib/dotfiles/vim/compiler/ruby.vim +68 -0
  57. data/lib/dotfiles/vim/compiler/rubyunit.vim +35 -0
  58. data/lib/dotfiles/vim/doc/NERD_tree.txt +1235 -0
  59. data/lib/dotfiles/vim/doc/fakeclip.txt +190 -0
  60. data/lib/dotfiles/vim/doc/matchit.txt +406 -0
  61. data/lib/dotfiles/vim/doc/project.txt +710 -0
  62. data/lib/dotfiles/vim/doc/rails.txt +1123 -0
  63. data/lib/dotfiles/vim/doc/snippets_emu.txt +354 -0
  64. data/lib/dotfiles/vim/doc/surround.txt +218 -0
  65. data/lib/dotfiles/vim/doc/tags +433 -0
  66. data/lib/dotfiles/vim/filetype.vim +13 -0
  67. data/lib/dotfiles/vim/ftdetect/gist.vim +3 -0
  68. data/lib/dotfiles/vim/ftdetect/ruby.vim +14 -0
  69. data/lib/dotfiles/vim/ftplugin/eruby.vim +101 -0
  70. data/lib/dotfiles/vim/ftplugin/ruby.vim +230 -0
  71. data/lib/dotfiles/vim/indent/eruby.vim +73 -0
  72. data/lib/dotfiles/vim/indent/ruby.vim +373 -0
  73. data/lib/dotfiles/vim/plugin/NERD_tree.vim +3536 -0
  74. data/lib/dotfiles/vim/plugin/comments.vim +321 -0
  75. data/lib/dotfiles/vim/plugin/fakeclip.vim +174 -0
  76. data/lib/dotfiles/vim/plugin/fuzzyfinder.vim +1676 -0
  77. data/lib/dotfiles/vim/plugin/fuzzyfinder_textmate.vim +150 -0
  78. data/lib/dotfiles/vim/plugin/gist.vim +241 -0
  79. data/lib/dotfiles/vim/plugin/gitdiff.vim +141 -0
  80. data/lib/dotfiles/vim/plugin/matchit.vim +812 -0
  81. data/lib/dotfiles/vim/plugin/mru.vim +787 -0
  82. data/lib/dotfiles/vim/plugin/rails.vim +310 -0
  83. data/lib/dotfiles/vim/plugin/rspec.vim +12 -0
  84. data/lib/dotfiles/vim/plugin/snippets.vim +17 -0
  85. data/lib/dotfiles/vim/plugin/snippetsEmu.vim +973 -0
  86. data/lib/dotfiles/vim/plugin/supertab.vim +531 -0
  87. data/lib/dotfiles/vim/plugin/surround.vim +632 -0
  88. data/lib/dotfiles/vim/ref_vimrc +80 -0
  89. data/lib/dotfiles/vim/ruby/fuzzy_file_finder.rb +353 -0
  90. data/lib/dotfiles/vim/syntax/eruby.vim +85 -0
  91. data/lib/dotfiles/vim/syntax/haml.vim +113 -0
  92. data/lib/dotfiles/vim/syntax/mkd.vim +86 -0
  93. data/lib/dotfiles/vim/syntax/ruby.vim +324 -0
  94. data/lib/dotfiles/vim/syntax/sass.vim +93 -0
  95. data/lib/dotfiles/vimrc +269 -0
  96. data/lib/vixplode/cli.rb +73 -0
  97. data/lib/vixploder.rb +6 -0
  98. data/script/console +10 -0
  99. data/script/destroy +14 -0
  100. data/script/generate +14 -0
  101. data/spec/spec.opts +1 -0
  102. data/spec/spec_helper.rb +10 -0
  103. data/spec/vixplode_cli_spec.rb +15 -0
  104. data/spec/vixploder_spec.rb +7 -0
  105. data/tasks/rspec.rake +21 -0
  106. metadata +202 -8
@@ -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 do do<CR>".st.et."<CR>end<CR>".st.et
10
+ exec "Snippet class class ".st."className".et."<CR>".st.et."<CR>end<CR>".st.et
11
+ exec "Snippet begin begin<CR>".st.et."<CR>rescue ".st."Exception".et." => ".st."e".et."<CR>".st.et."<CR>end<CR>".st.et
12
+ exec "Snippet each_with_index0 each_with_index do |".st."element".et.", ".st."index".et."|<CR>".st."element".et.".".st.et."<CR>end<CR>".st.et
13
+ exec "Snippet collect collect { |".st."element".et."| ".st."element".et.".".st.et." }<CR>".st.et
14
+ exec "Snippet forin for ".st."element".et." in ".st."collection".et."<CR>".st."element".et.".".st.et."<CR>end<CR>".st.et
15
+ exec "Snippet doo do |".st."object".et."|<CR>".st.et."<CR>end<CR>".st.et
16
+ exec "Snippet : :".st."key".et." => \"".st."value".et."\"".st.et."<CR>".st.et
17
+ exec "Snippet def def ".st."methodName".et."<CR>".st.et."<CR>end<CR>".st.et
18
+ exec "Snippet case case ".st."object".et."<CR>when ".st."condition".et."<CR>".st.et."<CR>end<CR>".st.et
19
+ exec "Snippet collecto collect do |".st."element".et."|<CR>".st."element".et.".".st.et."<CR>end<CR>".st.et
20
+ exec "Snippet each each { |".st."element".et."| ".st."element".et.".".st.et." }<CR>".st.et
21
+ exec "Snippet each_with_index each_with_index { |".st."element".et.", ".st."idx".et."| ".st."element".et.".".st.et." }<CR>".st.et
22
+ exec "Snippet if if ".st."condition".et."<CR>".st.et."<CR>end<CR>".st.et
23
+ exec "Snippet eacho each do |".st."element".et."|<CR>".st."element".et.".".st.et."<CR>end<CR>".st.et
24
+ exec "Snippet unless unless ".st."condition".et."<CR>".st.et."<CR>end<CR>".st.et
25
+ exec "Snippet ife if ".st."condition".et."<CR>".st.et."<CR>else<CR>".st.et."<CR>end<CR>".st.et
26
+ exec "Snippet when when ".st."condition".et."<CR>".st.et
27
+ exec "Snippet selecto select do |".st."element".et."|<CR>".st."element".et.".".st.et."<CR>end<CR>".st.et
28
+ exec "Snippet injecto inject(".st."object".et.") do |".st."injection".et.", ".st."element".et."| <CR>".st.et."<CR>end<CR>".st.et
29
+ exec "Snippet reject { |".st."element".et."| ".st."element".et.".".st.et." }<CR>".st.et
30
+ exec "Snippet rejecto reject do |".st."element".et."| <CR>".st."element".et.".".st.et."<CR>end<CR>".st.et
31
+ exec "Snippet inject inject(".st."object".et.") { |".st."injection".et.", ".st."element".et."| ".st.et." }<CR>".st.et
32
+ exec "Snippet select select { |".st."element".et."| ".st."element".et.".".st.et." }<CR>".st.et
@@ -0,0 +1,12 @@
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
+ "Snippet !env #!/usr/bin/env ${1:${TM_SCOPE/(?:source|.*)\\.(\\w+).*/$1/}}
10
+ exec "Snippet if if [[ ".st."condition".et." ]]; then<CR>".st.et."<CR>fi".st.et
11
+ exec "Snippet elif elif [[ ".st."condition".et." ]]; then<CR>".st.et
12
+ 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
@@ -0,0 +1,19 @@
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 do do: [| :".st."each".et."| ".st.et."]<CR>".st.et
10
+ exec "Snippet proto define: #".st."NewName".et." &parents: {".st."parents".et."} &slots: {".st."slotSpecs".et."}.<CR>".st.et
11
+ exec "Snippet ifte ".st."condition".et." ifTrue: [".st.et.":then] ifFalse: [".st.et.":else]<CR>".st.et
12
+ exec "Snippet collect collect: [| :".st."each".et."| ".st.et."]<CR>".st.et
13
+ exec "Snippet if ".st."condition".et." ifTrue: [".st.et.":then]".st.et
14
+ exec "Snippet until [".st."condition".et."] whileFalse: [".st.et.":body]".st.et
15
+ exec "Snippet reject reject: [| :".st."each".et."| ".st.et."]<CR>".st.et
16
+ exec "Snippet dowith doWithIndex: [| :".st."each".et." :".st."index".et." | ".st.et."]<CR>".st.et
17
+ exec "Snippet select select: [| :".st."each".et."| ".st.et."]".st.et
18
+ exec "Snippet while [".st."condition".et."] whileTrue: [".st.et.":body]".st.et
19
+ exec "Snippet inject inject: ".st."object".et." [| :".st."injection".et.", :".st."each".et."| ".st.et."]".st.et
@@ -0,0 +1,35 @@
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 {cycle {cycle values=\"#SELSTART#".st."foo".et.",".st."bar".et."#SELEND#\" name=\"default\" print=true advance=true delimiter=\",\" assign=varname }<CR>".st.et
10
+ exec "Snippet |regex_replace |regex_replace:\"".st."regex".et."\":\"".st.et."\"".st.et
11
+ exec "Snippet {counter {counter name=\"#INSERTION#\" start=1 skip=1 direction=\"up\" print=true<CR>assign=\"foo\" }<CR><CR>{counter}<CR>".st.et
12
+ exec "Snippet {eval {eval var=\"#SELSTART#{template_format}#SELEND#\" assign=varname} <CR>".st.et
13
+ "Snippet |date_format |date_format:"${1:strftime() formatting}" <CR><{}>
14
+ exec "Snippet |truncate |truncate:".st.et.":".st.et.":".st."false".et.""
15
+ 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
16
+ "Snippet |string_format |string_format:"${1:sprintf formatting}" <CR><{}>
17
+ exec "Snippet {assign {assign var=".st.et." value=\"".st.et."\"}".st.et
18
+ exec "Snippet {foreach {foreach from=".st."varname".et." item=i [key=k name=\"\"] }<CR><CR>".st.et."<CR><CR>{/foreach}<CR><CR>".st.et
19
+ exec "Snippet {capture {capture name=#INSERTION#}<CR><CR>#SELECT#<CR><CR>{/capture}<CR>".st.et
20
+ exec "Snippet |wordwrap |wordwrap:".st.et.":\"".st.et."\":".st.et
21
+ exec "Snippet |spacify |spacify:\"".st.et."\"".st.et." "
22
+ exec "Snippet |default |default:\"".st.et."\"".st.et
23
+ exec "Snippet {debug {debug output=\"#SELSTART#".st.et."#SELEND#\" }".st.et
24
+ exec "Snippet |replace |replace:\"".st."needle".et."\":\"".st.et."\"".st.et
25
+ exec "Snippet {include {include file=\"".st.et."\" [assign=varname foo=\"bar\"] }".st.et
26
+ exec "Snippet |escape |escape:\"".st.et."\"".st.et
27
+ exec "Snippet {strip {strip}<CR>".st.et."<CR>{/strip}".st.et
28
+ exec "Snippet {math {math equation=\"".st.et."\" assign=".st.et." ".st.et."}".st.et
29
+ exec "Snippet {config_load {config_load file=\"#INSERTION#\" [section=\"\" scope=\"local|parent|global\"] }".st.et
30
+ exec "Snippet |cat |cat:\"".st.et."\"".st.et
31
+ exec "Snippet {insert {insert name=\"insert_".st.et."\" [assign=varname script=\"foo.php\" foo=\"bar\"] }".st.et
32
+ exec "Snippet {fetch {fetch file=\"#SELSTART#http:// or file#SELEND#\" assign=varname}".st.et
33
+ exec "Snippet {literal {literal}<CR><CR>".st.et."<CR><CR>{/literal}".st.et
34
+ exec "Snippet {include_php {include_php file=\"".st.et."\" [once=true]}".st.et
35
+ exec "Snippet |strip |strip:[\"".st.et."\"]".st.et
@@ -0,0 +1,21 @@
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 image_tag image_tag('".st."imageName".et."'".st.et.")".st.et
10
+ exec "Snippet get public function get".st.et." ()<CR>{<CR>return $this->".st.et.";<CR>}<CR><CR>".st.et
11
+ exec "Snippet link_to link_to('".st."linkName".et."', '".st."moduleName".et."/".st."actionName".et.st.et."')".st.et
12
+ exec "Snippet sexecute public function execute<Action>()<CR>{<CR>".st.et."<CR>}<CR>".st.et
13
+ exec "Snippet set public function set".st.et." ($".st.et.")<CR>{<CR>$this->".st.et." = ".st.et.";<CR>}<CR><CR>".st.et
14
+ exec "Snippet execute /**<CR>* ".st."className".et."<CR>*<CR>*/<CR>public function execute<Action>()<CR>{<CR>".st.et."<CR>}<CR>".st.et
15
+ exec "Snippet tforeach <?php foreach ($".st."variable".et." as $".st."key".et.st.et."): ?><CR>".st.et."<CR><?php endforeach ?><CR>".st.et
16
+ exec "Snippet getparam $this->getRequestParameter('".st."id".et."')".st.et
17
+ exec "Snippet div <div".st.et."><CR>".st.et."<CR></div>".st.et
18
+ exec "Snippet tif <?php if (".st."condition".et."): ?><CR>".st.et."<CR><?php endif ?><CR>".st.et
19
+ 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
20
+ exec "Snippet echo <?php echo ".st.et." ?>".st.et
21
+ 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
@@ -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 switch switch ".st.et." -- $".st."var".et." {<CR>".st."match".et." {<CR>".st.et."<CR>}<CR>default<CR>{".st.et."}<CR>}<CR>".st.et
10
+ exec "Snippet foreach foreach ".st."var".et." $".st."list".et." {<CR>".st.et."<CR>}<CR>".st.et
11
+ exec "Snippet proc proc ".st."name".et." {".st."args".et."} <CR>{<CR>".st.et."<CR>}<CR>".st.et
12
+ exec "Snippet if if {".st."condition".et."} {<CR>".st.et."<CR>}<CR>".st.et
13
+ exec "Snippet for for {".st."i".et." {".st.et."} {".st.et."} {<CR>".st.et."<CR>}<CR>".st.et
14
+ exec "Snippet while while {".st."condition".et."} {<CR>".st.et."<CR>}<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 wrap [% WRAPPER ".st."template".et." %]<CR>".st.et."<CR>[% END %]<CR>".st.et
10
+ exec "Snippet if [% IF ".st."condition".et." %]<CR>".st.et."<CR>[% ELSE %]<CR>".st.et."<CR>[% END %]<CR>".st.et
11
+ exec "Snippet unl [% UNLESS ".st."condition".et." %]<CR>".st.et."<CR>[% END %]<CR>".st.et
12
+ exec "Snippet inc [% INCLUDE ".st."template".et." %]<CR>".st.et
13
+ exec "Snippet for [% FOR ".st."var".et." IN ".st."set".et." %]<CR>".st.et."<CR>[% END %]".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
@@ -0,0 +1,48 @@
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 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
10
+ exec "Snippet aref <a href=\"".st.et."\" id=\"".st.et."\" title=\"".st.et."\">".st.et."</a>".st.et
11
+ exec "Snippet head <head><CR>".st.et."<CR></head>".st.et
12
+ exec "Snippet script <script type=\"text/javascript\" language=\"<javascript>\" charset=\"".st.et."\"><CR>// <![CDATA[<CR>".st.et."<CR>// ]]><CR></script>".st.et
13
+ 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>"
14
+ exec "Snippet h3 <h3>".st.et."</h3>".st.et
15
+ exec "Snippet h4 <h4>".st.et."</h4>".st.et
16
+ exec "Snippet h5 <h5>".st.et."</h5>".st.et
17
+ exec "Snippet h6 <h6>".st.et."</h6>".st.et
18
+ exec "Snippet fieldset <fieldset><CR>".st.et."<CR></fieldset>".st.et
19
+ exec "Snippet noscript <noscript><CR>".st.et."<CR></noscript>".st.et
20
+ exec "Snippet ul <ul ".st.et."><CR>".st.et."<CR></ul>".st.et
21
+ exec "Snippet xml <?xml version=\"1.0\" encoding=\"iso-8859-1\"?><CR><CR>".st.et
22
+ exec "Snippet body <body id=\"".st.et."\" ".st.et."><CR>".st.et."<CR></body>".st.et
23
+ exec "Snippet legend <legend align=\"".st.et."\" accesskey=\"".st.et."\"><CR>".st.et."<CR></legend>".st.et
24
+ exec "Snippet title <title>".st."PageTitle".et."</title>".st.et
25
+ exec "Snippet scriptsrc <script src=\"".st.et."\" type=\"text/javascript\" language=\"<javascript>\" charset=\"".st.et."\"></script>".st.et
26
+ exec "Snippet img <img src=\"".st.et."\" alt=\"".st.et."\" class=\"".st.et."\" />".st.et
27
+ exec "Snippet option <option label=\"".st."label".et."\" value=\"".st."value".et."\" ".st.et."></option> ".st.et
28
+ exec "Snippet optgroup <optgroup label=\"".st."Label".et."\"><CR>".st.et."<CR></optgroup>".st.et
29
+ exec "Snippet meta <meta name=\"".st."name".et."\" content=\"".st."content".et."\" />".st.et
30
+ exec "Snippet td <td ".st.et.">".st.et."</td>".st.et
31
+ exec "Snippet dt <dt>".st.et."<CR></dt><CR><dd>".st.et."</dd>".st.et
32
+ exec "Snippet tfoot <tfoot><CR>".st.et."<CR></tfoot>".st.et
33
+ exec "Snippet div <!-- begin div.".st."id".et." --><CR><div id=\"".st."id".et."\"><CR>".st.et."<CR></div><CR><!-- end div.".st."id".et." --><CR>".st.et
34
+ exec "Snippet ol <ol ".st.et."><CR>".st.et."<CR></ol>".st.et
35
+ 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
36
+ exec "Snippet mailto <a href=\"mailto:".st.et."?subject=".st.et."\">".st.et."</a>".st.et
37
+ exec "Snippet table <table summary=\"".st."Summary".et."\" class=\"".st."className".et."\" width=\"".st.et."\" cellspacing=\"".st.et."\" cellpadding=\"".st.et."\" border=\"".st.et."\"><CR>".st.et."<CR></table>".st.et
38
+ exec "Snippet hint <span class=\"hint\">".st.et."</span>".st.et
39
+ exec "Snippet link <link rel=\"".st."stylesheet".et."\" href=\"".st.et."\" type=\"text/css\" media=\"".st."screen".et."\" title=\"".st.et."\" charset=\"".st.et."\" />".st.et
40
+ 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
41
+ exec "Snippet tr <tr ".st.et."><CR>".st.et."<CR></tr>".st.et
42
+ exec "Snippet label <label for=\"".st."inputItem".et."\">".st.et."</label>".st.et
43
+ exec "Snippet image <img src=\"".st.et."\" alt=\"".st.et."\" width=\"".st.et."\" height=\"".st.et."\" ".st.et."/>".st.et
44
+ exec "Snippet input <input name=\"".st.et."\" id=\"".st.et."\" type=\"radio\" value=\"".st."defaultValue".et."\" tabindex=\"".st.et."\" ".st.et." />".st.et
45
+ 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
46
+ exec "Snippet style <style type=\"text/css\" media=\"".st."screen".et."\"><CR>/* <![CDATA[ */<CR>".st.et."<CR>/* ]]> */<CR></style><CR>".st.et
47
+ exec "Snippet divheader <!-- Begin HeaderDiv:: --><CR><div id=\"HeaderDiv\"><CR><!--logo in background --><CR><h1>".st."CompanyName".et."</h1><CR></div><CR><!-- End HeaderDiv:: --><CR>".st.et
48
+ exec "Snippet base <base href=\"".st.et."\" ".st.et."/>".st.et
@@ -0,0 +1,253 @@
1
+ " fakeclip - pseude clipboard register for non-GUI version of Vim
2
+ " Version: 0.2.1
3
+ " Copyright (C) 2008 kana <http://whileimautomaton.net/>
4
+ " License: MIT license {{{
5
+ " Permission is hereby granted, free of charge, to any person obtaining
6
+ " a copy of this software and associated documentation files (the
7
+ " "Software"), to deal in the Software without restriction, including
8
+ " without limitation the rights to use, copy, modify, merge, publish,
9
+ " distribute, sublicense, and/or sell copies of the Software, and to
10
+ " permit persons to whom the Software is furnished to do so, subject to
11
+ " the following conditions:
12
+ "
13
+ " The above copyright notice and this permission notice shall be included
14
+ " in all copies or substantial portions of the Software.
15
+ "
16
+ " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ " OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ " MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ " IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ " CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ " TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ " SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+ " }}}
24
+ " Platform detection "{{{1
25
+
26
+ if has('macunix') || system('uname') =~? '^darwin'
27
+ let s:PLATFORM = 'mac'
28
+ elseif has('win32unix')
29
+ let s:PLATFORM = 'cygwin'
30
+ else
31
+ let s:PLATFORM = 'unknown'
32
+ endif
33
+
34
+
35
+ call system('which screen') " FIXME: Non *nix platform
36
+ let s:SCREEN_AVAILABLE_P = v:shell_error == 0
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+ " Interface "{{{1
46
+ function! fakeclip#clipboard_yank(motion_type) "{{{2
47
+ return fakeclip#yank('clipboard', a:motion_type)
48
+ endfunction
49
+
50
+
51
+
52
+
53
+ function! fakeclip#content(system_type) "{{{2
54
+ return s:read_{a:system_type}()
55
+ endfunction
56
+
57
+
58
+
59
+
60
+ function! fakeclip#put(system_type, motion_type, put_type) "{{{2
61
+ let r_ = s:save_register('"')
62
+ let @@ = fakeclip#content(a:system_type)
63
+
64
+ if a:motion_type == ''
65
+ execute 'normal!' s:count().a:put_type
66
+ call s:restore_register('"', r_)
67
+ else
68
+ call s:select_last_motion(a:motion_type)
69
+ execute 'normal!' s:count().a:put_type
70
+ endif
71
+ endfunction
72
+
73
+
74
+
75
+
76
+ function! fakeclip#screen_yank(motion_type) "{{{2
77
+ return fakeclip#yank('screen', a:motion_type)
78
+ endfunction
79
+
80
+
81
+
82
+
83
+ function! fakeclip#yank(system_type, motion_type) "{{{2
84
+ let r0 = s:save_register('0')
85
+
86
+ call s:select_last_motion(a:motion_type)
87
+ normal! y
88
+ call s:write_{a:system_type}(@@)
89
+
90
+ call s:restore_register('0', r0)
91
+ endfunction
92
+
93
+
94
+
95
+
96
+ function! fakeclip#yank_Y(system_type) "{{{2
97
+ let diff = s:count() - 1
98
+ normal! V
99
+ if 0 < diff
100
+ execute 'normal!' diff.'j'
101
+ endif
102
+ execute 'normal' (a:system_type ==# 'clipboard'
103
+ \ ? "\<Plug>(fakeclip-Y)"
104
+ \ : "\<Plug>(fakeclip-screen-Y)")
105
+ endfunction
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ " Core "{{{1
115
+ function! s:read_clipboard() "{{{2
116
+ return s:read_clipboard_{s:PLATFORM}()
117
+ endfunction
118
+
119
+
120
+ function! s:read_clipboard_mac()
121
+ return system('pbpaste')
122
+ endfunction
123
+
124
+
125
+ function! s:read_clipboard_cygwin()
126
+ let content = ''
127
+ for line in readfile('/dev/clipboard', 'b')
128
+ let content = content . "\x0A" . substitute(line, "\x0D", '', 'g')
129
+ endfor
130
+ return content[1:]
131
+ endfunction
132
+
133
+
134
+ function! s:read_clipboard_unknown()
135
+ echoerr 'Getting the clipboard content is not supported on this platform:'
136
+ \ s:PLATFORM
137
+ return ''
138
+ endfunction
139
+
140
+
141
+
142
+
143
+ function! s:read_screen() "{{{2
144
+ if s:SCREEN_AVAILABLE_P
145
+ let _ = tempname()
146
+ call system('screen -X writebuf ' . fnameescape(_))
147
+ let content = join(readfile(_, 'b'), "\n")
148
+ call delete(_)
149
+ return content
150
+ else
151
+ echoerr 'GNU screen is not available'
152
+ return ''
153
+ endif
154
+ endfunction
155
+
156
+
157
+
158
+
159
+ function! s:write_clipboard(text) "{{{2
160
+ call s:write_clipboard_{s:PLATFORM}(a:text)
161
+ return
162
+ endfunction
163
+
164
+
165
+ function! s:write_clipboard_mac(text)
166
+ call system('pbcopy', a:text)
167
+ return
168
+ endfunction
169
+
170
+
171
+ function! s:write_clipboard_cygwin(text)
172
+ call writefile(split(a:text, "\x0A", 1), '/dev/clipboard', 'b')
173
+ return
174
+ endfunction
175
+
176
+
177
+ function! s:write_clipboard_unknown(text)
178
+ echoerr 'Yanking into the clipboard is not supported on this platform:'
179
+ \ s:PLATFORM
180
+ return
181
+ endfunction
182
+
183
+
184
+
185
+
186
+ function! s:write_screen(text) "{{{2
187
+ if s:SCREEN_AVAILABLE_P
188
+ let _ = tempname()
189
+ call writefile([a:text], _, 'b')
190
+ call system('screen -X readbuf ' . fnameescape(_))
191
+ call delete(_)
192
+ else
193
+ echoerr 'GNU screen is not available'
194
+ endif
195
+ return
196
+ endfunction
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+ " Misc. "{{{1
206
+ function! s:count() "{{{2
207
+ return (v:count == v:count1) ? v:count : ''
208
+ endfunction
209
+
210
+
211
+
212
+
213
+ function! s:restore_register(regname, reginfo) "{{{2
214
+ call setreg(a:regname, a:reginfo[0], a:reginfo[1])
215
+ return
216
+ endfunction
217
+
218
+
219
+
220
+
221
+ function! s:save_register(regname) "{{{2
222
+ return [getreg(a:regname), getregtype(a:regname)]
223
+ endfunction
224
+
225
+
226
+
227
+
228
+ function! s:select_last_motion(motion_type) "{{{2
229
+ let orig_selection = &selection
230
+ let &selection = 'inclusive'
231
+
232
+ if a:motion_type == 'char'
233
+ normal! `[v`]
234
+ elseif a:motion_type == 'line'
235
+ normal! '[V']
236
+ elseif a:motion_type == 'block'
237
+ execute "normal! `[\<C-v>`]"
238
+ else " invoked from visual mode
239
+ normal! gv
240
+ endif
241
+
242
+ let &selection = orig_selection
243
+ endfunction
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+ " __END__ "{{{1
253
+ " vim: foldmethod=marker