Skip to content
Browse files

updated from mac 2

  • Loading branch information...
1 parent da849d2 commit 4f42efa0ab8cd3f906e2c546ed23c24ae97ff555 @codeprimate committed
Showing with 679 additions and 0 deletions.
  1. +169 −0 .vim/doc/tags
  2. +368 −0 .vim/tcomment.txt
  3. +142 −0 .vim/tcomment.vim
View
169 .vim/doc/tags
@@ -17,13 +17,58 @@
'NERDTreeStatusline' NERD_tree.txt /*'NERDTreeStatusline'*
'NERDTreeWinPos' NERD_tree.txt /*'NERDTreeWinPos'*
'NERDTreeWinSize' NERD_tree.txt /*'NERDTreeWinSize'*
+'Tlist_Auto_Highlight_Tag' taglist.txt /*'Tlist_Auto_Highlight_Tag'*
+'Tlist_Auto_Open' taglist.txt /*'Tlist_Auto_Open'*
+'Tlist_Auto_Update' taglist.txt /*'Tlist_Auto_Update'*
+'Tlist_Close_On_Select' taglist.txt /*'Tlist_Close_On_Select'*
+'Tlist_Compact_Format' taglist.txt /*'Tlist_Compact_Format'*
+'Tlist_Ctags_Cmd' taglist.txt /*'Tlist_Ctags_Cmd'*
+'Tlist_Display_Prototype' taglist.txt /*'Tlist_Display_Prototype'*
+'Tlist_Display_Tag_Scope' taglist.txt /*'Tlist_Display_Tag_Scope'*
+'Tlist_Enable_Fold_Column' taglist.txt /*'Tlist_Enable_Fold_Column'*
+'Tlist_Exit_OnlyWindow' taglist.txt /*'Tlist_Exit_OnlyWindow'*
+'Tlist_File_Fold_Auto_Close' taglist.txt /*'Tlist_File_Fold_Auto_Close'*
+'Tlist_GainFocus_On_ToggleOpen' taglist.txt /*'Tlist_GainFocus_On_ToggleOpen'*
+'Tlist_Highlight_Tag_On_BufEnter' taglist.txt /*'Tlist_Highlight_Tag_On_BufEnter'*
+'Tlist_Inc_Winwidth' taglist.txt /*'Tlist_Inc_Winwidth'*
+'Tlist_Max_Submenu_Items' taglist.txt /*'Tlist_Max_Submenu_Items'*
+'Tlist_Max_Tag_Length' taglist.txt /*'Tlist_Max_Tag_Length'*
+'Tlist_Process_File_Always' taglist.txt /*'Tlist_Process_File_Always'*
+'Tlist_Show_Menu' taglist.txt /*'Tlist_Show_Menu'*
+'Tlist_Show_One_File' taglist.txt /*'Tlist_Show_One_File'*
+'Tlist_Sort_Type' taglist.txt /*'Tlist_Sort_Type'*
+'Tlist_Use_Horiz_Window' taglist.txt /*'Tlist_Use_Horiz_Window'*
+'Tlist_Use_Right_Window' taglist.txt /*'Tlist_Use_Right_Window'*
+'Tlist_Use_SingleClick' taglist.txt /*'Tlist_Use_SingleClick'*
+'Tlist_WinHeight' taglist.txt /*'Tlist_WinHeight'*
+'Tlist_WinWidth' taglist.txt /*'Tlist_WinWidth'*
'loaded_nerd_tree' NERD_tree.txt /*'loaded_nerd_tree'*
+/MyProjectDir/ dbext.txt /*\/MyProjectDir\/*
+/MyProjectDir/ dbext.txt /*\/MyProjectDir\/*
:NERDTree NERD_tree.txt /*:NERDTree*
:NERDTreeClose NERD_tree.txt /*:NERDTreeClose*
:NERDTreeFind NERD_tree.txt /*:NERDTreeFind*
:NERDTreeFromBookmark NERD_tree.txt /*:NERDTreeFromBookmark*
:NERDTreeMirror NERD_tree.txt /*:NERDTreeMirror*
:NERDTreeToggle NERD_tree.txt /*:NERDTreeToggle*
+:TlistAddFiles taglist.txt /*:TlistAddFiles*
+:TlistAddFilesRecursive taglist.txt /*:TlistAddFilesRecursive*
+:TlistClose taglist.txt /*:TlistClose*
+:TlistDebug taglist.txt /*:TlistDebug*
+:TlistHighlightTag taglist.txt /*:TlistHighlightTag*
+:TlistLock taglist.txt /*:TlistLock*
+:TlistMessages taglist.txt /*:TlistMessages*
+:TlistOpen taglist.txt /*:TlistOpen*
+:TlistSessionLoad taglist.txt /*:TlistSessionLoad*
+:TlistSessionSave taglist.txt /*:TlistSessionSave*
+:TlistShowPrototype taglist.txt /*:TlistShowPrototype*
+:TlistShowTag taglist.txt /*:TlistShowTag*
+:TlistToggle taglist.txt /*:TlistToggle*
+:TlistUndebug taglist.txt /*:TlistUndebug*
+:TlistUnlock taglist.txt /*:TlistUnlock*
+:TlistUpdate taglist.txt /*:TlistUpdate*
+AND dbext.txt /*AND*
+DBI dbext.txt /*DBI*
NERDTree NERD_tree.txt /*NERDTree*
NERDTree-? NERD_tree.txt /*NERDTree-?*
NERDTree-A NERD_tree.txt /*NERDTree-A*
@@ -83,6 +128,11 @@ NERDTreeOptionSummary NERD_tree.txt /*NERDTreeOptionSummary*
NERDTreeOptions NERD_tree.txt /*NERDTreeOptions*
NERDTreeRender() NERD_tree.txt /*NERDTreeRender()*
NERD_tree.txt NERD_tree.txt /*NERD_tree.txt*
+ODBC dbext.txt /*ODBC*
+Tlist_Get_Tag_Prototype_By_Line() taglist.txt /*Tlist_Get_Tag_Prototype_By_Line()*
+Tlist_Get_Tagname_By_Line() taglist.txt /*Tlist_Get_Tagname_By_Line()*
+Tlist_Set_App() taglist.txt /*Tlist_Set_App()*
+Tlist_Update_File_Tags() taglist.txt /*Tlist_Update_File_Tags()*
VimExplorer vimExplorer.txt /*VimExplorer*
VimExplorer-author vimExplorer.txt /*VimExplorer-author*
VimExplorer-browse vimExplorer.txt /*VimExplorer-browse*
@@ -118,9 +168,102 @@ VimExplorer-tempmark vimExplorer.txt /*VimExplorer-tempmark*
VimExplorer-todo vimExplorer.txt /*VimExplorer-todo*
VimExplorer-treebrowse vimExplorer.txt /*VimExplorer-treebrowse*
VimExplorer-treehotkey vimExplorer.txt /*VimExplorer-treehotkey*
+asa dbext.txt /*asa*
+ase dbext.txt /*ase*
config/rails.vim rails.txt /*config\/rails.vim*
cs surround.txt /*cs*
+database-extension dbext.txt /*database-extension*
+db2 dbext.txt /*db2*
+db_ext dbext.txt /*db_ext*
+db_ext.vim dbext.txt /*db_ext.vim*
+dbext dbext.txt /*dbext*
+dbext-completion dbext.txt /*dbext-completion*
+dbext-configure dbext.txt /*dbext-configure*
+dbext-configure-db2 dbext.txt /*dbext-configure-db2*
+dbext-configure-dbi dbext.txt /*dbext-configure-dbi*
+dbext-configure-options dbext.txt /*dbext-configure-options*
+dbext-configure-results dbext.txt /*dbext-configure-results*
+dbext-configure-variables dbext.txt /*dbext-configure-variables*
+dbext-connect dbext.txt /*dbext-connect*
+dbext-connect-ask dbext.txt /*dbext-connect-ask*
+dbext-connect-autocmd dbext.txt /*dbext-connect-autocmd*
+dbext-connect-modelines dbext.txt /*dbext-connect-modelines*
+dbext-connect-parameters dbext.txt /*dbext-connect-parameters*
+dbext-connect-profiles dbext.txt /*dbext-connect-profiles*
+dbext-connect-profiles-examples dbext.txt /*dbext-connect-profiles-examples*
+dbext-connect-prompting dbext.txt /*dbext-connect-prompting*
+dbext-filetypes dbext.txt /*dbext-filetypes*
+dbext-filetypes-adding dbext.txt /*dbext-filetypes-adding*
+dbext-filetypes-using dbext.txt /*dbext-filetypes-using*
+dbext-getting-started dbext.txt /*dbext-getting-started*
+dbext-history dbext.txt /*dbext-history*
+dbext-in-mappings dbext.txt /*dbext-in-mappings*
+dbext-install dbext.txt /*dbext-install*
+dbext-integration dbext.txt /*dbext-integration*
+dbext-intellisense dbext.txt /*dbext-intellisense*
+dbext-list-objects dbext.txt /*dbext-list-objects*
+dbext-mappings dbext.txt /*dbext-mappings*
+dbext-modelines dbext.txt /*dbext-modelines*
+dbext-new dbext.txt /*dbext-new*
+dbext-newdb dbext.txt /*dbext-newdb*
+dbext-omni-completion dbext.txt /*dbext-omni-completion*
+dbext-overview dbext.txt /*dbext-overview*
+dbext-prompting dbext.txt /*dbext-prompting*
+dbext-sourceforge dbext.txt /*dbext-sourceforge*
+dbext-tutorial dbext.txt /*dbext-tutorial*
+dbext-tutorial-completion dbext.txt /*dbext-tutorial-completion*
+dbext-tutorial-connection dbext.txt /*dbext-tutorial-connection*
+dbext-tutorial-dbi dbext.txt /*dbext-tutorial-dbi*
+dbext-tutorial-describe dbext.txt /*dbext-tutorial-describe*
+dbext-tutorial-execute dbext.txt /*dbext-tutorial-execute*
+dbext-tutorial-filetype dbext.txt /*dbext-tutorial-filetype*
+dbext-tutorial-history dbext.txt /*dbext-tutorial-history*
+dbext-tutorial-login dbext.txt /*dbext-tutorial-login*
+dbext-tutorial-objects dbext.txt /*dbext-tutorial-objects*
+dbext-tutorial-profile dbext.txt /*dbext-tutorial-profile*
+dbext-tutorial-results dbext.txt /*dbext-tutorial-results*
+dbext-tutorial-select dbext.txt /*dbext-tutorial-select*
+dbext-tutorial-variables dbext.txt /*dbext-tutorial-variables*
+dbext.txt dbext.txt /*dbext.txt*
+dbext.vim dbext.txt /*dbext.vim*
ds surround.txt /*ds*
+firebird dbext.txt /*firebird*
+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-: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*
g:loaded_rails rails.txt /*g:loaded_rails*
g:rails_abbreviations rails.txt /*g:rails_abbreviations*
g:rails_ctags_arguments rails.txt /*g:rails_ctags_arguments*
@@ -136,7 +279,13 @@ g:rails_tabstop rails.txt /*g:rails_tabstop*
g:rails_url rails.txt /*g:rails_url*
i_CTRL-G_S surround.txt /*i_CTRL-G_S*
i_CTRL-G_s surround.txt /*i_CTRL-G_s*
+ingres dbext.txt /*ingres*
+interbase dbext.txt /*interbase*
macros/rails.vim rails.txt /*macros\/rails.vim*
+mysql dbext.txt /*mysql*
+ora dbext.txt /*ora*
+oracle dbext.txt /*oracle*
+pgsql dbext.txt /*pgsql*
project project.txt /*project*
project-adding-mappings project.txt /*project-adding-mappings*
project-example project.txt /*project-example*
@@ -287,6 +436,9 @@ rails-template-types rails.txt /*rails-template-types*
rails-type-navigation rails.txt /*rails-type-navigation*
rails-vim-integration rails.txt /*rails-vim-integration*
rails.txt rails.txt /*rails.txt*
+sqlanywhere dbext.txt /*sqlanywhere*
+sqlite dbext.txt /*sqlite*
+sqlsrv dbext.txt /*sqlsrv*
surround surround.txt /*surround*
surround-author surround.txt /*surround-author*
surround-customizing surround.txt /*surround-customizing*
@@ -295,6 +447,23 @@ surround-mappings surround.txt /*surround-mappings*
surround-replacements surround.txt /*surround-replacements*
surround-targets surround.txt /*surround-targets*
surround.txt surround.txt /*surround.txt*
+taglist-commands taglist.txt /*taglist-commands*
+taglist-debug taglist.txt /*taglist-debug*
+taglist-extend taglist.txt /*taglist-extend*
+taglist-faq taglist.txt /*taglist-faq*
+taglist-functions taglist.txt /*taglist-functions*
+taglist-install taglist.txt /*taglist-install*
+taglist-internet taglist.txt /*taglist-internet*
+taglist-intro taglist.txt /*taglist-intro*
+taglist-keys taglist.txt /*taglist-keys*
+taglist-license taglist.txt /*taglist-license*
+taglist-menu taglist.txt /*taglist-menu*
+taglist-options taglist.txt /*taglist-options*
+taglist-requirements taglist.txt /*taglist-requirements*
+taglist-session taglist.txt /*taglist-session*
+taglist-todo taglist.txt /*taglist-todo*
+taglist-using taglist.txt /*taglist-using*
+taglist.txt taglist.txt /*taglist.txt*
vS surround.txt /*vS*
vgS surround.txt /*vgS*
vs surround.txt /*vs*
View
368 .vim/tcomment.txt
@@ -0,0 +1,368 @@
+*tcomment.txt* An easily extensible & universal comment plugin
+ Author: Thomas Link, micathom AT gmail com?subject=vim
+
+tcomment provides easy to use, file-type sensible comments for Vim. It
+can handle embedded syntax.
+
+TComment works like a toggle, i.e., it will comment out text that
+contains uncommented lines, and it will remove comment markup for
+already commented text (i.e. text that contains no uncommented lines).
+
+If the file-type is properly defined, TComment will figure out which
+comment string to use. Otherwise you use |tcomment#DefineType()| to
+override the default choice.
+
+TComment can properly handle an embedded syntax, e.g., ruby/python/perl
+regions in vim scripts, HTML or JavaScript in php code etc.
+
+Demo:
+http://vimsomnia.blogspot.com/2010/11/tcomment-vim-plugin.html
+
+
+ *tcomment-maps*
+Key bindings~
+
+Most of the time the default toggle keys will do what you want (or to be
+more precise: what I think you want it to do ;-).
+
+ *g:tcommentMapLeaderOp1*
+ *g:tcommentMapLeaderOp2*
+As operator (the prefix can be customized via g:tcommentMapLeaderOp1
+and g:tcommentMapLeaderOp2):
+
+ gc{motion} :: Toggle comments (for small comments within one line
+ the &filetype_inline style will be used, if
+ defined)
+ gcc :: Toggle comment for the current line
+ gC{motion} :: Comment region
+ gCc :: Comment the current line
+
+By default the cursor stays put. If you want the cursor to the end of
+the commented text, set |g:tcommentOpModeExtra| to '>' (but this may not
+work properly with exclusive motions).
+
+Primary key maps:
+
+ <c-_><c-_> :: :TComment
+ <c-_><space> :: :TComment <QUERY COMMENT-BEGIN ?COMMENT-END>
+ <c-_>b :: :TCommentBlock
+ <c-_>a :: :TCommentAs <QUERY COMMENT TYPE>
+ <c-_>n :: :TCommentAs &filetype <QUERY COUNT>
+ <c-_>s :: :TCommentAs &filetype_<QUERY COMMENT SUBTYPE>
+ <c-_>i :: :TCommentInline
+ <c-_>r :: :TCommentRight
+ <c-_>p :: Comment the current inner paragraph
+
+A secondary set of key maps is defined for normal mode.
+
+ <Leader>__ :: :TComment
+ <Leader>_p :: Comment the current inner paragraph
+ <Leader>_<space> :: :TComment <QUERY COMMENT-BEGIN ?COMMENT-END>
+ <Leader>_i :: :TCommentInline
+ <Leader>_r :: :TCommentRight
+ <Leader>_b :: :TCommentBlock
+ <Leader>_a :: :TCommentAs <QUERY COMMENT TYPE>
+ <Leader>_n :: :TCommentAs &filetype <QUERY COUNT>
+ <Leader>_s :: :TCommentAs &filetype_<QUERY COMMENT SUBTYPE>
+
+
+-----------------------------------------------------------------------
+Install~
+
+Edit the vba file and type: >
+
+ :so %
+
+See :help vimball for details. If you have difficulties or use vim 7.0,
+please make sure, you have the current version of vimball (vimscript
+#1502) installed or update your runtime.
+
+
+========================================================================
+Contents~
+
+ :TComment ........................... |:TComment|
+ :TCommentAs ......................... |:TCommentAs|
+ :TCommentRight ...................... |:TCommentRight|
+ :TCommentBlock ...................... |:TCommentBlock|
+ :TCommentInline ..................... |:TCommentInline|
+ :TCommentMaybeInline ................ |:TCommentMaybeInline|
+ g:tcommentBlankLines ................ |g:tcommentBlankLines|
+ g:tcommentOpModeExtra ............... |g:tcommentOpModeExtra|
+ g:tcommentOptions ................... |g:tcommentOptions|
+ g:tcomment#ignore_char_type ......... |g:tcomment#ignore_char_type|
+ g:tcommentGuessFileType ............. |g:tcommentGuessFileType|
+ g:tcommentGuessFileType_dsl ......... |g:tcommentGuessFileType_dsl|
+ g:tcommentGuessFileType_php ......... |g:tcommentGuessFileType_php|
+ g:tcommentGuessFileType_html ........ |g:tcommentGuessFileType_html|
+ g:tcommentGuessFileType_tskeleton ... |g:tcommentGuessFileType_tskeleton|
+ g:tcommentGuessFileType_vim ......... |g:tcommentGuessFileType_vim|
+ g:tcommentGuessFileType_django ...... |g:tcommentGuessFileType_django|
+ g:tcommentIgnoreTypes_php ........... |g:tcommentIgnoreTypes_php|
+ g:tcomment#syntax_substitute ........ |g:tcomment#syntax_substitute|
+ g:tcommentSyntaxMap ................. |g:tcommentSyntaxMap|
+ g:tcommentBlockC .................... |g:tcommentBlockC|
+ g:tcommentBlockC2 ................... |g:tcommentBlockC2|
+ g:tcommentInlineC ................... |g:tcommentInlineC|
+ g:tcommentBlockXML .................. |g:tcommentBlockXML|
+ g:tcommentInlineXML ................. |g:tcommentInlineXML|
+ tcomment#DefineType ................. |tcomment#DefineType()|
+ g:tcomment_types .................... |g:tcomment_types|
+ tcomment#Comment .................... |tcomment#Comment()|
+ tcomment#Operator ................... |tcomment#Operator()|
+ tcomment#OperatorLine ............... |tcomment#OperatorLine()|
+ tcomment#OperatorAnyway ............. |tcomment#OperatorAnyway()|
+ tcomment#OperatorLineAnyway ......... |tcomment#OperatorLineAnyway()|
+ tcomment#CommentAs .................. |tcomment#CommentAs()|
+
+
+========================================================================
+plugin/tcomment.vim~
+
+ *:TComment*
+:[range]TComment[!] ?ARGS...
+ If there is a visual selection that begins and ends in the same line,
+ then |:TCommentInline| is used instead.
+ The optional range defaults to the current line. With a bang '!',
+ always comment the line.
+
+ ARGS... are either (see also |tcomment#Comment()|):
+ 1. a list of key=value pairs
+ 2. 1-2 values for: ?commentBegin, ?commentEnd
+
+ *:TCommentAs*
+:[range]TCommentAs[!] commenttype ?ARGS...
+ TCommentAs requires g:tcomment_{filetype} to be defined.
+ With a bang '!', always comment the line.
+
+ ARGS... are either (see also |tcomment#Comment()|):
+ 1. a list of key=value pairs
+ 2. 1-2 values for: ?commentBegin, ?commentEnd
+
+ *:TCommentRight*
+:[range]TCommentRight[!] ?ARGS...
+ Comment the text to the right of the cursor. If a visual selection was
+ made (be it block-wise or not), all lines are commented out at from
+ the current cursor position downwards.
+ With a bang '!', always comment the line.
+
+ ARGS... are either (see also |tcomment#Comment()|):
+ 1. a list of key=value pairs
+ 2. 1-2 values for: ?commentBegin, ?commentEnd
+
+ *:TCommentBlock*
+:[range]TCommentBlock[!] ?ARGS...
+ Comment as "block", e.g. use the {&ft}_block comment style. The
+ commented text isn't indented or reformated.
+ With a bang '!', always comment the line.
+
+ ARGS... are either (see also |tcomment#Comment()|):
+ 1. a list of key=value pairs
+ 2. 1-2 values for: ?commentBegin, ?commentEnd
+
+ *:TCommentInline*
+:[range]TCommentInline[!] ?ARGS...
+ Use the {&ft}_inline comment style.
+ With a bang '!', always comment the line.
+
+ ARGS... are either (see also |tcomment#Comment()|):
+ 1. a list of key=value pairs
+ 2. 1-2 values for: ?commentBegin, ?commentEnd
+
+ *:TCommentMaybeInline*
+:[range]TCommentMaybeInline[!] ?ARGS...
+ With a bang '!', always comment the line.
+
+ ARGS... are either (see also |tcomment#Comment()|):
+ 1. a list of key=value pairs
+ 2. 1-2 values for: ?commentBegin, ?commentEnd
+
+
+========================================================================
+autoload/tcomment.vim~
+
+ *g:tcommentBlankLines*
+g:tcommentBlankLines (default: 1)
+ If true, comment blank lines too
+
+ *g:tcommentOpModeExtra*
+g:tcommentOpModeExtra (default: '')
+ Modifies how the operator works.
+ > ... Move the cursor to the end of the comment
+
+ *g:tcommentOptions*
+g:tcommentOptions (default: {})
+ Other key-value options used by |tcomment#Comment()|.
+
+ Example: If you want to put the opening comment marker always in
+ the first column regardless of the block's indentation, put this
+ into your |vimrc| file: >
+ let g:tcommentOptions = {'col': 1}
+<
+
+ *g:tcomment#ignore_char_type*
+g:tcomment#ignore_char_type (default: 1)
+ |text-objects| for use with |tcomment#Operator| can have different
+ types: line, block, char etc. Text objects like aB, it, at etc.
+ have type char but this may not work reliably. By default,
+ tcomment handles those text objects most often as if they were of
+ type line. Set this variable to 0 in order to change this
+ behaviour. Be prepared that the result may not always match your
+ intentions.
+
+ *g:tcommentGuessFileType*
+g:tcommentGuessFileType (default: 0)
+ Guess the file type based on syntax names always or for some fileformat only
+ If non-zero, try to guess filetypes.
+ tcomment also checks g:tcommentGuessFileType_{&filetype} for
+ filetype specific values.
+
+ Values:
+ 0 ... don't guess
+ 1 ... guess
+ FILETYPE ... assume this filetype
+
+ *g:tcommentGuessFileType_dsl*
+g:tcommentGuessFileType_dsl (default: 'xml')
+ For dsl documents, assumet filetype = xml.
+
+ *g:tcommentGuessFileType_php*
+g:tcommentGuessFileType_php (default: 'html')
+ In php documents, the php part is usually marked as phpRegion. We
+ thus assume that the buffers default comment style isn't php but
+ html.
+
+ *g:tcommentGuessFileType_html*
+g:tcommentGuessFileType_html (default: 1)
+
+ *g:tcommentGuessFileType_tskeleton*
+g:tcommentGuessFileType_tskeleton (default: 1)
+
+ *g:tcommentGuessFileType_vim*
+g:tcommentGuessFileType_vim (default: 1)
+
+ *g:tcommentGuessFileType_django*
+g:tcommentGuessFileType_django (default: 1)
+
+ *g:tcommentIgnoreTypes_php*
+g:tcommentIgnoreTypes_php (default: 'sql')
+ In php files, some syntax regions are wongly highlighted as sql
+ markup. We thus ignore sql syntax when guessing the filetype in
+ php files.
+
+ *g:tcomment#syntax_substitute*
+g:tcomment#syntax_substitute (default: {...})
+
+ *g:tcommentSyntaxMap*
+g:tcommentSyntaxMap (default: {...})
+ tcomment guesses filetypes based on the name of the current syntax
+ region. This works well if the syntax names match
+ /filetypeSomeName/. Other syntax names have to be explicitly
+ mapped onto the corresponding filetype.
+
+ *g:tcommentBlockC*
+g:tcommentBlockC (default: {...})
+ Generic c-like block comments.
+
+ *g:tcommentBlockC2*
+g:tcommentBlockC2 (default: {...})
+ Generic c-like block comments (alternative markup).
+
+ *g:tcommentInlineC*
+g:tcommentInlineC (default: "/* %s */")
+ Generic c-like comments.
+
+ *g:tcommentBlockXML*
+g:tcommentBlockXML (default: "<!--%s-->\n ")
+ Generic xml-like block comments.
+
+ *g:tcommentInlineXML*
+g:tcommentInlineXML (default: "<!-- %s -->")
+ Generic xml-like comments.
+
+ *tcomment#DefineType()*
+tcomment#DefineType(name, commentdef)
+ If you don't explicitly define a comment style, |:TComment| will use
+ 'commentstring' instead. We override the default values here in order
+ to have a blank after the comment marker. Block comments work only if
+ we explicitly define the markup.
+
+ The comment definition can be either a string or a dictionary.
+
+ If it is a string:
+ The format for block comments is similar to 'commentstrings' with the
+ exception that the format strings for blocks can contain a second line
+ that defines how "middle lines" (see :h format-comments) should be
+ displayed.
+
+ If it is a dictionary:
+ See the help on the args argument of |tcomment#Comment|.
+
+ *g:tcomment_types*
+g:tcomment_types (default: {})
+ A dictionary of NAME => COMMENT DEFINITION (see |tcomment#DefineType|)
+ that can be set in vimrc to override tcomment's default comment
+ styles.
+
+
+
+ *tcomment#Comment()*
+tcomment#Comment(beg, end, ...)
+ tcomment#Comment(line1, line2, ?commentMode, ?commentAnyway, ?args...)
+ args... are either:
+ 1. a list of key=value pairs where known keys are (see also
+ |g:tcommentOptions|):
+ as=STRING ... Use a specific comment definition
+ col=N ... Start the comment at column N (in block
+ mode; must be smaller than |indent()|)
+ mode=STRING ... See the notes below on the "commentMode" argument
+ begin=STRING ... Comment prefix
+ end=STRING ... Comment postfix
+ middle=STRING ... Middle line comments in block mode
+ rxbeg=N ... Regexp to find the substring of "begin"
+ that should be multipied by "count"
+ rxend=N ... The above for "end"
+ rxmid=N ... The above for "middle"
+ commentstring_rx ... A regexp format string that matches
+ commented lines (no new groups may be
+ introduced, the |regexp| is |\V|; % have
+ to be doubled); "commentstring", "begin"
+ and optionally "end" must be defined or
+ deducible.
+ 2. 1-2 values for: ?commentPrefix, ?commentPostfix
+ 3. a dictionary (internal use only)
+
+ commentMode:
+ G ... guess the value of commentMode
+ B ... block (use extra lines for the comment markers)
+ i ... maybe inline, guess
+ I ... inline
+ R ... right (comment the line right of the cursor)
+ v ... visual
+ o ... operator
+ By default, each line in range will be commented by adding the comment
+ prefix and postfix.
+
+ *tcomment#Operator()*
+tcomment#Operator(type, ...)
+
+ *tcomment#OperatorLine()*
+tcomment#OperatorLine(type)
+
+ *tcomment#OperatorAnyway()*
+tcomment#OperatorAnyway(type)
+
+ *tcomment#OperatorLineAnyway()*
+tcomment#OperatorLineAnyway(type)
+
+ *tcomment#CommentAs()*
+tcomment#CommentAs(beg, end, commentAnyway, filetype, ?args...)
+ Where args is either:
+ 1. A count NUMBER
+ 2. An args list (see the notes on the "args" argument of
+ |tcomment#Comment()|)
+ comment text as if it were of a specific filetype
+
+
+
+vim:tw=78:fo=tcq2:isk=!-~,^*,^|,^":ts=8:ft=help:norl:
View
142 .vim/tcomment.vim
@@ -0,0 +1,142 @@
+" tComment.vim -- An easily extensible & universal comment plugin
+" @Author: Tom Link (micathom AT gmail com)
+" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
+" @Created: 27-Dez-2004.
+" @Last Change: 2011-05-26.
+" @Revision: 720
+" GetLatestVimScripts: 1173 1 tcomment.vim
+
+if &cp || exists('loaded_tcomment')
+ finish
+endif
+let loaded_tcomment = 205
+
+if !exists("g:tcommentMapLeader1")
+ " g:tcommentMapLeader1 should be a shortcut that can be used with
+ " map, imap, vmap.
+ let g:tcommentMapLeader1 = '<c-_>'
+endif
+if !exists("g:tcommentMapLeader2")
+ " g:tcommentMapLeader2 should be a shortcut that can be used with
+ " map, xmap.
+ let g:tcommentMapLeader2 = '<Leader>_'
+endif
+if !exists("g:tcommentMapLeaderOp1")
+ let g:tcommentMapLeaderOp1 = 'gc'
+endif
+if !exists("g:tcommentMapLeaderOp2")
+ let g:tcommentMapLeaderOp2 = 'gC'
+endif
+
+
+" :display: :[range]TComment[!] ?ARGS...
+" If there is a visual selection that begins and ends in the same line,
+" then |:TCommentInline| is used instead.
+" The optional range defaults to the current line. With a bang '!',
+" always comment the line.
+"
+" ARGS... are either (see also |tcomment#Comment()|):
+" 1. a list of key=value pairs
+" 2. 1-2 values for: ?commentBegin, ?commentEnd
+command! -bang -range -nargs=* -complete=customlist,tcomment#CompleteArgs TComment
+ \ keepjumps call tcomment#Comment(<line1>, <line2>, 'G', "<bang>", <f-args>)
+
+" :display: :[range]TCommentAs[!] commenttype ?ARGS...
+" TCommentAs requires g:tcomment_{filetype} to be defined.
+" With a bang '!', always comment the line.
+"
+" ARGS... are either (see also |tcomment#Comment()|):
+" 1. a list of key=value pairs
+" 2. 1-2 values for: ?commentBegin, ?commentEnd
+command! -bang -complete=customlist,tcomment#Complete -range -nargs=+ TCommentAs
+ \ call tcomment#CommentAs(<line1>, <line2>, "<bang>", <f-args>)
+
+" :display: :[range]TCommentRight[!] ?ARGS...
+" Comment the text to the right of the cursor. If a visual selection was
+" made (be it block-wise or not), all lines are commented out at from
+" the current cursor position downwards.
+" With a bang '!', always comment the line.
+"
+" ARGS... are either (see also |tcomment#Comment()|):
+" 1. a list of key=value pairs
+" 2. 1-2 values for: ?commentBegin, ?commentEnd
+command! -bang -range -nargs=* -complete=customlist,tcomment#CompleteArgs TCommentRight
+ \ keepjumps call tcomment#Comment(<line1>, <line2>, 'R', "<bang>", <f-args>)
+
+" :display: :[range]TCommentBlock[!] ?ARGS...
+" Comment as "block", e.g. use the {&ft}_block comment style. The
+" commented text isn't indented or reformated.
+" With a bang '!', always comment the line.
+"
+" ARGS... are either (see also |tcomment#Comment()|):
+" 1. a list of key=value pairs
+" 2. 1-2 values for: ?commentBegin, ?commentEnd
+command! -bang -range -nargs=* -complete=customlist,tcomment#CompleteArgs TCommentBlock
+ \ keepjumps call tcomment#Comment(<line1>, <line2>, 'B', "<bang>", <f-args>)
+
+" :display: :[range]TCommentInline[!] ?ARGS...
+" Use the {&ft}_inline comment style.
+" With a bang '!', always comment the line.
+"
+" ARGS... are either (see also |tcomment#Comment()|):
+" 1. a list of key=value pairs
+" 2. 1-2 values for: ?commentBegin, ?commentEnd
+command! -bang -range -nargs=* -complete=customlist,tcomment#CompleteArgs TCommentInline
+ \ keepjumps call tcomment#Comment(<line1>, <line2>, 'I', "<bang>", <f-args>)
+
+" :display: :[range]TCommentMaybeInline[!] ?ARGS...
+" With a bang '!', always comment the line.
+"
+" ARGS... are either (see also |tcomment#Comment()|):
+" 1. a list of key=value pairs
+" 2. 1-2 values for: ?commentBegin, ?commentEnd
+command! -bang -range -nargs=* -complete=customlist,tcomment#CompleteArgs TCommentMaybeInline
+ \ keepjumps call tcomment#Comment(<line1>, <line2>, 'i', "<bang>", <f-args>)
+
+
+
+if (g:tcommentMapLeader1 != '')
+ exec 'noremap <silent> '. g:tcommentMapLeader1 . g:tcommentMapLeader1 .' :TComment<cr>'
+ exec 'vnoremap <silent> '. g:tcommentMapLeader1 . g:tcommentMapLeader1 .' :TCommentMaybeInline<cr>'
+ exec 'inoremap <silent> '. g:tcommentMapLeader1 . g:tcommentMapLeader1 .' <c-o>:TComment<cr>'
+ exec 'noremap <silent> '. g:tcommentMapLeader1 .'p m`vip:TComment<cr>``'
+ exec 'inoremap <silent> '. g:tcommentMapLeader1 .'p <c-o>:norm! m`vip<cr>:TComment<cr><c-o>``'
+ exec 'noremap '. g:tcommentMapLeader1 .'<space> :TComment '
+ exec 'inoremap '. g:tcommentMapLeader1 .'<space> <c-o>:TComment '
+ exec 'inoremap <silent> '. g:tcommentMapLeader1 .'r <c-o>:TCommentRight<cr>'
+ exec 'noremap <silent> '. g:tcommentMapLeader1 .'r :TCommentRight<cr>'
+ exec 'vnoremap <silent> '. g:tcommentMapLeader1 .'i :TCommentInline<cr>'
+ exec 'vnoremap <silent> '. g:tcommentMapLeader1 .'r :TCommentRight<cr>'
+ exec 'noremap '. g:tcommentMapLeader1 .'b :TCommentBlock<cr>'
+ exec 'inoremap '. g:tcommentMapLeader1 .'b <c-o>:TCommentBlock<cr>'
+ exec 'noremap '. g:tcommentMapLeader1 .'a :TCommentAs '
+ exec 'inoremap '. g:tcommentMapLeader1 .'a <c-o>:TCommentAs '
+ exec 'noremap '. g:tcommentMapLeader1 .'n :TCommentAs <c-r>=&ft<cr> '
+ exec 'inoremap '. g:tcommentMapLeader1 .'n <c-o>:TCommentAs <c-r>=&ft<cr> '
+ exec 'noremap '. g:tcommentMapLeader1 .'s :TCommentAs <c-r>=&ft<cr>_'
+ exec 'inoremap '. g:tcommentMapLeader1 .'s <c-o>:TCommentAs <c-r>=&ft<cr>_'
+endif
+if (g:tcommentMapLeader2 != '')
+ exec 'noremap <silent> '. g:tcommentMapLeader2 .'_ :TComment<cr>'
+ exec 'xnoremap <silent> '. g:tcommentMapLeader2 .'_ :TCommentMaybeInline<cr>'
+ exec 'noremap <silent> '. g:tcommentMapLeader2 .'p vip:TComment<cr>'
+ exec 'noremap '. g:tcommentMapLeader2 .'<space> :TComment '
+ exec 'xnoremap <silent> '. g:tcommentMapLeader2 .'i :TCommentInline<cr>'
+ exec 'noremap <silent> '. g:tcommentMapLeader2 .'r :TCommentRight<cr>'
+ exec 'xnoremap <silent> '. g:tcommentMapLeader2 .'r :TCommentRight<cr>'
+ exec 'noremap '. g:tcommentMapLeader2 .'b :TCommentBlock<cr>'
+ exec 'noremap '. g:tcommentMapLeader2 .'a :TCommentAs '
+ exec 'noremap '. g:tcommentMapLeader2 .'n :TCommentAs <c-r>=&ft<cr> '
+ exec 'noremap '. g:tcommentMapLeader2 .'s :TCommentAs <c-r>=&ft<cr>_'
+endif
+if (g:tcommentMapLeaderOp1 != '')
+ exec 'nnoremap <silent> '. g:tcommentMapLeaderOp1 .' :let w:tcommentPos = getpos(".") \| set opfunc=tcomment#Operator<cr>g@'
+ exec 'nnoremap <silent> '. g:tcommentMapLeaderOp1 .'c :let w:tcommentPos = getpos(".") \| set opfunc=tcomment#OperatorLine<cr>g@$'
+ exec 'xnoremap <silent> '. g:tcommentMapLeaderOp1 .' :TCommentMaybeInline<cr>'
+endif
+if (g:tcommentMapLeaderOp2 != '')
+ exec 'nnoremap <silent> '. g:tcommentMapLeaderOp2 .' :let w:tcommentPos = getpos(".") \| set opfunc=tcomment#OperatorAnyway<cr>g@'
+ exec 'nnoremap <silent> '. g:tcommentMapLeaderOp2 .'c :let w:tcommentPos = getpos(".") \| set opfunc=tcomment#OperatorLineAnyway<cr>g@$'
+ exec 'xnoremap <silent> '. g:tcommentMapLeaderOp2 .' :TCommentMaybeInline<cr>'
+endif
+

0 comments on commit 4f42efa

Please sign in to comment.
Something went wrong with that request. Please try again.