Skip to content

Commit

Permalink
added vim plugins and more snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjm committed Oct 11, 2012
1 parent ce2f57c commit acef182
Show file tree
Hide file tree
Showing 55 changed files with 7,121 additions and 155 deletions.
896 changes: 896 additions & 0 deletions vim/doc/command-t.txt

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions vim/doc/tags
Expand Up @@ -21,6 +21,11 @@
'snippets' snipMate.txt /*'snippets'*
.snippet snipMate.txt /*.snippet*
.snippets snipMate.txt /*.snippets*
:CommandT command-t.txt /*:CommandT*
:CommandTBuffer command-t.txt /*:CommandTBuffer*
:CommandTFlush command-t.txt /*:CommandTFlush*
:CommandTJumps command-t.txt /*:CommandTJumps*
:CommandTTag command-t.txt /*:CommandTTag*
:FufAddBookmark fuf.txt /*:FufAddBookmark*
:FufAddBookmarkAsSelectedText fuf.txt /*:FufAddBookmarkAsSelectedText*
:FufBookmark fuf.txt /*:FufBookmark*
Expand Down Expand Up @@ -118,7 +123,61 @@ NERDTreeRender() NERD_tree.txt /*NERDTreeRender()*
NERD_tree.txt NERD_tree.txt /*NERD_tree.txt*
ResetSnippets() snipMate.txt /*ResetSnippets()*
TCommentDefineType() tComment.txt /*TCommentDefineType()*
Tabular.txt Tabular.txt /*Tabular.txt*
[<Space> unimpaired.txt /*[<Space>*
[A unimpaired.txt /*[A*
[B unimpaired.txt /*[B*
[L unimpaired.txt /*[L*
[Q unimpaired.txt /*[Q*
[a unimpaired.txt /*[a*
[b unimpaired.txt /*[b*
[e unimpaired.txt /*[e*
[l unimpaired.txt /*[l*
[o unimpaired.txt /*[o*
[q unimpaired.txt /*[q*
[u unimpaired.txt /*[u*
[uu unimpaired.txt /*[uu*
[x unimpaired.txt /*[x*
[xx unimpaired.txt /*[xx*
[y unimpaired.txt /*[y*
[yy unimpaired.txt /*[yy*
]<Space> unimpaired.txt /*]<Space>*
]A unimpaired.txt /*]A*
]B unimpaired.txt /*]B*
]L unimpaired.txt /*]L*
]Q unimpaired.txt /*]Q*
]a unimpaired.txt /*]a*
]b unimpaired.txt /*]b*
]e unimpaired.txt /*]e*
]l unimpaired.txt /*]l*
]o unimpaired.txt /*]o*
]q unimpaired.txt /*]q*
]u unimpaired.txt /*]u*
]uu unimpaired.txt /*]uu*
]x unimpaired.txt /*]x*
]xx unimpaired.txt /*]xx*
]y unimpaired.txt /*]y*
]yy unimpaired.txt /*]yy*
abc fuf.txt /*abc*
command-t command-t.txt /*command-t*
command-t-authors command-t.txt /*command-t-authors*
command-t-commands command-t.txt /*command-t-commands*
command-t-contents command-t.txt /*command-t-contents*
command-t-development command-t.txt /*command-t-development*
command-t-donations command-t.txt /*command-t-donations*
command-t-history command-t.txt /*command-t-history*
command-t-installation command-t.txt /*command-t-installation*
command-t-intro command-t.txt /*command-t-intro*
command-t-license command-t.txt /*command-t-license*
command-t-mappings command-t.txt /*command-t-mappings*
command-t-options command-t.txt /*command-t-options*
command-t-pathogen command-t.txt /*command-t-pathogen*
command-t-requirements command-t.txt /*command-t-requirements*
command-t-trouble-shooting command-t.txt /*command-t-trouble-shooting*
command-t-usage command-t.txt /*command-t-usage*
command-t-website command-t.txt /*command-t-website*
command-t-wildignore command-t.txt /*command-t-wildignore*
command-t.txt command-t.txt /*command-t.txt*
config/rails.vim rails.txt /*config\/rails.vim*
cs surround.txt /*cs*
ds surround.txt /*ds*
Expand Down Expand Up @@ -179,7 +238,71 @@ fuf-thanks fuf.txt /*fuf-thanks*
fuf-usage fuf.txt /*fuf-usage*
fuf-vimrc-example fuf.txt /*fuf-vimrc-example*
fuf.txt fuf.txt /*fuf.txt*
fugitive fugitive.txt /*fugitive*
fugitive#statusline() fugitive.txt /*fugitive#statusline()*
fugitive-:Gblame fugitive.txt /*fugitive-:Gblame*
fugitive-:Gcd fugitive.txt /*fugitive-:Gcd*
fugitive-:Gcommit fugitive.txt /*fugitive-:Gcommit*
fugitive-:Gdiff fugitive.txt /*fugitive-:Gdiff*
fugitive-:Gdiff! fugitive.txt /*fugitive-:Gdiff!*
fugitive-:Ge fugitive.txt /*fugitive-:Ge*
fugitive-:Gedit fugitive.txt /*fugitive-:Gedit*
fugitive-:Ggrep fugitive.txt /*fugitive-:Ggrep*
fugitive-:Git fugitive.txt /*fugitive-:Git*
fugitive-:Glcd fugitive.txt /*fugitive-:Glcd*
fugitive-:Glog fugitive.txt /*fugitive-:Glog*
fugitive-:Gmove fugitive.txt /*fugitive-:Gmove*
fugitive-:Gpedit fugitive.txt /*fugitive-:Gpedit*
fugitive-:Gread fugitive.txt /*fugitive-:Gread*
fugitive-:Gread! fugitive.txt /*fugitive-:Gread!*
fugitive-:Gremove fugitive.txt /*fugitive-:Gremove*
fugitive-:Gsplit fugitive.txt /*fugitive-:Gsplit*
fugitive-:Gstatus fugitive.txt /*fugitive-:Gstatus*
fugitive-:Gtabedit fugitive.txt /*fugitive-:Gtabedit*
fugitive-:Gvsplit fugitive.txt /*fugitive-:Gvsplit*
fugitive-:Gwrite fugitive.txt /*fugitive-:Gwrite*
fugitive-<CR> fugitive.txt /*fugitive-<CR>*
fugitive-C fugitive.txt /*fugitive-C*
fugitive-O fugitive.txt /*fugitive-O*
fugitive-P fugitive.txt /*fugitive-P*
fugitive-a fugitive.txt /*fugitive-a*
fugitive-about fugitive.txt /*fugitive-about*
fugitive-author fugitive.txt /*fugitive-author*
fugitive-commands fugitive.txt /*fugitive-commands*
fugitive-mappings fugitive.txt /*fugitive-mappings*
fugitive-o fugitive.txt /*fugitive-o*
fugitive-revision fugitive.txt /*fugitive-revision*
fugitive-statusline fugitive.txt /*fugitive-statusline*
fugitive-~ fugitive.txt /*fugitive-~*
fugitive.txt fugitive.txt /*fugitive.txt*
fuzzyfinder fuf.txt /*fuzzyfinder*
g:CommandTAcceptSelectionMap command-t.txt /*g:CommandTAcceptSelectionMap*
g:CommandTAcceptSelectionSplitMap command-t.txt /*g:CommandTAcceptSelectionSplitMap*
g:CommandTAcceptSelectionTabMap command-t.txt /*g:CommandTAcceptSelectionTabMap*
g:CommandTAcceptSelectionVSplitMap command-t.txt /*g:CommandTAcceptSelectionVSplitMap*
g:CommandTAlwaysShowDotFiles command-t.txt /*g:CommandTAlwaysShowDotFiles*
g:CommandTBackspaceMap command-t.txt /*g:CommandTBackspaceMap*
g:CommandTCancelMap command-t.txt /*g:CommandTCancelMap*
g:CommandTClearMap command-t.txt /*g:CommandTClearMap*
g:CommandTCursorEndMap command-t.txt /*g:CommandTCursorEndMap*
g:CommandTCursorLeftMap command-t.txt /*g:CommandTCursorLeftMap*
g:CommandTCursorRightMap command-t.txt /*g:CommandTCursorRightMap*
g:CommandTCursorStartMap command-t.txt /*g:CommandTCursorStartMap*
g:CommandTDeleteMap command-t.txt /*g:CommandTDeleteMap*
g:CommandTMatchWindowAtTop command-t.txt /*g:CommandTMatchWindowAtTop*
g:CommandTMatchWindowReverse command-t.txt /*g:CommandTMatchWindowReverse*
g:CommandTMaxCachedDirectories command-t.txt /*g:CommandTMaxCachedDirectories*
g:CommandTMaxDepth command-t.txt /*g:CommandTMaxDepth*
g:CommandTMaxFiles command-t.txt /*g:CommandTMaxFiles*
g:CommandTMaxHeight command-t.txt /*g:CommandTMaxHeight*
g:CommandTMinHeight command-t.txt /*g:CommandTMinHeight*
g:CommandTNeverShowDotFiles command-t.txt /*g:CommandTNeverShowDotFiles*
g:CommandTRefreshMap command-t.txt /*g:CommandTRefreshMap*
g:CommandTScanDotDirectories command-t.txt /*g:CommandTScanDotDirectories*
g:CommandTSelectNextMap command-t.txt /*g:CommandTSelectNextMap*
g:CommandTSelectPrevMap command-t.txt /*g:CommandTSelectPrevMap*
g:CommandTTagIncludeFilenames command-t.txt /*g:CommandTTagIncludeFilenames*
g:CommandTToggleFocusMap command-t.txt /*g:CommandTToggleFocusMap*
g:fuf_abbrevMap fuf.txt /*g:fuf_abbrevMap*
g:fuf_bookmark_keyDelete fuf.txt /*g:fuf_bookmark_keyDelete*
g:fuf_bookmark_prompt fuf.txt /*g:fuf_bookmark_prompt*
Expand Down Expand Up @@ -464,6 +587,27 @@ tComment-Key-Bindings tComment.txt /*tComment-Key-Bindings*
tComment-Usage tComment.txt /*tComment-Usage*
tComment-commands tComment.txt /*tComment-commands*
tComment.txt tComment.txt /*tComment.txt*
tabular Tabular.txt /*tabular*
tabular-intro Tabular.txt /*tabular-intro*
tabular-scripting Tabular.txt /*tabular-scripting*
tabular-toc Tabular.txt /*tabular-toc*
tabular-walkthrough Tabular.txt /*tabular-walkthrough*
tabular.vim Tabular.txt /*tabular.vim*
unimpaired unimpaired.txt /*unimpaired*
unimpaired-author unimpaired.txt /*unimpaired-author*
unimpaired-encoding unimpaired.txt /*unimpaired-encoding*
unimpaired-lines unimpaired.txt /*unimpaired-lines*
unimpaired-next unimpaired.txt /*unimpaired-next*
unimpaired-todo unimpaired.txt /*unimpaired-todo*
unimpaired.txt unimpaired.txt /*unimpaired.txt*
v_[e unimpaired.txt /*v_[e*
v_[u unimpaired.txt /*v_[u*
v_[x unimpaired.txt /*v_[x*
v_[y unimpaired.txt /*v_[y*
v_]e unimpaired.txt /*v_]e*
v_]u unimpaired.txt /*v_]u*
v_]x unimpaired.txt /*v_]x*
v_]y unimpaired.txt /*v_]y*
vs surround.txt /*vs*
yS surround.txt /*yS*
ySS surround.txt /*ySS*
Expand Down
2 changes: 2 additions & 0 deletions vim/ftdetect/markdown.vim
@@ -0,0 +1,2 @@
" Markdown
autocmd BufNewFile,BufRead *.{md,mkd,mkdn,mark*} set filetype=markdown
21 changes: 21 additions & 0 deletions vim/ftplugin/markdown.vim
@@ -0,0 +1,21 @@
" Vim filetype plugin
" Language: Markdown
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>

if exists("b:did_ftplugin")
finish
endif

runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim

setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+

if exists('b:undo_ftplugin')
let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
else
let b:undo_ftplugin = "setl cms< com< fo< flp<"
endif

" vim:set sw=2:
186 changes: 186 additions & 0 deletions vim/plugin/command-t.vim
@@ -0,0 +1,186 @@
" command-t.vim
" Copyright 2010-2012 Wincent Colaiuta. All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions are met:
"
" 1. Redistributions of source code must retain the above copyright notice,
" this list of conditions and the following disclaimer.
" 2. Redistributions in binary form must reproduce the above copyright notice,
" this list of conditions and the following disclaimer in the documentation
" and/or other materials provided with the distribution.
"
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
" POSSIBILITY OF SUCH DAMAGE.

if exists("g:command_t_loaded") || &cp
finish
endif
let g:command_t_loaded = 1

command CommandTBuffer call <SID>CommandTShowBufferFinder()
command CommandTJump call <SID>CommandTShowJumpFinder()
command CommandTTag call <SID>CommandTShowTagFinder()
command -nargs=? -complete=dir CommandT call <SID>CommandTShowFileFinder(<q-args>)
command CommandTFlush call <SID>CommandTFlush()

if !hasmapto(':CommandT<CR>')
silent! nnoremap <unique> <silent> <Leader>t :CommandT<CR>
endif

if !hasmapto(':CommandTBuffer<CR>')
silent! nnoremap <unique> <silent> <Leader>b :CommandTBuffer<CR>
endif

function s:CommandTRubyWarning()
echohl WarningMsg
echo "command-t.vim requires Vim to be compiled with Ruby support"
echo "For more information type: :help command-t"
echohl none
endfunction

function s:CommandTShowBufferFinder()
if has('ruby')
ruby $command_t.show_buffer_finder
else
call s:CommandTRubyWarning()
endif
endfunction

function s:CommandTShowFileFinder(arg)
if has('ruby')
ruby $command_t.show_file_finder
else
call s:CommandTRubyWarning()
endif
endfunction

function s:CommandTShowJumpFinder()
if has('ruby')
ruby $command_t.show_jump_finder
else
call s:CommandTRubyWarning()
endif
endfunction

function s:CommandTShowTagFinder()
if has('ruby')
ruby $command_t.show_tag_finder
else
call s:CommandTRubyWarning()
endif
endfunction

function s:CommandTFlush()
if has('ruby')
ruby $command_t.flush
else
call s:CommandTRubyWarning()
endif
endfunction

if !has('ruby')
finish
endif

function CommandTHandleKey(arg)
ruby $command_t.handle_key
endfunction

function CommandTBackspace()
ruby $command_t.backspace
endfunction

function CommandTDelete()
ruby $command_t.delete
endfunction

function CommandTAcceptSelection()
ruby $command_t.accept_selection
endfunction

function CommandTAcceptSelectionTab()
ruby $command_t.accept_selection :command => 'tabe'
endfunction

function CommandTAcceptSelectionSplit()
ruby $command_t.accept_selection :command => 'sp'
endfunction

function CommandTAcceptSelectionVSplit()
ruby $command_t.accept_selection :command => 'vs'
endfunction

function CommandTRefresh()
ruby $command_t.refresh
endfunction

function CommandTToggleFocus()
ruby $command_t.toggle_focus
endfunction

function CommandTCancel()
ruby $command_t.cancel
endfunction

function CommandTSelectNext()
ruby $command_t.select_next
endfunction

function CommandTSelectPrev()
ruby $command_t.select_prev
endfunction

function CommandTClear()
ruby $command_t.clear
endfunction

function CommandTCursorLeft()
ruby $command_t.cursor_left
endfunction

function CommandTCursorRight()
ruby $command_t.cursor_right
endfunction

function CommandTCursorEnd()
ruby $command_t.cursor_end
endfunction

function CommandTCursorStart()
ruby $command_t.cursor_start
endfunction

ruby << EOF
# require Ruby files
begin
# prepare controller
require 'command-t/vim'
require 'command-t/controller'
$command_t = CommandT::Controller.new
rescue LoadError
load_path_modified = false
::VIM::evaluate('&runtimepath').to_s.split(',').each do |path|
lib = "#{path}/ruby"
if !$LOAD_PATH.include?(lib) and File.exist?(lib)
$LOAD_PATH << lib
load_path_modified = true
end
end
retry if load_path_modified

# could get here if C extension was not compiled, or was compiled
# for the wrong architecture or Ruby version
require 'command-t/stub'
$command_t = CommandT::Stub.new
end
EOF

0 comments on commit acef182

Please sign in to comment.