adding new stuff
This commit is contained in:
parent
f84d7183aa
commit
9ef8a96f9a
1580 changed files with 0 additions and 0 deletions
11
plugins/bundle/xptemplate/ftplugin/_comment/c.like.xpt.vim
Normal file
11
plugins/bundle/xptemplate/ftplugin/_comment/c.like.xpt.vim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
" NOTE: You can include this file into which uses C comment format. But It is
|
||||
" recommended to include _comment/doubleSign (or singleSign,
|
||||
" singleDouble) directly.
|
||||
XPTemplate priority=like
|
||||
|
||||
XPTvar $CL /*
|
||||
XPTvar $CM *
|
||||
XPTvar $CR */
|
||||
|
||||
XPTinclude
|
||||
\ _comment/doubleSign
|
||||
13
plugins/bundle/xptemplate/ftplugin/_comment/cpp.like.xpt.vim
Normal file
13
plugins/bundle/xptemplate/ftplugin/_comment/cpp.like.xpt.vim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
" NOTE: You can include this file into which uses CPP comment format. But It
|
||||
" is recommended to include _comment/doubleSign (or singleSign,
|
||||
" singleDouble) directly.
|
||||
XPTemplate priority=like-
|
||||
|
||||
XPTvar $CL /*
|
||||
XPTvar $CM *
|
||||
XPTvar $CR */
|
||||
|
||||
XPTvar $CS //
|
||||
|
||||
XPTinclude
|
||||
\ _comment/singleDouble
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
XPTemplate priority=all-
|
||||
|
||||
let s:f = g:XPTfuncs()
|
||||
|
||||
" snippets for language whose comment sign is 2 signs, like c:"/* */"
|
||||
" TODO friendly cursor place holder
|
||||
|
||||
XPTinclude
|
||||
\ _common/common
|
||||
|
||||
|
||||
fun! s:f._xCommentMidIndent()
|
||||
let l = self.GetVar( '$CL' )
|
||||
let m = self.GetVar( '$CM' )
|
||||
|
||||
if len( l ) <= len( m )
|
||||
return ''
|
||||
else
|
||||
return ' '[ : len( l ) - len( m ) - 1 ]
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
fun! s:f._xCommentLeftWithoutMid()
|
||||
let l = self.GetVar( '$CL' )
|
||||
let m = self.GetVar( '$CM' )
|
||||
|
||||
if l == '' || m == ''
|
||||
return l
|
||||
endif
|
||||
|
||||
if l[ -len( m ) : ] == m
|
||||
return l[ : -len( m ) -1 ]
|
||||
else
|
||||
return l
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
XPT _d_comment hidden wrap=what " $CL .. $CR
|
||||
`$CL^ `what^^ `$CR^`^
|
||||
|
||||
|
||||
XPT _d_commentBlock hidden wrap " $CL ..
|
||||
`$_xCommentLeftWithoutMid^`$CM `cursor^
|
||||
`$_xCommentMidIndent$CR^
|
||||
|
||||
|
||||
XPT _d_commentDoc hidden wrap " $CL$CM ..
|
||||
`$CL^`$CM^
|
||||
`$_xCommentMidIndent$CM `cursor^
|
||||
`$_xCommentMidIndent$CR^
|
||||
|
||||
|
||||
XPT _d_commentLine hidden wrap=what " $CL .. $CR
|
||||
XSET what=
|
||||
`$CL `what` $CR^`^
|
||||
|
||||
|
||||
XPT comment alias=_d_comment
|
||||
XPT commentBlock alias=_d_commentBlock
|
||||
XPT commentDoc alias=_d_commentDoc
|
||||
XPT commentLine alias=_d_commentLine
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
XPTemplate priority=all-2
|
||||
|
||||
|
||||
XPTinclude
|
||||
\ _comment/common
|
||||
\ _comment/singleSign
|
||||
\ _comment/doubleSign
|
||||
|
||||
|
||||
|
||||
|
||||
XPT comment alias=_d_comment
|
||||
XPT commentBlock alias=_d_commentBlock
|
||||
XPT commentDoc alias=_d_commentDoc
|
||||
XPT commentLine alias=_s_commentLine
|
||||
XPT commentLine2 alias=_d_commentLine
|
||||
|
||||
|
||||
|
||||
42
plugins/bundle/xptemplate/ftplugin/_comment/pattern.xpt.vim
Normal file
42
plugins/bundle/xptemplate/ftplugin/_comment/pattern.xpt.vim
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
" priority is a bit lower than 'spec'
|
||||
XPTemplate priority=spec+
|
||||
|
||||
echom "_comment/pattern is deprecated."
|
||||
|
||||
|
||||
" XPTvar $CL Warn_$CL_IS_NOT_SET
|
||||
" XPTvar $CM Warn_$CM_IS_NOT_SET
|
||||
" XPTvar $CR Warn_$CR_IS_NOT_SET
|
||||
" XPTvar $CS Warn_$CS_IS_NOT_SET
|
||||
|
||||
" ================================= Snippets ===================================
|
||||
|
||||
if has_key(s:v, '$CL') && has_key(s:v, '$CR')
|
||||
|
||||
call XPTdefineSnippet('cc', {'hint' : '$CL $CR'}, [ '`$CL^ `cursor^ `$CR^' ])
|
||||
call XPTdefineSnippet('cc_', {'hint' : '$CL ... $CR'}, [ '`$CL^ `wrapped^ `$CR^' ])
|
||||
|
||||
" block comment
|
||||
call XPTdefineSnippet('cb', {'hint' : '$CL ...'}, [
|
||||
\'`$CL^',
|
||||
\' `$CM^ `cursor^',
|
||||
\' `$CR^' ])
|
||||
|
||||
" block doc comment
|
||||
call XPTdefineSnippet('cd', {'hint' : '$CL$CM ...'}, [
|
||||
\'`$CL^`$CM^',
|
||||
\' `$CM^ `cursor^',
|
||||
\' `$CR^' ])
|
||||
|
||||
endif
|
||||
|
||||
" line comment
|
||||
if has_key(s:v, '$CS')
|
||||
call XPTdefineSnippet('cl', {'hint' : '$CS'}, [ '`$CS^ `cursor^' ])
|
||||
|
||||
else
|
||||
call XPTdefineSnippet('cl', {'hint' : '$CL .. $CR'}, [ '`$CL^ `cursor^ `$CR^' ])
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
XPTemplate priority=all-2
|
||||
|
||||
|
||||
XPTinclude
|
||||
\ _comment/common
|
||||
\ _comment/singleSign
|
||||
\ _comment/doubleSign
|
||||
|
||||
|
||||
|
||||
|
||||
XPT comment alias=_s_comment
|
||||
XPT commentBlock alias=_s_commentBlock
|
||||
XPT commentDoc alias=_d_commentDoc
|
||||
XPT commentLine alias=_s_commentLine
|
||||
XPT commentLine2 alias=_d_commentLine
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
XPTemplate priority=all-
|
||||
|
||||
|
||||
XPTinclude
|
||||
\ _comment/common
|
||||
|
||||
|
||||
|
||||
XPT _s_comment hidden wrap " $CS ..
|
||||
`$CS `cursor^
|
||||
|
||||
|
||||
XPT _s_commentBlock hidden wrap " $CS ..
|
||||
`$CS `cursor^
|
||||
|
||||
|
||||
XPT _s_commentDoc hidden wrap " $CS ..
|
||||
`$CS^
|
||||
`$CS `cursor^
|
||||
`$CS^
|
||||
|
||||
XPT _s_commentLine hidden wrap " $CS ..
|
||||
`$CS `cursor^
|
||||
|
||||
|
||||
XPT comment alias=_s_comment
|
||||
XPT commentBlock alias=_s_commentBlock
|
||||
XPT commentDoc alias=_s_commentDoc
|
||||
XPT commentLine alias=_s_commentLine
|
||||
|
||||
11
plugins/bundle/xptemplate/ftplugin/_comment/xml.xpt.vim
Normal file
11
plugins/bundle/xptemplate/ftplugin/_comment/xml.xpt.vim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
" NOTE: You can include this file into which uses XML comment format. But It is
|
||||
" recommended to include _comment/doubleSign (or singleSign,
|
||||
" singleDouble) directly.
|
||||
XPTemplate priority=spec
|
||||
|
||||
XPTvar $CL <!--
|
||||
XPTvar $CR -->
|
||||
|
||||
|
||||
XPTinclude
|
||||
\ _comment/doubleSign
|
||||
Loading…
Add table
Add a link
Reference in a new issue