vim-latex-cvs Mailing List for Vim-Latex (Page 32)
Brought to you by:
srinathava,
tmaas
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(82) |
Dec
(124) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(104) |
Feb
(3) |
Mar
(6) |
Apr
(48) |
May
(34) |
Jun
(62) |
Jul
(33) |
Aug
(24) |
Sep
(32) |
Oct
(16) |
Nov
(36) |
Dec
(39) |
| 2004 |
Jan
|
Feb
(3) |
Mar
(8) |
Apr
|
May
(29) |
Jun
(13) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
(6) |
Dec
(9) |
| 2006 |
Jan
(9) |
Feb
(2) |
Mar
(16) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(1) |
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(17) |
Sep
(3) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2010 |
Jan
(25) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(8) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(10) |
Oct
(1) |
Nov
|
Dec
(1) |
| 2012 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(1) |
Dec
|
| 2013 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(15) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
|
From: <sri...@us...> - 2002-12-22 03:01:32
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv16004/ftplugin/latex-suite
Modified Files:
bibtex.vim custommacros.vim diacritics.vim elementmacros.vim
envmacros.vim main.vim mathmacros.vim packages.vim
templates.vim texrc wizardfuncs.vim
Log Message:
This is a merge from the b-newimaps branch. The branch was started when a
need to robustify imaps.vim was felt. Before, it had a big dependence on
"funky" characters. Since imaps.vim affected a lot of files, this commit
has a lot of modified files.
Briefly, it changes the <<, >> and the <a-umlaut> characters throughout
latex-suite to 'unfunky' characters.
<< --- <+
>> --- +>
<a-umlaut> --- <++>
The syntax of IMAP and IMAP_PutTextWithMovement was also changed to accept
2 new optional arguments which specify the placeholder characters in the
a:rhs. This allows scriptwriters to generate long term maps which will not
depend on the internals of imaps.vim
The b-newimaps tip at the time of this merge has been tagged as
b-newimaps-merge-sa-1
Index: bibtex.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/bibtex.vim,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** bibtex.vim 13 Dec 2002 17:23:43 -0000 1.2
--- bibtex.vim 22 Dec 2002 03:00:37 -0000 1.3
***************
*** 3,7 ****
" Function: BibT
" Author: Alan G Isaac <ai...@am...>
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"=============================================================================
--- 3,7 ----
" Function: BibT
" Author: Alan G Isaac <ai...@am...>
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"=============================================================================
***************
*** 11,17 ****
let s:done = 1
! call Tex_IMAP ('BBA', "\<C-r>=BibT('article', '', 0)\<CR>", 'bib')
! call Tex_IMAP ('BBB', "\<C-r>=BibT('inproceedings', '', 0)\<CR>", 'bib')
! call Tex_IMAP ('BAS', "\<C-r>=BibT('', '', 0)\<CR>", 'bib')
" BibT: function to generate a formatted bibtex entry {{{
--- 11,17 ----
let s:done = 1
! call IMAP ('BBA', "\<C-r>=BibT('article', '', 0)\<CR>", 'bib')
! call IMAP ('BBB', "\<C-r>=BibT('inproceedings', '', 0)\<CR>", 'bib')
! call IMAP ('BAS', "\<C-r>=BibT('', '', 0)\<CR>", 'bib')
" BibT: function to generate a formatted bibtex entry {{{
***************
*** 44,48 ****
let extras=""
let retval = ""
! let key='«key»'
" characterize entry types
--- 44,48 ----
let extras=""
let retval = ""
! let key='<+key+>'
" characterize entry types
***************
*** 248,255 ****
endif
endif
! let retval = retval.'otherinfo = {«»}'."\n"
! let retval = retval."}«»"."\n"
! return Tex_PutTextWithMovement(retval)
endfunction
--- 248,255 ----
endif
endif
! let retval = retval.'otherinfo = {<++>}'."\n"
! let retval = retval."}<++>"."\n"
! return IMAP_PutTextWithMovement(retval)
endfunction
***************
*** 259,266 ****
let retval = input(a:prompt)
if retval == ''
! return "«»"
endif
else
! return "«»"
endif
endfunction
--- 259,266 ----
let retval = input(a:prompt)
if retval == ''
! return "<++>"
endif
else
! return "<++>"
endif
endfunction
Index: custommacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/custommacros.vim,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** custommacros.vim 13 Dec 2002 17:23:46 -0000 1.8
--- custommacros.vim 22 Dec 2002 03:00:37 -0000 1.9
***************
*** 4,8 ****
" Version: 1.0
" Created: Tue Apr 23 05:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: functions for processing custom macros in the
--- 4,8 ----
" Version: 1.0
" Created: Tue Apr 23 05:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: functions for processing custom macros in the
***************
*** 109,113 ****
call Tex_CleanSearchHistory()
! silent! exec "normal! i\<C-r>='¡!¡Start here¡!¡'.Tex_PutTextWithMovement(@a)\<CR>"
let pos = line('.').'| normal! '.virtcol('.').'|'
--- 109,113 ----
call Tex_CleanSearchHistory()
! silent! exec "normal! i\<C-r>='¡!¡Start here¡!¡'.IMAP_PutTextWithMovement(@a)\<CR>"
let pos = line('.').'| normal! '.virtcol('.').'|'
Index: diacritics.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/diacritics.vim,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** diacritics.vim 13 Dec 2002 17:23:51 -0000 1.2
--- diacritics.vim 22 Dec 2002 03:00:38 -0000 1.3
***************
*** 3,7 ****
" Author: Lubomir Host
" Created: Tue Apr 23 07:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: shortcuts for all diacritics.
--- 3,7 ----
" Author: Lubomir Host
" Created: Tue Apr 23 07:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: shortcuts for all diacritics.
***************
*** 13,125 ****
" \'{a} {{{
! call Tex_IMAP ('=a', "\\\'{a}", 'tex')
! call Tex_IMAP ('=b', "\\'{b}", 'tex')
! call Tex_IMAP ('=c', "\\'{c}", 'tex')
! call Tex_IMAP ('=d', "\\'{d}", 'tex')
! call Tex_IMAP ('=e', "\\'{e}", 'tex')
! call Tex_IMAP ('=f', "\\'{f}", 'tex')
! call Tex_IMAP ('=g', "\\'{g}", 'tex')
! call Tex_IMAP ('=h', "\\'{h}", 'tex')
! call Tex_IMAP ('=i', "\\'{\i}", 'tex')
! call Tex_IMAP ('=j', "\\'{j}", 'tex')
! call Tex_IMAP ('=k', "\\'{k}", 'tex')
! call Tex_IMAP ('=l', "\\'{l}", 'tex')
! call Tex_IMAP ('=m', "\\'{m}", 'tex')
! call Tex_IMAP ('=n', "\\'{n}", 'tex')
! call Tex_IMAP ('=o', "\\'{o}", 'tex')
! call Tex_IMAP ('=p', "\\'{p}", 'tex')
! call Tex_IMAP ('=q', "\\'{q}", 'tex')
! call Tex_IMAP ('=r', "\\'{r}", 'tex')
! call Tex_IMAP ('=s', "\\'{s}", 'tex')
! call Tex_IMAP ('=t', "\\'{t}", 'tex')
! call Tex_IMAP ('=u', "\\'{u}", 'tex')
! call Tex_IMAP ('=v', "\\'{v}", 'tex')
! call Tex_IMAP ('=w', "\\'{w}", 'tex')
! call Tex_IMAP ('=x', "\\'{x}", 'tex')
! call Tex_IMAP ('=y', "\\'{y}", 'tex')
! call Tex_IMAP ('=z', "\\'{z}", 'tex')
! call Tex_IMAP ('=A', "\\'{A}", 'tex')
! call Tex_IMAP ('=B', "\\'{B}", 'tex')
! call Tex_IMAP ('=C', "\\'{C}", 'tex')
! call Tex_IMAP ('=D', "\\'{D}", 'tex')
! call Tex_IMAP ('=E', "\\'{E}", 'tex')
! call Tex_IMAP ('=F', "\\'{F}", 'tex')
! call Tex_IMAP ('=G', "\\'{G}", 'tex')
! call Tex_IMAP ('=H', "\\'{H}", 'tex')
! call Tex_IMAP ('=I', "\\'{\I}", 'tex')
! call Tex_IMAP ('=J', "\\'{J}", 'tex')
! call Tex_IMAP ('=K', "\\'{K}", 'tex')
! call Tex_IMAP ('=L', "\\'{L}", 'tex')
! call Tex_IMAP ('=M', "\\'{M}", 'tex')
! call Tex_IMAP ('=N', "\\'{N}", 'tex')
! call Tex_IMAP ('=O', "\\'{O}", 'tex')
! call Tex_IMAP ('=P', "\\'{P}", 'tex')
! call Tex_IMAP ('=Q', "\\'{Q}", 'tex')
! call Tex_IMAP ('=R', "\\'{R}", 'tex')
! call Tex_IMAP ('=S', "\\'{S}", 'tex')
! call Tex_IMAP ('=T', "\\'{T}", 'tex')
! call Tex_IMAP ('=U', "\\'{U}", 'tex')
! call Tex_IMAP ('=V', "\\'{V}", 'tex')
! call Tex_IMAP ('=W', "\\'{W}", 'tex')
! call Tex_IMAP ('=X', "\\'{X}", 'tex')
! call Tex_IMAP ('=Y', "\\'{Y}", 'tex')
! call Tex_IMAP ('=Z', "\\'{Z}", 'tex')
" }}}
" \v{a} {{{
! call Tex_IMAP ('+a', "\\v{a}", 'tex')
! call Tex_IMAP ('+b', "\\v{b}", 'tex')
! call Tex_IMAP ('+c', "\\v{c}", 'tex')
! call Tex_IMAP ('+d', "\\v{d}", 'tex')
! call Tex_IMAP ('+e', "\\v{e}", 'tex')
! call Tex_IMAP ('+f', "\\v{f}", 'tex')
! call Tex_IMAP ('+g', "\\v{g}", 'tex')
! call Tex_IMAP ('+h', "\\v{h}", 'tex')
! call Tex_IMAP ('+i', "\\v{\i}", 'tex')
! call Tex_IMAP ('+j', "\\v{j}", 'tex')
! call Tex_IMAP ('+k', "\\v{k}", 'tex')
! call Tex_IMAP ('+l', "\\q l", 'tex')
! call Tex_IMAP ('+m', "\\v{m}", 'tex')
! call Tex_IMAP ('+n', "\\v{n}", 'tex')
! call Tex_IMAP ('+o', "\\v{o}", 'tex')
! call Tex_IMAP ('+p', "\\v{p}", 'tex')
! call Tex_IMAP ('+q', "\\v{q}", 'tex')
! call Tex_IMAP ('+r', "\\v{r}", 'tex')
! call Tex_IMAP ('+s', "\\v{s}", 'tex')
! call Tex_IMAP ('+t', "\\q t", 'tex')
! call Tex_IMAP ('+u', "\\v{u}", 'tex')
! call Tex_IMAP ('+v', "\\v{v}", 'tex')
! call Tex_IMAP ('+w', "\\v{w}", 'tex')
! call Tex_IMAP ('+x', "\\v{x}", 'tex')
! call Tex_IMAP ('+y', "\\v{y}", 'tex')
! call Tex_IMAP ('+z', "\\v{z}", 'tex')
! call Tex_IMAP ('+A', "\\v{A}", 'tex')
! call Tex_IMAP ('+B', "\\v{B}", 'tex')
! call Tex_IMAP ('+C', "\\v{C}", 'tex')
! call Tex_IMAP ('+D', "\\v{D}", 'tex')
! call Tex_IMAP ('+E', "\\v{E}", 'tex')
! call Tex_IMAP ('+F', "\\v{F}", 'tex')
! call Tex_IMAP ('+G', "\\v{G}", 'tex')
! call Tex_IMAP ('+H', "\\v{H}", 'tex')
! call Tex_IMAP ('+I', "\\v{\I}", 'tex')
! call Tex_IMAP ('+J', "\\v{J}", 'tex')
! call Tex_IMAP ('+K', "\\v{K}", 'tex')
! call Tex_IMAP ('+L', "\\v{L}", 'tex')
! call Tex_IMAP ('+M', "\\v{M}", 'tex')
! call Tex_IMAP ('+N', "\\v{N}", 'tex')
! call Tex_IMAP ('+O', "\\v{O}", 'tex')
! call Tex_IMAP ('+P', "\\v{P}", 'tex')
! call Tex_IMAP ('+Q', "\\v{Q}", 'tex')
! call Tex_IMAP ('+R', "\\v{R}", 'tex')
! call Tex_IMAP ('+S', "\\v{S}", 'tex')
! call Tex_IMAP ('+T', "\\v{T}", 'tex')
! call Tex_IMAP ('+U', "\\v{U}", 'tex')
! call Tex_IMAP ('+V', "\\v{V}", 'tex')
! call Tex_IMAP ('+W', "\\v{W}", 'tex')
! call Tex_IMAP ('+X', "\\v{X}", 'tex')
! call Tex_IMAP ('+Y', "\\v{Y}", 'tex')
! call Tex_IMAP ('+Z', "\\v{Z}", 'tex')
" }}}
! call Tex_IMAP ('+}', "\\\"{a}", 'tex')
! call Tex_IMAP ('+:', "\\^{o}", 'tex')
" vim:fdm=marker:ts=4:sw=4:noet
--- 13,125 ----
" \'{a} {{{
! call IMAP ('=a', "\\\'{a}", 'tex')
! call IMAP ('=b', "\\'{b}", 'tex')
! call IMAP ('=c', "\\'{c}", 'tex')
! call IMAP ('=d', "\\'{d}", 'tex')
! call IMAP ('=e', "\\'{e}", 'tex')
! call IMAP ('=f', "\\'{f}", 'tex')
! call IMAP ('=g', "\\'{g}", 'tex')
! call IMAP ('=h', "\\'{h}", 'tex')
! call IMAP ('=i', "\\'{\i}", 'tex')
! call IMAP ('=j', "\\'{j}", 'tex')
! call IMAP ('=k', "\\'{k}", 'tex')
! call IMAP ('=l', "\\'{l}", 'tex')
! call IMAP ('=m', "\\'{m}", 'tex')
! call IMAP ('=n', "\\'{n}", 'tex')
! call IMAP ('=o', "\\'{o}", 'tex')
! call IMAP ('=p', "\\'{p}", 'tex')
! call IMAP ('=q', "\\'{q}", 'tex')
! call IMAP ('=r', "\\'{r}", 'tex')
! call IMAP ('=s', "\\'{s}", 'tex')
! call IMAP ('=t', "\\'{t}", 'tex')
! call IMAP ('=u', "\\'{u}", 'tex')
! call IMAP ('=v', "\\'{v}", 'tex')
! call IMAP ('=w', "\\'{w}", 'tex')
! call IMAP ('=x', "\\'{x}", 'tex')
! call IMAP ('=y', "\\'{y}", 'tex')
! call IMAP ('=z', "\\'{z}", 'tex')
! call IMAP ('=A', "\\'{A}", 'tex')
! call IMAP ('=B', "\\'{B}", 'tex')
! call IMAP ('=C', "\\'{C}", 'tex')
! call IMAP ('=D', "\\'{D}", 'tex')
! call IMAP ('=E', "\\'{E}", 'tex')
! call IMAP ('=F', "\\'{F}", 'tex')
! call IMAP ('=G', "\\'{G}", 'tex')
! call IMAP ('=H', "\\'{H}", 'tex')
! call IMAP ('=I', "\\'{\I}", 'tex')
! call IMAP ('=J', "\\'{J}", 'tex')
! call IMAP ('=K', "\\'{K}", 'tex')
! call IMAP ('=L', "\\'{L}", 'tex')
! call IMAP ('=M', "\\'{M}", 'tex')
! call IMAP ('=N', "\\'{N}", 'tex')
! call IMAP ('=O', "\\'{O}", 'tex')
! call IMAP ('=P', "\\'{P}", 'tex')
! call IMAP ('=Q', "\\'{Q}", 'tex')
! call IMAP ('=R', "\\'{R}", 'tex')
! call IMAP ('=S', "\\'{S}", 'tex')
! call IMAP ('=T', "\\'{T}", 'tex')
! call IMAP ('=U', "\\'{U}", 'tex')
! call IMAP ('=V', "\\'{V}", 'tex')
! call IMAP ('=W', "\\'{W}", 'tex')
! call IMAP ('=X', "\\'{X}", 'tex')
! call IMAP ('=Y', "\\'{Y}", 'tex')
! call IMAP ('=Z', "\\'{Z}", 'tex')
" }}}
" \v{a} {{{
! call IMAP ('+a', "\\v{a}", 'tex')
! call IMAP ('+b', "\\v{b}", 'tex')
! call IMAP ('+c', "\\v{c}", 'tex')
! call IMAP ('+d', "\\v{d}", 'tex')
! call IMAP ('+e', "\\v{e}", 'tex')
! call IMAP ('+f', "\\v{f}", 'tex')
! call IMAP ('+g', "\\v{g}", 'tex')
! call IMAP ('+h', "\\v{h}", 'tex')
! call IMAP ('+i', "\\v{\i}", 'tex')
! call IMAP ('+j', "\\v{j}", 'tex')
! call IMAP ('+k', "\\v{k}", 'tex')
! call IMAP ('+l', "\\q l", 'tex')
! call IMAP ('+m', "\\v{m}", 'tex')
! call IMAP ('+n', "\\v{n}", 'tex')
! call IMAP ('+o', "\\v{o}", 'tex')
! call IMAP ('+p', "\\v{p}", 'tex')
! call IMAP ('+q', "\\v{q}", 'tex')
! call IMAP ('+r', "\\v{r}", 'tex')
! call IMAP ('+s', "\\v{s}", 'tex')
! call IMAP ('+t', "\\q t", 'tex')
! call IMAP ('+u', "\\v{u}", 'tex')
! call IMAP ('+v', "\\v{v}", 'tex')
! call IMAP ('+w', "\\v{w}", 'tex')
! call IMAP ('+x', "\\v{x}", 'tex')
! call IMAP ('+y', "\\v{y}", 'tex')
! call IMAP ('+z', "\\v{z}", 'tex')
! call IMAP ('+A', "\\v{A}", 'tex')
! call IMAP ('+B', "\\v{B}", 'tex')
! call IMAP ('+C', "\\v{C}", 'tex')
! call IMAP ('+D', "\\v{D}", 'tex')
! call IMAP ('+E', "\\v{E}", 'tex')
! call IMAP ('+F', "\\v{F}", 'tex')
! call IMAP ('+G', "\\v{G}", 'tex')
! call IMAP ('+H', "\\v{H}", 'tex')
! call IMAP ('+I', "\\v{\I}", 'tex')
! call IMAP ('+J', "\\v{J}", 'tex')
! call IMAP ('+K', "\\v{K}", 'tex')
! call IMAP ('+L', "\\v{L}", 'tex')
! call IMAP ('+M', "\\v{M}", 'tex')
! call IMAP ('+N', "\\v{N}", 'tex')
! call IMAP ('+O', "\\v{O}", 'tex')
! call IMAP ('+P', "\\v{P}", 'tex')
! call IMAP ('+Q', "\\v{Q}", 'tex')
! call IMAP ('+R', "\\v{R}", 'tex')
! call IMAP ('+S', "\\v{S}", 'tex')
! call IMAP ('+T', "\\v{T}", 'tex')
! call IMAP ('+U', "\\v{U}", 'tex')
! call IMAP ('+V', "\\v{V}", 'tex')
! call IMAP ('+W', "\\v{W}", 'tex')
! call IMAP ('+X', "\\v{X}", 'tex')
! call IMAP ('+Y', "\\v{Y}", 'tex')
! call IMAP ('+Z', "\\v{Z}", 'tex')
" }}}
! call IMAP ('+}', "\\\"{a}", 'tex')
! call IMAP ('+:', "\\^{o}", 'tex')
" vim:fdm=marker:ts=4:sw=4:noet
Index: elementmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/elementmacros.vim,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** elementmacros.vim 13 Dec 2002 17:23:55 -0000 1.5
--- elementmacros.vim 22 Dec 2002 03:00:41 -0000 1.6
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: macros for dimensions/fonts/counters.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: macros for dimensions/fonts/counters.
***************
*** 55,59 ****
exe "vnoremap <silent> ".g:Tex_Leader.vislhs.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
! exe 'call Tex_IMAP ("'.a:font.'", "\\text'.vislhs.'{ä}«»", "tex")'
endif
--- 55,59 ----
exe "vnoremap <silent> ".g:Tex_Leader.vislhs.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
! exe 'call IMAP ("'.a:font.'", "\\text'.vislhs.'{<++>}<++>", "tex")'
endif
***************
*** 62,66 ****
let location = s:fontMenuLoc.substitute(a:fam, '^.', '\u&', '').'.'.vislhs.a:fam.'<tab>'.a:font.'\ ('.g:Tex_Leader.vislhs.')'
exe "amenu ".location.
! \" <plug><C-r>=Tex_PutTextWithMovement('\\text".vislhs."{ä}«»')<CR>"
exe "vmenu ".location.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
--- 62,66 ----
let location = s:fontMenuLoc.substitute(a:fam, '^.', '\u&', '').'.'.vislhs.a:fam.'<tab>'.a:font.'\ ('.g:Tex_Leader.vislhs.')'
exe "amenu ".location.
! \" <plug><C-r>=IMAP_PutTextWithMovement('\\text".vislhs."{<++>}<++>')<CR>"
exe "vmenu ".location.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
***************
*** 75,79 ****
let location = s:fontMenuLoc.'&Diacritics.'.a:name.'<tab>'
exe 'amenu '.location.
! \" <plug><C-r>=Tex_PutTextWithMovement('\\".a:rhs."{«»}«»')<CR>"
exe 'vmenu '.location.
\" \<C-\\>\<C-n>:call VEnclose('\\".a:rhs."{', '}', '', '')<CR>"
--- 75,79 ----
let location = s:fontMenuLoc.'&Diacritics.'.a:name.'<tab>'
exe 'amenu '.location.
! \" <plug><C-r>=IMAP_PutTextWithMovement('\\".a:rhs."{<++>}<++>')<CR>"
exe 'vmenu '.location.
\" \<C-\\>\<C-n>:call VEnclose('\\".a:rhs."{', '}', '', '')<CR>"
***************
*** 90,94 ****
function! <SID>Tex_Fontfont(desc, lhs)
let location = s:fontMenuLoc.'&font.'.a:desc.'<tab>'
! exe "amenu ".location." <plug><C-r>=Tex_PutTextWithMovement('".a:lhs."')<CR>"
exe "vunmenu ".location
endfunction " }}}
--- 90,94 ----
function! <SID>Tex_Fontfont(desc, lhs)
let location = s:fontMenuLoc.'&font.'.a:desc.'<tab>'
! exe "amenu ".location." <plug><C-r>=IMAP_PutTextWithMovement('".a:lhs."')<CR>"
exe "vunmenu ".location
endfunction " }}}
***************
*** 108,112 ****
function! <SID>Tex_VariousMenus(desc, lhs)
let location = s:variousMenuLoc.a:desc.'<tab>'
! exe "amenu ".location." <plug><C-r>=Tex_PutTextWithMovement('".a:lhs."')<CR>"
exe "vunmenu ".location
endfunction " }}}
--- 108,112 ----
function! <SID>Tex_VariousMenus(desc, lhs)
let location = s:variousMenuLoc.a:desc.'<tab>'
! exe "amenu ".location." <plug><C-r>=IMAP_PutTextWithMovement('".a:lhs."')<CR>"
exe "vunmenu ".location
endfunction " }}}
***************
*** 132,136 ****
" the \emph is special.
if g:Tex_FontMaps | exe "vnoremap <silent> ".g:Tex_Leader."em \<C-\\>\<C-N>:call VEnclose('\\emph{', '}', '{\\em', '\\/}')<CR>" | endif
! if g:Tex_FontMaps | exe 'call Tex_IMAP ("FEM", "\\emph{ä}«»", "tex")' | endif
" }}}
--- 132,136 ----
" the \emph is special.
if g:Tex_FontMaps | exe "vnoremap <silent> ".g:Tex_Leader."em \<C-\\>\<C-N>:call VEnclose('\\emph{', '}', '{\\em', '\\/}')<CR>" | endif
! if g:Tex_FontMaps | exe 'call IMAP ("FEM", "\\emph{<++>}<++>", "tex")' | endif
" }}}
***************
*** 166,174 ****
" }}}
" {{{ &font.
! call s:Tex_Fontfont('fontencoding{}', '\fontencoding{ä}«»')
! call s:Tex_Fontfont('fontfamily{qtm}', '\fontfamily{ä}«»')
! call s:Tex_Fontfont('fontseries{m\ b\ bx\ sb\ c}', '\fontseries{ä}«»')
! call s:Tex_Fontfont('fontshape{n\ it\ sl\ sc\ ui}', '\fontshape{ä}«»')
! call s:Tex_Fontfont('fontsize{}{}', '\fontsize{ä}{«»}«»')
call s:Tex_Fontfont('selectfont', '\selectfont ')
" }}}
--- 166,174 ----
" }}}
" {{{ &font.
! call s:Tex_Fontfont('fontencoding{}', '\fontencoding{<++>}<++>')
! call s:Tex_Fontfont('fontfamily{qtm}', '\fontfamily{<++>}<++>')
! call s:Tex_Fontfont('fontseries{m\ b\ bx\ sb\ c}', '\fontseries{<++>}<++>')
! call s:Tex_Fontfont('fontshape{n\ it\ sl\ sc\ ui}', '\fontshape{<++>}<++>')
! call s:Tex_Fontfont('fontsize{}{}', '\fontsize{<++>}{<++>}<++>')
call s:Tex_Fontfont('selectfont', '\selectfont ')
" }}}
***************
*** 320,331 ****
if g:Tex_Menus
" Various {{{
! call <SID>Tex_VariousMenus('ref{}' , '\ref{ä}«»')
! call <SID>Tex_VariousMenus('pageref{}' , '\pageref{ä}«»')
! call <SID>Tex_VariousMenus('label{}' , '\label{ä}«»')
! call <SID>Tex_VariousMenus('footnote{}' , '\footnote{ä}«»')
! call <SID>Tex_VariousMenus('footnotemark{}', '\footnotemark{ä}«»')
! call <SID>Tex_VariousMenus('footnotemark{}', '\footnotetext{ä}«»')
! call <SID>Tex_VariousMenus('cite{}' , '\cite{ä}«»')
! call <SID>Tex_VariousMenus('nocite{}' , '\nocite{ä}«»')
" }}}
endif
--- 320,331 ----
if g:Tex_Menus
" Various {{{
! call <SID>Tex_VariousMenus('ref{}' , '\ref{<++>}<++>')
! call <SID>Tex_VariousMenus('pageref{}' , '\pageref{<++>}<++>')
! call <SID>Tex_VariousMenus('label{}' , '\label{<++>}<++>')
! call <SID>Tex_VariousMenus('footnote{}' , '\footnote{<++>}<++>')
! call <SID>Tex_VariousMenus('footnotemark{}', '\footnotemark{<++>}<++>')
! call <SID>Tex_VariousMenus('footnotemark{}', '\footnotetext{<++>}<++>')
! call <SID>Tex_VariousMenus('cite{}' , '\cite{<++>}<++>')
! call <SID>Tex_VariousMenus('nocite{}' , '\nocite{<++>}<++>')
" }}}
endif
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** envmacros.vim 13 Dec 2002 17:23:59 -0000 1.12
--- envmacros.vim 22 Dec 2002 03:00:43 -0000 1.13
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 08:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: mappings/menus for environments.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 08:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: mappings/menus for environments.
***************
*** 18,33 ****
" Define environments for IMAP evaluation " {{{
! let s:figure = "\\begin{figure}[«htpb»]\<cr>\\begin{center}\<cr>\\psfig{figure=«eps file»}\<cr>\\end{center}\<cr>\\caption{«caption text»}\<cr>\\label{fig:«label»}\<cr>\\end{figure}«»"
! let s:minipage = "\\begin{minipage}[«tb»]{«width»}\<cr>«»\<cr>\\end{minipage}«»"
! let s:picture = "\\begin{picture}(«width», «height»)(«xoff»,«yoff»)\<cr>\\put(«xoff»,«yoff»){\\framebox(«»,«»){«»}}\<cr>\\end{picture}«»"
! let s:list = "\\begin{list}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{list}«»"
! let s:enumerate = "\\begin{enumerate}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{enumerate}«»"
! let s:itemize = "\\begin{itemize}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{itemize}«»"
! let s:theindex = "\\begin{theindex}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{theindex}«»"
! let s:trivlist = "\\begin{trivlist}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{trivlist}«»"
! let s:table = "\\begin{table}\<cr>\\centering\<cr>\\begin{tabular}{«dimensions»}\<cr>«»\<cr>\\end{tabular}\<cr>\\caption{«Caption text»}\<cr>\\label{tab:«label»}\<cr>\\end{table}«»"
! let s:array = "\\leftä\<cr>\\begin{array}{«dimension»}\<cr>«elements»\<cr>\\end{array}\<cr>\\right«»"
! let s:description ="\\begin{description}\<cr>\\item[«label»]«»\<cr>\\end{description}«»"
! let s:document = "\\documentclass[«options»]{«class»}\<cr>\<cr>\\begin{document}\<cr>«»\<cr>\\end{document}"
" }}}
--- 18,33 ----
" Define environments for IMAP evaluation " {{{
! let s:figure = "\\begin{figure}[<+htpb+>]\<cr>\\begin{center}\<cr>\\psfig{figure=<+eps file+>}\<cr>\\end{center}\<cr>\\caption{<+caption text+>}\<cr>\\label{fig:<+label+>}\<cr>\\end{figure}<++>"
! let s:minipage = "\\begin{minipage}[<+tb+>]{<+width+>}\<cr><++>\<cr>\\end{minipage}<++>"
! let s:picture = "\\begin{picture}(<+width+>, <+height+>)(<+xoff+>,<+yoff+>)\<cr>\\put(<+xoff+>,<+yoff+>){\\framebox(<++>,<++>){<++>}}\<cr>\\end{picture}<++>"
! let s:list = "\\begin{list}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{list}<++>"
! let s:enumerate = "\\begin{enumerate}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{enumerate}<++>"
! let s:itemize = "\\begin{itemize}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{itemize}<++>"
! let s:theindex = "\\begin{theindex}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{theindex}<++>"
! let s:trivlist = "\\begin{trivlist}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{trivlist}<++>"
! let s:table = "\\begin{table}\<cr>\\centering\<cr>\\begin{tabular}{<+dimensions+>}\<cr><++>\<cr>\\end{tabular}\<cr>\\caption{<+Caption text+>}\<cr>\\label{tab:<+label+>}\<cr>\\end{table}<++>"
! let s:array = "\\left<++>\<cr>\\begin{array}{<+dimension+>}\<cr><+elements+>\<cr>\\end{array}\<cr>\\right<++>"
! let s:description ="\\begin{description}\<cr>\\item[<+label+>]<++>\<cr>\\end{description}<++>"
! let s:document = "\\documentclass[<+options+>]{<+class+>}\<cr>\<cr>\\begin{document}\<cr><++>\<cr>\\end{document}"
" }}}
***************
*** 74,78 ****
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call Tex_IMAP (a:lhs, '\begin{'.a:name."}\<CR>".extra."«»\<CR>\\end{".a:name."}«»", 'tex')
exec 'vnoremap <silent> '.vlhs.' '.vrhs
endif
--- 74,78 ----
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call IMAP (a:lhs, '\begin{'.a:name."}\<CR>".extra."<++>\<CR>\\end{".a:name."}<++>", 'tex')
exec 'vnoremap <silent> '.vlhs.' '.vrhs
endif
***************
*** 113,117 ****
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call Tex_IMAP(a:lhs, a:irhs, 'tex')
exec 'vnoremap '.vlhs.' '.vrhs
endif
--- 113,117 ----
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call IMAP(a:lhs, a:irhs, 'tex')
exec 'vnoremap '.vlhs.' '.vrhs
endif
***************
*** 123,127 ****
exe 'amenu '.location.' <plug><C-r>=Tex_DoEnvironment("'.a:name.'")<CR>'
else
! exe 'amenu '.location." <plug><C-r>=Tex_PutTextWithMovement('".a:irhs."')<CR>"
endif
exe 'vmenu '.location.' '.vrhs
--- 123,127 ----
exe 'amenu '.location.' <plug><C-r>=Tex_DoEnvironment("'.a:name.'")<CR>'
else
! exe 'amenu '.location." <plug><C-r>=IMAP_PutTextWithMovement('".a:irhs."')<CR>"
endif
exe 'vmenu '.location.' '.vrhs
***************
*** 138,142 ****
if g:Tex_SectionMaps && !exists('s:doneOnce')
exe 'vnoremap '.vlhs.' '.vrhs
! call Tex_IMAP (a:lhs, "\\".a:name.'{«»}«»', 'tex')
endif
--- 138,142 ----
if g:Tex_SectionMaps && !exists('s:doneOnce')
exe 'vnoremap '.vlhs.' '.vrhs
! call IMAP (a:lhs, "\\".a:name.'{<++>}<++>', 'tex')
endif
***************
*** 145,149 ****
let advlocation = g:Tex_EnvMenuLocation.'Sections.Advanced.'.a:name
! let irhs = "\<C-r>=Tex_PutTextWithMovement('\\".a:name."{«»}«»')\<CR>"
let advirhs = "\<C-r>=Tex_InsSecAdv('".a:name."')\<CR>"
--- 145,149 ----
let advlocation = g:Tex_EnvMenuLocation.'Sections.Advanced.'.a:name
! let irhs = "\<C-r>=IMAP_PutTextWithMovement('\\".a:name."{<++>}<++>')\<CR>"
let advirhs = "\<C-r>=Tex_InsSecAdv('".a:name."')\<CR>"
***************
*** 159,172 ****
" NewEnvironments {{{
! call s:Tex_SpecialMacros('', '', 'newenvironment', '\newenvironment{«»}[«»][«»]{«»}{«»}«»', 0)
! call s:Tex_SpecialMacros('', '', 'newenvironment*', '\newenvironment*{«»}[«»][«»]{«»}{«»}«»', 0)
! call s:Tex_SpecialMacros('', '', 'renewenvironment', '\renewenvironment{«»}[«»][«»]{«»}{«»}«»', 0)
! call s:Tex_SpecialMacros('', '', 'renewenvironment*', '\renewenvironment*{«»}[«»][«»]{«»}{«»}«»', 0)
call s:Tex_SpecialMacros('', '', '-sepenv0-', ' :', 0)
" }}}
" Environments specific commands {{{
call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', '&item', '\item', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', 'i&tem[]', '\item[«»]«»', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', '&bibitem{}', '\bibitem{«»}«»', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&=', '\=', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&>', '\>', 0)
--- 159,172 ----
" NewEnvironments {{{
! call s:Tex_SpecialMacros('', '', 'newenvironment', '\newenvironment{<++>}[<++>][<++>]{<++>}{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', '', 'newenvironment*', '\newenvironment*{<++>}[<++>][<++>]{<++>}{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', '', 'renewenvironment', '\renewenvironment{<++>}[<++>][<++>]{<++>}{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', '', 'renewenvironment*', '\renewenvironment*{<++>}[<++>][<++>]{<++>}{<++>}<++>', 0)
call s:Tex_SpecialMacros('', '', '-sepenv0-', ' :', 0)
" }}}
" Environments specific commands {{{
call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', '&item', '\item', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', 'i&tem[]', '\item[<++>]<++>', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', '&bibitem{}', '\bibitem{<++>}<++>', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&=', '\=', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&>', '\>', 0)
***************
*** 177,183 ****
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&`', '\`', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&kill', '\kill', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '&makron\ \\CHAR=', '\«»=«»', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', "&aigu\ \\CHAR\'", "\\«»\'«»", 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '&grave\ \\CHAR`', '\«»`«»', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', 'p&ushtabs', '\pushtabs', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', 'p&optabs', '\poptabs', 0)
--- 177,183 ----
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&`', '\`', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&kill', '\kill', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '&makron\ \\CHAR=', '\<++>=<++>', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', "&aigu\ \\CHAR\'", "\\<++>\'<++>", 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '&grave\ \\CHAR`', '\<++>`<++>', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', 'p&ushtabs', '\pushtabs', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', 'p&optabs', '\poptabs', 0)
***************
*** 186,190 ****
call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&\&', '&', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&\\\\', '\\', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&multicolumn{}{}{}', '\multicolumn{«»}{«»}{«»}«»', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&makelabels', '\makelabels', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&address', '\address', 0)
--- 186,190 ----
call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&\&', '&', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&\\\\', '\\', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&multicolumn{}{}{}', '\multicolumn{<++>}{<++>}{<++>}<++>', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&makelabels', '\makelabels', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&address', '\address', 0)
***************
*** 192,201 ****
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&date', '\date', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '-sepenva4-', ' :', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&opening{}', '\opening{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&closing{}', '\closing{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&ps{}', '\ps{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', 'cc&{}', '\cc{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&onlyslides{}', '\onlyslides{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&onlynotes{}', '\onlynotes{«»}«»', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '-sepenva5-', ' :', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&invisible', '\invisible', 0)
--- 192,201 ----
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&date', '\date', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '-sepenva4-', ' :', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&opening{}', '\opening{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&closing{}', '\closing{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&ps{}', '\ps{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', 'cc&{}', '\cc{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&onlyslides{}', '\onlyslides{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&onlynotes{}', '\onlynotes{<++>}<++>', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '-sepenva5-', ' :', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&invisible', '\invisible', 0)
***************
*** 286,290 ****
" Tex_itemize: {{{
function! Tex_itemize(env)
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>\\item «»\<cr>\\end{".a:env."}«»")
endfunction
" }}}
--- 286,290 ----
" Tex_itemize: {{{
function! Tex_itemize(env)
! return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>\\item <++>\<cr>\\end{".a:env."}<++>")
endfunction
" }}}
***************
*** 296,302 ****
let itlabel = '['.itlabel.']'
endif
! return Tex_PutTextWithMovement("\\begin{description}\<cr>\\item".itlabel." «»\<cr>\\end{description}«»")
else
! return Tex_PutTextWithMovement(s:description)
endif
endfunction
--- 296,302 ----
let itlabel = '['.itlabel.']'
endif
! return IMAP_PutTextWithMovement("\\begin{description}\<cr>\\item".itlabel." <++>\<cr>\\end{description}<++>")
else
! return IMAP_PutTextWithMovement(s:description)
endif
endfunction
***************
*** 319,323 ****
let pic = '\input{'.pic."}\<cr>"
else
! let pic = "ä\<cr>"
endif
if caption != ''
--- 319,323 ----
let pic = '\input{'.pic."}\<cr>"
else
! let pic = "<++>\<cr>"
endif
if caption != ''
***************
*** 341,347 ****
let figure = figure . centr
let figure = figure . '\end{'.a:env.'}'
! return Tex_PutTextWithMovement(figure)
else
! return Tex_PutTextWithMovement(s:figure)
endif
endfunction
--- 341,347 ----
let figure = figure . centr
let figure = figure . '\end{'.a:env.'}'
! return IMAP_PutTextWithMovement(figure)
else
! return IMAP_PutTextWithMovement(s:figure)
endif
endfunction
***************
*** 372,378 ****
let format = input("Format ( l r c p{width} | @{text} )? ")
if format == ''
! let format = '«»'
endif
! let ret = ret.foo.'{'.format."}\<cr>ä\<cr>\\end{tabular}«»\<cr>"
if center == 'y'
let ret=ret."\\end{center}\<cr>"
--- 372,378 ----
let format = input("Format ( l r c p{width} | @{text} )? ")
if format == ''
! let format = '<++>'
endif
! let ret = ret.foo.'{'.format."}\<cr><++>\<cr>\\end{tabular}<++>\<cr>"
if center == 'y'
let ret=ret."\\end{center}\<cr>"
***************
*** 384,391 ****
let ret=ret.'\label{tab:'.label."}\<cr>"
endif
! let ret=ret.'\end{table}«»'
! return Tex_PutTextWithMovement(ret)
else
! return Tex_PutTextWithMovement(s:table)
endif
endfunction
--- 384,391 ----
let ret=ret.'\label{tab:'.label."}\<cr>"
endif
! let ret=ret.'\end{table}<++>'
! return IMAP_PutTextWithMovement(ret)
else
! return IMAP_PutTextWithMovement(s:table)
endif
endfunction
***************
*** 402,408 ****
let format = '{'.format.'}'
endif
! return Tex_PutTextWithMovement('\begin{'.a:env.'}'.pos.format."\<cr> \<cr>\\end{".a:env.'}«»')
else
! return Tex_PutTextWithMovement('\begin{'.a:env.'}[«position»]{«format»}'."\<cr>«»\<cr>\\end{".a:env.'}«»')
endif
endfunction
--- 402,408 ----
let format = '{'.format.'}'
endif
! return IMAP_PutTextWithMovement('\begin{'.a:env.'}'.pos.format."\<cr> \<cr>\\end{".a:env.'}<++>')
else
! return IMAP_PutTextWithMovement('\begin{'.a:env.'}[<+position+>]{<+format+>}'."\<cr><++>\<cr>\\end{".a:env.'}<++>')
endif
endfunction
***************
*** 421,432 ****
let arrlabel = ''
endif
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."«»\<cr>\\end{".a:env."}«»")
else
if a:env !~ '\*'
! let arrlabel = '\label{«»}«»'
else
! let arrlabel = '«»'
endif
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."\<cr>".'\end{'.a:env.'}«»')
endif
endfunction
--- 421,432 ----
let arrlabel = ''
endif
! return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."<++>\<cr>\\end{".a:env."}<++>")
else
if a:env !~ '\*'
! let arrlabel = '\label{<++>}<++>'
else
! let arrlabel = '<++>'
endif
! return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."\<cr>".'\end{'.a:env.'}<++>')
endif
endfunction
***************
*** 445,451 ****
let label = ''
endif
! return Tex_PutTextWithMovement('\begin{list}'.label."\<cr>\\item \<cr>\\end{list}«»")
else
! return Tex_PutTextWithMovement(s:list)
endif
endfunction
--- 445,451 ----
let label = ''
endif
! return IMAP_PutTextWithMovement('\begin{list}'.label."\<cr>\\item \<cr>\\end{list}<++>")
else
! return IMAP_PutTextWithMovement(s:list)
endif
endfunction
***************
*** 462,468 ****
let foo = foo.'['.opts.']'.'{'.dstyle.'}'
endif
! return Tex_PutTextWithMovement(foo."\<cr>\<cr>\\begin{document}\<cr>«»\<cr>\\end{document}")
else
! return Tex_PutTextWithMovement(s:document)
endif
endfunction
--- 462,468 ----
let foo = foo.'['.opts.']'.'{'.dstyle.'}'
endif
! return IMAP_PutTextWithMovement(foo."\<cr>\<cr>\\begin{document}\<cr><++>\<cr>\\end{document}")
else
! return IMAP_PutTextWithMovement(s:document)
endif
endfunction
***************
*** 479,485 ****
let foo = foo.'['.pos.']{'.width.'}'
endif
! return Tex_PutTextWithMovement(foo."\<cr>«»\<cr>\\end{minipage}«»")
else
! return Tex_PutTextWithMovement(s:minipage)
endif
endfunction
--- 479,485 ----
let foo = foo.'['.pos.']{'.width.'}'
endif
! return IMAP_PutTextWithMovement(foo."\<cr><++>\<cr>\\end{minipage}<++>")
else
! return IMAP_PutTextWithMovement(s:minipage)
endif
endfunction
***************
*** 497,501 ****
endif
let bar = bar.'{'.key.'}'
! return Tex_PutTextWithMovement('\begin{thebibliography}'.foo."\<cr>".bar." \<cr>\\end{thebibliography}«»\<Up>")
endfunction
" }}}
--- 497,501 ----
endif
let bar = bar.'{'.key.'}'
! return IMAP_PutTextWithMovement('\begin{thebibliography}'.foo."\<cr>".bar." \<cr>\\end{thebibliography}<++>\<Up>")
endfunction
" }}}
***************
*** 580,588 ****
exe 'return Tex_'.a:env.'(a:env)'
elseif a:env == '$$'
! return Tex_PutTextWithMovement('$$«»$$')
elseif a:env == '['
! return Tex_PutTextWithMovement("\\[\<CR>«»\<CR>\\]«»")
else
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>«»\<cr>\\end{".a:env."}«»")
endif
endfunction " }}}
--- 580,588 ----
exe 'return Tex_'.a:env.'(a:env)'
elseif a:env == '$$'
! return IMAP_PutTextWithMovement('$$<++>$$')
elseif a:env == '['
! return IMAP_PutTextWithMovement("\\[\<CR><++>\<CR>\\]<++>")
else
! return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr><++>\<cr>\\end{".a:env."}<++>")
endif
endfunction " }}}
Index: main.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** main.vim 13 Dec 2002 17:24:06 -0000 1.16
--- main.vim 22 Dec 2002 03:00:44 -0000 1.17
***************
*** 4,8 ****
" Email: sr...@fa...
" URL:
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Help:
--- 4,8 ----
" Email: sr...@fa...
" URL:
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Help:
***************
*** 75,137 ****
" short forms for latex formatting and math elements. {{{
" taken from auctex.vim or miktexmacros.vim
! call Tex_IMAP ('__', '_{ä}«»', "tex")
! call Tex_IMAP ('()', '(ä)«»', "tex")
! call Tex_IMAP ('[]', '[ä]«»', "tex")
! call Tex_IMAP ('{}', '{ä}«»', "tex")
! call Tex_IMAP ('^^', '^{ä}«»', "tex")
! call Tex_IMAP ('$$', '$ä$«»', "tex")
! call Tex_IMAP ('==', '&=& ', "tex")
! call Tex_IMAP ('~~', '&\approx& ', "tex")
! call Tex_IMAP ('=~', '\approx', "tex")
! call Tex_IMAP ('::', '\dots', "tex")
! call Tex_IMAP ('((', '\left( ä \right)«»', "tex")
! call Tex_IMAP ('[[', '\left[ ä \right]«»', "tex")
! call Tex_IMAP ('{{', '\left\{ ä \right\}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'^', '\hat{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'_', '\bar{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'6', '\partial', "tex")
! call Tex_IMAP (g:Tex_Leader.'8', '\infty', "tex")
! call Tex_IMAP (g:Tex_Leader.'/', '\frac{ä}{«»}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'%', '\frac{ä}{«»}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'@', '\circ', "tex")
! call Tex_IMAP (g:Tex_Leader.'0', '^\circ', "tex")
! call Tex_IMAP (g:Tex_Leader.'=', '\equiv', "tex")
! call Tex_IMAP (g:Tex_Leader."\\",'\setminus', "tex")
! call Tex_IMAP (g:Tex_Leader.'.', '\cdot', "tex")
! call Tex_IMAP (g:Tex_Leader.'*', '\times', "tex")
! call Tex_IMAP (g:Tex_Leader.'&', '\wedge', "tex")
! call Tex_IMAP (g:Tex_Leader.'-', '\bigcap', "tex")
! call Tex_IMAP (g:Tex_Leader.'+', '\bigcup', "tex")
! call Tex_IMAP (g:Tex_Leader.'(', '\subset', "tex")
! call Tex_IMAP (g:Tex_Leader.')', '\supset', "tex")
! call Tex_IMAP (g:Tex_Leader.'<', '\le', "tex")
! call Tex_IMAP (g:Tex_Leader.'>', '\ge', "tex")
! call Tex_IMAP (g:Tex_Leader.',', '\nonumber', "tex")
! call Tex_IMAP (g:Tex_Leader.'~', '\tilde{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.';', '\dot{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.':', '\ddot{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'2', '\sqrt{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'|', '\Big|', "tex")
! call Tex_IMAP (g:Tex_Leader.'I', "\\int_{ä}^{«»}«»", 'tex')
" }}}
" other miscellaneous stuff taken from imaps.vim. {{{
! call Tex_IMAP ("vb".s:ml, "\\verb|ä|«»", "tex")
! call Tex_IMAP ("bf".s:ml, "{\\bf ä}«»", "tex")
! call Tex_IMAP ("em".s:ml, "{\\em ä}«»", "tex")
! call Tex_IMAP ("it".s:ml, "{\\it ä}«»", "tex")
! call Tex_IMAP ("mb".s:ml, "\\mbox{ä}«»", "tex")
! call Tex_IMAP ("frac".s:ml, "\\frac{ä}{«»}«»", "tex")
! call Tex_IMAP ("sq".s:ml, "\\sqrt{ä}«»", "tex")
! call Tex_IMAP ("eps".s:ml, "\\psfig{figure=ä.eps}«»", "tex")
! call Tex_IMAP ("sum".s:ml, "\\sum{ä}{«»}«»", "tex")
! call Tex_IMAP ("suml".s:ml, "\\sum\\limits_{ä}^{«»}«»", "tex")
! call Tex_IMAP ("int".s:ml, "\\int_{ä}^{«»}«»", "tex")
! call Tex_IMAP ("intl".s:ml, "\\int\\limits_{ä}^{«»}«»", "tex")
! call Tex_IMAP ("bbr".s:ml, "\\left( ä \\right)«»", "tex")
! call Tex_IMAP ("bbc".s:ml, "\\left\\{ ä \\right\\}«»", "tex")
! call Tex_IMAP ("bbs".s:ml, "\\left[ ä \\right]«»", "tex")
! call Tex_IMAP ("rr".s:ml, "\\right", "tex")
! call Tex_IMAP ("ll".s:ml, "\\left", "tex")
! call Tex_IMAP ("part".s:ml, "\\partial", "tex")
" }}}
" Greek Letters {{{
--- 75,137 ----
" short forms for latex formatting and math elements. {{{
" taken from auctex.vim or miktexmacros.vim
! call IMAP ('__', '_{<++>}<++>', "tex")
! call IMAP ('()', '(<++>)<++>', "tex")
! call IMAP ('[]', '[<++>]<++>', "tex")
! call IMAP ('{}', '{<++>}<++>', "tex")
! call IMAP ('^^', '^{<++>}<++>', "tex")
! call IMAP ('$$', '$<++>$<++>', "tex")
! call IMAP ('==', '&=& ', "tex")
! call IMAP ('~~', '&\approx& ', "tex")
! call IMAP ('=~', '\approx', "tex")
! call IMAP ('::', '\dots', "tex")
! call IMAP ('((', '\left( <++> \right)<++>', "tex")
! call IMAP ('[[', '\left[ <++> \right]<++>', "tex")
! call IMAP ('{{', '\left\{ <++> \right\}<++>', "tex")
! call IMAP (g:Tex_Leader.'^', '\hat{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'_', '\bar{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'6', '\partial', "tex")
! call IMAP (g:Tex_Leader.'8', '\infty', "tex")
! call IMAP (g:Tex_Leader.'/', '\frac{<++>}{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'%', '\frac{<++>}{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'@', '\circ', "tex")
! call IMAP (g:Tex_Leader.'0', '^\circ', "tex")
! call IMAP (g:Tex_Leader.'=', '\equiv', "tex")
! call IMAP (g:Tex_Leader."\\",'\setminus', "tex")
! call IMAP (g:Tex_Leader.'.', '\cdot', "tex")
! call IMAP (g:Tex_Leader.'*', '\times', "tex")
! call IMAP (g:Tex_Leader.'&', '\wedge', "tex")
! call IMAP (g:Tex_Leader.'-', '\bigcap', "tex")
! call IMAP (g:Tex_Leader.'+', '\bigcup', "tex")
! call IMAP (g:Tex_Leader.'(', '\subset', "tex")
! call IMAP (g:Tex_Leader.')', '\supset', "tex")
! call IMAP (g:Tex_Leader.'<', '\le', "tex")
! call IMAP (g:Tex_Leader.'>', '\ge', "tex")
! call IMAP (g:Tex_Leader.',', '\nonumber', "tex")
! call IMAP (g:Tex_Leader.'~', '\tilde{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.';', '\dot{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.':', '\ddot{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'2', '\sqrt{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'|', '\Big|', "tex")
! call IMAP (g:Tex_Leader.'I', "\\int_{<++>}^{<++>}<++>", 'tex')
" }}}
" other miscellaneous stuff taken from imaps.vim. {{{
! call IMAP ("vb".s:ml, "\\verb|<++>|<++>", "tex")
! call IMAP ("bf".s:ml, "{\\bf <++>}<++>", "tex")
! call IMAP ("em".s:ml, "{\\em <++>}<++>", "tex")
! call IMAP ("it".s:ml, "{\\it <++>}<++>", "tex")
! call IMAP ("mb".s:ml, "\\mbox{<++>}<++>", "tex")
! call IMAP ("frac".s:ml, "\\frac{<++>}{<++>}<++>", "tex")
! call IMAP ("sq".s:ml, "\\sqrt{<++>}<++>", "tex")
! call IMAP ("eps".s:ml, "\\psfig{figure=<++>.eps}<++>", "tex")
! call IMAP ("sum".s:ml, "\\sum{<++>}{<++>}<++>", "tex")
! call IMAP ("suml".s:ml, "\\sum\\limits_{<++>}^{<++>}<++>", "tex")
! call IMAP ("int".s:ml, "\\int_{<++>}^{<++>}<++>", "tex")
! call IMAP ("intl".s:ml, "\\int\\limits_{<++>}^{<++>}<++>", "tex")
! call IMAP ("bbr".s:ml, "\\left( <++> \\right)<++>", "tex")
! call IMAP ("bbc".s:ml, "\\left\\{ <++> \\right\\}<++>", "tex")
! call IMAP ("bbs".s:ml, "\\left[ <++> \\right]<++>", "tex")
! call IMAP ("rr".s:ml, "\\right", "tex")
! call IMAP ("ll".s:ml, "\\left", "tex")
! call IMAP ("part".s:ml, "\\partial", "tex")
" }}}
" Greek Letters {{{
***************
*** 178,182 ****
" something like ``a (at the beginning of a quote), we immediately get
" `\alpha. Also if there is a \ preceding the `, then do not insert a
! " greek letter so we can insert greek letters such as \`a.
function! TEX_InsertGreekLetter(char)
if a:char =~ '[a-zA-Z]' && getline('.')[col('.')-2] != '`'
--- 178,182 ----
" something like ``a (at the beginning of a quote), we immediately get
" `\alpha. Also if there is a \ preceding the `, then do not insert a
! " greek letter so we can insert accented letters such as \`a.
function! TEX_InsertGreekLetter(char)
if a:char =~ '[a-zA-Z]' && getline('.')[col('.')-2] != '`'
***************
*** 193,199 ****
let i = char2nr('a')
while i <= char2nr('z')
! call Tex_IMAP(g:Tex_Leader.nr2char(i), "\<C-r>=TEX_InsertGreekLetter('".nr2char(i)."')\<CR>", 'tex')
if exists('s:greek_'.nr2char(i-32))
! call Tex_IMAP(g:Tex_Leader.nr2char(i-32), "\<C-r>=TEX_InsertGreekLetter('".nr2char(i-32)."')\<CR>", 'tex')
endif
let i = i + 1
--- 193,199 ----
let i = char2nr('a')
while i <= char2nr('z')
! call IMAP(g:Tex_Leader.nr2char(i), "\<C-r>=TEX_InsertGreekLetter('".nr2char(i)."')\<CR>", 'tex')
if exists('s:greek_'.nr2char(i-32))
! call IMAP(g:Tex_Leader.nr2char(i-32), "\<C-r>=TEX_InsertGreekLetter('".nr2char(i-32)."')\<CR>", 'tex')
endif
let i = i + 1
Index: mathmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/mathmacros.vim,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mathmacros.vim 13 Dec 2002 17:24:13 -0000 1.3
--- mathmacros.vim 22 Dec 2002 03:00:46 -0000 1.4
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: macros for everything mathematical in latex.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: macros for everything mathematical in latex.
***************
*** 79,91 ****
" MATH Fonts {{{
let s:pA2a = s:pA."&MathFonts."
! exe s:pA2a.'mathbf{} <plug><C-r>=Tex_PutTextWithMovement("\\mathbf{ä}«»")<cr>'
! exe s:pA2a.'mathrm{} <plug><C-r>=Tex_PutTextWithMovement("\\mathrm{ä}«»")<cr>'
! exe s:pA2a.'mathsf{} <plug><C-r>=Tex_PutTextWithMovement("\\mathsf{ä}«»")<cr>'
! exe s:pA2a.'mathtt{} <plug><C-r>=Tex_PutTextWithMovement("\\mathtt{ä}«»")<cr>'
! exe s:pA2a.'mathit{} <plug><C-r>=Tex_PutTextWithMovement("\\mathit{ä}«»")<cr>'
! exe s:pA2a.'mathfrak{} <plug><C-r>=Tex_PutTextWithMovement("\\mathfrak{ä}«»")<cr>'
! exe s:pA2a.'mathcal{} <plug><C-r>=Tex_PutTextWithMovement("\\mathcal{ä}«»")<cr>'
! exe s:pA2a.'mathscr{} <plug><C-r>=Tex_PutTextWithMovement("\\mathscr{ä}«»")<cr>'
! exe s:pA2a.'mathbb{} <plug><C-r>=Tex_PutTextWithMovement("\\mathbb{ä}«»")<cr>'
" }}}
" Greek Letters small {{{
--- 79,91 ----
" MATH Fonts {{{
let s:pA2a = s:pA."&MathFonts."
! exe s:pA2a.'mathbf{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathbf{<++>}<++>")<cr>'
! exe s:pA2a.'mathrm{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathrm{<++>}<++>")<cr>'
! exe s:pA2a.'mathsf{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathsf{<++>}<++>")<cr>'
! exe s:pA2a.'mathtt{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathtt{<++>}<++>")<cr>'
! exe s:pA2a.'mathit{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathit{<++>}<++>")<cr>'
! exe s:pA2a.'mathfrak{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathfrak{<++>}<++>")<cr>'
! exe s:pA2a.'mathcal{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathcal{<++>}<++>")<cr>'
! exe s:pA2a.'mathscr{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathscr{<++>}<++>")<cr>'
! exe s:pA2a.'mathbb{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathbb{<++>}<++>")<cr>'
" }}}
" Greek Letters small {{{
***************
*** 472,498 ****
" {{{ MathDiacritics
let s:pA12 = s:pA."&MathDiacritics."
! exe s:pA12.'acute{} <plug><C-r>=Tex_PutTextWithMovement("\\acute{ä}«»")<cr>'
! exe s:pA12.'bar{}<Tab>`_ <plug><C-r>=Tex_PutTextWithMovement("\\bar{ä}«»")<cr>'
! exe s:pA12.'breve{} <plug><C-r>=Tex_PutTextWithMovement("\\breve{ä}«»")<cr>'
! exe s:pA12.'check{} <plug><C-r>=Tex_PutTextWithMovement("\\check{ä}«»")<cr>'
! exe s:pA12.'ddot{}<Tab>`: <plug><C-r>=Tex_PutTextWithMovement("\\ddot{ä}«»")<cr>'
! exe s:pA12.'dot{}<Tab>`; <plug><C-r>=Tex_PutTextWithMovement("\\dot{ä}«»")<cr>'
! exe s:pA12.'grave{} <plug><C-r>=Tex_PutTextWithMovement("\\grave{ä}«»")<cr>'
! exe s:pA12.'hat{}<Tab>`^ <plug><C-r>=Tex_PutTextWithMovement("\\hat{ä}«»")<cr>'
! exe s:pA12.'tilde{}<tab>`~ <plug><C-r>=Tex_PutTextWithMovement("\\tilde{ä}«»")<cr>'
! exe s:pA12.'vec{} <plug><C-r>=Tex_PutTextWithMovement("\\vec{ä}«»")<cr>'
! exe s:pA12.'widehat{} <plug><C-r>=Tex_PutTextWithMovement("\\widehat{ä}«»")<cr>'
! exe s:pA12.'widetilde{} <plug><C-r>=Tex_PutTextWithMovement("\\widetilde{ä}«»")<cr>'
! exe s:pA12.'imath <plug><C-r>=Tex_PutTextWithMovement("\\imath")<cr>'
! exe s:pA12.'jmath <plug><C-r>=Tex_PutTextWithMovement("\\jmath")<cr>'
" }}}
" {{{ OverlineAndCo
let s:pA13 = s:pA."&OverlineAndCo."
! exe s:pA13.'overline{} <plug><C-r>=Tex_PutTextWithMovement("\\overline{}")<cr>'
! exe s:pA13.'underline{} <plug><C-r>=Tex_PutTextWithMovement("\\underline{}")<cr>'
! exe s:pA13.'overrightarrow{} <plug><C-r>=Tex_PutTextWithMovement("\\overrightarrow{}")<cr>'
! exe s:pA13.'overleftarrow{} <plug><C-r>=Tex_PutTextWithMovement("\\overleftarrow{}")<cr>'
! exe s:pA13.'overbrace{} <plug><C-r>=Tex_PutTextWithMovement("\\overbrace{}")<cr>'
! exe s:pA13.'underbrace{} <plug><C-r>=Tex_PutTextWithMovement("\\underbrace{}")<cr>'
" }}}
" {{{ Symbols1
--- 472,498 ----
" {{{ MathDiacritics
let s:pA12 = s:pA."&MathDiacritics."
! exe s:pA12.'acute{} <plug><C-r>=IMAP_PutTextWithMovement("\\acute{<++>}<++>")<cr>'
! exe s:pA12.'bar{}<Tab>`_ <plug><C-r>=IMAP_PutTextWithMovement("\\bar{<++>}<++>")<cr>'
! exe s:pA12.'breve{} <plug><C-r>=IMAP_PutTextWithMovement("\\breve{<++>}<++>")<cr>'
! exe s:pA12.'check{} <plug><C-r>=IMAP_PutTextWithMovement("\\check{<++>}<++>")<cr>'
! exe s:pA12.'ddot{}<Tab>`: <plug><C-r>=IMAP_PutTextWithMovement("\\ddot{<++>}<++>")<cr>'
! exe s:pA12.'dot{}<Tab>`; <plug><C-r>=IMAP_PutTextWithMovement("\\dot{<++>}<++>")<cr>'
! exe s:pA12.'grave{} <plug><C-r>=IMAP_PutTextWithMovement("\\grave{<++>}<++>")<cr>'
! exe s:pA12.'hat{}<Tab>`^ <plug><C-r>=IMAP_PutTextWithMovement("\\hat{<++>}<++>")<cr>'
! exe s:pA12.'tilde{}<tab>`~ <plug><C-r>=IMAP_PutTextWithMovement("\\tilde{<++>}<++>")<cr>'
! exe s:pA12.'vec{} <plug><C-r>=IMAP_PutTextWithMovement("\\vec{<++>}<++>")<cr>'
! exe s:pA12.'widehat{} <plug><C-r>=IMAP_PutTextWithMovement("\\widehat{<++>}<++>")<cr>'
! exe s:pA12.'widetilde{} <plug><C-r>=IMAP_PutTextWithMovement("\\widetilde{<++>}<++>")<cr>'
! exe s:pA12.'imath <plug><C-r>=IMAP_PutTextWithMovement("\\imath")<cr>'
! exe s:pA12.'jmath <plug><C-r>=IMAP_PutTextWithMovement("\\jmath")<cr>'
" }}}
" {{{ OverlineAndCo
let s:pA13 = s:pA."&OverlineAndCo."
! exe s:pA13.'overline{} <plug><C-r>=IMAP_PutTextWithMovement("\\overline{}")<cr>'
! exe s:pA13.'underline{} <plug><C-r>=IMAP_PutTextWithMovement("\\underline{}")<cr>'
! exe s:pA13.'overrightarrow{} <plug><C-r>=IMAP_PutTextWithMovement("\\overrightarrow{}")<cr>'
! exe s:pA13.'overleftarrow{} <plug><C-r>=IMAP_PutTextWithMovement("\\overleftarrow{}")<cr>'
! exe s:pA13.'overbrace{} <plug><C-r>=IMAP_PutTextWithMovement("\\overbrace{}")<cr>'
! exe s:pA13.'underbrace{} <plug><C-r>=IMAP_PutTextWithMovement("\\underbrace{}")<cr>'
" }}}
" {{{ Symbols1
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** packages.vim 13 Dec 2002 17:24:19 -0000 1.15
--- packages.vim 22 Dec 2002 03:00:47 -0000 1.16
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: handling packages from within vim
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: handling packages from within vim
***************
*** 248,257 ****
endif
endif
! let l_m_p_o_item = '&'.substitute(p_o_item, 'ä', '', '')
let p_o_end = p_o_item[strlen(p_o_item) - 1]
if p_o_end !~ "[a-zA-Z}]"
! let r_m_p_o_item = "<plug><C-r>=Tex_PutTextWithMovement('".p_o_item.'ä'.p_o_delimiter."«»')<cr>"
elseif p_o_end == '}'
! let r_m_p_o_item = "<plug><C-r>=Tex_PutTextWithMovement('".p_o_item.p_o_delimiter."«»')<cr>"
else
let r_m_p_o_item = '<plug>'.p_o_item.p_o_delimiter
--- 248,257 ----
endif
endif
! let l_m_p_o_item = '&'.substitute(p_o_item, '<++>', '', '')
let p_o_end = p_o_item[strlen(p_o_item) - 1]
if p_o_end !~ "[a-zA-Z}]"
! let r_m_p_o_item = "<plug><C-r>=IMAP_PutTextWithMovement('".p_o_item.'<++>'.p_o_delimiter."<++>')<cr>"
elseif p_o_end == '}'
! let r_m_p_o_item = "<plug><C-r>=IMAP_PutTextWithMovement('".p_o_item.p_o_delimiter."<++>')<cr>"
else
let r_m_p_o_item = '<plug>'.p_o_item.p_o_delimiter
***************
*** 286,298 ****
let com_type = '{}'
let l_m_item = '\\&'.p_item_name.'{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."{ä}«»')<cr>"
elseif p_item_def == 'brs'
let com_type = '{}'
! let l_m_item = '\\&'.substitute(p_item_name, "[ä«»]", '', 'g')
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."«»')<cr>"
elseif p_item_def == 'brd'
let com_type = '{}{}'
let l_m_item = '\\&'.p_item_name.'{}{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."{ä}{«»}«»')<cr>"
elseif p_item_def == 'sep'
let com_type = ''
--- 286,298 ----
let com_type = '{}'
let l_m_item = '\\&'.p_item_name.'{}'
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."{<++>}<++>')<cr>"
elseif p_item_def == 'brs'
let com_type = '{}'
! let l_m_item = '\\&'.substitute(p_item_name, "[<++><++>]", '', 'g')
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."<++>')<cr>"
elseif p_item_def == 'brd'
let com_type = '{}{}'
let l_m_item = '\\&'.p_item_name.'{}{}'
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."{<++>}{<++>}<++>')<cr>"
elseif p_item_def == 'sep'
let com_type = ''
***************
*** 302,306 ****
let com_type = '(E)'
let l_m_item = '&'.p_item_name.'(E)'
! let r_m_item = '<plug>\begin{'.p_item_name.'}<cr> <cr>\end{'.p_item_name.'}«»<Up><Left>'
elseif p_item_def == 'ens'
let com_type = '(E)'
--- 302,306 ----
let com_type = '(E)'
let l_m_item = '&'.p_item_name.'(E)'
! let r_m_item = '<plug>\begin{'.p_item_name.'}<cr> <cr>\end{'.p_item_name.'}<++><Up><Left>'
elseif p_item_def == 'ens'
let com_type = '(E)'
***************
*** 308,316 ****
let p_env_name = matchstr(p_item_name, '^[^:]*')
let l_m_item = '&'.p_env_name.'(E)'
! let r_m_item = '<plug>\begin{'.p_env_name.'}'.p_env_spec.'<cr>«»<cr>\end{'.p_env_name.'}«»<Up><Up><C-j>'
elseif p_item_def == 'eno'
let com_type = '(E)'
let l_m_item = '&'.p_item_name.'(E)'
! let r_m_item = '<plug>\begin[«»]{'.p_item_name.'}<cr>«»<cr>\end{'.p_item_name.'}«»<Up><Up><C-j>'
elseif p_item_def == 'nor'
let com_type = "\\\\'"
--- 308,316 ----
let p_env_name = matchstr(p_item_name, '^[^:]*')
let l_m_item = '&'.p_env_name.'(E)'
! let r_m_item = '<plug>\begin{'.p_env_name.'}'.p_env_spec.'<cr><++><cr>\end{'.p_env_name.'}<++><Up><Up><C-j>'
elseif p_item_def == 'eno'
let com_type = '(E)'
let l_m_item = '&'.p_item_name.'(E)'
! let r_m_item = '<plug>\begin[<++>]{'.p_item_name.'}<cr><++><cr>\end{'.p_item_name.'}<++><Up><Up><C-j>'
elseif p_item_def == 'nor'
let com_type = "\\\\'"
***************
*** 320,328 ****
let com_type = '\\[]'
let l_m_item = '\\&'.p_item_name.'[]'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."[ä]«»')<cr>"
elseif p_item_def == 'nob'
let com_type = '[]{}'
let l_m_item = '\\&'.p_item_name.'[]{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."[ä]{«»}«»')<cr>"
elseif p_item_def == 'pla'
let com_type = '(p)'
--- 320,328 ----
let com_type = '\\[]'
let l_m_item = '\\&'.p_item_name.'[]'
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."[<++>]<++>')<cr>"
elseif p_item_def == 'nob'
let com_type = '[]{}'
let l_m_item = '\\&'.p_item_name.'[]{}'
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."[<++>]{<++>}<++>')<cr>"
elseif p_item_def == 'pla'
let com_type = '(p)'
***************
*** 360,364 ****
exe 'let g:s_p_o = g:TeX_package_option_'.a:supp_pack
if exists('g:s_p_o') && g:s_p_o != ''
! exe 'normal i\usepackage{'.a:supp_pack.'}«»'
exe 'normal F{i[]'."\<Right>"
else
--- 360,364 ----
exe 'let g:s_p_o = g:TeX_package_option_'.a:supp_pack
if exists('g:s_p_o') && g:s_p_o != ''
! exe 'normal i\usepackage{'.a:supp_pack.'}<++>'
exe 'normal F{i[]'."\<Right>"
else
Index: templates.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/templates.vim,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** templates.vim 10 Nov 2002 18:09:35 -0000 1.6
--- templates.vim 22 Dec 2002 03:00:49 -0000 1.7
***************
*** 5,9 ****
" Version: 1.0
" Created: Tue Apr 23 05:00 PM 2002 PST
! " Last Change: nie lis 10 05:00 2002 C
"
" Description: functions for handling templates in latex-suite/templates
--- 5,9 ----
" Version: 1.0
" Created: Tue Apr 23 05:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: functions for handling templates in latex-suite/templates
Index: texrc
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/lat...
[truncated message content] |
|
From: <sri...@us...> - 2002-12-22 03:01:32
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/macros
In directory sc8-pr-cvs1:/tmp/cvs-serv16004/ftplugin/latex-suite/macros
Modified Files:
example
Log Message:
This is a merge from the b-newimaps branch. The branch was started when a
need to robustify imaps.vim was felt. Before, it had a big dependence on
"funky" characters. Since imaps.vim affected a lot of files, this commit
has a lot of modified files.
Briefly, it changes the <<, >> and the <a-umlaut> characters throughout
latex-suite to 'unfunky' characters.
<< --- <+
>> --- +>
<a-umlaut> --- <++>
The syntax of IMAP and IMAP_PutTextWithMovement was also changed to accept
2 new optional arguments which specify the placeholder characters in the
a:rhs. This allows scriptwriters to generate long term maps which will not
depend on the internals of imaps.vim
The b-newimaps tip at the time of this merge has been tagged as
b-newimaps-merge-sa-1
Index: example
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/macros/example,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** example 30 Apr 2002 00:03:23 -0000 1.1.1.1
--- example 22 Dec 2002 03:00:53 -0000 1.2
***************
*** 5,11 ****
% formatting here. the indentation will follow automatically...
\begin{mycomplicatedenvironment}
! \mycommand1{«»}
! \mycommand2{«hint2»}
! \mycommand3{«»}
! \mycommand4{«»}
! \end{mycomplicatedenvironment}«»
--- 5,11 ----
% formatting here. the indentation will follow automatically...
\begin{mycomplicatedenvironment}
! \mycommand1{<++>}
! \mycommand2{<+hint2+>}
! \mycommand3{<++>}
! \mycommand4{<++>}
! \end{mycomplicatedenvironment}<++>
|
|
From: Benji F. <be...@me...> - 2002-12-22 02:40:11
|
Srinath Avadhanula wrote:
> In my opinion, it is _much_ more useful now to figure out the encoding
> problems instead of trying to spending any more time on this.
[snip]
>
> In summary, unless there are some real concrete reasons to pursue this,
> lets worry about this next time someone reports a bug about it.
Fair enough. I have already volunteered to look at the encoding
problems. It will help if someone can tell me exactly what encoding
problems (actual, not potential) there are.
--Benji
|
|
From: <sri...@us...> - 2002-12-22 02:36:36
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv11890
Modified Files:
Tag: b-newimaps
texrc
Log Message:
. modify TexLet to also accept things like
TexLet g:Foo = "foo"
Previously, it would quote the value with single quotes, so g:Foo would
get a value of '"foo"'.
Index: texrc
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v
retrieving revision 1.15.2.2
retrieving revision 1.15.2.3
diff -C2 -d -r1.15.2.2 -r1.15.2.3
*** texrc 19 Dec 2002 12:19:00 -0000 1.15.2.2
--- texrc 22 Dec 2002 02:36:33 -0000 1.15.2.3
***************
*** 4,8 ****
" Author: Srinath Avadhanula
" Created: Mon Apr 01 11:00 AM 2002 PST
! " Last Change: Thu Dec 19 04:00 AM 2002 PST
"
" Description: This file contains resource configuration information for the
--- 4,8 ----
" Author: Srinath Avadhanula
" Created: Mon Apr 01 11:00 AM 2002 PST
! " Last Change: Sat Dec 21 06:00 PM 2002 PST
"
" Description: This file contains resource configuration information for the
***************
*** 43,46 ****
--- 43,47 ----
" TexLet g:varname = '1'
" TexLet g:varname = 'foo bar'
+ " TexLet g:varname = "foo\nbar"
" TexLet g:varname = foo bar
function! <SID>SafeLet(arg)
***************
*** 49,53 ****
let value = substitute(value, '\s*$', '', '')
if !exists(name)
! if value =~ "^'"
exec "let ".name." = ".value
else
--- 50,54 ----
let value = substitute(value, '\s*$', '', '')
if !exists(name)
! if value =~ "^'\\|^\""
exec "let ".name." = ".value
else
|
|
From: Srinath A. <sr...@fa...> - 2002-12-22 02:06:46
|
I think we are needlessly carrying this argument too far.
If the text in a file already contains [bg]:PlaceHolder* strings, (such
as a french user using the << strings for placeholders as well as for
quotations), then the placeholder concept becomes not only useless, it
will become positively painful for the end user. It is a very reasonable
thing to expect the user to set his placeholder characters to some
characters (or combination of characters) which will not appear in the
file by themselves except as placeholders.
Again, a script writer will _not_ choose the [bg]:PlaceHolder* strings.
He will only do something like:
> call IMAP('foo', 'bar <++> <<cursor>> <++> <<next>>', '', '<<', '>>')
It is upto the user to either have
let g:Imap_PlaceHolderStart = '<+'
let g:Imap_PlaceHolderEnd = '+>'
or to have
let g:Imap_PlaceHolderStart = '<<'
let g:Imap_PlaceHolderEnd = '>>'
or something else in his .vimrc or ftplugin file. If he actually uses
the first option, then it is guarenteed that he will soon get very
annoyed indeed whether or not we use your idea. Even the cure you have
for this only works for the very first time the text is inserted. The
big deal about having placeholders is the <C-J> map which takes him to
the next point of interest. You have still not answered how your fix
will allow the user to skip past the <++> and take him to <+next+>, if
he chooses '<+' as the placeholder setting in the above example.
I was very happy with the simplifications you made to the IMAP and
LookupCharacter functions. Now I fear you are needlessly complicating
something for no real advantage at all. Plus, there was code being
duplicated between IMAP_PutText... and IMAP_JumpFunc, another thing
which you have objected against in other files.
On Sat, 21 Dec 2002, Benji Fisher wrote:
> We cannot enforce cooperation between the person who writes the
> call to IMAP() and the person who inserts the text. If we can get the
> intended text inserted when the user types "foo", I think it is worth a
> little extra effort.
>
I dont buy this. We are not really making the user's job any easier at
all with this fix. Refer my question about how to figure out that <++>
is not a placeholder for the <C-J> map.
> Remember: a script writer may make the call to IMAP() (and
> another script writer may use different place holders) and we want to
> allow the user to pick his or her own values independent of this.
We are still doing this, right? All we are assuming is that the user has
not chosen some stupid value for the placeholder settings which makes
<C-J> confuse parts of his file as being placeholders.
> If you want to use
>
> let marker = '<!--- @#% Start Here @#% ----!>'
>
> I guess it is OK. I see you used different numbers of - characters,
> which helps. It is long enough that it might trigger an unwanted line
> break, but maybe we should wait until that problem actually shows up. If
What about the @#! character! I am willing to bet that there is not a
single text file in the world (except the mails we have exchanged and
imaps.vim) which contain these combination of characters! :)
> we want to revert to my idea, "<+<++>+>" style, then we would have to
> require that the two place holders be different (which seems reasonable
> to me).
Well, Luc Hermitte uses question marks when he edits latex. That was the
first time I thought about making them customizable. So I know at least
one person who will not like this restriction on placeholders...
In my opinion, it is _much_ more useful now to figure out the encoding
problems instead of trying to spending any more time on this. I would
also like to simplify packages.vim a little... Fabio Spelta's suggestion
about the quotes also sounded good. So hopefully, we can give this
little thread a decent burial and move on :) I also would like to
implement a feature I have heard emacs auctex.vim has. When the user
presses <M-c>, \cite{} is inserted and a list of avaiable citations from
the bibtex file is displayed and he can choose one... The same for
references etc...
In summary, unless there are some real concrete reasons to pursue this,
lets worry about this next time someone reports a bug about it.
Srinath
|
|
From: Benji F. <be...@me...> - 2002-12-21 14:58:53
|
Srinath Avadhanula wrote:
On Fri, 20 Dec 2002, Benji Fisher wrote:
:call IMAP("foo", "bar <++> <<cursor>> <++> <<next>>", "", "<<", ">>")
Okay, I just checked again... With the [bg]:Place* settings left at '<+'
and '+>', it does go to <+cursor+> (which is nice :)
But I don't quite get how making it jump to <+cursor+> is better. After
all, what is the next <C-J> going to do? Take him to <+next+> instead of
<++> by somehow magically remembering that it was the <+next+> which the
user meant as a placeholder. What about the new <C-K> map? Even if he
does land up in <+cursor+> is searching for the previous placeholder
supposed to skip the first <++>?
We cannot enforce cooperation between the person who writes the
call to IMAP() and the person who inserts the text. If we can get the
intended text inserted when the user types "foo", I think it is worth a
little extra effort.
Ofcourse, if the user does something like:
let g:Imap_PlaceHolderStart = '<<'
let g:Imap_PlaceHolderEnd = '>>'
call IMAP('foo', 'bar <++> <<cursor>> <++> next', '', '<<', '>>')
[snip]
Remember: a script writer may make the call to IMAP() (and
another script writer may use different place holders) and we want to
allow the user to pick his or her own values independent of this.
No. There was no utf screw up here... I actually meant single question
marks as the arguments to IMAP and using them in the [bg]:Place*
settings as well... Using '<-' and '->' will not ofcourse cause
problems... This example is ofcourse a little contrived, but so is the
one you had with the <<cursor>> ;)
Okay just to make things clearer, try the following example on 1.9.2.4
(this is not too contrived).
let g:Imap_PlaceHolderStart = '?'
let g:Imap_PlaceHolderEnd = '?'
call IMAP('foo', 'bar ??something?? something next', '', '?', '?')
Here the user would expect to be taken to the first ?? and then to the
next ?? For me, this causes a problem with 1.9.2.4. Check it...
We already agreed that this can be fixed by replacing the place
holders in pairs instead of one substitute for phs and another for phe.
I think you are right: the two items above are internal, and we
can decide on what to do after merging the changed into the main branch.
Yes. There were a couple of bugs in packages.vim which needed to be
fixed. I could then tell Mikolaj the problem...
PS: You can jump back and forth between revisions using
cvs update -r 1.9.2.4 imaps.vim
cvs update -r b-newimaps imaps.vim
When a branch tag is specified, then the tip of the branch is used.
Thanks.
If you want to use
let marker = '<!--- @#% Start Here @#% ----!>'
I guess it is OK. I see you used different numbers of - characters,
which helps. It is long enough that it might trigger an unwanted line
break, but maybe we should wait until that problem actually shows up. If
we want to revert to my idea, "<+<++>+>" style, then we would have to
require that the two place holders be different (which seems reasonable
to me).
--Benji
|
|
From: Srinath A. <sr...@fa...> - 2002-12-20 17:59:01
|
On Fri, 20 Dec 2002, Benji Fisher wrote:
> > Did your version do something different? I just checked and at least
> > for the example you mention it seems to work the same...
>
> I get
>
> bar <++> <+cursor+> <++> <+next+>
>
> with "<+cursor+>" highlighted in Select mode. I think the intention of
> the above call to IMAP() is to insert a literal "<++>" into the buffer,
> and position the cursor on "<<cursor>>" (modified to "<+cursor+>").
> This is why I broke the string into initial, template, and final.
>
Okay, I just checked again... With the [bg]:Place* settings left at '<+'
and '+>', it does go to <+cursor+> (which is nice :)
But I don't quite get how making it jump to <+cursor+> is better. After
all, what is the next <C-J> going to do? Take him to <+next+> instead of
<++> by somehow magically remembering that it was the <+next+> which the
user meant as a placeholder. What about the new <C-K> map? Even if he
does land up in <+cursor+> is searching for the previous placeholder
supposed to skip the first <++>?
Ofcourse, if the user does something like:
let g:Imap_PlaceHolderStart = '<<'
let g:Imap_PlaceHolderEnd = '>>'
call IMAP('foo', 'bar <++> <<cursor>> <++> next', '', '<<', '>>')
then your version and the latest version both take the user to
<<cursor>> instead of <++> and then we do not have problems anyway
because <++> will not be confused for a placeholder...
> > Note that we could have
> >
> > let g:Imap_PlaceHolderStart = '?' let g:Imap_PlaceHolderEnd = '?'
> > call IMAP('foo', 'bar ?template? and 2 empty templates: ???? bar',
> > '', '?', '?')
> >
> > Then when we search backward from the end, we will not land at the
> > beginning... Ofcourse, this is an improbable scenario, but why take
> > the chance?
>
> I get "?" for the characters you are using, but I assume that your
> "2 empty templates" should look something like "<--><-->". (I'll
No. There was no utf screw up here... I actually meant single question
marks as the arguments to IMAP and using them in the [bg]:Place*
settings as well... Using '<-' and '->' will not ofcourse cause
problems... This example is ofcourse a little contrived, but so is the
one you had with the <<cursor>> ;)
Okay just to make things clearer, try the following example on 1.9.2.4
(this is not too contrived).
let g:Imap_PlaceHolderStart = '?'
let g:Imap_PlaceHolderEnd = '?'
call IMAP('foo', 'bar ??something?? something next', '', '?', '?')
Here the user would expect to be taken to the first ?? and then to the
next ?? For me, this causes a problem with 1.9.2.4. Check it...
> I think you are right: the two items above are internal, and we
> can decide on what to do after merging the changed into the main branch.
Yes. There were a couple of bugs in packages.vim which needed to be
fixed. I could then tell Mikolaj the problem...
> I am done with grading, so I can do some more coding; but I do not
> want to make changes until we agree on what to do. As the CVS docs say,
> "log messages are not a substitute for communication." ;)
>
Hehe :) Sorry about the really long log message of 1.9.2.5 then. I will
email those kinds of things to you from next time on... (Should I do an
admin -m and change that log message too?)
Srinath
PS: You can jump back and forth between revisions using
cvs update -r 1.9.2.4 imaps.vim
cvs update -r b-newimaps imaps.vim
When a branch tag is specified, then the tip of the branch is used.
|
|
From: Benji F. <be...@me...> - 2002-12-20 14:37:36
|
Srinath Avadhanula wrote:
> On Thu, 19 Dec 2002, Benji Fisher wrote:
Item 1:
======
>>> " Break text up into "initial <+template+> final"; any piece may
>>> be empty. let initial = substitute(text, pattern, '\1', '') let
>>> template = substitute(text, pattern, '\2', '') let final =
>>> substitute(text, pattern, '\3', '')
>>>
>>> This assumes that there is only a single <+template+> in the
>>> text.
>>
>> Why do you say that? The cursor should be placed on template; all
>> the place holders in final will be replaced.
This question still stands.
> What I didnt quite understand was why you treated the first
> placeholder seperately from the rest?
>
> Why not simply do
>
> let text = substitute(text, '\V'.phs.'\(\.\{-}\)'.phe,
> phsUser.'\1'.pheUser, 'g')
[snip]
> All of this code seems to do effectively what that one substitute
> should be doing. (Note, I am not trying to save lines, using one
> substitute also seems to be clearer logically). Or is there something
> I am missing?
Yes, I think you are missing something. See the example below.
>> let final = substitute(final, '\V'.startpat.'\(\.\{-}\)'.endpat, \
>> escape(phs, '\') . '\1' . escape(phe, '\'), 'g')
>
> Precisely what I do in the latest version! escape(phs, '\') is
> phsUser and so on...
>
>> I do not like your solution. Part of the reason for these new,
>> optional arguments is that the following should work:
>>
>> :call IMAP("foo", "bar <++> <<cursor>> <++> <<next>>", "", "<<",
>> ">>")
>>
>> I think your method breaks this.
>
[snip]
> But with this fix, the example you give works just fine for me. I
> _do_ use the optional arguments in the latest version too... Never
> ignored them. In the example above, after pressing foo, I end up with
>
>
> bar | <+cursor+> <++> <+next+>
>
> with the cursor shown at | if g:Imap_PlaceHolder's are left at
> default values. If they are changed to something like '?' and '?',
> then I get
[snip]
>
> Did your version do something different? I just checked and at least
> for the example you mention it seems to work the same...
I get
bar <++> <+cursor+> <++> <+next+>
with "<+cursor+>" highlighted in Select mode. I think the intention of
the above call to IMAP() is to insert a literal "<++>" into the buffer,
and position the cursor on "<<cursor>>" (modified to "<+cursor+>").
This is why I broke the string into initial, template, and final.
Item 2:
======
>>> Also, I dont think
>>> let marker = phs . phs . phe . phe
>>>
>>> is a "rare" enough string. As in the previous example, this could simply be
>>> ????. We do _not_ want to accidentally delete stuff from the user's files.
>>>
>>> let marker = '<!--- @#% Start Here @#% ----!>'
>>> This sounds safer. Ofcourse, we could always make a search and be
>>> sure, but I am willing to bet that this string will never happen
>>> on purpose in some file.
>>
>> We only have to worry about the marker appearing in the text
>> inserted by IMAP_PutTextWithMovement(). Can you think of an
>> example where my marker is still there after the substitute()
>> commands?
>
> Note that we could have
>
> let g:Imap_PlaceHolderStart = '?' let g:Imap_PlaceHolderEnd = '?'
> call IMAP('foo', 'bar ?template? and 2 empty templates: ???? bar',
> '', '?', '?')
>
> Then when we search backward from the end, we will not land at the
> beginning... Ofcourse, this is an improbable scenario, but why take
> the chance?
I get "?" for the characters you are using, but I assume that your
"2 empty templates" should look something like "<--><-->". (I'll
pretend tha the call to IMAP() gives "<-" and "->" as the place-holder
arguments.) My proposed marker is "<-<-->->", nested place holders. We
do not intend to support nested markers, and none of our substitutions
respect them; this is why I think this is safe. If "<-<-->->" did occur
in the rhs argument, it would be not be there any more after the
substitute() steps.
Item 3:
======
>>> into the main trunk and get working on a next release version and
>>> also solving the encoding problem once and for all...
>>
>> You forgot to mention testing.
>
> Absolutely. But I am wondering how to apply patches to the other
> parts of the suite which need a stable interface to IMAP() and
> IMAP_PutTextWithMovement(). I agree that we can take time testing on
> the branch, but its somewhat essential to at least fix on a good
> prototype. The internals can be optimized without hurrying...
I think you are right: the two items above are internal, and we
can decide on what to do after merging the changed into the main branch.
I am done with grading, so I can do some more coding; but I do not
want to make changes until we agree on what to do. As the CVS docs say,
"log messages are not a substitute for communication." ;)
--Benji
|
|
From: Srinath A. <sr...@fa...> - 2002-12-20 10:11:18
|
This has to be the single most useless thing I have done all of today. But you might have a little fun looking at it anyway. The following is a chart of the "comment percentage" in the various files of latex-suite. Overall, approximately 70% of our files are actual vim code, the rest being comments or empty lines... which actually doesn't look high enough... If you take out all the package files and the dictionaries and stuff then the percentage comes to something like 60%. I feel _really_ guilty having spent time on this. but heck. I just finished with my semester... But no more of such timepass! :) Srinath compiler/tex.vim :---------------------+ (0.43) ftplugin/latex-suite/bibtex.vim :---------------------------------------------+ (0.89) ftplugin/latex-suite/compiler.vim :-----------------------------+ (0.57) ftplugin/latex-suite/custommacros.vim :---------------------------------+ (0.66) ftplugin/latex-suite/diacritics.vim :--------------------------------------------+ (0.87) ftplugin/latex-suite/dictionaries/dictionary :--------------------------------------------------+ (1) ftplugin/latex-suite/dictionaries/SIunits :--------------------------------------------------+ (1) ftplugin/latex-suite/elementmacros.vim :-------------------------------------+ (0.73) ftplugin/latex-suite/envmacros.vim :------------------------------------+ (0.72) ftplugin/latex-suite/folding.vim :---------------------+ (0.42) ftplugin/latex-suite/macros/example :--------------------------------------------------+ (1) ftplugin/latex-suite/main.vim :--------------------------------+ (0.64) ftplugin/latex-suite/mathmacros.vim :---------------------------------------------+ (0.9) ftplugin/latex-suite/packages/accents :-------------------------------------------+ (0.87) ftplugin/latex-suite/packages/amsmath :-------------------------------------------------+ (0.98) ftplugin/latex-suite/packages/amsthm :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/amsxtra :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/bar :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/caption2 :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/changebar :------------------------------------------------+ (0.96) ftplugin/latex-suite/packages/chapterbib :--------------------------------------------+ (0.89) ftplugin/latex-suite/packages/cite :---------------------------------------------+ (0.91) ftplugin/latex-suite/packages/color :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/drftcite :---------------------------------------------+ (0.9) ftplugin/latex-suite/packages/eqlist :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/eqparbox :---------------------------------+ (0.67) ftplugin/latex-suite/packages/exmpl :------------+ (0.24) ftplugin/latex-suite/packages/float :------------------------------------+ (0.73) ftplugin/latex-suite/packages/footmisc :-----------------------------------------+ (0.81) ftplugin/latex-suite/packages/geometry :-------------------------------------------------+ (0.98) ftplugin/latex-suite/packages/graphicx :------------------------------------------------+ (0.95) ftplugin/latex-suite/packages/harpoon :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/hhline :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/hyperref :-------------------------------------------------+ (0.98) ftplugin/latex-suite/packages/ifthen :-----------------------------------------+ (0.81) ftplugin/latex-suite/packages/inputenc :------------------------------------------------+ (0.95) ftplugin/latex-suite/packages/lineno :-----------------------------------------------+ (0.95) ftplugin/latex-suite/packages/longtable :------------------------------------------------+ (0.96) ftplugin/latex-suite/packages/manyfoot :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/moreverbatim :--------------------------------------+ (0.76) ftplugin/latex-suite/packages/multicol :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/newalg :-----------------------------------------------+ (0.95) ftplugin/latex-suite/packages/outliner :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/overcite :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/parallel :--------------------------------------------+ (0.88) ftplugin/latex-suite/packages/polski :--------------------------------+ (0.64) ftplugin/latex-suite/packages/schedule :----------------------------------------+ (0.8) ftplugin/latex-suite/packages/SIunits :--------------------------------------------------+ (0.99) ftplugin/latex-suite/packages/tipa :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/ulem :----------------------------------------------+ (0.93) ftplugin/latex-suite/packages.vim :------------------------------------------+ (0.84) ftplugin/latex-suite/templates.vim :-------------------------------+ (0.62) ftplugin/latex-suite/texmenuconf.vim :-----------------------------------+ (0.7) ftplugin/latex-suite/texrc :---------+ (0.19) ftplugin/latex-suite/wizardfuncs.vim :------------------------------------------+ (0.84) ftplugin/tex/brackets.vim :----------------------+ (0.44) ftplugin/tex/smartspace.vim :-------------------------------+ (0.61) ftplugin/tex.vim :-------------------------+ (0.5) ftplugin/tex_latexSuite.vim :---------------------+ (0.42) indent/tex.vim :------------------+ (0.36) latextags :---------------------------------------------+ (0.91) ltags :--------------------------------------------+ (0.88) makefile :--------------------------------------------+ (0.87) plugin/imaps.vim :---------------------+ (0.42) plugin/libList.vim :-----------------+ (0.34) plugin/SyntaxFolds.vim :-------------------------+ (0.49) lines: 272 codelines: 116 compiler/tex.vim lines: 270 codelines: 241 ftplugin/latex-suite/bibtex.vim lines: 410 codelines: 234 ftplugin/latex-suite/compiler.vim lines: 137 codelines: 91 ftplugin/latex-suite/custommacros.vim lines: 125 codelines: 109 ftplugin/latex-suite/diacritics.vim lines: 677 codelines: 677 ftplugin/latex-suite/dictionaries/dictionary lines: 289 codelines: 289 ftplugin/latex-suite/dictionaries/SIunits lines: 339 codelines: 248 ftplugin/latex-suite/elementmacros.vim lines: 833 codelines: 598 ftplugin/latex-suite/envmacros.vim lines: 250 codelines: 105 ftplugin/latex-suite/folding.vim lines: 11 codelines: 11 ftplugin/latex-suite/macros/example lines: 501 codelines: 320 ftplugin/latex-suite/main.vim lines: 695 codelines: 624 ftplugin/latex-suite/mathmacros.vim lines: 23 codelines: 20 ftplugin/latex-suite/packages/accents lines: 98 codelines: 96 ftplugin/latex-suite/packages/amsmath lines: 13 codelines: 13 ftplugin/latex-suite/packages/amsthm lines: 4 codelines: 4 ftplugin/latex-suite/packages/amsxtra lines: 19 codelines: 19 ftplugin/latex-suite/packages/bar lines: 38 codelines: 35 ftplugin/latex-suite/packages/caption2 lines: 28 codelines: 27 ftplugin/latex-suite/packages/changebar lines: 18 codelines: 16 ftplugin/latex-suite/packages/chapterbib lines: 22 codelines: 20 ftplugin/latex-suite/packages/cite lines: 38 codelines: 35 ftplugin/latex-suite/packages/color lines: 21 codelines: 19 ftplugin/latex-suite/packages/drftcite lines: 12 codelines: 11 ftplugin/latex-suite/packages/eqlist lines: 6 codelines: 4 ftplugin/latex-suite/packages/eqparbox lines: 50 codelines: 12 ftplugin/latex-suite/packages/exmpl lines: 11 codelines: 8 ftplugin/latex-suite/packages/float lines: 16 codelines: 13 ftplugin/latex-suite/packages/footmisc lines: 87 codelines: 85 ftplugin/latex-suite/packages/geometry lines: 64 codelines: 61 ftplugin/latex-suite/packages/graphicx lines: 10 codelines: 10 ftplugin/latex-suite/packages/harpoon lines: 13 codelines: 13 ftplugin/latex-suite/packages/hhline lines: 163 codelines: 159 ftplugin/latex-suite/packages/hyperref lines: 16 codelines: 13 ftplugin/latex-suite/packages/ifthen lines: 22 codelines: 21 ftplugin/latex-suite/packages/inputenc lines: 55 codelines: 52 ftplugin/latex-suite/packages/lineno lines: 28 codelines: 27 ftplugin/latex-suite/packages/longtable lines: 6 codelines: 6 ftplugin/latex-suite/packages/manyfoot lines: 21 codelines: 16 ftplugin/latex-suite/packages/moreverbatim lines: 13 codelines: 13 ftplugin/latex-suite/packages/multicol lines: 19 codelines: 18 ftplugin/latex-suite/packages/newalg lines: 12 codelines: 11 ftplugin/latex-suite/packages/outliner lines: 24 codelines: 22 ftplugin/latex-suite/packages/overcite lines: 8 codelines: 7 ftplugin/latex-suite/packages/parallel lines: 154 codelines: 99 ftplugin/latex-suite/packages/polski lines: 15 codelines: 12 ftplugin/latex-suite/packages/schedule lines: 310 codelines: 307 ftplugin/latex-suite/packages/SIunits lines: 357 codelines: 356 ftplugin/latex-suite/packages/tipa lines: 14 codelines: 13 ftplugin/latex-suite/packages/ulem lines: 396 codelines: 334 ftplugin/latex-suite/packages.vim lines: 8 codelines: 8 ftplugin/latex-suite/templates/article.tex lines: 8 codelines: 8 ftplugin/latex-suite/templates/report.tex lines: 8 codelines: 8 ftplugin/latex-suite/templates/report_two_column.tex lines: 92 codelines: 57 ftplugin/latex-suite/templates.vim lines: 129 codelines: 90 ftplugin/latex-suite/texmenuconf.vim lines: 465 codelines: 88 ftplugin/latex-suite/texrc lines: 203 codelines: 171 ftplugin/latex-suite/wizardfuncs.vim lines: 151 codelines: 66 ftplugin/tex/brackets.vim lines: 95 codelines: 58 ftplugin/tex/smartspace.vim lines: 4 codelines: 2 ftplugin/tex.vim lines: 12 codelines: 5 ftplugin/tex_latexSuite.vim lines: 135 codelines: 48 indent/tex.vim lines: 11 codelines: 10 latextags lines: 78 codelines: 69 ltags lines: 87 codelines: 76 makefile lines: 596 codelines: 253 plugin/imaps.vim lines: 249 codelines: 84 plugin/libList.vim lines: 323 codelines: 159 plugin/SyntaxFolds.vim compiler/tex.vim :---------------------+ (0.43) ftplugin/latex-suite/bibtex.vim :---------------------------------------------+ (0.89) ftplugin/latex-suite/compiler.vim :-----------------------------+ (0.57) ftplugin/latex-suite/custommacros.vim :---------------------------------+ (0.66) ftplugin/latex-suite/diacritics.vim :--------------------------------------------+ (0.87) ftplugin/latex-suite/dictionaries/dictionary :--------------------------------------------------+ (1) ftplugin/latex-suite/dictionaries/SIunits :--------------------------------------------------+ (1) ftplugin/latex-suite/elementmacros.vim :-------------------------------------+ (0.73) ftplugin/latex-suite/envmacros.vim :------------------------------------+ (0.72) ftplugin/latex-suite/folding.vim :---------------------+ (0.42) ftplugin/latex-suite/macros/example :--------------------------------------------------+ (1) ftplugin/latex-suite/main.vim :--------------------------------+ (0.64) ftplugin/latex-suite/mathmacros.vim :---------------------------------------------+ (0.9) ftplugin/latex-suite/packages/accents :-------------------------------------------+ (0.87) ftplugin/latex-suite/packages/amsmath :-------------------------------------------------+ (0.98) ftplugin/latex-suite/packages/amsthm :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/amsxtra :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/bar :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/caption2 :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/changebar :------------------------------------------------+ (0.96) ftplugin/latex-suite/packages/chapterbib :--------------------------------------------+ (0.89) ftplugin/latex-suite/packages/cite :---------------------------------------------+ (0.91) ftplugin/latex-suite/packages/color :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/drftcite :---------------------------------------------+ (0.9) ftplugin/latex-suite/packages/eqlist :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/eqparbox :---------------------------------+ (0.67) ftplugin/latex-suite/packages/exmpl :------------+ (0.24) ftplugin/latex-suite/packages/float :------------------------------------+ (0.73) ftplugin/latex-suite/packages/footmisc :-----------------------------------------+ (0.81) ftplugin/latex-suite/packages/geometry :-------------------------------------------------+ (0.98) ftplugin/latex-suite/packages/graphicx :------------------------------------------------+ (0.95) ftplugin/latex-suite/packages/harpoon :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/hhline :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/hyperref :-------------------------------------------------+ (0.98) ftplugin/latex-suite/packages/ifthen :-----------------------------------------+ (0.81) ftplugin/latex-suite/packages/inputenc :------------------------------------------------+ (0.95) ftplugin/latex-suite/packages/lineno :-----------------------------------------------+ (0.95) ftplugin/latex-suite/packages/longtable :------------------------------------------------+ (0.96) ftplugin/latex-suite/packages/manyfoot :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/moreverbatim :--------------------------------------+ (0.76) ftplugin/latex-suite/packages/multicol :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/newalg :-----------------------------------------------+ (0.95) ftplugin/latex-suite/packages/outliner :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/overcite :----------------------------------------------+ (0.92) ftplugin/latex-suite/packages/parallel :--------------------------------------------+ (0.88) ftplugin/latex-suite/packages/polski :--------------------------------+ (0.64) ftplugin/latex-suite/packages/schedule :----------------------------------------+ (0.8) ftplugin/latex-suite/packages/SIunits :--------------------------------------------------+ (0.99) ftplugin/latex-suite/packages/tipa :--------------------------------------------------+ (1) ftplugin/latex-suite/packages/ulem :----------------------------------------------+ (0.93) ftplugin/latex-suite/packages.vim :------------------------------------------+ (0.84) ftplugin/latex-suite/templates.vim :-------------------------------+ (0.62) ftplugin/latex-suite/texmenuconf.vim :-----------------------------------+ (0.7) ftplugin/latex-suite/texrc :---------+ (0.19) ftplugin/latex-suite/wizardfuncs.vim :------------------------------------------+ (0.84) ftplugin/tex/brackets.vim :----------------------+ (0.44) ftplugin/tex/smartspace.vim :-------------------------------+ (0.61) ftplugin/tex.vim :-------------------------+ (0.5) ftplugin/tex_latexSuite.vim :---------------------+ (0.42) indent/tex.vim :------------------+ (0.36) latextags :---------------------------------------------+ (0.91) ltags :--------------------------------------------+ (0.88) makefile :--------------------------------------------+ (0.87) plugin/imaps.vim :---------------------+ (0.42) plugin/libList.vim :-----------------+ (0.34) plugin/SyntaxFolds.vim :-------------------------+ (0.49) |
|
From: Srinath A. <sr...@fa...> - 2002-12-20 09:17:00
|
On Thu, 19 Dec 2002, Benji Fisher wrote:
> sri...@us... wrote:
> > Update of /cvsroot/vim-latex/vimfiles/plugin
> > In directory sc8-pr-cvs1:/tmp/cvs-serv7443
> >
> > Modified Files:
> > Tag: b-newimaps
> > imaps.vim
> > Log Message:
> > Comments on the last version:
> >
> > " Break text up into "initial <+template+> final"; any piece may be empty.
> > let initial = substitute(text, pattern, '\1', '')
> > let template = substitute(text, pattern, '\2', '')
> > let final = substitute(text, pattern, '\3', '')
> >
> > This assumes that there is only a single <+template+> in the text.
>
> Why do you say that? The cursor should be placed on template; all
> the place holders in final will be replaced.
What I didnt quite understand was why you treated the first placeholder
seperately from the rest?
Why not simply do
let text = substitute(text, '\V'.phs.'\(\.\{-}\)'.phe, phsUser.'\1'.pheUser, 'g')
where phs and phe are the arguments supplied to IMAP_PutTextWithMovement
and phsUser and pheUser are the user's [bg]:PlaceHolder settings. (which
is what was done in 1.9.2.5)
In 1.9.2.4, it was done as:
" Break text up into "initial <+template+> final"; any piece may be empty.
let initial = substitute(text, pattern, '\1', '')
let template = substitute(text, pattern, '\2', '')
let final = substitute(text, pattern, '\3', '')
" Now, get the place holders for the output.
let phs = s:PlaceHolderStart() " default <+
let phe = s:PlaceHolderEnd() " default +>
let template = phs . template . phe
let final = substitute(final, startpat, escape(phs, '\'), 'g')
let final = substitute(final, endpat, escape(phe, '\'), 'g')
" Now, start building the return value.
let text = initial . marker . template . marker . final
All of this code seems to do effectively what that one substitute should
be doing. (Note, I am not trying to save lines, using one substitute
also seems to be clearer logically). Or is there something I am missing?
> let final = substitute(final, '\V'.startpat.'\(\.\{-}\)'.endpat,
> \ escape(phs, '\') . '\1' . escape(phe, '\'), 'g')
Precisely what I do in the latest version! escape(phs, '\') is phsUser
and so on...
> I do not like your solution. Part of the reason for these new, optional
> arguments is that the following should work:
>
> :call IMAP("foo", "bar <++> <<cursor>> <++> <<next>>", "", "<<", ">>")
>
> I think your method breaks this.
>
This does work in the latest version! Okay, I'll admit there was still a
bug, but it was not a big deal...
I originally had:
" If there are no place holders, just return the text.
if text !~ '\V'.phs.'\{-}'.phe
return text
endif
The test statement should actually be: (I will be commiting this bug fix
now).
if text !~ '\V'.phs.'\.\{-}'.phe
But with this fix, the example you give works just fine for me. I _do_
use the optional arguments in the latest version too... Never ignored
them. In the example above, after pressing foo, I end up with
bar | <+cursor+> <++> <+next+>
with the cursor shown at | if g:Imap_PlaceHolder's are left at default
values. If they are changed to something like '?' and '?', then I get
bar <++> ?cursor? <++> ?next?
with ?cursor? highlighted in select mode.
Did your version do something different? I just checked and at least for
the example you mention it seems to work the same...
> > This sounds safer. Ofcourse, we could always make a search and be sure, but
> > I am willing to bet that this string will never happen on purpose in some
> > file.
>
> We only have to worry about the marker appearing in the text
> inserted by IMAP_PutTextWithMovement(). Can you think of an example
> where my marker is still there after the substitute() commands?
>
Note that we could have
let g:Imap_PlaceHolderStart = '?'
let g:Imap_PlaceHolderEnd = '?'
call IMAP('foo', 'bar ?template? and 2 empty templates: ???? bar', '', '?', '?')
Then when we search backward from the end, we will not land at the
beginning... Ofcourse, this is an improbable scenario, but why take the
chance?
> > into the main trunk and get working on a next release version and also
> > solving the encoding problem once and for all...
>
> You forgot to mention testing.
Absolutely. But I am wondering how to apply patches to the other parts
of the suite which need a stable interface to IMAP() and
IMAP_PutTextWithMovement(). I agree that we can take time testing on the
branch, but its somewhat essential to at least fix on a good prototype.
The internals can be optimized without hurrying...
Srinath
|
|
From: <sri...@us...> - 2002-12-20 09:04:27
|
Update of /cvsroot/vim-latex/vimfiles/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv16875
Modified Files:
Tag: b-newimaps
imaps.vim
Log Message:
Bug in the RE for testing whether a string contains a placeholder
substring.
if text !~ '\V'.phs.'\{-}'.phe
should have been:
if text !~ '\V'.phs.'\.\{-}'.phe
Index: imaps.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v
retrieving revision 1.9.2.6
retrieving revision 1.9.2.7
diff -C2 -d -r1.9.2.6 -r1.9.2.7
*** imaps.vim 19 Dec 2002 12:13:59 -0000 1.9.2.6
--- imaps.vim 20 Dec 2002 09:04:22 -0000 1.9.2.7
***************
*** 8,12 ****
" while preserving filetype indentation.
"
! " Last Change: Thu Dec 19 04:00 AM 2002 PST
"
" Documentation: {{{
--- 8,12 ----
" while preserving filetype indentation.
"
! " Last Change: Fri Dec 20 01:00 AM 2002 PST
"
" Documentation: {{{
***************
*** 246,250 ****
" If there are no place holders, just return the text.
! if text !~ '\V'.phs.'\{-}'.phe
return text
endif
--- 246,250 ----
" If there are no place holders, just return the text.
! if text !~ '\V'.phs.'\.\{-}'.phe
return text
endif
|
|
From: Benji F. <be...@me...> - 2002-12-19 12:35:26
|
sri...@us... wrote:
> Update of /cvsroot/vim-latex/vimfiles/plugin
> In directory sc8-pr-cvs1:/tmp/cvs-serv7443
>
> Modified Files:
> Tag: b-newimaps
> imaps.vim
> Log Message:
> Comments on the last version:
>
> " Break text up into "initial <+template+> final"; any piece may be empty.
> let initial = substitute(text, pattern, '\1', '')
> let template = substitute(text, pattern, '\2', '')
> let final = substitute(text, pattern, '\3', '')
>
> This assumes that there is only a single <+template+> in the text.
Why do you say that? The cursor should be placed on template; all
the place holders in final will be replaced.
> Afterwards:
>
> let final = substitute(final, startpat, escape(phs, '\'), 'g')
> let final = substitute(final, endpat, escape(phe, '\'), 'g')
>
> This will fail when the user uses something like:
>
> call Imap_PutTextWithMovement('bar?desc?', '?', '?')
> with g:Imap_Place..Start = '<+' != g:Imap_Place...End
> i.e when phs and phe are the same, but the [bg]:Imap_Place* settings arent.
Yes, that should be fixed. I would fix it with
let final = substitute(final, '\V'.startpat.'\(\.\{-}\)'.endpat,
\ escape(phs, '\') . '\1' . escape(phe, '\'), 'g')
I do not like your solution. Part of the reason for these new, optional
arguments is that the following should work:
:call IMAP("foo", "bar <++> <<cursor>> <++> <<next>>", "", "<<", ">>")
I think your method breaks this.
> Also, I dont think
>
> let marker = phs . phs . phe . phe
>
> is a "rare" enough string. As in the previous example, this could simply be
> ????. We do _not_ want to accidentally delete stuff from the user's files.
>
> let marker = '<!--- @#% Start Here @#% ----!>'
>
> This sounds safer. Ofcourse, we could always make a search and be sure, but
> I am willing to bet that this string will never happen on purpose in some
> file.
We only have to worry about the marker appearing in the text
inserted by IMAP_PutTextWithMovement(). Can you think of an example
where my marker is still there after the substitute() commands?
>
> Changes this time:
>
> 1. Cleaned up the IMAP_PutTextWithMovement() function. This function now
> calls the IMAP_Jumpfunc() function instead of trying to do the same
> thing.
That sounds like an improvement.
> 2. IMAP_Jumpfunc(): After suggestions from LH, implemented the option of
> . not deleting empty placeholders.
> . going up and down. (<C-J> and <C-K>)
> . option of not deleting the placeholder while moving.
>
> TODO:
> . command to insert placeholder at current position
> . command to erase all placeholders.
>
> I am going to follow up this commit with another big one renaming all the
> old Tex_IMAP()s to IMAP()s... After that, it is time to merge this branch
> into the main trunk and get working on a next release version and also
> solving the encoding problem once and for all...
You forgot to mention testing.
--Benji
|
|
From: <sri...@us...> - 2002-12-19 12:19:04
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv19503/ftplugin/latex-suite
Modified Files:
Tag: b-newimaps
bibtex.vim custommacros.vim diacritics.vim elementmacros.vim
envmacros.vim main.vim mathmacros.vim packages.vim
templates.vim texrc wizardfuncs.vim
Log Message:
. Revert back Tex_IMAP() to IMAP() and
Tex_PutTextWithMovement() to IMAP_PutTextWithMovement().
Index: bibtex.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/bibtex.vim,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** bibtex.vim 14 Dec 2002 10:59:18 -0000 1.2.2.1
--- bibtex.vim 19 Dec 2002 12:18:59 -0000 1.2.2.2
***************
*** 3,7 ****
" Function: BibT
" Author: Alan G Isaac <ai...@am...>
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"=============================================================================
--- 3,7 ----
" Function: BibT
" Author: Alan G Isaac <ai...@am...>
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"=============================================================================
***************
*** 11,17 ****
let s:done = 1
! call Tex_IMAP ('BBA', "\<C-r>=BibT('article', '', 0)\<CR>", 'bib')
! call Tex_IMAP ('BBB', "\<C-r>=BibT('inproceedings', '', 0)\<CR>", 'bib')
! call Tex_IMAP ('BAS', "\<C-r>=BibT('', '', 0)\<CR>", 'bib')
" BibT: function to generate a formatted bibtex entry {{{
--- 11,17 ----
let s:done = 1
! call IMAP ('BBA', "\<C-r>=BibT('article', '', 0)\<CR>", 'bib')
! call IMAP ('BBB', "\<C-r>=BibT('inproceedings', '', 0)\<CR>", 'bib')
! call IMAP ('BAS', "\<C-r>=BibT('', '', 0)\<CR>", 'bib')
" BibT: function to generate a formatted bibtex entry {{{
***************
*** 251,255 ****
let retval = retval."}<++>"."\n"
! return Tex_PutTextWithMovement(retval)
endfunction
--- 251,255 ----
let retval = retval."}<++>"."\n"
! return IMAP_PutTextWithMovement(retval)
endfunction
Index: custommacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/custommacros.vim,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -d -r1.8 -r1.8.2.1
*** custommacros.vim 13 Dec 2002 17:23:46 -0000 1.8
--- custommacros.vim 19 Dec 2002 12:18:59 -0000 1.8.2.1
***************
*** 4,8 ****
" Version: 1.0
" Created: Tue Apr 23 05:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: functions for processing custom macros in the
--- 4,8 ----
" Version: 1.0
" Created: Tue Apr 23 05:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: functions for processing custom macros in the
***************
*** 109,113 ****
call Tex_CleanSearchHistory()
! silent! exec "normal! i\<C-r>='¡!¡Start here¡!¡'.Tex_PutTextWithMovement(@a)\<CR>"
let pos = line('.').'| normal! '.virtcol('.').'|'
--- 109,113 ----
call Tex_CleanSearchHistory()
! silent! exec "normal! i\<C-r>='¡!¡Start here¡!¡'.IMAP_PutTextWithMovement(@a)\<CR>"
let pos = line('.').'| normal! '.virtcol('.').'|'
Index: diacritics.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/diacritics.vim,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** diacritics.vim 13 Dec 2002 17:23:51 -0000 1.2
--- diacritics.vim 19 Dec 2002 12:18:59 -0000 1.2.2.1
***************
*** 3,7 ****
" Author: Lubomir Host
" Created: Tue Apr 23 07:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: shortcuts for all diacritics.
--- 3,7 ----
" Author: Lubomir Host
" Created: Tue Apr 23 07:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: shortcuts for all diacritics.
***************
*** 13,125 ****
" \'{a} {{{
! call Tex_IMAP ('=a', "\\\'{a}", 'tex')
! call Tex_IMAP ('=b', "\\'{b}", 'tex')
! call Tex_IMAP ('=c', "\\'{c}", 'tex')
! call Tex_IMAP ('=d', "\\'{d}", 'tex')
! call Tex_IMAP ('=e', "\\'{e}", 'tex')
! call Tex_IMAP ('=f', "\\'{f}", 'tex')
! call Tex_IMAP ('=g', "\\'{g}", 'tex')
! call Tex_IMAP ('=h', "\\'{h}", 'tex')
! call Tex_IMAP ('=i', "\\'{\i}", 'tex')
! call Tex_IMAP ('=j', "\\'{j}", 'tex')
! call Tex_IMAP ('=k', "\\'{k}", 'tex')
! call Tex_IMAP ('=l', "\\'{l}", 'tex')
! call Tex_IMAP ('=m', "\\'{m}", 'tex')
! call Tex_IMAP ('=n', "\\'{n}", 'tex')
! call Tex_IMAP ('=o', "\\'{o}", 'tex')
! call Tex_IMAP ('=p', "\\'{p}", 'tex')
! call Tex_IMAP ('=q', "\\'{q}", 'tex')
! call Tex_IMAP ('=r', "\\'{r}", 'tex')
! call Tex_IMAP ('=s', "\\'{s}", 'tex')
! call Tex_IMAP ('=t', "\\'{t}", 'tex')
! call Tex_IMAP ('=u', "\\'{u}", 'tex')
! call Tex_IMAP ('=v', "\\'{v}", 'tex')
! call Tex_IMAP ('=w', "\\'{w}", 'tex')
! call Tex_IMAP ('=x', "\\'{x}", 'tex')
! call Tex_IMAP ('=y', "\\'{y}", 'tex')
! call Tex_IMAP ('=z', "\\'{z}", 'tex')
! call Tex_IMAP ('=A', "\\'{A}", 'tex')
! call Tex_IMAP ('=B', "\\'{B}", 'tex')
! call Tex_IMAP ('=C', "\\'{C}", 'tex')
! call Tex_IMAP ('=D', "\\'{D}", 'tex')
! call Tex_IMAP ('=E', "\\'{E}", 'tex')
! call Tex_IMAP ('=F', "\\'{F}", 'tex')
! call Tex_IMAP ('=G', "\\'{G}", 'tex')
! call Tex_IMAP ('=H', "\\'{H}", 'tex')
! call Tex_IMAP ('=I', "\\'{\I}", 'tex')
! call Tex_IMAP ('=J', "\\'{J}", 'tex')
! call Tex_IMAP ('=K', "\\'{K}", 'tex')
! call Tex_IMAP ('=L', "\\'{L}", 'tex')
! call Tex_IMAP ('=M', "\\'{M}", 'tex')
! call Tex_IMAP ('=N', "\\'{N}", 'tex')
! call Tex_IMAP ('=O', "\\'{O}", 'tex')
! call Tex_IMAP ('=P', "\\'{P}", 'tex')
! call Tex_IMAP ('=Q', "\\'{Q}", 'tex')
! call Tex_IMAP ('=R', "\\'{R}", 'tex')
! call Tex_IMAP ('=S', "\\'{S}", 'tex')
! call Tex_IMAP ('=T', "\\'{T}", 'tex')
! call Tex_IMAP ('=U', "\\'{U}", 'tex')
! call Tex_IMAP ('=V', "\\'{V}", 'tex')
! call Tex_IMAP ('=W', "\\'{W}", 'tex')
! call Tex_IMAP ('=X', "\\'{X}", 'tex')
! call Tex_IMAP ('=Y', "\\'{Y}", 'tex')
! call Tex_IMAP ('=Z', "\\'{Z}", 'tex')
" }}}
" \v{a} {{{
! call Tex_IMAP ('+a', "\\v{a}", 'tex')
! call Tex_IMAP ('+b', "\\v{b}", 'tex')
! call Tex_IMAP ('+c', "\\v{c}", 'tex')
! call Tex_IMAP ('+d', "\\v{d}", 'tex')
! call Tex_IMAP ('+e', "\\v{e}", 'tex')
! call Tex_IMAP ('+f', "\\v{f}", 'tex')
! call Tex_IMAP ('+g', "\\v{g}", 'tex')
! call Tex_IMAP ('+h', "\\v{h}", 'tex')
! call Tex_IMAP ('+i', "\\v{\i}", 'tex')
! call Tex_IMAP ('+j', "\\v{j}", 'tex')
! call Tex_IMAP ('+k', "\\v{k}", 'tex')
! call Tex_IMAP ('+l', "\\q l", 'tex')
! call Tex_IMAP ('+m', "\\v{m}", 'tex')
! call Tex_IMAP ('+n', "\\v{n}", 'tex')
! call Tex_IMAP ('+o', "\\v{o}", 'tex')
! call Tex_IMAP ('+p', "\\v{p}", 'tex')
! call Tex_IMAP ('+q', "\\v{q}", 'tex')
! call Tex_IMAP ('+r', "\\v{r}", 'tex')
! call Tex_IMAP ('+s', "\\v{s}", 'tex')
! call Tex_IMAP ('+t', "\\q t", 'tex')
! call Tex_IMAP ('+u', "\\v{u}", 'tex')
! call Tex_IMAP ('+v', "\\v{v}", 'tex')
! call Tex_IMAP ('+w', "\\v{w}", 'tex')
! call Tex_IMAP ('+x', "\\v{x}", 'tex')
! call Tex_IMAP ('+y', "\\v{y}", 'tex')
! call Tex_IMAP ('+z', "\\v{z}", 'tex')
! call Tex_IMAP ('+A', "\\v{A}", 'tex')
! call Tex_IMAP ('+B', "\\v{B}", 'tex')
! call Tex_IMAP ('+C', "\\v{C}", 'tex')
! call Tex_IMAP ('+D', "\\v{D}", 'tex')
! call Tex_IMAP ('+E', "\\v{E}", 'tex')
! call Tex_IMAP ('+F', "\\v{F}", 'tex')
! call Tex_IMAP ('+G', "\\v{G}", 'tex')
! call Tex_IMAP ('+H', "\\v{H}", 'tex')
! call Tex_IMAP ('+I', "\\v{\I}", 'tex')
! call Tex_IMAP ('+J', "\\v{J}", 'tex')
! call Tex_IMAP ('+K', "\\v{K}", 'tex')
! call Tex_IMAP ('+L', "\\v{L}", 'tex')
! call Tex_IMAP ('+M', "\\v{M}", 'tex')
! call Tex_IMAP ('+N', "\\v{N}", 'tex')
! call Tex_IMAP ('+O', "\\v{O}", 'tex')
! call Tex_IMAP ('+P', "\\v{P}", 'tex')
! call Tex_IMAP ('+Q', "\\v{Q}", 'tex')
! call Tex_IMAP ('+R', "\\v{R}", 'tex')
! call Tex_IMAP ('+S', "\\v{S}", 'tex')
! call Tex_IMAP ('+T', "\\v{T}", 'tex')
! call Tex_IMAP ('+U', "\\v{U}", 'tex')
! call Tex_IMAP ('+V', "\\v{V}", 'tex')
! call Tex_IMAP ('+W', "\\v{W}", 'tex')
! call Tex_IMAP ('+X', "\\v{X}", 'tex')
! call Tex_IMAP ('+Y', "\\v{Y}", 'tex')
! call Tex_IMAP ('+Z', "\\v{Z}", 'tex')
" }}}
! call Tex_IMAP ('+}', "\\\"{a}", 'tex')
! call Tex_IMAP ('+:', "\\^{o}", 'tex')
" vim:fdm=marker:ts=4:sw=4:noet
--- 13,125 ----
" \'{a} {{{
! call IMAP ('=a', "\\\'{a}", 'tex')
! call IMAP ('=b', "\\'{b}", 'tex')
! call IMAP ('=c', "\\'{c}", 'tex')
! call IMAP ('=d', "\\'{d}", 'tex')
! call IMAP ('=e', "\\'{e}", 'tex')
! call IMAP ('=f', "\\'{f}", 'tex')
! call IMAP ('=g', "\\'{g}", 'tex')
! call IMAP ('=h', "\\'{h}", 'tex')
! call IMAP ('=i', "\\'{\i}", 'tex')
! call IMAP ('=j', "\\'{j}", 'tex')
! call IMAP ('=k', "\\'{k}", 'tex')
! call IMAP ('=l', "\\'{l}", 'tex')
! call IMAP ('=m', "\\'{m}", 'tex')
! call IMAP ('=n', "\\'{n}", 'tex')
! call IMAP ('=o', "\\'{o}", 'tex')
! call IMAP ('=p', "\\'{p}", 'tex')
! call IMAP ('=q', "\\'{q}", 'tex')
! call IMAP ('=r', "\\'{r}", 'tex')
! call IMAP ('=s', "\\'{s}", 'tex')
! call IMAP ('=t', "\\'{t}", 'tex')
! call IMAP ('=u', "\\'{u}", 'tex')
! call IMAP ('=v', "\\'{v}", 'tex')
! call IMAP ('=w', "\\'{w}", 'tex')
! call IMAP ('=x', "\\'{x}", 'tex')
! call IMAP ('=y', "\\'{y}", 'tex')
! call IMAP ('=z', "\\'{z}", 'tex')
! call IMAP ('=A', "\\'{A}", 'tex')
! call IMAP ('=B', "\\'{B}", 'tex')
! call IMAP ('=C', "\\'{C}", 'tex')
! call IMAP ('=D', "\\'{D}", 'tex')
! call IMAP ('=E', "\\'{E}", 'tex')
! call IMAP ('=F', "\\'{F}", 'tex')
! call IMAP ('=G', "\\'{G}", 'tex')
! call IMAP ('=H', "\\'{H}", 'tex')
! call IMAP ('=I', "\\'{\I}", 'tex')
! call IMAP ('=J', "\\'{J}", 'tex')
! call IMAP ('=K', "\\'{K}", 'tex')
! call IMAP ('=L', "\\'{L}", 'tex')
! call IMAP ('=M', "\\'{M}", 'tex')
! call IMAP ('=N', "\\'{N}", 'tex')
! call IMAP ('=O', "\\'{O}", 'tex')
! call IMAP ('=P', "\\'{P}", 'tex')
! call IMAP ('=Q', "\\'{Q}", 'tex')
! call IMAP ('=R', "\\'{R}", 'tex')
! call IMAP ('=S', "\\'{S}", 'tex')
! call IMAP ('=T', "\\'{T}", 'tex')
! call IMAP ('=U', "\\'{U}", 'tex')
! call IMAP ('=V', "\\'{V}", 'tex')
! call IMAP ('=W', "\\'{W}", 'tex')
! call IMAP ('=X', "\\'{X}", 'tex')
! call IMAP ('=Y', "\\'{Y}", 'tex')
! call IMAP ('=Z', "\\'{Z}", 'tex')
" }}}
" \v{a} {{{
! call IMAP ('+a', "\\v{a}", 'tex')
! call IMAP ('+b', "\\v{b}", 'tex')
! call IMAP ('+c', "\\v{c}", 'tex')
! call IMAP ('+d', "\\v{d}", 'tex')
! call IMAP ('+e', "\\v{e}", 'tex')
! call IMAP ('+f', "\\v{f}", 'tex')
! call IMAP ('+g', "\\v{g}", 'tex')
! call IMAP ('+h', "\\v{h}", 'tex')
! call IMAP ('+i', "\\v{\i}", 'tex')
! call IMAP ('+j', "\\v{j}", 'tex')
! call IMAP ('+k', "\\v{k}", 'tex')
! call IMAP ('+l', "\\q l", 'tex')
! call IMAP ('+m', "\\v{m}", 'tex')
! call IMAP ('+n', "\\v{n}", 'tex')
! call IMAP ('+o', "\\v{o}", 'tex')
! call IMAP ('+p', "\\v{p}", 'tex')
! call IMAP ('+q', "\\v{q}", 'tex')
! call IMAP ('+r', "\\v{r}", 'tex')
! call IMAP ('+s', "\\v{s}", 'tex')
! call IMAP ('+t', "\\q t", 'tex')
! call IMAP ('+u', "\\v{u}", 'tex')
! call IMAP ('+v', "\\v{v}", 'tex')
! call IMAP ('+w', "\\v{w}", 'tex')
! call IMAP ('+x', "\\v{x}", 'tex')
! call IMAP ('+y', "\\v{y}", 'tex')
! call IMAP ('+z', "\\v{z}", 'tex')
! call IMAP ('+A', "\\v{A}", 'tex')
! call IMAP ('+B', "\\v{B}", 'tex')
! call IMAP ('+C', "\\v{C}", 'tex')
! call IMAP ('+D', "\\v{D}", 'tex')
! call IMAP ('+E', "\\v{E}", 'tex')
! call IMAP ('+F', "\\v{F}", 'tex')
! call IMAP ('+G', "\\v{G}", 'tex')
! call IMAP ('+H', "\\v{H}", 'tex')
! call IMAP ('+I', "\\v{\I}", 'tex')
! call IMAP ('+J', "\\v{J}", 'tex')
! call IMAP ('+K', "\\v{K}", 'tex')
! call IMAP ('+L', "\\v{L}", 'tex')
! call IMAP ('+M', "\\v{M}", 'tex')
! call IMAP ('+N', "\\v{N}", 'tex')
! call IMAP ('+O', "\\v{O}", 'tex')
! call IMAP ('+P', "\\v{P}", 'tex')
! call IMAP ('+Q', "\\v{Q}", 'tex')
! call IMAP ('+R', "\\v{R}", 'tex')
! call IMAP ('+S', "\\v{S}", 'tex')
! call IMAP ('+T', "\\v{T}", 'tex')
! call IMAP ('+U', "\\v{U}", 'tex')
! call IMAP ('+V', "\\v{V}", 'tex')
! call IMAP ('+W', "\\v{W}", 'tex')
! call IMAP ('+X', "\\v{X}", 'tex')
! call IMAP ('+Y', "\\v{Y}", 'tex')
! call IMAP ('+Z', "\\v{Z}", 'tex')
" }}}
! call IMAP ('+}', "\\\"{a}", 'tex')
! call IMAP ('+:', "\\^{o}", 'tex')
" vim:fdm=marker:ts=4:sw=4:noet
Index: elementmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/elementmacros.vim,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -C2 -d -r1.5.2.1 -r1.5.2.2
*** elementmacros.vim 14 Dec 2002 10:59:18 -0000 1.5.2.1
--- elementmacros.vim 19 Dec 2002 12:19:00 -0000 1.5.2.2
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"
" Description: macros for dimensions/fonts/counters.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: macros for dimensions/fonts/counters.
***************
*** 55,59 ****
exe "vnoremap <silent> ".g:Tex_Leader.vislhs.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
! exe 'call Tex_IMAP ("'.a:font.'", "\\text'.vislhs.'{<++>}<++>", "tex")'
endif
--- 55,59 ----
exe "vnoremap <silent> ".g:Tex_Leader.vislhs.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
! exe 'call IMAP ("'.a:font.'", "\\text'.vislhs.'{<++>}<++>", "tex")'
endif
***************
*** 62,66 ****
let location = s:fontMenuLoc.substitute(a:fam, '^.', '\u&', '').'.'.vislhs.a:fam.'<tab>'.a:font.'\ ('.g:Tex_Leader.vislhs.')'
exe "amenu ".location.
! \" <plug><C-r>=Tex_PutTextWithMovement('\\text".vislhs."{<++>}<++>')<CR>"
exe "vmenu ".location.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
--- 62,66 ----
let location = s:fontMenuLoc.substitute(a:fam, '^.', '\u&', '').'.'.vislhs.a:fam.'<tab>'.a:font.'\ ('.g:Tex_Leader.vislhs.')'
exe "amenu ".location.
! \" <plug><C-r>=IMAP_PutTextWithMovement('\\text".vislhs."{<++>}<++>')<CR>"
exe "vmenu ".location.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
***************
*** 75,79 ****
let location = s:fontMenuLoc.'&Diacritics.'.a:name.'<tab>'
exe 'amenu '.location.
! \" <plug><C-r>=Tex_PutTextWithMovement('\\".a:rhs."{<++>}<++>')<CR>"
exe 'vmenu '.location.
\" \<C-\\>\<C-n>:call VEnclose('\\".a:rhs."{', '}', '', '')<CR>"
--- 75,79 ----
let location = s:fontMenuLoc.'&Diacritics.'.a:name.'<tab>'
exe 'amenu '.location.
! \" <plug><C-r>=IMAP_PutTextWithMovement('\\".a:rhs."{<++>}<++>')<CR>"
exe 'vmenu '.location.
\" \<C-\\>\<C-n>:call VEnclose('\\".a:rhs."{', '}', '', '')<CR>"
***************
*** 90,94 ****
function! <SID>Tex_Fontfont(desc, lhs)
let location = s:fontMenuLoc.'&font.'.a:desc.'<tab>'
! exe "amenu ".location." <plug><C-r>=Tex_PutTextWithMovement('".a:lhs."')<CR>"
exe "vunmenu ".location
endfunction " }}}
--- 90,94 ----
function! <SID>Tex_Fontfont(desc, lhs)
let location = s:fontMenuLoc.'&font.'.a:desc.'<tab>'
! exe "amenu ".location." <plug><C-r>=IMAP_PutTextWithMovement('".a:lhs."')<CR>"
exe "vunmenu ".location
endfunction " }}}
***************
*** 108,112 ****
function! <SID>Tex_VariousMenus(desc, lhs)
let location = s:variousMenuLoc.a:desc.'<tab>'
! exe "amenu ".location." <plug><C-r>=Tex_PutTextWithMovement('".a:lhs."')<CR>"
exe "vunmenu ".location
endfunction " }}}
--- 108,112 ----
function! <SID>Tex_VariousMenus(desc, lhs)
let location = s:variousMenuLoc.a:desc.'<tab>'
! exe "amenu ".location." <plug><C-r>=IMAP_PutTextWithMovement('".a:lhs."')<CR>"
exe "vunmenu ".location
endfunction " }}}
***************
*** 132,136 ****
" the \emph is special.
if g:Tex_FontMaps | exe "vnoremap <silent> ".g:Tex_Leader."em \<C-\\>\<C-N>:call VEnclose('\\emph{', '}', '{\\em', '\\/}')<CR>" | endif
! if g:Tex_FontMaps | exe 'call Tex_IMAP ("FEM", "\\emph{<++>}<++>", "tex")' | endif
" }}}
--- 132,136 ----
" the \emph is special.
if g:Tex_FontMaps | exe "vnoremap <silent> ".g:Tex_Leader."em \<C-\\>\<C-N>:call VEnclose('\\emph{', '}', '{\\em', '\\/}')<CR>" | endif
! if g:Tex_FontMaps | exe 'call IMAP ("FEM", "\\emph{<++>}<++>", "tex")' | endif
" }}}
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -C2 -d -r1.12.2.1 -r1.12.2.2
*** envmacros.vim 14 Dec 2002 10:59:18 -0000 1.12.2.1
--- envmacros.vim 19 Dec 2002 12:19:00 -0000 1.12.2.2
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 08:00 PM 2002 PST
! " Last Change: Sat Dec 14 02:00 AM 2002 PST
"
" Description: mappings/menus for environments.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 08:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: mappings/menus for environments.
***************
*** 74,78 ****
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call Tex_IMAP (a:lhs, '\begin{'.a:name."}\<CR>".extra."<++>\<CR>\\end{".a:name."}<++>", 'tex')
exec 'vnoremap <silent> '.vlhs.' '.vrhs
endif
--- 74,78 ----
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call IMAP (a:lhs, '\begin{'.a:name."}\<CR>".extra."<++>\<CR>\\end{".a:name."}<++>", 'tex')
exec 'vnoremap <silent> '.vlhs.' '.vrhs
endif
***************
*** 113,117 ****
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call Tex_IMAP(a:lhs, a:irhs, 'tex')
exec 'vnoremap '.vlhs.' '.vrhs
endif
--- 113,117 ----
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call IMAP(a:lhs, a:irhs, 'tex')
exec 'vnoremap '.vlhs.' '.vrhs
endif
***************
*** 123,127 ****
exe 'amenu '.location.' <plug><C-r>=Tex_DoEnvironment("'.a:name.'")<CR>'
else
! exe 'amenu '.location." <plug><C-r>=Tex_PutTextWithMovement('".a:irhs."')<CR>"
endif
exe 'vmenu '.location.' '.vrhs
--- 123,127 ----
exe 'amenu '.location.' <plug><C-r>=Tex_DoEnvironment("'.a:name.'")<CR>'
else
! exe 'amenu '.location." <plug><C-r>=IMAP_PutTextWithMovement('".a:irhs."')<CR>"
endif
exe 'vmenu '.location.' '.vrhs
***************
*** 138,142 ****
if g:Tex_SectionMaps && !exists('s:doneOnce')
exe 'vnoremap '.vlhs.' '.vrhs
! call Tex_IMAP (a:lhs, "\\".a:name.'{<++>}<++>', 'tex')
endif
--- 138,142 ----
if g:Tex_SectionMaps && !exists('s:doneOnce')
exe 'vnoremap '.vlhs.' '.vrhs
! call IMAP (a:lhs, "\\".a:name.'{<++>}<++>', 'tex')
endif
***************
*** 145,149 ****
let advlocation = g:Tex_EnvMenuLocation.'Sections.Advanced.'.a:name
! let irhs = "\<C-r>=Tex_PutTextWithMovement('\\".a:name."{<++>}<++>')\<CR>"
let advirhs = "\<C-r>=Tex_InsSecAdv('".a:name."')\<CR>"
--- 145,149 ----
let advlocation = g:Tex_EnvMenuLocation.'Sections.Advanced.'.a:name
! let irhs = "\<C-r>=IMAP_PutTextWithMovement('\\".a:name."{<++>}<++>')\<CR>"
let advirhs = "\<C-r>=Tex_InsSecAdv('".a:name."')\<CR>"
***************
*** 286,290 ****
" Tex_itemize: {{{
function! Tex_itemize(env)
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>\\item <++>\<cr>\\end{".a:env."}<++>")
endfunction
" }}}
--- 286,290 ----
" Tex_itemize: {{{
function! Tex_itemize(env)
! return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>\\item <++>\<cr>\\end{".a:env."}<++>")
endfunction
" }}}
***************
*** 296,302 ****
let itlabel = '['.itlabel.']'
endif
! return Tex_PutTextWithMovement("\\begin{description}\<cr>\\item".itlabel." <++>\<cr>\\end{description}<++>")
else
! return Tex_PutTextWithMovement(s:description)
endif
endfunction
--- 296,302 ----
let itlabel = '['.itlabel.']'
endif
! return IMAP_PutTextWithMovement("\\begin{description}\<cr>\\item".itlabel." <++>\<cr>\\end{description}<++>")
else
! return IMAP_PutTextWithMovement(s:description)
endif
endfunction
***************
*** 341,347 ****
let figure = figure . centr
let figure = figure . '\end{'.a:env.'}'
! return Tex_PutTextWithMovement(figure)
else
! return Tex_PutTextWithMovement(s:figure)
endif
endfunction
--- 341,347 ----
let figure = figure . centr
let figure = figure . '\end{'.a:env.'}'
! return IMAP_PutTextWithMovement(figure)
else
! return IMAP_PutTextWithMovement(s:figure)
endif
endfunction
***************
*** 385,391 ****
endif
let ret=ret.'\end{table}<++>'
! return Tex_PutTextWithMovement(ret)
else
! return Tex_PutTextWithMovement(s:table)
endif
endfunction
--- 385,391 ----
endif
let ret=ret.'\end{table}<++>'
! return IMAP_PutTextWithMovement(ret)
else
! return IMAP_PutTextWithMovement(s:table)
endif
endfunction
***************
*** 402,408 ****
let format = '{'.format.'}'
endif
! return Tex_PutTextWithMovement('\begin{'.a:env.'}'.pos.format."\<cr> \<cr>\\end{".a:env.'}<++>')
else
! return Tex_PutTextWithMovement('\begin{'.a:env.'}[<+position+>]{<+format+>}'."\<cr><++>\<cr>\\end{".a:env.'}<++>')
endif
endfunction
--- 402,408 ----
let format = '{'.format.'}'
endif
! return IMAP_PutTextWithMovement('\begin{'.a:env.'}'.pos.format."\<cr> \<cr>\\end{".a:env.'}<++>')
else
! return IMAP_PutTextWithMovement('\begin{'.a:env.'}[<+position+>]{<+format+>}'."\<cr><++>\<cr>\\end{".a:env.'}<++>')
endif
endfunction
***************
*** 421,425 ****
let arrlabel = ''
endif
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."<++>\<cr>\\end{".a:env."}<++>")
else
if a:env !~ '\*'
--- 421,425 ----
let arrlabel = ''
endif
! return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."<++>\<cr>\\end{".a:env."}<++>")
else
if a:env !~ '\*'
***************
*** 428,432 ****
let arrlabel = '<++>'
endif
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."\<cr>".'\end{'.a:env.'}<++>')
endif
endfunction
--- 428,432 ----
let arrlabel = '<++>'
endif
! return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."\<cr>".'\end{'.a:env.'}<++>')
endif
endfunction
***************
*** 445,451 ****
let label = ''
endif
! return Tex_PutTextWithMovement('\begin{list}'.label."\<cr>\\item \<cr>\\end{list}<++>")
else
! return Tex_PutTextWithMovement(s:list)
endif
endfunction
--- 445,451 ----
let label = ''
endif
! return IMAP_PutTextWithMovement('\begin{list}'.label."\<cr>\\item \<cr>\\end{list}<++>")
else
! return IMAP_PutTextWithMovement(s:list)
endif
endfunction
***************
*** 462,468 ****
let foo = foo.'['.opts.']'.'{'.dstyle.'}'
endif
! return Tex_PutTextWithMovement(foo."\<cr>\<cr>\\begin{document}\<cr><++>\<cr>\\end{document}")
else
! return Tex_PutTextWithMovement(s:document)
endif
endfunction
--- 462,468 ----
let foo = foo.'['.opts.']'.'{'.dstyle.'}'
endif
! return IMAP_PutTextWithMovement(foo."\<cr>\<cr>\\begin{document}\<cr><++>\<cr>\\end{document}")
else
! return IMAP_PutTextWithMovement(s:document)
endif
endfunction
***************
*** 479,485 ****
let foo = foo.'['.pos.']{'.width.'}'
endif
! return Tex_PutTextWithMovement(foo."\<cr><++>\<cr>\\end{minipage}<++>")
else
! return Tex_PutTextWithMovement(s:minipage)
endif
endfunction
--- 479,485 ----
let foo = foo.'['.pos.']{'.width.'}'
endif
! return IMAP_PutTextWithMovement(foo."\<cr><++>\<cr>\\end{minipage}<++>")
else
! return IMAP_PutTextWithMovement(s:minipage)
endif
endfunction
***************
*** 497,501 ****
endif
let bar = bar.'{'.key.'}'
! return Tex_PutTextWithMovement('\begin{thebibliography}'.foo."\<cr>".bar." \<cr>\\end{thebibliography}<++>\<Up>")
endfunction
" }}}
--- 497,501 ----
endif
let bar = bar.'{'.key.'}'
! return IMAP_PutTextWithMovement('\begin{thebibliography}'.foo."\<cr>".bar." \<cr>\\end{thebibliography}<++>\<Up>")
endfunction
" }}}
***************
*** 580,588 ****
exe 'return Tex_'.a:env.'(a:env)'
elseif a:env == '$$'
! return Tex_PutTextWithMovement('$$<++>$$')
elseif a:env == '['
! return Tex_PutTextWithMovement("\\[\<CR><++>\<CR>\\]<++>")
else
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr><++>\<cr>\\end{".a:env."}<++>")
endif
endfunction " }}}
--- 580,588 ----
exe 'return Tex_'.a:env.'(a:env)'
elseif a:env == '$$'
! return IMAP_PutTextWithMovement('$$<++>$$')
elseif a:env == '['
! return IMAP_PutTextWithMovement("\\[\<CR><++>\<CR>\\]<++>")
else
! return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr><++>\<cr>\\end{".a:env."}<++>")
endif
endfunction " }}}
Index: main.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C2 -d -r1.16.2.1 -r1.16.2.2
*** main.vim 14 Dec 2002 10:59:18 -0000 1.16.2.1
--- main.vim 19 Dec 2002 12:19:00 -0000 1.16.2.2
***************
*** 4,8 ****
" Email: sr...@fa...
" URL:
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"
" Help:
--- 4,8 ----
" Email: sr...@fa...
" URL:
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Help:
***************
*** 75,137 ****
" short forms for latex formatting and math elements. {{{
" taken from auctex.vim or miktexmacros.vim
! call Tex_IMAP ('__', '_{<++>}<++>', "tex")
! call Tex_IMAP ('()', '(<++>)<++>', "tex")
! call Tex_IMAP ('[]', '[<++>]<++>', "tex")
! call Tex_IMAP ('{}', '{<++>}<++>', "tex")
! call Tex_IMAP ('^^', '^{<++>}<++>', "tex")
! call Tex_IMAP ('$$', '$<++>$<++>', "tex")
! call Tex_IMAP ('==', '&=& ', "tex")
! call Tex_IMAP ('~~', '&\approx& ', "tex")
! call Tex_IMAP ('=~', '\approx', "tex")
! call Tex_IMAP ('::', '\dots', "tex")
! call Tex_IMAP ('((', '\left( <++> \right)<++>', "tex")
! call Tex_IMAP ('[[', '\left[ <++> \right]<++>', "tex")
! call Tex_IMAP ('{{', '\left\{ <++> \right\}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'^', '\hat{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'_', '\bar{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'6', '\partial', "tex")
! call Tex_IMAP (g:Tex_Leader.'8', '\infty', "tex")
! call Tex_IMAP (g:Tex_Leader.'/', '\frac{<++>}{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'%', '\frac{<++>}{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'@', '\circ', "tex")
! call Tex_IMAP (g:Tex_Leader.'0', '^\circ', "tex")
! call Tex_IMAP (g:Tex_Leader.'=', '\equiv', "tex")
! call Tex_IMAP (g:Tex_Leader."\\",'\setminus', "tex")
! call Tex_IMAP (g:Tex_Leader.'.', '\cdot', "tex")
! call Tex_IMAP (g:Tex_Leader.'*', '\times', "tex")
! call Tex_IMAP (g:Tex_Leader.'&', '\wedge', "tex")
! call Tex_IMAP (g:Tex_Leader.'-', '\bigcap', "tex")
! call Tex_IMAP (g:Tex_Leader.'+', '\bigcup', "tex")
! call Tex_IMAP (g:Tex_Leader.'(', '\subset', "tex")
! call Tex_IMAP (g:Tex_Leader.')', '\supset', "tex")
! call Tex_IMAP (g:Tex_Leader.'<', '\le', "tex")
! call Tex_IMAP (g:Tex_Leader.'>', '\ge', "tex")
! call Tex_IMAP (g:Tex_Leader.',', '\nonumber', "tex")
! call Tex_IMAP (g:Tex_Leader.'~', '\tilde{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.';', '\dot{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.':', '\ddot{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'2', '\sqrt{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'|', '\Big|', "tex")
! call Tex_IMAP (g:Tex_Leader.'I', "\\int_{<++>}^{<++>}<++>", 'tex')
" }}}
" other miscellaneous stuff taken from imaps.vim. {{{
! call Tex_IMAP ("vb".s:ml, "\\verb|<++>|<++>", "tex")
! call Tex_IMAP ("bf".s:ml, "{\\bf <++>}<++>", "tex")
! call Tex_IMAP ("em".s:ml, "{\\em <++>}<++>", "tex")
! call Tex_IMAP ("it".s:ml, "{\\it <++>}<++>", "tex")
! call Tex_IMAP ("mb".s:ml, "\\mbox{<++>}<++>", "tex")
! call Tex_IMAP ("frac".s:ml, "\\frac{<++>}{<++>}<++>", "tex")
! call Tex_IMAP ("sq".s:ml, "\\sqrt{<++>}<++>", "tex")
! call Tex_IMAP ("eps".s:ml, "\\psfig{figure=<++>.eps}<++>", "tex")
! call Tex_IMAP ("sum".s:ml, "\\sum{<++>}{<++>}<++>", "tex")
! call Tex_IMAP ("suml".s:ml, "\\sum\\limits_{<++>}^{<++>}<++>", "tex")
! call Tex_IMAP ("int".s:ml, "\\int_{<++>}^{<++>}<++>", "tex")
! call Tex_IMAP ("intl".s:ml, "\\int\\limits_{<++>}^{<++>}<++>", "tex")
! call Tex_IMAP ("bbr".s:ml, "\\left( <++> \\right)<++>", "tex")
! call Tex_IMAP ("bbc".s:ml, "\\left\\{ <++> \\right\\}<++>", "tex")
! call Tex_IMAP ("bbs".s:ml, "\\left[ <++> \\right]<++>", "tex")
! call Tex_IMAP ("rr".s:ml, "\\right", "tex")
! call Tex_IMAP ("ll".s:ml, "\\left", "tex")
! call Tex_IMAP ("part".s:ml, "\\partial", "tex")
" }}}
" Greek Letters {{{
--- 75,137 ----
" short forms for latex formatting and math elements. {{{
" taken from auctex.vim or miktexmacros.vim
! call IMAP ('__', '_{<++>}<++>', "tex")
! call IMAP ('()', '(<++>)<++>', "tex")
! call IMAP ('[]', '[<++>]<++>', "tex")
! call IMAP ('{}', '{<++>}<++>', "tex")
! call IMAP ('^^', '^{<++>}<++>', "tex")
! call IMAP ('$$', '$<++>$<++>', "tex")
! call IMAP ('==', '&=& ', "tex")
! call IMAP ('~~', '&\approx& ', "tex")
! call IMAP ('=~', '\approx', "tex")
! call IMAP ('::', '\dots', "tex")
! call IMAP ('((', '\left( <++> \right)<++>', "tex")
! call IMAP ('[[', '\left[ <++> \right]<++>', "tex")
! call IMAP ('{{', '\left\{ <++> \right\}<++>', "tex")
! call IMAP (g:Tex_Leader.'^', '\hat{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'_', '\bar{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'6', '\partial', "tex")
! call IMAP (g:Tex_Leader.'8', '\infty', "tex")
! call IMAP (g:Tex_Leader.'/', '\frac{<++>}{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'%', '\frac{<++>}{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'@', '\circ', "tex")
! call IMAP (g:Tex_Leader.'0', '^\circ', "tex")
! call IMAP (g:Tex_Leader.'=', '\equiv', "tex")
! call IMAP (g:Tex_Leader."\\",'\setminus', "tex")
! call IMAP (g:Tex_Leader.'.', '\cdot', "tex")
! call IMAP (g:Tex_Leader.'*', '\times', "tex")
! call IMAP (g:Tex_Leader.'&', '\wedge', "tex")
! call IMAP (g:Tex_Leader.'-', '\bigcap', "tex")
! call IMAP (g:Tex_Leader.'+', '\bigcup', "tex")
! call IMAP (g:Tex_Leader.'(', '\subset', "tex")
! call IMAP (g:Tex_Leader.')', '\supset', "tex")
! call IMAP (g:Tex_Leader.'<', '\le', "tex")
! call IMAP (g:Tex_Leader.'>', '\ge', "tex")
! call IMAP (g:Tex_Leader.',', '\nonumber', "tex")
! call IMAP (g:Tex_Leader.'~', '\tilde{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.';', '\dot{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.':', '\ddot{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'2', '\sqrt{<++>}<++>', "tex")
! call IMAP (g:Tex_Leader.'|', '\Big|', "tex")
! call IMAP (g:Tex_Leader.'I', "\\int_{<++>}^{<++>}<++>", 'tex')
" }}}
" other miscellaneous stuff taken from imaps.vim. {{{
! call IMAP ("vb".s:ml, "\\verb|<++>|<++>", "tex")
! call IMAP ("bf".s:ml, "{\\bf <++>}<++>", "tex")
! call IMAP ("em".s:ml, "{\\em <++>}<++>", "tex")
! call IMAP ("it".s:ml, "{\\it <++>}<++>", "tex")
! call IMAP ("mb".s:ml, "\\mbox{<++>}<++>", "tex")
! call IMAP ("frac".s:ml, "\\frac{<++>}{<++>}<++>", "tex")
! call IMAP ("sq".s:ml, "\\sqrt{<++>}<++>", "tex")
! call IMAP ("eps".s:ml, "\\psfig{figure=<++>.eps}<++>", "tex")
! call IMAP ("sum".s:ml, "\\sum{<++>}{<++>}<++>", "tex")
! call IMAP ("suml".s:ml, "\\sum\\limits_{<++>}^{<++>}<++>", "tex")
! call IMAP ("int".s:ml, "\\int_{<++>}^{<++>}<++>", "tex")
! call IMAP ("intl".s:ml, "\\int\\limits_{<++>}^{<++>}<++>", "tex")
! call IMAP ("bbr".s:ml, "\\left( <++> \\right)<++>", "tex")
! call IMAP ("bbc".s:ml, "\\left\\{ <++> \\right\\}<++>", "tex")
! call IMAP ("bbs".s:ml, "\\left[ <++> \\right]<++>", "tex")
! call IMAP ("rr".s:ml, "\\right", "tex")
! call IMAP ("ll".s:ml, "\\left", "tex")
! call IMAP ("part".s:ml, "\\partial", "tex")
" }}}
" Greek Letters {{{
***************
*** 193,199 ****
let i = char2nr('a')
while i <= char2nr('z')
! call Tex_IMAP(g:Tex_Leader.nr2char(i), "\<C-r>=TEX_InsertGreekLetter('".nr2char(i)."')\<CR>", 'tex')
if exists('s:greek_'.nr2char(i-32))
! call Tex_IMAP(g:Tex_Leader.nr2char(i-32), "\<C-r>=TEX_InsertGreekLetter('".nr2char(i-32)."')\<CR>", 'tex')
endif
let i = i + 1
--- 193,199 ----
let i = char2nr('a')
while i <= char2nr('z')
! call IMAP(g:Tex_Leader.nr2char(i), "\<C-r>=TEX_InsertGreekLetter('".nr2char(i)."')\<CR>", 'tex')
if exists('s:greek_'.nr2char(i-32))
! call IMAP(g:Tex_Leader.nr2char(i-32), "\<C-r>=TEX_InsertGreekLetter('".nr2char(i-32)."')\<CR>", 'tex')
endif
let i = i + 1
Index: mathmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/mathmacros.vim,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -d -r1.3.2.1 -r1.3.2.2
*** mathmacros.vim 14 Dec 2002 10:59:18 -0000 1.3.2.1
--- mathmacros.vim 19 Dec 2002 12:19:00 -0000 1.3.2.2
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"
" Description: macros for everything mathematical in latex.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: macros for everything mathematical in latex.
***************
*** 79,91 ****
" MATH Fonts {{{
let s:pA2a = s:pA."&MathFonts."
! exe s:pA2a.'mathbf{} <plug><C-r>=Tex_PutTextWithMovement("\\mathbf{<++>}<++>")<cr>'
! exe s:pA2a.'mathrm{} <plug><C-r>=Tex_PutTextWithMovement("\\mathrm{<++>}<++>")<cr>'
! exe s:pA2a.'mathsf{} <plug><C-r>=Tex_PutTextWithMovement("\\mathsf{<++>}<++>")<cr>'
! exe s:pA2a.'mathtt{} <plug><C-r>=Tex_PutTextWithMovement("\\mathtt{<++>}<++>")<cr>'
! exe s:pA2a.'mathit{} <plug><C-r>=Tex_PutTextWithMovement("\\mathit{<++>}<++>")<cr>'
! exe s:pA2a.'mathfrak{} <plug><C-r>=Tex_PutTextWithMovement("\\mathfrak{<++>}<++>")<cr>'
! exe s:pA2a.'mathcal{} <plug><C-r>=Tex_PutTextWithMovement("\\mathcal{<++>}<++>")<cr>'
! exe s:pA2a.'mathscr{} <plug><C-r>=Tex_PutTextWithMovement("\\mathscr{<++>}<++>")<cr>'
! exe s:pA2a.'mathbb{} <plug><C-r>=Tex_PutTextWithMovement("\\mathbb{<++>}<++>")<cr>'
" }}}
" Greek Letters small {{{
--- 79,91 ----
" MATH Fonts {{{
let s:pA2a = s:pA."&MathFonts."
! exe s:pA2a.'mathbf{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathbf{<++>}<++>")<cr>'
! exe s:pA2a.'mathrm{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathrm{<++>}<++>")<cr>'
! exe s:pA2a.'mathsf{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathsf{<++>}<++>")<cr>'
! exe s:pA2a.'mathtt{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathtt{<++>}<++>")<cr>'
! exe s:pA2a.'mathit{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathit{<++>}<++>")<cr>'
! exe s:pA2a.'mathfrak{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathfrak{<++>}<++>")<cr>'
! exe s:pA2a.'mathcal{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathcal{<++>}<++>")<cr>'
! exe s:pA2a.'mathscr{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathscr{<++>}<++>")<cr>'
! exe s:pA2a.'mathbb{} <plug><C-r>=IMAP_PutTextWithMovement("\\mathbb{<++>}<++>")<cr>'
" }}}
" Greek Letters small {{{
***************
*** 472,498 ****
" {{{ MathDiacritics
let s:pA12 = s:pA."&MathDiacritics."
! exe s:pA12.'acute{} <plug><C-r>=Tex_PutTextWithMovement("\\acute{<++>}<++>")<cr>'
! exe s:pA12.'bar{}<Tab>`_ <plug><C-r>=Tex_PutTextWithMovement("\\bar{<++>}<++>")<cr>'
! exe s:pA12.'breve{} <plug><C-r>=Tex_PutTextWithMovement("\\breve{<++>}<++>")<cr>'
! exe s:pA12.'check{} <plug><C-r>=Tex_PutTextWithMovement("\\check{<++>}<++>")<cr>'
! exe s:pA12.'ddot{}<Tab>`: <plug><C-r>=Tex_PutTextWithMovement("\\ddot{<++>}<++>")<cr>'
! exe s:pA12.'dot{}<Tab>`; <plug><C-r>=Tex_PutTextWithMovement("\\dot{<++>}<++>")<cr>'
! exe s:pA12.'grave{} <plug><C-r>=Tex_PutTextWithMovement("\\grave{<++>}<++>")<cr>'
! exe s:pA12.'hat{}<Tab>`^ <plug><C-r>=Tex_PutTextWithMovement("\\hat{<++>}<++>")<cr>'
! exe s:pA12.'tilde{}<tab>`~ <plug><C-r>=Tex_PutTextWithMovement("\\tilde{<++>}<++>")<cr>'
! exe s:pA12.'vec{} <plug><C-r>=Tex_PutTextWithMovement("\\vec{<++>}<++>")<cr>'
! exe s:pA12.'widehat{} <plug><C-r>=Tex_PutTextWithMovement("\\widehat{<++>}<++>")<cr>'
! exe s:pA12.'widetilde{} <plug><C-r>=Tex_PutTextWithMovement("\\widetilde{<++>}<++>")<cr>'
! exe s:pA12.'imath <plug><C-r>=Tex_PutTextWithMovement("\\imath")<cr>'
! exe s:pA12.'jmath <plug><C-r>=Tex_PutTextWithMovement("\\jmath")<cr>'
" }}}
" {{{ OverlineAndCo
let s:pA13 = s:pA."&OverlineAndCo."
! exe s:pA13.'overline{} <plug><C-r>=Tex_PutTextWithMovement("\\overline{}")<cr>'
! exe s:pA13.'underline{} <plug><C-r>=Tex_PutTextWithMovement("\\underline{}")<cr>'
! exe s:pA13.'overrightarrow{} <plug><C-r>=Tex_PutTextWithMovement("\\overrightarrow{}")<cr>'
! exe s:pA13.'overleftarrow{} <plug><C-r>=Tex_PutTextWithMovement("\\overleftarrow{}")<cr>'
! exe s:pA13.'overbrace{} <plug><C-r>=Tex_PutTextWithMovement("\\overbrace{}")<cr>'
! exe s:pA13.'underbrace{} <plug><C-r>=Tex_PutTextWithMovement("\\underbrace{}")<cr>'
" }}}
" {{{ Symbols1
--- 472,498 ----
" {{{ MathDiacritics
let s:pA12 = s:pA."&MathDiacritics."
! exe s:pA12.'acute{} <plug><C-r>=IMAP_PutTextWithMovement("\\acute{<++>}<++>")<cr>'
! exe s:pA12.'bar{}<Tab>`_ <plug><C-r>=IMAP_PutTextWithMovement("\\bar{<++>}<++>")<cr>'
! exe s:pA12.'breve{} <plug><C-r>=IMAP_PutTextWithMovement("\\breve{<++>}<++>")<cr>'
! exe s:pA12.'check{} <plug><C-r>=IMAP_PutTextWithMovement("\\check{<++>}<++>")<cr>'
! exe s:pA12.'ddot{}<Tab>`: <plug><C-r>=IMAP_PutTextWithMovement("\\ddot{<++>}<++>")<cr>'
! exe s:pA12.'dot{}<Tab>`; <plug><C-r>=IMAP_PutTextWithMovement("\\dot{<++>}<++>")<cr>'
! exe s:pA12.'grave{} <plug><C-r>=IMAP_PutTextWithMovement("\\grave{<++>}<++>")<cr>'
! exe s:pA12.'hat{}<Tab>`^ <plug><C-r>=IMAP_PutTextWithMovement("\\hat{<++>}<++>")<cr>'
! exe s:pA12.'tilde{}<tab>`~ <plug><C-r>=IMAP_PutTextWithMovement("\\tilde{<++>}<++>")<cr>'
! exe s:pA12.'vec{} <plug><C-r>=IMAP_PutTextWithMovement("\\vec{<++>}<++>")<cr>'
! exe s:pA12.'widehat{} <plug><C-r>=IMAP_PutTextWithMovement("\\widehat{<++>}<++>")<cr>'
! exe s:pA12.'widetilde{} <plug><C-r>=IMAP_PutTextWithMovement("\\widetilde{<++>}<++>")<cr>'
! exe s:pA12.'imath <plug><C-r>=IMAP_PutTextWithMovement("\\imath")<cr>'
! exe s:pA12.'jmath <plug><C-r>=IMAP_PutTextWithMovement("\\jmath")<cr>'
" }}}
" {{{ OverlineAndCo
let s:pA13 = s:pA."&OverlineAndCo."
! exe s:pA13.'overline{} <plug><C-r>=IMAP_PutTextWithMovement("\\overline{}")<cr>'
! exe s:pA13.'underline{} <plug><C-r>=IMAP_PutTextWithMovement("\\underline{}")<cr>'
! exe s:pA13.'overrightarrow{} <plug><C-r>=IMAP_PutTextWithMovement("\\overrightarrow{}")<cr>'
! exe s:pA13.'overleftarrow{} <plug><C-r>=IMAP_PutTextWithMovement("\\overleftarrow{}")<cr>'
! exe s:pA13.'overbrace{} <plug><C-r>=IMAP_PutTextWithMovement("\\overbrace{}")<cr>'
! exe s:pA13.'underbrace{} <plug><C-r>=IMAP_PutTextWithMovement("\\underbrace{}")<cr>'
" }}}
" {{{ Symbols1
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.15.2.1
retrieving revision 1.15.2.2
diff -C2 -d -r1.15.2.1 -r1.15.2.2
*** packages.vim 14 Dec 2002 10:59:19 -0000 1.15.2.1
--- packages.vim 19 Dec 2002 12:19:00 -0000 1.15.2.2
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"
" Description: handling packages from within vim
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: handling packages from within vim
***************
*** 251,257 ****
let p_o_end = p_o_item[strlen(p_o_item) - 1]
if p_o_end !~ "[a-zA-Z}]"
! let r_m_p_o_item = "<plug><C-r>=Tex_PutTextWithMovement('".p_o_item.'<++>'.p_o_delimiter."<++>')<cr>"
elseif p_o_end == '}'
! let r_m_p_o_item = "<plug><C-r>=Tex_PutTextWithMovement('".p_o_item.p_o_delimiter."<++>')<cr>"
else
let r_m_p_o_item = '<plug>'.p_o_item.p_o_delimiter
--- 251,257 ----
let p_o_end = p_o_item[strlen(p_o_item) - 1]
if p_o_end !~ "[a-zA-Z}]"
! let r_m_p_o_item = "<plug><C-r>=IMAP_PutTextWithMovement('".p_o_item.'<++>'.p_o_delimiter."<++>')<cr>"
elseif p_o_end == '}'
! let r_m_p_o_item = "<plug><C-r>=IMAP_PutTextWithMovement('".p_o_item.p_o_delimiter."<++>')<cr>"
else
let r_m_p_o_item = '<plug>'.p_o_item.p_o_delimiter
***************
*** 286,298 ****
let com_type = '{}'
let l_m_item = '\\&'.p_item_name.'{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."{<++>}<++>')<cr>"
elseif p_item_def == 'brs'
let com_type = '{}'
let l_m_item = '\\&'.substitute(p_item_name, "[<++><++>]", '', 'g')
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."<++>')<cr>"
elseif p_item_def == 'brd'
let com_type = '{}{}'
let l_m_item = '\\&'.p_item_name.'{}{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."{<++>}{<++>}<++>')<cr>"
elseif p_item_def == 'sep'
let com_type = ''
--- 286,298 ----
let com_type = '{}'
let l_m_item = '\\&'.p_item_name.'{}'
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."{<++>}<++>')<cr>"
elseif p_item_def == 'brs'
let com_type = '{}'
let l_m_item = '\\&'.substitute(p_item_name, "[<++><++>]", '', 'g')
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."<++>')<cr>"
elseif p_item_def == 'brd'
let com_type = '{}{}'
let l_m_item = '\\&'.p_item_name.'{}{}'
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."{<++>}{<++>}<++>')<cr>"
elseif p_item_def == 'sep'
let com_type = ''
***************
*** 320,328 ****
let com_type = '\\[]'
let l_m_item = '\\&'.p_item_name.'[]'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."[<++>]<++>')<cr>"
elseif p_item_def == 'nob'
let com_type = '[]{}'
let l_m_item = '\\&'.p_item_name.'[]{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."[<++>]{<++>}<++>')<cr>"
elseif p_item_def == 'pla'
let com_type = '(p)'
--- 320,328 ----
let com_type = '\\[]'
let l_m_item = '\\&'.p_item_name.'[]'
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."[<++>]<++>')<cr>"
elseif p_item_def == 'nob'
let com_type = '[]{}'
let l_m_item = '\\&'.p_item_name.'[]{}'
! let r_m_item = "<plug><C-r>=IMAP_PutTextWithMovement('\\".p_item_name."[<++>]{<++>}<++>')<cr>"
elseif p_item_def == 'pla'
let com_type = '(p)'
Index: templates.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/templates.vim,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -C2 -d -r1.6 -r1.6.4.1
*** templates.vim 10 Nov 2002 18:09:35 -0000 1.6
--- templates.vim 19 Dec 2002 12:19:00 -0000 1.6.4.1
***************
*** 5,9 ****
" Version: 1.0
" Created: Tue Apr 23 05:00 PM 2002 PST
! " Last Change: nie lis 10 05:00 2002 C
"
" Description: functions for handling templates in latex-suite/templates
--- 5,9 ----
" Version: 1.0
" Created: Tue Apr 23 05:00 PM 2002 PST
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Description: functions for handling templates in latex-suite/templates
Index: texrc
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v
retrieving revision 1.15.2.1
retrieving revision 1.15.2.2
diff -C2 -d -r1.15.2.1 -r1.15.2.2
*** texrc 14 Dec 2002 10:59:19 -0000 1.15.2.1
--- texrc 19 Dec 2002 12:19:00 -0000 1.15.2.2
***************
*** 4,8 ****
" Author: Srinath Avadhanula
" Created: Mon Apr 01 11:00 AM 2002 PST
! " Last Change: Sat Dec 14 02:00 AM 2002 PST
"
" Description: This file contains resource configuration information for the
--- 4,8 ----
" Author: Srinath Avadhanula
" Created: Mon Apr 01 11:00 AM 2002 PST
! " Last Change: Thu Dec 19 04:00 AM 2002 PST
"
" Description: This file contains resource configuration information for the
***************
*** 181,190 ****
" and not Tex_. See |placeholders| for a description of how to use
" place-holders. You can either completely disable placeholders (not
! " recommended) and/or you can change the place holder characters. The Start
! " and End characters should only be single characters. i.e, '' or ,, etc are
! " not allowed.
TexLet g:Imap_UsePlaceHolders = 1
TexLet g:Imap_PlaceHolderStart = '<+'
TexLet g:Imap_PlaceHolderEnd = '+>'
" }}}
--- 181,202 ----
" and not Tex_. See |placeholders| for a description of how to use
" place-holders. You can either completely disable placeholders (not
! " recommended) and/or you can change the place holder characters.
!
TexLet g:Imap_UsePlaceHolders = 1
TexLet g:Imap_PlaceHolderStart = '<+'
TexLet g:Imap_PlaceHolderEnd = '+>'
+
+ " This option when set to 1 makes <C-J> in insert mode delete
+ " non-descriptive (empty) placeholders and enters insert mode.
+ " NOTE: This option _has_ to be set in the .vimrc. Setting this in a filetype
+ " plugin file such as ftplugin/tex.vim will not have any affect.
+ TexLet g:Imap_DeleteEmptyPlaceHolders = 0
+
+ " When set to 1, in visual mode, <C-J> takes you to the next placeholder
+ " without deleting the current placeholder.
+ " NOTE: This option _has_ to be set in the .vimrc. Setting this in a filetype
+ " plugin file such as ftplugin/tex.vim will not have any affect.
+ TexLet g:Imap_StickyPlaceHolders = 1
+
" }}}
Index: wizardfuncs.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/wizardfuncs.vim,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -C2 -d -r1.5.2.1 -r1.5.2.2
*** wizardfuncs.vim 14 Dec 2002 10:59:19 -0000 1.5.2.1
--- wizardfuncs.vim 19 Dec 2002 12:19:00 -0000 1.5.2.2
***************
*** 198,202 ****
exe "normal! i\\".a:section_name."{<++>}<++>\<Esc>0\<C-j>"
" let ret_section = "\\".a:section_name."{<++>}<++>"
! " exe "normal! i\<C-r>=Tex_PutTextWithMovement(ret_section)\<CR>"
" normal f}i
endfunction "}}}
--- 198,202 ----
exe "normal! i\\".a:section_name."{<++>}<++>\<Esc>0\<C-j>"
" let ret_section = "\\".a:section_name."{<++>}<++>"
! " exe "normal! i\<C-r>=IMAP_PutTextWithMovement(ret_section)\<CR>"
" normal f}i
endfunction "}}}
|
|
From: <sri...@us...> - 2002-12-19 12:19:04
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/tex
In directory sc8-pr-cvs1:/tmp/cvs-serv19503/ftplugin/tex
Modified Files:
Tag: b-newimaps
brackets.vim
Log Message:
. Revert back Tex_IMAP() to IMAP() and
Tex_PutTextWithMovement() to IMAP_PutTextWithMovement().
Index: brackets.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/tex/brackets.vim,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -C2 -d -r1.5.2.1 -r1.5.2.2
*** brackets.vim 14 Dec 2002 10:59:21 -0000 1.5.2.1
--- brackets.vim 19 Dec 2002 12:19:01 -0000 1.5.2.2
***************
*** 2,6 ****
" Author: Carl Mueller
" (incorporated into latex-suite by Srinath Avadhanula)
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
" Description:
" This ftplugin provides the following maps:
--- 2,6 ----
" Author: Carl Mueller
" (incorporated into latex-suite by Srinath Avadhanula)
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
" Description:
" This ftplugin provides the following maps:
***************
*** 93,97 ****
return "\<BS>".'\mathcal{'.toupper(char).'}'
else
! return Tex_PutTextWithMovement('\cite{<++>}<++>')
endif
endfunction
--- 93,97 ----
return "\<BS>".'\mathcal{'.toupper(char).'}'
else
! return IMAP_PutTextWithMovement('\cite{<++>}<++>')
endif
endfunction
***************
*** 121,129 ****
endif
let rhs = matchstr(matchedbrackets, char.'\zs.\ze')
! return "\<BS>".Tex_PutTextWithMovement('\left'.add.char.'<++>\right'.add.rhs.'<++>')
elseif char == '<'
! return "\<BS>".Tex_PutTextWithMovement('langle<++>\rangle<++>')
elseif char == 'q'
! return "\<BS>".Tex_PutTextWithMovement('\lefteqn{<++>}<++>')
else
return '\label{<++>}<++>'
--- 121,129 ----
endif
let rhs = matchstr(matchedbrackets, char.'\zs.\ze')
! return "\<BS>".IMAP_PutTextWithMovement('\left'.add.char.'<++>\right'.add.rhs.'<++>')
elseif char == '<'
! return "\<BS>".IMAP_PutTextWithMovement('langle<++>\rangle<++>')
elseif char == 'q'
! return "\<BS>".IMAP_PutTextWithMovement('\lefteqn{<++>}<++>')
else
return '\label{<++>}<++>'
|
|
From: <sri...@us...> - 2002-12-19 12:19:04
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages
In directory sc8-pr-cvs1:/tmp/cvs-serv19503/ftplugin/latex-suite/packages
Modified Files:
Tag: b-newimaps
polski
Log Message:
. Revert back Tex_IMAP() to IMAP() and
Tex_PutTextWithMovement() to IMAP_PutTextWithMovement().
Index: polski
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/polski,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -d -r1.8 -r1.8.2.1
*** polski 13 Dec 2002 17:24:27 -0000 1.8
--- polski 19 Dec 2002 12:19:01 -0000 1.8.2.1
***************
*** 1,5 ****
" Author: Mikolaj Machowski <mi...@wp...>
" (c) Copyright by Mikolaj Machowski 2002
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
" License: Vim Charityware
"
--- 1,5 ----
" Author: Mikolaj Machowski <mi...@wp...>
" (c) Copyright by Mikolaj Machowski 2002
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
" License: Vim Charityware
"
***************
*** 49,53 ****
" u¿ywasz (albo go ¶ci±gnij z http://vim-latex.sf.net)
function! TPackagePolskiTylda()
! call Tex_IMAP (" ---", "~---", "tex")
endfunction
call TPackagePolskiTylda()
--- 49,53 ----
" u¿ywasz (albo go ¶ci±gnij z http://vim-latex.sf.net)
function! TPackagePolskiTylda()
! call IMAP (" ---", "~---", "tex")
endfunction
call TPackagePolskiTylda()
|
|
From: <sri...@us...> - 2002-12-19 12:14:03
|
Update of /cvsroot/vim-latex/vimfiles/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv12787
Modified Files:
Tag: b-newimaps
imaps.vim
Log Message:
. provide defaults for g:Imap_StickyPlaceHolders and
g:Imap_DeleteEmptyPlaceHolders.
. remove the RestoreEncoding function. Hopefully, in the near future we
will be able to get away with iconv and the fact that the scripts
themselves do not contain funkiness.
Index: imaps.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v
retrieving revision 1.9.2.5
retrieving revision 1.9.2.6
diff -C2 -d -r1.9.2.5 -r1.9.2.6
*** imaps.vim 19 Dec 2002 11:44:55 -0000 1.9.2.5
--- imaps.vim 19 Dec 2002 12:13:59 -0000 1.9.2.6
***************
*** 8,12 ****
" while preserving filetype indentation.
"
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Documentation: {{{
--- 8,12 ----
" while preserving filetype indentation.
"
! " Last Change: Thu Dec 19 04:00 AM 2002 PST
"
" Documentation: {{{
***************
*** 97,103 ****
" ==============================================================================
! " Script variables
! " ==============================================================================
! " {{{
" s:LHS_{ft}_{char} will be generated automatically. It will look like
" s:LHS_tex_o = 'fo\|foo\|boo' and contain all mapped sequences ending in "o".
--- 97,111 ----
" ==============================================================================
! " Script Options / Variables
! " ==============================================================================
! " Options {{{
! if !exists('g:Imap_StickyPlaceHolders')
! let g:Imap_StickyPlaceHolders = 1
! endif
! if !exists('g:Imap_DeleteEmptyPlaceHolders')
! let g:Imap_DeleteEmptyPlaceHolders = 1
! endif
! " }}}
! " Variables {{{
" s:LHS_{ft}_{char} will be generated automatically. It will look like
" s:LHS_tex_o = 'fo\|foo\|boo' and contain all mapped sequences ending in "o".
***************
*** 302,307 ****
function! IMAP_Jumpfunc(direction, inclusive)
- let g:Imap_DeleteEmptyPlaceHolders = 0
-
" The user's placeholder settings.
let phsUser = s:PlaceHolderStart()
--- 310,313 ----
***************
*** 382,393 ****
end
" }}}
- " RestoreEncoding: restores file encoding to what it was originally {{{
- " Description:
- function! RestoreEncoding()
- if s:oldenc != 'latin1'
- let &g:encoding = s:oldenc
- endif
- return ''
- endfunction " }}}
nmap <silent> <script> <plug><+SelectRegion+> `<v`>
--- 388,391 ----
|
|
From: <sri...@us...> - 2002-12-19 11:44:58
|
Update of /cvsroot/vim-latex/vimfiles/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv7443
Modified Files:
Tag: b-newimaps
imaps.vim
Log Message:
Comments on the last version:
" Break text up into "initial <+template+> final"; any piece may be empty.
let initial = substitute(text, pattern, '\1', '')
let template = substitute(text, pattern, '\2', '')
let final = substitute(text, pattern, '\3', '')
This assumes that there is only a single <+template+> in the text.
Afterwards:
let final = substitute(final, startpat, escape(phs, '\'), 'g')
let final = substitute(final, endpat, escape(phe, '\'), 'g')
This will fail when the user uses something like:
call Imap_PutTextWithMovement('bar?desc?', '?', '?')
with g:Imap_Place..Start = '<+' != g:Imap_Place...End
i.e when phs and phe are the same, but the [bg]:Imap_Place* settings arent.
Also, I dont think
let marker = phs . phs . phe . phe
is a "rare" enough string. As in the previous example, this could simply be
????. We do _not_ want to accidentally delete stuff from the user's files.
let marker = '<!--- @#% Start Here @#% ----!>'
This sounds safer. Ofcourse, we could always make a search and be sure, but
I am willing to bet that this string will never happen on purpose in some
file.
Changes this time:
1. Cleaned up the IMAP_PutTextWithMovement() function. This function now
calls the IMAP_Jumpfunc() function instead of trying to do the same
thing.
2. IMAP_Jumpfunc(): After suggestions from LH, implemented the option of
. not deleting empty placeholders.
. going up and down. (<C-J> and <C-K>)
. option of not deleting the placeholder while moving.
TODO:
. command to insert placeholder at current position
. command to erase all placeholders.
I am going to follow up this commit with another big one renaming all the
old Tex_IMAP()s to IMAP()s... After that, it is time to merge this branch
into the main trunk and get working on a next release version and also
solving the encoding problem once and for all...
Index: imaps.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v
retrieving revision 1.9.2.4
retrieving revision 1.9.2.5
diff -C2 -d -r1.9.2.4 -r1.9.2.5
*** imaps.vim 18 Dec 2002 16:36:19 -0000 1.9.2.4
--- imaps.vim 19 Dec 2002 11:44:55 -0000 1.9.2.5
***************
*** 8,12 ****
" while preserving filetype indentation.
"
! " Last Change: Wed Dec 18 11:00 AM 2002 EST
"
" Documentation: {{{
--- 8,12 ----
" while preserving filetype indentation.
"
! " Last Change: Thu Dec 19 03:00 AM 2002 PST
"
" Documentation: {{{
***************
*** 49,53 ****
" form:
"
! " call Tex_IMAP (lhs, rhs, ft)
"
" Some characters in the RHS have special meaning which help in cursor
--- 49,53 ----
" form:
"
! " call IMAP (lhs, rhs, ft)
"
" Some characters in the RHS have special meaning which help in cursor
***************
*** 56,60 ****
" Example One:
"
! " call Tex_IMAP ("bit`", "\\begin{itemize}\<cr>\\item <++>\<cr>\\end{itemize}<++>", "tex")
"
" This effectively sets up the map for "bit`" whenever you edit a latex file.
--- 56,60 ----
" Example One:
"
! " call IMAP ("bit`", "\\begin{itemize}\<cr>\\item <++>\<cr>\\end{itemize}<++>", "tex")
"
" This effectively sets up the map for "bit`" whenever you edit a latex file.
***************
*** 83,87 ****
" Example Two:
" You can use the <C-r> command to insert dynamic elements such as dates.
! " call Tex_IMAP ('date`', "\<c-r>=strftime('%b %d %Y')\<cr>", '')
"
" sets up the map for date` to insert the current date.
--- 83,87 ----
" Example Two:
" You can use the <C-r> command to insert dynamic elements such as dates.
! " call IMAP ('date`', "\<c-r>=strftime('%b %d %Y')\<cr>", '')
"
" sets up the map for date` to insert the current date.
***************
*** 91,94 ****
--- 91,96 ----
" '----%<----' above and below the visually selected range of lines. The
" length of the string is chosen to be equal to the longest line in the range.
+ " Recommended Usage:
+ " '<,'>Snip
"--------------------------------------%<--------------------------------------
" }}}
***************
*** 110,114 ****
" IMAP: Adds a "fake" insert mode mapping. {{{
" For example, doing
! " Tex_IMAP('abc', 'def' ft)
" will mean that if the letters abc are pressed in insert mode, then
" they will be replaced by def. If ft != '', then the "mapping" will be
--- 112,116 ----
" IMAP: Adds a "fake" insert mode mapping. {{{
" For example, doing
! " IMAP('abc', 'def' ft)
" will mean that if the letters abc are pressed in insert mode, then
" they will be replaced by def. If ft != '', then the "mapping" will be
***************
*** 223,309 ****
function! IMAP_PutTextWithMovement(str, ...)
! " Find the place holders for the input.
if a:0 < 2
let phs = '<+'
let phe = '+>'
else
! let phs = a:1
! let phe = a:2
endif
- let startpat = escape(phs, '\')
- let endpat = escape(phe, '\')
- " A very rare string:
- let marker = phs . phs . phe . phe
- " TODO: Maybe I need to play some games with iconv() to define marker and
- " markerpat in case marker !~ marker ...
let text = a:str
- " If the user does not want to use place-holders, then remove them.
- if exists('g:Imap_UsePlaceHolders') && !g:Imap_UsePlaceHolders
- " a heavy-handed way to just use the first placeholder and remove the
- " rest. Replace the first template with phe ...
- let text = substitute(text, '\V'.startpat.'\.\{-}'.endpat, endpat, '')
- " ... delete all the others ...
- let text = substitute(text, '\V'.startpat.'\.\{-}'.endpat, '', 'g')
- " ... and replace the first phe with phs.phe .
- let text = substitute(text, '\V'.endpat, startpat.endpat, '')
- endif
- let pattern = '\V\(\.\{-}\)' .startpat. '\(\.\{-}\)' .endpat. '\(\.\*\)'
" If there are no place holders, just return the text.
! if text !~ pattern
return text
endif
- " Break text up into "initial <+template+> final"; any piece may be empty.
- let initial = substitute(text, pattern, '\1', '')
- let template = substitute(text, pattern, '\2', '')
- let final = substitute(text, pattern, '\3', '')
! " Now, get the place holders for the output.
! let phs = s:PlaceHolderStart() " default <+
! let phe = s:PlaceHolderEnd() " default +>
! let template = phs . template . phe
! let final = substitute(final, startpat, escape(phs, '\'), 'g')
! let final = substitute(final, endpat, escape(phe, '\'), 'g')
! " Now, start building the return value.
! let text = initial . marker . template . marker . final
! " Return to Normal mode: this works even if 'insertmode' is set:
! let text = text . "\<C-\>\<C-N>"
! " Move to the first marker and delete it. Cursor ends on beginning of
! " template.
! let text = text . "2?" . marker . "\<CR>" . "v/" . marker . "/e\<CR>x"
! " Enter Visual mode and move to just before the next marker.
! let text = text . "v/" . marker . "/s-1\<CR>\<C-\>\<C-N>"
! " Move to the second marker and delete it.
! let text = text . "/" . marker . "\<CR>" . "d/" . marker . "/e\<CR>"
! " Note: We use a search strategy instead of computing the length of the
! " template because strlen() returns different things depending on the
! " encoding.
! " Clean up the search history. Restore Visual selection.
! let text = text . ":" . s:RemoveLastHistoryItem . "\<CR>gv"
! " Finally, append commands to Select <+template+> or replace <++> .
! if template == phs . phe " template looks like <++> so Change it:
! let text = text . "c"
! else " Enter Select mode.
! let text = text . "\<C-G>"
endif
! return text
! endfunction
! " Tex_PutTextWithMovement: old version of IMAP_PutTextWithMovement
! " Description:
! " This function is supplied to maintain backward compatibility.
! " This function is only for use in latex-suite.
! function! Tex_PutTextWithMovement(text)
!
! let phs = s:PlaceHolderStart()
! let phe = s:PlaceHolderEnd()
! let newText = substitute(a:text, '<+', phs, 'g')
! let newText = substitute(newText, '+>', phe, 'g')
! return IMAP_PutTextWithMovement(newText)
! endfunction
" }}}
--- 225,298 ----
function! IMAP_PutTextWithMovement(str, ...)
! " The placeholders used in the particular input string. These can be
! " different from what the user wants to use.
if a:0 < 2
let phs = '<+'
let phe = '+>'
else
! let phs = escape(a:1, '\')
! let phe = escape(a:2, '\')
endif
let text = a:str
" If there are no place holders, just return the text.
! if text !~ '\V'.phs.'\{-}'.phe
return text
endif
! " The user's placeholder settings.
! let phsUser = s:PlaceHolderStart()
! let pheUser = s:PlaceHolderEnd()
! " A very rare string: Do not use any special characters here. This is used
! " for moving to the beginning of the inserted text
! let marker = '<!--- @#% Start Here @#% ----!>'
! let markerLength = strlen(marker)
!
! " If the user does not want to use place-holders, then remove all but the
! " first placeholder
! if exists('g:Imap_UsePlaceHolders') && !g:Imap_UsePlaceHolders
! " a heavy-handed way to just use the first placeholder and remove the
! " rest. Replace the first placeholder with phe ...
! let text = substitute(text, '\V'.phs.'\.\{-}'.phe, phe, '')
! " ... delete all the others ...
! let text = substitute(text, '\V'.phs.'\.\{-}'.phe, '', 'g')
! " ... and replace the first phe with phsUser.pheUser .
! let text = substitute(text, '\V'.phe, phsUser.pheUser, '')
endif
! " now replace all occurences of the placeholders here with the users choice
! " of placeholder settings.
! " NOTE: There can be more than 1 placeholders here. Therefore use a global
! " search and replace.
! let text = substitute(text, '\V'.phs.'\(\.\{-}\)'.phe, phsUser.'\1'.pheUser, 'g')
! " Now append the marker (the rare string) to the beginning of the text so
! " we know where the expansion started from
! let text = marker.text
! " This search will move us to the very beginning of the text to be
! " inserted.
! " The steps are:
! " 1. enter escape mode (using <C-\><C-n> so it works in insertmode as
! " well)
! " 2. Search backward for marker text.
! " 3. delete from the beginning to the end of marker into the blackhole
! " register.
! let movement = "\<C-\>\<C-N>"
! \ . "?\\V".marker."\<CR>"
! \ . '"_d/\V'.marker."/e\<CR>"
! " Now enter insert mode and call IMAP_Jumpfunc() to take us to the next
! " placeholder and get us either into visual or insert mode. Since we do
! " at least one search in this function, remove it from the search history
! " first.
! " NOTE: Even if we performed more than one search, vim will only put one
! " of them in the user's search list.
! let movement = movement.':'.s:RemoveLastHistoryItem."\<CR>"
! \ . "i\<C-r>=IMAP_Jumpfunc('', 1)\<CR>"
!
! return text.movement
! endfunction
" }}}
***************
*** 311,340 ****
" Author: Luc Hermitte
"
! function! IMAP_Jumpfunc()
! let phs = escape(s:PlaceHolderStart(), '\')
! let phe = escape(s:PlaceHolderEnd(), '\')
! if !search(phs.'.\{-}' . phe, 'W') "no more marks
! return ""
else
! if strpart(getline('.'), col('.') + strlen(phs) - 1)
! \ =~ '^' . phe
- return substitute(phs . phe, '.', "\<Del>", 'g')
- else
- if col('.') > 1
- return "\<Esc>lv/\\V" . phe . "/e\<CR>\<C-g>"
- else
- return "\<C-\>\<C-n>v/\\V" . phe . "/e\<CR>\<C-g>"
- endif
- endif
endif
endfunction
" map only if there is no mapping already. allows for user customization.
if !hasmapto('IMAP_Jumpfunc')
! inoremap <C-J> <c-r>=IMAP_Jumpfunc()<CR>
nmap <C-J> i<C-J>
end
" }}}
--- 300,383 ----
" Author: Luc Hermitte
"
! function! IMAP_Jumpfunc(direction, inclusive)
! let g:Imap_DeleteEmptyPlaceHolders = 0
! " The user's placeholder settings.
! let phsUser = s:PlaceHolderStart()
! let pheUser = s:PlaceHolderEnd()
!
! let searchOpts = a:direction
! " If the user has nowrapscan set, then do not make the search wrap around
! " the end (or beginning) of the file.
! if ! &wrapscan
! let searchOpts = direction.'W'
! endif
!
! let searchString = ''
! " If this is not an inclusive search or if it is inclusive, but the
! " current cursor position does not contain a placeholder character, then
! " search for the placeholder characters.
! if !a:inclusive || strpart(getline('.'), col('.')-1) !~ '\V^'.phsUser
! let searchString = '\V'.phsUser.'\.\{-}'.pheUser
! endif
!
! " If we didn't find any placeholders return quietly.
! if searchString != '' && !search(searchString, searchOpts)
! return ''
! endif
!
! " At this point, we are at the beginning of a placeholder.
! " Remember the position here.
! let position = line('.') . "normal! ".virtcol('.').'|'
! " Open any closed folds and make this part of the text visible.
! silent! foldopen!
!
! " Calculate if we have an empty placeholder or if it contains some
! " description.
! let template =
! \ matchstr(strpart(getline('.'), col('.')-1),
! \ '\V\^'.phsUser.'\zs\.\{-}\ze'.pheUser)
! let placeHolderEmpty = !strlen(template)
!
! " This movement command selects the placeholder text. In the forward mode,
! " we select left-right, otherwise right-left.
! if a:direction =~ 'b'
! " If we are going in the backward direction, make the selection from
! " right to left so that a backward search for phsUser doesnt get us
! " back to the same placeholder.
! let movement = "\<C-\>\<C-N>:".position."\<CR>"
! \ . "/\\V".pheUser."/e\<CR>"
! \ . "v?\\V".phsUser."?b\<CR>"
else
! let movement = "\<C-\>\<C-N>:".position."\<CR>v/\\V".pheUser."/e\<CR>"
! endif
!
! if placeHolderEmpty && g:Imap_DeleteEmptyPlaceHolders
! " delete the empty placeholder into the blackhole.
! return movement."\"_c\<C-o>:".s:RemoveLastHistoryItem."\<CR>"
!
! else
! return movement."\<C-\>\<C-N>:".s:RemoveLastHistoryItem."\<CR>gv\<C-g>"
endif
+
endfunction
+ " }}}
+ " Maps for IMAP_Jumpfunc {{{
" map only if there is no mapping already. allows for user customization.
if !hasmapto('IMAP_Jumpfunc')
! inoremap <C-J> <c-r>=IMAP_Jumpfunc('', 0)<CR>
! inoremap <C-K> <c-r>=IMAP_Jumpfunc('b', 0)<CR>
nmap <C-J> i<C-J>
+ nmap <C-K> i<C-K>
+ if exists('g:Imap_StickyPlaceHolders') && g:Imap_StickyPlaceHolders
+ vmap <C-J> <C-\><C-N>i<C-J>
+ vmap <C-K> <C-\><C-N>i<C-K>
+ else
+ vmap <C-J> <Del>i<C-J>
+ vmap <C-K> <Del>i<C-K>
+ endif
end
" }}}
|
|
From: <ma...@us...> - 2002-12-18 16:36:22
|
Update of /cvsroot/vim-latex/vimfiles/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv24432/plugin
Modified Files:
Tag: b-newimaps
imaps.vim
Log Message:
I implemented yet another new syntax for IMAP() and
IMAP_PutTextWithMovement():
IMAP(lhs, rhs, ft, ...)
IMAP_PutTextWithMovement(str, ...)
In both cases, the optinal arguments are place holders, such as "<<" and ">>".
If not supplied, the default values "<+" and "+>" are used. IMAP() saves
these in script variables, which are then read by s:LookupCharacter() and
passed to IMAP_PutTextWithMovement().
Index: imaps.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v
retrieving revision 1.9.2.3
retrieving revision 1.9.2.4
diff -C2 -d -r1.9.2.3 -r1.9.2.4
*** imaps.vim 14 Dec 2002 14:22:23 -0000 1.9.2.3
--- imaps.vim 18 Dec 2002 16:36:19 -0000 1.9.2.4
***************
*** 8,12 ****
" while preserving filetype indentation.
"
! " Last Change: Sat Dec 14 09:00 AM 2002 EST
"
" Documentation: {{{
--- 8,12 ----
" while preserving filetype indentation.
"
! " Last Change: Wed Dec 18 11:00 AM 2002 EST
"
" Documentation: {{{
***************
*** 130,234 ****
" the previously typed characters and erased and the right hand side is
" inserted
- function! IMAP(ft, lhs, ...)
- let lastLHSChar = a:lhs[strlen(a:lhs)-1]
- " Add a:lhs to the list of left-hand sides that end with lastLHSChar:
- if !exists("s:LHS_" . a:ft . "_" . s:Hash(lastLHSChar))
- let s:LHS_{a:ft}_{s:Hash(lastLHSChar)} = escape(a:lhs, '\')
- else
- let s:LHS_{a:ft}_{s:Hash(lastLHSChar)} = escape(a:lhs, "\\") . '\|' .
- \ s:LHS_{a:ft}_{s:Hash(lastLHSChar)}
- endif
-
- " Build up the right-hand side:
- let rhs = ""
- let phs = s:PlaceHolderStart() " default <+
- let phe = s:PlaceHolderEnd() " default +>
- let i = 1 " counter for arguments
- let template = 0 " flag: is the current argument a <+template+> ?
- while i <= a:0
- if template
- let rhs = rhs . phs . a:{i} . phe
- else
- let rhs = rhs . a:{i}
- endif
- let i = i+1
- let template = !template
- endwhile
- let s:Map_{a:ft}_{s:Hash(a:lhs)} = rhs
-
- " map only the last character of the left-hand side.
- if lastLHSChar == ' '
- let lastLHSChar = '<space>'
- end
- exe 'inoremap <silent>' escape(lastLHSChar, '|')
- \ '<C-r>=<SID>NewLookupCharacter("' . escape(lastLHSChar, '\|') .
- \ '")<CR>'
- endfunction
! " }}}
! " Tex_IMAP: This is the old version of IMAP which used to take 3 arguments. {{{
! " It has been changed in order to retain backwards compatibility (of
! " sorts) while still using the new IMAP
! " It could also be used for convenience in places where specifying multiple
! " arguments might be tedious.
! "
! " Ex:
! "
! " call Tex_IMAP('foo', 'ba<++>bar', '', '<+', '+>')
"
! " The last 2 optional arguments specify the placeholder characters in the rhs.
! " See s:PlaceHolderStart() and s:PlaceHolderEnd() for how they are chosen if
! " the the optional arguments are unspecified.
! function! Tex_IMAP(lhs, rhs, ft, ...)
! if a:0 > 0
! let phs = a:1
! let phe = a:2
! else
! " Tex_IMAP is only concerned with mappings which latex-suite itself
! " generates. This means that we do not use the g:Imap_PlaceHolder*
! " settings.
let phs = '<+'
let phe = '+>'
endif
- let startpat = escape(phs, '\')
- let endpat = escape(phe, '\')
! " This might not work in all cases, but it is a good idea.
! " Problem: \ or " or ' in a:rhs ...
! " " Change 'ba<++>bar' into '"ba", "", "bar"'
! " let args = '"' . escape(a:rhs, '\"') . '"'
! " let args = substitute(args, '\V' . startpat . '\|' . endpat, '","', "g")
! " let callString = 'call IMAP(a:ft, a:lhs,' . args . ')'
!
! " break up the rhs into multiple chunks
! let remainingString = a:rhs
! let callString = 'call IMAP(a:ft, a:lhs'
! " Use \V so that we do not have to worry about magic characters.
! let pat = '\V' . '\(\.\{-}\)' .startpat. '\(\.\{-}\)' .endpat. '\(\.\*\)'
! let i = 1
! while remainingString =~ pat
! let arg_{i} = substitute(remainingString, pat, '\1', '')
! let callString = callString.', arg_'.i
! let arg_{i+1} = substitute(remainingString, pat, '\2', '')
! let callString = callString.', arg_'.(i+1)
! let remainingString = substitute(remainingString, pat, '\3', '')
! let i = i+2
! if i >= 20
! echomsg 'getting more than 20 placeholders!'
! echomsg 'input rhs = '.a:rhs
! endif
! endwhile
! if strlen(remainingString)
! let arg_{i} = remainingString
! let callString = callString.', arg_'.i
endif
! " Finally, we end up with a string like:
! " 'call IMAP(a:ft, a:lhs, arg_1, arg_2, arg_3)'
! let callString = callString.')'
!
! exec callString
endfunction
--- 130,177 ----
" the previously typed characters and erased and the right hand side is
" inserted
! " IMAP: set up a filetype specific mapping.
! " Description:
! " "maps" the lhs to rhs in files of type 'ft'. If supplied with 2
! " additional arguments, then those are assumed to be the placeholder
! " characters in rhs. If unspecified, then the placeholder characters
! " are assumed to be '<+' and '+>' These placeholder characters in
! " a:rhs are replaced with the users setting of
! " [bg]:Imap_PlaceHolderStart and [bg]:Imap_PlaceHolderEnd settings.
"
! function! IMAP(lhs, rhs, ft, ...)
! " Find the place holders to save for IMAP_PutTextWithMovement() .
! if a:0 < 2
let phs = '<+'
let phe = '+>'
+ else
+ let phs = a:1
+ let phe = a:2
endif
! let hash = s:Hash(a:lhs)
! let s:Map_{a:ft}_{hash} = a:rhs
! let s:phs_{a:ft}_{hash} = phs
! let s:phe_{a:ft}_{hash} = phe
! " Add a:lhs to the list of left-hand sides that end with lastLHSChar:
! let lastLHSChar = a:lhs[strlen(a:lhs)-1]
! let hash = s:Hash(lastLHSChar)
! if !exists("s:LHS_" . a:ft . "_" . hash)
! let s:LHS_{a:ft}_{hash} = escape(a:lhs, '\')
! else
! let s:LHS_{a:ft}_{hash} = escape(a:lhs, '\') .'\|'. s:LHS_{a:ft}_{hash}
endif
! " map only the last character of the left-hand side.
! if lastLHSChar == ' '
! let lastLHSChar = '<space>'
! end
! exe 'inoremap <silent>' (a:ft== '' ? '' : '<buffer>')
! \ escape(lastLHSChar, '|')
! \ '<C-r>=<SID>LookupCharacter("' .
! \ escape(lastLHSChar, '\|') .
! \ '")<CR>'
endfunction
***************
*** 236,244 ****
" LookupCharacter: inserts mapping corresponding to this character {{{
"
! " This function performs a reverse lookup when this character is typed in. It
! " loops over all the possible left-hand side variables ending in this
! " character and then if a possible match exists, erases the left-hand side
! " and inserts the right-hand side instead.
! function! s:NewLookupCharacter(char)
let charHash = s:Hash(a:char)
--- 179,187 ----
" LookupCharacter: inserts mapping corresponding to this character {{{
"
! " This function extracts from s:LHS_{&ft}_{a:char} or s:LHS__{a:char}
! " the longest lhs matching the current text. Then it replaces lhs with the
! " corresponding rhs saved in s:Map_{ft}_{lhs} .
! " The place-holder variables are passed to IMAP_PutTextWithMovement() .
! function! s:LookupCharacter(char)
let charHash = s:Hash(a:char)
***************
*** 254,259 ****
" escaped when building up s:LHS_{ft}_{charHash} .
let text = strpart(getline("."), 0, col(".")-1) . a:char
! " matchstr() returns the longest match. This automatically ensures that
! " the longest LHS is used for the mapping.
let lhs = matchstr(text, '\V\(' . s:LHS_{ft}_{charHash} . '\)\$')
if strlen(lhs) == 0
--- 197,202 ----
" escaped when building up s:LHS_{ft}_{charHash} .
let text = strpart(getline("."), 0, col(".")-1) . a:char
! " matchstr() returns the match that starts first. This automatically
! " ensures that the longest LHS is used for the mapping.
let lhs = matchstr(text, '\V\(' . s:LHS_{ft}_{charHash} . '\)\$')
if strlen(lhs) == 0
***************
*** 263,357 ****
" character typed:
let bs = substitute(strpart(lhs, 1), ".", "\<bs>", "g")
! " Execute this string to get to the start of the replacement text:
! let mark = line(".") . "norm!" . (virtcol(".") - strlen(lhs) + 1) . "|"
! return bs . IMAP_PutTextWithMovement(s:Map_{ft}_{s:Hash(lhs)}, mark)
! endfunction
!
! " Old version:
! function! <SID>LookupCharacter(char)
! let charHash = char2nr(a:char)
!
! if !exists('s:charLens_'.&ft.'_'.charHash)
! \ && !exists('s:charLens__'.charHash)
! return a:char
! end
!
! let k = 1
! while k <= 2
! " first check the filetype specific mappings and then the general
! " purpose mappings.
! if k == 1
! let ft = &ft
! else
! let ft = ''
! end
!
! " get the lengths of the left-hand side mappings which end in this
! " character. if no mappings ended in this character, then continue...
! if !exists('s:charLens_'.ft.'_'.charHash)
! let k = k + 1
! continue
! end
!
! exe 'let lens = s:charLens_'.ft.'_'.charHash
!
! let i = 1
! while 1
! " get the i^th length.
! let numchars = s:Strntok(lens, ',', i)
! " if there are no more lengths, then skip to the next outer while
! " loop.
! if numchars == ''
! break
! end
!
! if col('.') < numchars
! let i = i + 1
! continue
! end
!
! " get the corresponding text from before the text. append the present
! " char to complete the (possible) LHS
! let text = strpart(getline('.'), col('.') - numchars, numchars - 1).a:char
! let lhsHash = 's:Map_'.ft.'_'.substitute(text, '\(\W\)', '\="_".char2nr(submatch(1))."_"', 'g')
!
! " if there is no mapping of this length which satisfies the previously
! " typed in characters, then proceed to the next length group...
! if !exists(lhsHash)
! let i = i + 1
! continue
! end
!
! " ... otherwise insert the corresponding RHS
! " first generate the required number of back-spaces to erase the
! " previously typed in characters.
! exe "let tokLHS = s:LenStr_".numchars
! let bkspc = substitute(tokLHS, '.$', '', '')
! let bkspc = substitute(bkspc, '.', "\<bs>", "g")
!
! " get the corresponding RHS
! exe "let ret = ".lhsHash
!
! return bkspc.Tex_PutTextWithMovement(ret)
!
! endwhile
!
! let k = k + 1
! endwhile
!
! return a:char
endfunction
" }}}
! " IMAP_PutTextWithMovement: appends movement commands to a text {{{
! " This enables which cursor placement.
! function! IMAP_PutTextWithMovement(text, mark)
! let text = a:text
! let phs = s:PlaceHolderStart()
! let phe = s:PlaceHolderEnd()
let startpat = escape(phs, '\')
let endpat = escape(phe, '\')
" If the user does not want to use place-holders, then remove them.
if exists('g:Imap_UsePlaceHolders') && !g:Imap_UsePlaceHolders
--- 206,242 ----
" character typed:
let bs = substitute(strpart(lhs, 1), ".", "\<bs>", "g")
! let hash = s:Hash(lhs)
! return bs . IMAP_PutTextWithMovement(s:Map_{ft}_{hash},
! \ s:phs_{ft}_{hash}, s:phe_{ft}_{hash})
endfunction
" }}}
! " IMAP_PutTextWithMovement: returns the string with movement appended {{{
! " Description:
! " If a:str contains "placeholders", then appends movement commands to
! " str in a way that the user moves to the first placeholder and enters
! " insert or select mode. If supplied with 2 additional arguments, then
! " they are assumed to be the placeholder specs. Otherwise, they are
! " assumed to be '<+' and '+>'. These placeholder chars are replaced
! " with the users settings of [bg]:Imap_PlaceHolderStart and
! " [bg]:Imap_PlaceHolderEnd.
! function! IMAP_PutTextWithMovement(str, ...)
! " Find the place holders for the input.
! if a:0 < 2
! let phs = '<+'
! let phe = '+>'
! else
! let phs = a:1
! let phe = a:2
! endif
let startpat = escape(phs, '\')
let endpat = escape(phe, '\')
+ " A very rare string:
+ let marker = phs . phs . phe . phe
+ " TODO: Maybe I need to play some games with iconv() to define marker and
+ " markerpat in case marker !~ marker ...
+ let text = a:str
" If the user does not want to use place-holders, then remove them.
if exists('g:Imap_UsePlaceHolders') && !g:Imap_UsePlaceHolders
***************
*** 365,394 ****
endif
! " template = first <+{...}+> in text, where {...} may be empty.
! let template = matchstr(text, '\V' . startpat . '\.\{-}' . endpat)
" If there are no place holders, just return the text.
! if strlen(template) == 0
! echomsg 'searching for \V' . startpat . '\.\{-}' . endpat . ' in ' . text
return text
endif
" Now, start building the return value.
" Return to Normal mode: this works even if 'insertmode' is set:
let text = text . "\<C-\>\<C-N>"
! " Start at the position given by mark:
! let text = text . ":" . a:mark . "\<CR>"
! " Look for the first place holder:
! let text = text . ":call search('\\V" . startpat . "', 'W')\<CR>"
" Finally, append commands to Select <+template+> or replace <++> .
! " Enter Visual mode and move to the end. Use a search strategy instead of
! " computing the length of the template because strlen() returns different
! " things depending on the encoding.
! let text = text . "v/\\V" . endpat . "/e\<CR>\<ESC>"
! \ . s:RemoveLastHistoryItem . "\<CR>gv"
! if template == phs . phe
! " template looks like <++> so Change it:
let text = text . "c"
! else
! " Enter Select mode.
let text = text . "\<C-G>"
endif
--- 250,290 ----
endif
! let pattern = '\V\(\.\{-}\)' .startpat. '\(\.\{-}\)' .endpat. '\(\.\*\)'
" If there are no place holders, just return the text.
! if text !~ pattern
return text
endif
+ " Break text up into "initial <+template+> final"; any piece may be empty.
+ let initial = substitute(text, pattern, '\1', '')
+ let template = substitute(text, pattern, '\2', '')
+ let final = substitute(text, pattern, '\3', '')
+
+ " Now, get the place holders for the output.
+ let phs = s:PlaceHolderStart() " default <+
+ let phe = s:PlaceHolderEnd() " default +>
+ let template = phs . template . phe
+ let final = substitute(final, startpat, escape(phs, '\'), 'g')
+ let final = substitute(final, endpat, escape(phe, '\'), 'g')
" Now, start building the return value.
+ let text = initial . marker . template . marker . final
" Return to Normal mode: this works even if 'insertmode' is set:
let text = text . "\<C-\>\<C-N>"
! " Move to the first marker and delete it. Cursor ends on beginning of
! " template.
! let text = text . "2?" . marker . "\<CR>" . "v/" . marker . "/e\<CR>x"
! " Enter Visual mode and move to just before the next marker.
! let text = text . "v/" . marker . "/s-1\<CR>\<C-\>\<C-N>"
! " Move to the second marker and delete it.
! let text = text . "/" . marker . "\<CR>" . "d/" . marker . "/e\<CR>"
! " Note: We use a search strategy instead of computing the length of the
! " template because strlen() returns different things depending on the
! " encoding.
! " Clean up the search history. Restore Visual selection.
! let text = text . ":" . s:RemoveLastHistoryItem . "\<CR>gv"
" Finally, append commands to Select <+template+> or replace <++> .
! if template == phs . phe " template looks like <++> so Change it:
let text = text . "c"
! else " Enter Select mode.
let text = text . "\<C-G>"
endif
|
|
From: <ma...@us...> - 2002-12-14 14:22:26
|
Update of /cvsroot/vim-latex/vimfiles/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv30280/plugin
Modified Files:
Tag: b-newimaps
imaps.vim
Log Message:
I simplified the Tex_IMAP() wrapper for the new IMAP() function and made
some other minor improvements.
Index: imaps.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -C2 -d -r1.9.2.2 -r1.9.2.3
*** imaps.vim 14 Dec 2002 10:48:24 -0000 1.9.2.2
--- imaps.vim 14 Dec 2002 14:22:23 -0000 1.9.2.3
***************
*** 8,12 ****
" while preserving filetype indentation.
"
! " Last Change: Sat Dec 14 02:00 AM 2002 PST
"
" Documentation: {{{
--- 8,12 ----
" while preserving filetype indentation.
"
! " Last Change: Sat Dec 14 09:00 AM 2002 EST
"
" Documentation: {{{
***************
*** 98,104 ****
" ==============================================================================
" {{{
- " A lot of back-spaces, to be used by IMAP(). If needed, more will be added
- " automatically.
- let s:backsp = substitute("0123456789", '\d', "\<bs>", 'g')
" s:LHS_{ft}_{char} will be generated automatically. It will look like
" s:LHS_tex_o = 'fo\|foo\|boo' and contain all mapped sequences ending in "o".
--- 98,101 ----
***************
*** 135,142 ****
function! IMAP(ft, lhs, ...)
let lastLHSChar = a:lhs[strlen(a:lhs)-1]
- " Make sure that s:backsp is long enough:
- while strlen(s:backsp) < strlen(a:lhs)
- let s:backsp = s:backsp . s:backsp
- endwhile
" Add a:lhs to the list of left-hand sides that end with lastLHSChar:
if !exists("s:LHS_" . a:ft . "_" . s:Hash(lastLHSChar))
--- 132,135 ----
***************
*** 146,154 ****
\ s:LHS_{a:ft}_{s:Hash(lastLHSChar)}
endif
" Build up the right-hand side:
let rhs = ""
! let phs = s:PlaceHolderStart()
! let phe = s:PlaceHolderEnd()
! let i = 1 " counter for arguments
let template = 0 " flag: is the current argument a <+template+> ?
while i <= a:0
--- 139,148 ----
\ s:LHS_{a:ft}_{s:Hash(lastLHSChar)}
endif
+
" Build up the right-hand side:
let rhs = ""
! let phs = s:PlaceHolderStart() " default <+
! let phe = s:PlaceHolderEnd() " default +>
! let i = 1 " counter for arguments
let template = 0 " flag: is the current argument a <+template+> ?
while i <= a:0
***************
*** 176,180 ****
" It has been changed in order to retain backwards compatibility (of
" sorts) while still using the new IMAP
! " It could also be used for convinience in places where specifying multiple
" arguments might be tedious.
"
--- 170,174 ----
" It has been changed in order to retain backwards compatibility (of
" sorts) while still using the new IMAP
! " It could also be used for convenience in places where specifying multiple
" arguments might be tedious.
"
***************
*** 184,189 ****
"
" The last 2 optional arguments specify the placeholder characters in the rhs.
! " See s:PlaceHolderStart() and s:PlaceHolderEnd for how they are chosen if the
! " the optional arguments are unspecified.
function! Tex_IMAP(lhs, rhs, ft, ...)
--- 178,183 ----
"
" The last 2 optional arguments specify the placeholder characters in the rhs.
! " See s:PlaceHolderStart() and s:PlaceHolderEnd() for how they are chosen if
! " the the optional arguments are unspecified.
function! Tex_IMAP(lhs, rhs, ft, ...)
***************
*** 198,241 ****
let phe = '+>'
endif
" break up the rhs into multiple chunks
let remainingString = a:rhs
! let callString = 'call IMAP(a:ft, a:lhs, arg_1'
let i = 1
! while remainingString != ''
! let firstPart = matchstr(remainingString, '^.\{-}\ze\('.phs.'\|$\)')
! let secondPart = matchstr(remainingString,
! \ phs.'\zs.\{-}\ze'.phe,
! \ strlen(firstPart))
! let arg_{i} = firstPart
! " we have already appended one argument. Do this only from next time
! " on.
! if i > 1
! let callString = callString.', arg_'.i
! endif
!
! " if firstPart is smaller than the total string, then there is a
! " placeholder. Therefore append the placeholder as an argument
! if strlen(firstPart) < strlen(remainingString)
! let i = i + 1
!
! let arg_{i} = secondPart
! let callString = callString.', arg_'.i
! endif
!
! " find out the part remaining.
! let remainingString = strpart(remainingString,
! \ strlen(firstPart) +
! \ strlen(secondPart) +
! \ strlen(phs) + strlen(phe))
!
if i >= 20
echomsg 'getting more than 20 placeholders!'
echomsg 'input rhs = '.a:rhs
endif
-
- let i = i + 1
endwhile
" Finally, we end up with a string like:
--- 192,228 ----
let phe = '+>'
endif
+ let startpat = escape(phs, '\')
+ let endpat = escape(phe, '\')
+
+ " This might not work in all cases, but it is a good idea.
+ " Problem: \ or " or ' in a:rhs ...
+ " " Change 'ba<++>bar' into '"ba", "", "bar"'
+ " let args = '"' . escape(a:rhs, '\"') . '"'
+ " let args = substitute(args, '\V' . startpat . '\|' . endpat, '","', "g")
+ " let callString = 'call IMAP(a:ft, a:lhs,' . args . ')'
" break up the rhs into multiple chunks
let remainingString = a:rhs
! let callString = 'call IMAP(a:ft, a:lhs'
! " Use \V so that we do not have to worry about magic characters.
! let pat = '\V' . '\(\.\{-}\)' .startpat. '\(\.\{-}\)' .endpat. '\(\.\*\)'
let i = 1
! while remainingString =~ pat
! let arg_{i} = substitute(remainingString, pat, '\1', '')
! let callString = callString.', arg_'.i
! let arg_{i+1} = substitute(remainingString, pat, '\2', '')
! let callString = callString.', arg_'.(i+1)
! let remainingString = substitute(remainingString, pat, '\3', '')
! let i = i+2
if i >= 20
echomsg 'getting more than 20 placeholders!'
echomsg 'input rhs = '.a:rhs
endif
endwhile
+ if strlen(remainingString)
+ let arg_{i} = remainingString
+ let callString = callString.', arg_'.i
+ endif
" Finally, we end up with a string like:
***************
*** 243,247 ****
let callString = callString.')'
- echomsg callString
exec callString
endfunction
--- 230,233 ----
***************
*** 619,625 ****
" variable, or the global one, or the default.
fun! s:PlaceHolderStart()
! if exists("b:Imap_PlaceHolderStart")
return b:Imap_PlaceHolderStart
! elseif exists("g:Imap_PlaceHolderStart")
return g:Imap_PlaceHolderStart
else
--- 605,611 ----
" variable, or the global one, or the default.
fun! s:PlaceHolderStart()
! if exists("b:Imap_PlaceHolderStart") && strlen(b:Imap_PlaceHolderEnd)
return b:Imap_PlaceHolderStart
! elseif exists("g:Imap_PlaceHolderStart") && strlen(g:Imap_PlaceHolderEnd)
return g:Imap_PlaceHolderStart
else
***************
*** 627,633 ****
endfun
fun! s:PlaceHolderEnd()
! if exists("b:Imap_PlaceHolderEnd")
return b:Imap_PlaceHolderEnd
! elseif exists("g:Imap_PlaceHolderEnd")
return g:Imap_PlaceHolderEnd
else
--- 613,619 ----
endfun
fun! s:PlaceHolderEnd()
! if exists("b:Imap_PlaceHolderEnd") && strlen(b:Imap_PlaceHolderEnd)
return b:Imap_PlaceHolderEnd
! elseif exists("g:Imap_PlaceHolderEnd") && strlen(g:Imap_PlaceHolderEnd)
return g:Imap_PlaceHolderEnd
else
|
|
From: Srinath A. <sr...@fa...> - 2002-12-14 11:08:34
|
Well, I guess my big plan about not posting the diffs didn't quite pan out :) Ho well... Srinath On Sat, 14 Dec 2002 sri...@us... wrote: > Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite > In directory sc8-pr-cvs1:/tmp/cvs-serv21869/ftplugin/latex-suite > > Modified Files: > Tag: b-newimaps > =09bibtex.vim elementmacros.vim envmacros.vim main.vim > =09mathmacros.vim packages.vim texrc wizardfuncs.vim > Log Message: > > Changed =E4 to <++> > changed =AB to <+ > changed =BB to +> > > No other change. > I will not be posting the actual diff of this commit to the group. Just t= he > log. Check the web cvs if you want the diff. > |
|
From: <sri...@us...> - 2002-12-14 10:59:53
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages
In directory sc8-pr-cvs1:/tmp/cvs-serv21869/ftplugin/latex-suite/packages
Modified Files:
Tag: b-newimaps
amsmath bar changebar color eqparbox float geometry graphicx
hyperref ifthen moreverbatim multicol newalg schedule
Log Message:
Changed ä to <++>
changed « to <+
changed » to +>
No other change.
I will not be posting the actual diff of this commit to the group. Just the
log. Check the web cvs if you want the diff.
Index: amsmath
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/amsmath,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** amsmath 25 Nov 2002 23:00:25 -0000 1.2
--- amsmath 14 Dec 2002 10:59:19 -0000 1.2.2.1
***************
*** 74,78 ****
\.'brd:dbinom,'
\.'brd:tbinom,'
! \.'brs:genfrac{«ldelim»}{«rdelim»}{«thick»}{«style»}{«numer»}{«denom»}«»,'
\.'sbr:Commands,'
\.'nob:smash,'
--- 74,78 ----
\.'brd:dbinom,'
\.'brd:tbinom,'
! \.'brs:genfrac{<+ldelim+>}{<+rdelim+>}{<+thick+>}{<+style+>}{<+numer+>}{<+denom+>}<++>,'
\.'sbr:Commands,'
\.'nob:smash,'
***************
*** 94,98 ****
\.'bra:uproot,'
\.'bra:boxed,'
! \.'brs:DeclareMathSymbol{«»}{«»}{«»}{«»}«»,'
\.'bra:eqref'
" vim:ft=vim
--- 94,98 ----
\.'bra:uproot,'
\.'bra:boxed,'
! \.'brs:DeclareMathSymbol{<++>}{<++>}{<++>}{<++>}<++>,'
\.'bra:eqref'
" vim:ft=vim
Index: bar
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/bar,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** bar 25 Nov 2002 23:00:25 -0000 1.2
--- bar 14 Dec 2002 10:59:19 -0000 1.2.2.1
***************
*** 2,19 ****
let g:TeX_package_bar =
\ 'env:barenv,'
! \.'brs:bar{«height»}{«index»}[«desc»],'
\.'hlineon,'
! \.'brs:legend{«index»}{«text»},'
\.'bra:setdepth,'
\.'bra:sethspace,'
! \.'brs:setlinestyle{«solid-dotted»},'
! \.'brs:setnumberpos{«empty-axis-down-inside-outside-up»},'
\.'bra:setprecision,'
\.'bra:setstretch,'
\.'bra:setstyle,'
\.'bra:setwidth,'
! \.'brs:setxaxis{«w1»}{«w2»}{«step»},'
! \.'brs:setyaxis[«n»]{«w1»}{«w2»}{«step»},'
! \.'brs:setxname[«lrbt»]{«etiquette»},'
! \.'brs:setyname[«lrbt»]{«etiquette»},'
! \.'brs:setxvaluetyp{«day-month»}'
--- 2,19 ----
let g:TeX_package_bar =
\ 'env:barenv,'
! \.'brs:bar{<+height+>}{<+index+>}[<+desc+>],'
\.'hlineon,'
! \.'brs:legend{<+index+>}{<+text+>},'
\.'bra:setdepth,'
\.'bra:sethspace,'
! \.'brs:setlinestyle{<+solid-dotted+>},'
! \.'brs:setnumberpos{<+empty-axis-down-inside-outside-up+>},'
\.'bra:setprecision,'
\.'bra:setstretch,'
\.'bra:setstyle,'
\.'bra:setwidth,'
! \.'brs:setxaxis{<+w1+>}{<+w2+>}{<+step+>},'
! \.'brs:setyaxis[<+n+>]{<+w1+>}{<+w2+>}{<+step+>},'
! \.'brs:setxname[<+lrbt+>]{<+etiquette+>},'
! \.'brs:setyname[<+lrbt+>]{<+etiquette+>},'
! \.'brs:setxvaluetyp{<+day-month+>}'
Index: changebar
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/changebar,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** changebar 25 Nov 2002 23:00:25 -0000 1.2
--- changebar 14 Dec 2002 10:59:20 -0000 1.2.2.1
***************
*** 18,22 ****
let g:TeX_package_changebar =
! \ 'ens:changebar:[«thickness»],'
\.'noo:cbstart,'
\.'cbend,'
--- 18,22 ----
let g:TeX_package_changebar =
! \ 'ens:changebar:[<+thickness+>],'
\.'noo:cbstart,'
\.'cbend,'
Index: color
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/color,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** color 13 Dec 2002 17:58:11 -0000 1.1
--- color 14 Dec 2002 10:59:20 -0000 1.1.2.1
***************
*** 23,36 ****
let g:TeX_package_color =
! \ 'brs:definecolor{«»}{«»}{«»},'
! \.'brs:DefineNamedColor{«»}{«»}{«»}{«»},'
\.'bra:color,'
\.'nob:color,'
\.'brd:textcolor,'
! \.'brs:textcolor[«»]{«»}{«»},'
\.'brd:colorbox,'
! \.'brs:colorbox[«»]{«»}{«»},'
! \.'brs:fcolorbox{«»}{«»}{«»},'
! \.'brs:fcolorbox[«»]{«»}{«»}{«»},'
\.'brd:pagecolor,'
\.'nob:pagecolor'
--- 23,36 ----
let g:TeX_package_color =
! \ 'brs:definecolor{<++>}{<++>}{<++>},'
! \.'brs:DefineNamedColor{<++>}{<++>}{<++>}{<++>},'
\.'bra:color,'
\.'nob:color,'
\.'brd:textcolor,'
! \.'brs:textcolor[<++>]{<++>}{<++>},'
\.'brd:colorbox,'
! \.'brs:colorbox[<++>]{<++>}{<++>},'
! \.'brs:fcolorbox{<++>}{<++>}{<++>},'
! \.'brs:fcolorbox[<++>]{<++>}{<++>}{<++>},'
\.'brd:pagecolor,'
\.'nob:pagecolor'
Index: eqparbox
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/eqparbox,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** eqparbox 23 Nov 2002 17:18:00 -0000 1.1
--- eqparbox 14 Dec 2002 10:59:20 -0000 1.1.2.1
***************
*** 2,6 ****
let g:TeX_package_eqparbox =
! \ 'brs:eqparbox[«pos»][«height»][«inner-pos»]{«tag»}{«text»}«»,'
\.'bra:eqboxwidth'
--- 2,6 ----
let g:TeX_package_eqparbox =
! \ 'brs:eqparbox[<+pos+>][<+height+>][<+inner-pos+>]{<+tag+>}{<+text+>}<++>,'
\.'bra:eqboxwidth'
Index: float
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/float,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** float 13 Dec 2002 17:58:13 -0000 1.1
--- float 14 Dec 2002 10:59:20 -0000 1.1.2.1
***************
*** 3,7 ****
let g:TeX_package_float =
\ 'bra:floatstyle,'
! \.'brs:newfloat{«»}{«»}{«»}[«»],'
\.'brd:floatname,'
\.'brd:listof,'
--- 3,7 ----
let g:TeX_package_float =
\ 'bra:floatstyle,'
! \.'brs:newfloat{<++>}{<++>}{<++>}[<++>],'
\.'brd:floatname,'
\.'brd:listof,'
Index: geometry
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/geometry,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** geometry 25 Nov 2002 23:00:25 -0000 1.2
--- geometry 14 Dec 2002 10:59:20 -0000 1.2.2.1
***************
*** 69,85 ****
\.'footnotesep=,'
\.'sbr:TwoValueOptions,'
! \.'papersize={ä},'
! \.'total={ä},'
! \.'body={ä},'
! \.'text={ä},'
! \.'scale={ä},'
! \.'hmargin={ä},'
! \.'vmargin={ä},'
! \.'margin={ä},'
! \.'offset={ä},'
\.'sbr:ThreeValueOptions,'
! \.'hdivide={ä},'
! \.'vdivide={ä},'
! \.'divide={ä}'
let g:TeX_package_geometry =
--- 69,85 ----
\.'footnotesep=,'
\.'sbr:TwoValueOptions,'
! \.'papersize={<++>},'
! \.'total={<++>},'
! \.'body={<++>},'
! \.'text={<++>},'
! \.'scale={<++>},'
! \.'hmargin={<++>},'
! \.'vmargin={<++>},'
! \.'margin={<++>},'
! \.'offset={<++>},'
\.'sbr:ThreeValueOptions,'
! \.'hdivide={<++>},'
! \.'vdivide={<++>},'
! \.'divide={<++>}'
let g:TeX_package_geometry =
Index: graphicx
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/graphicx,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** graphicx 13 Dec 2002 17:58:10 -0000 1.1
--- graphicx 14 Dec 2002 10:59:20 -0000 1.1.2.1
***************
*** 49,53 ****
\.'spe:command=,'
\.'sbr:Rotatebox,'
! \.'brs:rotatebox[«»]{«»}{«»},'
\.'spe:origin=,'
\.'spe:x=,'
--- 49,53 ----
\.'spe:command=,'
\.'sbr:Rotatebox,'
! \.'brs:rotatebox[<++>]{<++>}{<++>},'
\.'spe:origin=,'
\.'spe:x=,'
***************
*** 55,63 ****
\.'spe:units=,'
\.'sbr:Rest,'
! \.'brs:scalebox{«»}[«»]{«»},'
! \.'brs:resizebox{«»}{«»}{«»},'
! \.'brs:resizebox*{«»}{«»}{«»},'
\.'bra:DeclareGraphicsExtensions,'
! \.'brs:DeclareGraphicsRule{«»}{«»}{«»}{«»},'
\.'bra:graphicspath'
--- 55,63 ----
\.'spe:units=,'
\.'sbr:Rest,'
! \.'brs:scalebox{<++>}[<++>]{<++>},'
! \.'brs:resizebox{<++>}{<++>}{<++>},'
! \.'brs:resizebox*{<++>}{<++>}{<++>},'
\.'bra:DeclareGraphicsExtensions,'
! \.'brs:DeclareGraphicsRule{<++>}{<++>}{<++>}{<++>},'
\.'bra:graphicspath'
Index: hyperref
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/hyperref,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** hyperref 25 Nov 2002 23:00:25 -0000 1.2
--- hyperref 14 Dec 2002 10:59:20 -0000 1.2.2.1
***************
*** 9,13 ****
\.'b5paper,'
\.'backref=,'
! \.'baseurl={ä},'
\.'bookmarks=,'
\.'bookmarksnumbered=,'
--- 9,13 ----
\.'b5paper,'
\.'backref=,'
! \.'baseurl={<++>},'
\.'bookmarks=,'
\.'bookmarksnumbered=,'
***************
*** 50,60 ****
\.'pagebordercolor=,'
\.'pagecolor=,'
! \.'pdfauthor={ä},'
\.'pdfborder=,'
\.'pdfcenterwindow=,'
! \.'pdfcreator={ä},'
\.'pdffitwindow,'
\.'pdfhighlight=,'
! \.'pdfkeywords={ä},'
\.'pdfmenubar=,'
\.'pdfnewwindow=,'
--- 50,60 ----
\.'pagebordercolor=,'
\.'pagecolor=,'
! \.'pdfauthor={<++>},'
\.'pdfborder=,'
\.'pdfcenterwindow=,'
! \.'pdfcreator={<++>},'
\.'pdffitwindow,'
\.'pdfhighlight=,'
! \.'pdfkeywords={<++>},'
\.'pdfmenubar=,'
\.'pdfnewwindow=,'
***************
*** 64,73 ****
\.'pdfpagescrop=,'
\.'pdfpagetransition=,'
! \.'pdfproducer={ä},'
! \.'pdfstartpage={ä},'
! \.'pdfstartview={ä},'
! \.'pdfsubject={ä},'
\.'pdftex,'
! \.'pdftitle={ä},'
\.'pdftoolbar=,'
\.'pdfusetitle=,'
--- 64,73 ----
\.'pdfpagescrop=,'
\.'pdfpagetransition=,'
! \.'pdfproducer={<++>},'
! \.'pdfstartpage={<++>},'
! \.'pdfstartview={<++>},'
! \.'pdfsubject={<++>},'
\.'pdftex,'
! \.'pdftitle={<++>},'
\.'pdftoolbar=,'
\.'pdfusetitle=,'
***************
*** 92,125 ****
\.'sbr:Links,'
\.'bra:hyperbaseurl,'
! \.'brs:href{«URL»}{«text»},'
\.'bra:hyperimage,'
! \.'brs:hyperdef{«category»}{«name»}{«text»},'
! \.'brs:hyperref{«URL»}{«category»}{«name»}{«text»},'
! \.'brs:hyperlink{«name»}{«text»},'
! \.'brs:hypertarget{«name»}{«text»},'
\.'bra:url,'
\.'bra:htmladdnormallink,'
! \.'brs:Acrobatmenu{«option»}{«tekst»},'
! \.'brs:pdfbookmark[ä]{«»}{«»},'
\.'bra:thispdfpagelabel,'
\.'sbr:Forms,'
\.'env:Form,'
\.'sep:Forms1,'
! \.'brs:TextField[«parameters»]{«label»},'
! \.'brs:CheckBox[«parameters»]{«label»},'
! \.'brs:ChoiceMenu[«parameters»]{«label»}{«choices»},'
! \.'brs:PushButton[«parameters»]{«label»},'
! \.'brs:Submit[«parameters»]{«label»},'
! \.'brs:Reset[«parameters»]{«label»},'
\.'sep:Forms2,'
! \.'brs:LayoutTextField{«label»}{«field»},'
! \.'brs:LayoutChoiceField{«label»}{«field»},'
! \.'brs:LayoutCheckboxField{«label»}{«field»},'
\.'sep:Forms3,'
! \.'brs:MakeRadioField{«width»}{«height»},'
! \.'brs:MakeCheckField{«width»}{«height»},'
! \.'brs:MakeTextField{«width»}{«height»},'
! \.'brs:MakeChoiceField{«width»}{«height»},'
! \.'brs:MakeButtonField{«text»},'
\.'sbr:Parameters,'
\.'spe:accesskey,'
--- 92,125 ----
\.'sbr:Links,'
\.'bra:hyperbaseurl,'
! \.'brs:href{<+URL+>}{<+text+>},'
\.'bra:hyperimage,'
! \.'brs:hyperdef{<+category+>}{<+name+>}{<+text+>},'
! \.'brs:hyperref{<+URL+>}{<+category+>}{<+name+>}{<+text+>},'
! \.'brs:hyperlink{<+name+>}{<+text+>},'
! \.'brs:hypertarget{<+name+>}{<+text+>},'
\.'bra:url,'
\.'bra:htmladdnormallink,'
! \.'brs:Acrobatmenu{<+option+>}{<+tekst+>},'
! \.'brs:pdfbookmark[<++>]{<++>}{<++>},'
\.'bra:thispdfpagelabel,'
\.'sbr:Forms,'
\.'env:Form,'
\.'sep:Forms1,'
! \.'brs:TextField[<+parameters+>]{<+label+>},'
! \.'brs:CheckBox[<+parameters+>]{<+label+>},'
! \.'brs:ChoiceMenu[<+parameters+>]{<+label+>}{<+choices+>},'
! \.'brs:PushButton[<+parameters+>]{<+label+>},'
! \.'brs:Submit[<+parameters+>]{<+label+>},'
! \.'brs:Reset[<+parameters+>]{<+label+>},'
\.'sep:Forms2,'
! \.'brs:LayoutTextField{<+label+>}{<+field+>},'
! \.'brs:LayoutChoiceField{<+label+>}{<+field+>},'
! \.'brs:LayoutCheckboxField{<+label+>}{<+field+>},'
\.'sep:Forms3,'
! \.'brs:MakeRadioField{<+width+>}{<+height+>},'
! \.'brs:MakeCheckField{<+width+>}{<+height+>},'
! \.'brs:MakeTextField{<+width+>}{<+height+>},'
! \.'brs:MakeChoiceField{<+width+>}{<+height+>},'
! \.'brs:MakeButtonField{<+text+>},'
\.'sbr:Parameters,'
\.'spe:accesskey,'
Index: ifthen
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/ifthen,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** ifthen 13 Dec 2002 17:58:13 -0000 1.1
--- ifthen 14 Dec 2002 10:59:20 -0000 1.1.2.1
***************
*** 2,6 ****
let g:TeX_package_color =
! \ 'brs:ifthenelse{«»}{«»}{«»},'
\.'brd:equal,'
\.'bra:boolean,'
--- 2,6 ----
let g:TeX_package_color =
! \ 'brs:ifthenelse{<++>}{<++>}{<++>},'
\.'brd:equal,'
\.'bra:boolean,'
Index: moreverbatim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/moreverbatim,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** moreverbatim 13 Dec 2002 17:58:14 -0000 1.1
--- moreverbatim 14 Dec 2002 10:59:20 -0000 1.1.2.1
***************
*** 2,14 ****
let g:TeX_package_moreverbatim =
! \ 'ens:verbatimwrite:{«»},'
! \.'ens:verbatimtab:[«»],'
! \.'ens:listing:[«step»]{«number»},'
! \.'ens:listing*:[«step»]{«number»},'
\.'env:boxedverbatim,'
\.'bra:verbatimtabsize,'
\.'bra:listingoffset,'
! \.'brs:listinginput[«»]{«»}{«»},'
! \.'brs:verbatimtabinput[«»]{«»}'
syn region texZone start="\\begin{verbatimwrite}" end="\\end{verbatimwrite}\|%stopzone\>" fold
--- 2,14 ----
let g:TeX_package_moreverbatim =
! \ 'ens:verbatimwrite:{<++>},'
! \.'ens:verbatimtab:[<++>],'
! \.'ens:listing:[<+step+>]{<+number+>},'
! \.'ens:listing*:[<+step+>]{<+number+>},'
\.'env:boxedverbatim,'
\.'bra:verbatimtabsize,'
\.'bra:listingoffset,'
! \.'brs:listinginput[<++>]{<++>}{<++>},'
! \.'brs:verbatimtabinput[<++>]{<++>}'
syn region texZone start="\\begin{verbatimwrite}" end="\\end{verbatimwrite}\|%stopzone\>" fold
Index: multicol
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/multicol,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** multicol 25 Nov 2002 23:00:26 -0000 1.2
--- multicol 14 Dec 2002 10:59:20 -0000 1.2.2.1
***************
*** 1,5 ****
let g:TeX_package_option_multicol = ''
let g:TeX_package_multicol =
! \ 'ens:multicols:{«cols»}[«text»][«sep»],'
\.'columnbreak,'
\.'premulticols,'
--- 1,5 ----
let g:TeX_package_option_multicol = ''
let g:TeX_package_multicol =
! \ 'ens:multicols:{<+cols+>}[<+text+>][<+sep+>],'
\.'columnbreak,'
\.'premulticols,'
Index: newalg
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/newalg,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** newalg 13 Dec 2002 17:58:31 -0000 1.2
--- newalg 14 Dec 2002 10:59:20 -0000 1.2.2.1
***************
*** 2,9 ****
let g:TeX_package_newalg =
! \ 'ens:algorithm:{«name»}{«»},'
! \.'ens:IF:{«cond»},'
! \.'ens:FOR:{«loop»},'
! \.'ens:WHILE:{«cond»},'
\.'bra:ERROR,'
\.'nor:ELSE,'
--- 2,9 ----
let g:TeX_package_newalg =
! \ 'ens:algorithm:{<+name+>}{<++>},'
! \.'ens:IF:{<+cond+>},'
! \.'ens:FOR:{<+loop+>},'
! \.'ens:WHILE:{<+cond+>},'
\.'bra:ERROR,'
\.'nor:ELSE,'
Index: schedule
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/schedule,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** schedule 13 Dec 2002 17:58:32 -0000 1.2
--- schedule 14 Dec 2002 10:59:20 -0000 1.2.2.1
***************
*** 2,6 ****
let g:TeX_package_schedule =
! \ 'ens:schedule:[«title»],'
\.'bra:CellHeight,'
\.'bra:CellWidth,'
--- 2,6 ----
let g:TeX_package_schedule =
! \ 'ens:schedule:[<+title+>],'
\.'bra:CellHeight,'
\.'bra:CellWidth,'
***************
*** 11,15 ****
\.'nor:FiveDay,'
\.'nor:SevenDay,'
! \.'brs:NewAppointment{«name»}{«bg»}{«fg»}'
" vim:ft=vim:ff=unix
--- 11,15 ----
\.'nor:FiveDay,'
\.'nor:SevenDay,'
! \.'brs:NewAppointment{<+name+>}{<+bg+>}{<+fg+>}'
" vim:ft=vim:ff=unix
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv21869/ftplugin/latex-suite
Modified Files:
Tag: b-newimaps
bibtex.vim elementmacros.vim envmacros.vim main.vim
mathmacros.vim packages.vim texrc wizardfuncs.vim
Log Message:
Changed ä to <++>
changed « to <+
changed » to +>
No other change.
I will not be posting the actual diff of this commit to the group. Just the
log. Check the web cvs if you want the diff.
Index: bibtex.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/bibtex.vim,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** bibtex.vim 13 Dec 2002 17:23:43 -0000 1.2
--- bibtex.vim 14 Dec 2002 10:59:18 -0000 1.2.2.1
***************
*** 3,7 ****
" Function: BibT
" Author: Alan G Isaac <ai...@am...>
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"=============================================================================
--- 3,7 ----
" Function: BibT
" Author: Alan G Isaac <ai...@am...>
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"=============================================================================
***************
*** 44,48 ****
let extras=""
let retval = ""
! let key='«key»'
" characterize entry types
--- 44,48 ----
let extras=""
let retval = ""
! let key='<+key+>'
" characterize entry types
***************
*** 248,253 ****
endif
endif
! let retval = retval.'otherinfo = {«»}'."\n"
! let retval = retval."}«»"."\n"
return Tex_PutTextWithMovement(retval)
--- 248,253 ----
endif
endif
! let retval = retval.'otherinfo = {<++>}'."\n"
! let retval = retval."}<++>"."\n"
return Tex_PutTextWithMovement(retval)
***************
*** 259,266 ****
let retval = input(a:prompt)
if retval == ''
! return "«»"
endif
else
! return "«»"
endif
endfunction
--- 259,266 ----
let retval = input(a:prompt)
if retval == ''
! return "<++>"
endif
else
! return "<++>"
endif
endfunction
Index: elementmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/elementmacros.vim,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** elementmacros.vim 13 Dec 2002 17:23:55 -0000 1.5
--- elementmacros.vim 14 Dec 2002 10:59:18 -0000 1.5.2.1
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: macros for dimensions/fonts/counters.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"
" Description: macros for dimensions/fonts/counters.
***************
*** 55,59 ****
exe "vnoremap <silent> ".g:Tex_Leader.vislhs.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
! exe 'call Tex_IMAP ("'.a:font.'", "\\text'.vislhs.'{ä}«»", "tex")'
endif
--- 55,59 ----
exe "vnoremap <silent> ".g:Tex_Leader.vislhs.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
! exe 'call Tex_IMAP ("'.a:font.'", "\\text'.vislhs.'{<++>}<++>", "tex")'
endif
***************
*** 62,66 ****
let location = s:fontMenuLoc.substitute(a:fam, '^.', '\u&', '').'.'.vislhs.a:fam.'<tab>'.a:font.'\ ('.g:Tex_Leader.vislhs.')'
exe "amenu ".location.
! \" <plug><C-r>=Tex_PutTextWithMovement('\\text".vislhs."{ä}«»')<CR>"
exe "vmenu ".location.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
--- 62,66 ----
let location = s:fontMenuLoc.substitute(a:fam, '^.', '\u&', '').'.'.vislhs.a:fam.'<tab>'.a:font.'\ ('.g:Tex_Leader.vislhs.')'
exe "amenu ".location.
! \" <plug><C-r>=Tex_PutTextWithMovement('\\text".vislhs."{<++>}<++>')<CR>"
exe "vmenu ".location.
\" \<C-\\>\<C-N>:call VEnclose('\\text".vislhs."{', '}', '{\\".vislhs.a:fam." ', '}')<CR>"
***************
*** 75,79 ****
let location = s:fontMenuLoc.'&Diacritics.'.a:name.'<tab>'
exe 'amenu '.location.
! \" <plug><C-r>=Tex_PutTextWithMovement('\\".a:rhs."{«»}«»')<CR>"
exe 'vmenu '.location.
\" \<C-\\>\<C-n>:call VEnclose('\\".a:rhs."{', '}', '', '')<CR>"
--- 75,79 ----
let location = s:fontMenuLoc.'&Diacritics.'.a:name.'<tab>'
exe 'amenu '.location.
! \" <plug><C-r>=Tex_PutTextWithMovement('\\".a:rhs."{<++>}<++>')<CR>"
exe 'vmenu '.location.
\" \<C-\\>\<C-n>:call VEnclose('\\".a:rhs."{', '}', '', '')<CR>"
***************
*** 132,136 ****
" the \emph is special.
if g:Tex_FontMaps | exe "vnoremap <silent> ".g:Tex_Leader."em \<C-\\>\<C-N>:call VEnclose('\\emph{', '}', '{\\em', '\\/}')<CR>" | endif
! if g:Tex_FontMaps | exe 'call Tex_IMAP ("FEM", "\\emph{ä}«»", "tex")' | endif
" }}}
--- 132,136 ----
" the \emph is special.
if g:Tex_FontMaps | exe "vnoremap <silent> ".g:Tex_Leader."em \<C-\\>\<C-N>:call VEnclose('\\emph{', '}', '{\\em', '\\/}')<CR>" | endif
! if g:Tex_FontMaps | exe 'call Tex_IMAP ("FEM", "\\emph{<++>}<++>", "tex")' | endif
" }}}
***************
*** 166,174 ****
" }}}
" {{{ &font.
! call s:Tex_Fontfont('fontencoding{}', '\fontencoding{ä}«»')
! call s:Tex_Fontfont('fontfamily{qtm}', '\fontfamily{ä}«»')
! call s:Tex_Fontfont('fontseries{m\ b\ bx\ sb\ c}', '\fontseries{ä}«»')
! call s:Tex_Fontfont('fontshape{n\ it\ sl\ sc\ ui}', '\fontshape{ä}«»')
! call s:Tex_Fontfont('fontsize{}{}', '\fontsize{ä}{«»}«»')
call s:Tex_Fontfont('selectfont', '\selectfont ')
" }}}
--- 166,174 ----
" }}}
" {{{ &font.
! call s:Tex_Fontfont('fontencoding{}', '\fontencoding{<++>}<++>')
! call s:Tex_Fontfont('fontfamily{qtm}', '\fontfamily{<++>}<++>')
! call s:Tex_Fontfont('fontseries{m\ b\ bx\ sb\ c}', '\fontseries{<++>}<++>')
! call s:Tex_Fontfont('fontshape{n\ it\ sl\ sc\ ui}', '\fontshape{<++>}<++>')
! call s:Tex_Fontfont('fontsize{}{}', '\fontsize{<++>}{<++>}<++>')
call s:Tex_Fontfont('selectfont', '\selectfont ')
" }}}
***************
*** 320,331 ****
if g:Tex_Menus
" Various {{{
! call <SID>Tex_VariousMenus('ref{}' , '\ref{ä}«»')
! call <SID>Tex_VariousMenus('pageref{}' , '\pageref{ä}«»')
! call <SID>Tex_VariousMenus('label{}' , '\label{ä}«»')
! call <SID>Tex_VariousMenus('footnote{}' , '\footnote{ä}«»')
! call <SID>Tex_VariousMenus('footnotemark{}', '\footnotemark{ä}«»')
! call <SID>Tex_VariousMenus('footnotemark{}', '\footnotetext{ä}«»')
! call <SID>Tex_VariousMenus('cite{}' , '\cite{ä}«»')
! call <SID>Tex_VariousMenus('nocite{}' , '\nocite{ä}«»')
" }}}
endif
--- 320,331 ----
if g:Tex_Menus
" Various {{{
! call <SID>Tex_VariousMenus('ref{}' , '\ref{<++>}<++>')
! call <SID>Tex_VariousMenus('pageref{}' , '\pageref{<++>}<++>')
! call <SID>Tex_VariousMenus('label{}' , '\label{<++>}<++>')
! call <SID>Tex_VariousMenus('footnote{}' , '\footnote{<++>}<++>')
! call <SID>Tex_VariousMenus('footnotemark{}', '\footnotemark{<++>}<++>')
! call <SID>Tex_VariousMenus('footnotemark{}', '\footnotetext{<++>}<++>')
! call <SID>Tex_VariousMenus('cite{}' , '\cite{<++>}<++>')
! call <SID>Tex_VariousMenus('nocite{}' , '\nocite{<++>}<++>')
" }}}
endif
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -C2 -d -r1.12 -r1.12.2.1
*** envmacros.vim 13 Dec 2002 17:23:59 -0000 1.12
--- envmacros.vim 14 Dec 2002 10:59:18 -0000 1.12.2.1
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 08:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: mappings/menus for environments.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 08:00 PM 2002 PST
! " Last Change: Sat Dec 14 02:00 AM 2002 PST
"
" Description: mappings/menus for environments.
***************
*** 18,33 ****
" Define environments for IMAP evaluation " {{{
! let s:figure = "\\begin{figure}[«htpb»]\<cr>\\begin{center}\<cr>\\psfig{figure=«eps file»}\<cr>\\end{center}\<cr>\\caption{«caption text»}\<cr>\\label{fig:«label»}\<cr>\\end{figure}«»"
! let s:minipage = "\\begin{minipage}[«tb»]{«width»}\<cr>«»\<cr>\\end{minipage}«»"
! let s:picture = "\\begin{picture}(«width», «height»)(«xoff»,«yoff»)\<cr>\\put(«xoff»,«yoff»){\\framebox(«»,«»){«»}}\<cr>\\end{picture}«»"
! let s:list = "\\begin{list}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{list}«»"
! let s:enumerate = "\\begin{enumerate}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{enumerate}«»"
! let s:itemize = "\\begin{itemize}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{itemize}«»"
! let s:theindex = "\\begin{theindex}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{theindex}«»"
! let s:trivlist = "\\begin{trivlist}{«label»}{«commands»}\<cr>\\item «»\<cr>\\end{trivlist}«»"
! let s:table = "\\begin{table}\<cr>\\centering\<cr>\\begin{tabular}{«dimensions»}\<cr>«»\<cr>\\end{tabular}\<cr>\\caption{«Caption text»}\<cr>\\label{tab:«label»}\<cr>\\end{table}«»"
! let s:array = "\\leftä\<cr>\\begin{array}{«dimension»}\<cr>«elements»\<cr>\\end{array}\<cr>\\right«»"
! let s:description ="\\begin{description}\<cr>\\item[«label»]«»\<cr>\\end{description}«»"
! let s:document = "\\documentclass[«options»]{«class»}\<cr>\<cr>\\begin{document}\<cr>«»\<cr>\\end{document}"
" }}}
--- 18,33 ----
" Define environments for IMAP evaluation " {{{
! let s:figure = "\\begin{figure}[<+htpb+>]\<cr>\\begin{center}\<cr>\\psfig{figure=<+eps file+>}\<cr>\\end{center}\<cr>\\caption{<+caption text+>}\<cr>\\label{fig:<+label+>}\<cr>\\end{figure}<++>"
! let s:minipage = "\\begin{minipage}[<+tb+>]{<+width+>}\<cr><++>\<cr>\\end{minipage}<++>"
! let s:picture = "\\begin{picture}(<+width+>, <+height+>)(<+xoff+>,<+yoff+>)\<cr>\\put(<+xoff+>,<+yoff+>){\\framebox(<++>,<++>){<++>}}\<cr>\\end{picture}<++>"
! let s:list = "\\begin{list}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{list}<++>"
! let s:enumerate = "\\begin{enumerate}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{enumerate}<++>"
! let s:itemize = "\\begin{itemize}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{itemize}<++>"
! let s:theindex = "\\begin{theindex}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{theindex}<++>"
! let s:trivlist = "\\begin{trivlist}{<+label+>}{<+commands+>}\<cr>\\item <++>\<cr>\\end{trivlist}<++>"
! let s:table = "\\begin{table}\<cr>\\centering\<cr>\\begin{tabular}{<+dimensions+>}\<cr><++>\<cr>\\end{tabular}\<cr>\\caption{<+Caption text+>}\<cr>\\label{tab:<+label+>}\<cr>\\end{table}<++>"
! let s:array = "\\left<++>\<cr>\\begin{array}{<+dimension+>}\<cr><+elements+>\<cr>\\end{array}\<cr>\\right<++>"
! let s:description ="\\begin{description}\<cr>\\item[<+label+>]<++>\<cr>\\end{description}<++>"
! let s:document = "\\documentclass[<+options+>]{<+class+>}\<cr>\<cr>\\begin{document}\<cr><++>\<cr>\\end{document}"
" }}}
***************
*** 74,78 ****
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call Tex_IMAP (a:lhs, '\begin{'.a:name."}\<CR>".extra."«»\<CR>\\end{".a:name."}«»", 'tex')
exec 'vnoremap <silent> '.vlhs.' '.vrhs
endif
--- 74,78 ----
if g:Tex_EnvironmentMaps && !exists('s:doneOnce')
! call Tex_IMAP (a:lhs, '\begin{'.a:name."}\<CR>".extra."<++>\<CR>\\end{".a:name."}<++>", 'tex')
exec 'vnoremap <silent> '.vlhs.' '.vrhs
endif
***************
*** 138,142 ****
if g:Tex_SectionMaps && !exists('s:doneOnce')
exe 'vnoremap '.vlhs.' '.vrhs
! call Tex_IMAP (a:lhs, "\\".a:name.'{«»}«»', 'tex')
endif
--- 138,142 ----
if g:Tex_SectionMaps && !exists('s:doneOnce')
exe 'vnoremap '.vlhs.' '.vrhs
! call Tex_IMAP (a:lhs, "\\".a:name.'{<++>}<++>', 'tex')
endif
***************
*** 145,149 ****
let advlocation = g:Tex_EnvMenuLocation.'Sections.Advanced.'.a:name
! let irhs = "\<C-r>=Tex_PutTextWithMovement('\\".a:name."{«»}«»')\<CR>"
let advirhs = "\<C-r>=Tex_InsSecAdv('".a:name."')\<CR>"
--- 145,149 ----
let advlocation = g:Tex_EnvMenuLocation.'Sections.Advanced.'.a:name
! let irhs = "\<C-r>=Tex_PutTextWithMovement('\\".a:name."{<++>}<++>')\<CR>"
let advirhs = "\<C-r>=Tex_InsSecAdv('".a:name."')\<CR>"
***************
*** 159,172 ****
" NewEnvironments {{{
! call s:Tex_SpecialMacros('', '', 'newenvironment', '\newenvironment{«»}[«»][«»]{«»}{«»}«»', 0)
! call s:Tex_SpecialMacros('', '', 'newenvironment*', '\newenvironment*{«»}[«»][«»]{«»}{«»}«»', 0)
! call s:Tex_SpecialMacros('', '', 'renewenvironment', '\renewenvironment{«»}[«»][«»]{«»}{«»}«»', 0)
! call s:Tex_SpecialMacros('', '', 'renewenvironment*', '\renewenvironment*{«»}[«»][«»]{«»}{«»}«»', 0)
call s:Tex_SpecialMacros('', '', '-sepenv0-', ' :', 0)
" }}}
" Environments specific commands {{{
call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', '&item', '\item', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', 'i&tem[]', '\item[«»]«»', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', '&bibitem{}', '\bibitem{«»}«»', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&=', '\=', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&>', '\>', 0)
--- 159,172 ----
" NewEnvironments {{{
! call s:Tex_SpecialMacros('', '', 'newenvironment', '\newenvironment{<++>}[<++>][<++>]{<++>}{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', '', 'newenvironment*', '\newenvironment*{<++>}[<++>][<++>]{<++>}{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', '', 'renewenvironment', '\renewenvironment{<++>}[<++>][<++>]{<++>}{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', '', 'renewenvironment*', '\renewenvironment*{<++>}[<++>][<++>]{<++>}{<++>}<++>', 0)
call s:Tex_SpecialMacros('', '', '-sepenv0-', ' :', 0)
" }}}
" Environments specific commands {{{
call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', '&item', '\item', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', 'i&tem[]', '\item[<++>]<++>', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Lists.', '&bibitem{}', '\bibitem{<++>}<++>', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&=', '\=', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&>', '\>', 0)
***************
*** 177,183 ****
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&`', '\`', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&kill', '\kill', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '&makron\ \\CHAR=', '\«»=«»', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', "&aigu\ \\CHAR\'", "\\«»\'«»", 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '&grave\ \\CHAR`', '\«»`«»', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', 'p&ushtabs', '\pushtabs', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', 'p&optabs', '\poptabs', 0)
--- 177,183 ----
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&`', '\`', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '\\&kill', '\kill', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '&makron\ \\CHAR=', '\<++>=<++>', 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', "&aigu\ \\CHAR\'", "\\<++>\'<++>", 0)
! call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', '&grave\ \\CHAR`', '\<++>`<++>', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', 'p&ushtabs', '\pushtabs', 0)
call s:Tex_SpecialMacros('', 'Env&Commands.&Tabbing.', 'p&optabs', '\poptabs', 0)
***************
*** 186,190 ****
call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&\&', '&', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&\\\\', '\\', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&multicolumn{}{}{}', '\multicolumn{«»}{«»}{«»}«»', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&makelabels', '\makelabels', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&address', '\address', 0)
--- 186,190 ----
call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&\&', '&', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&\\\\', '\\', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Tabular.', '&multicolumn{}{}{}', '\multicolumn{<++>}{<++>}{<++>}<++>', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&makelabels', '\makelabels', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&address', '\address', 0)
***************
*** 192,201 ****
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&date', '\date', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '-sepenva4-', ' :', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&opening{}', '\opening{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&closing{}', '\closing{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&ps{}', '\ps{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', 'cc&{}', '\cc{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&onlyslides{}', '\onlyslides{«»}«»', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&onlynotes{}', '\onlynotes{«»}«»', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '-sepenva5-', ' :', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&invisible', '\invisible', 0)
--- 192,201 ----
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&date', '\date', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '-sepenva4-', ' :', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&opening{}', '\opening{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&closing{}', '\closing{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', '&ps{}', '\ps{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.Le&tter.', 'cc&{}', '\cc{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&onlyslides{}', '\onlyslides{<++>}<++>', 0)
! call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&onlynotes{}', '\onlynotes{<++>}<++>', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '-sepenva5-', ' :', 0)
call s:Tex_SpecialMacros('', 'EnvCommands.&Slides.', '&invisible', '\invisible', 0)
***************
*** 286,290 ****
" Tex_itemize: {{{
function! Tex_itemize(env)
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>\\item «»\<cr>\\end{".a:env."}«»")
endfunction
" }}}
--- 286,290 ----
" Tex_itemize: {{{
function! Tex_itemize(env)
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>\\item <++>\<cr>\\end{".a:env."}<++>")
endfunction
" }}}
***************
*** 296,300 ****
let itlabel = '['.itlabel.']'
endif
! return Tex_PutTextWithMovement("\\begin{description}\<cr>\\item".itlabel." «»\<cr>\\end{description}«»")
else
return Tex_PutTextWithMovement(s:description)
--- 296,300 ----
let itlabel = '['.itlabel.']'
endif
! return Tex_PutTextWithMovement("\\begin{description}\<cr>\\item".itlabel." <++>\<cr>\\end{description}<++>")
else
return Tex_PutTextWithMovement(s:description)
***************
*** 319,323 ****
let pic = '\input{'.pic."}\<cr>"
else
! let pic = "ä\<cr>"
endif
if caption != ''
--- 319,323 ----
let pic = '\input{'.pic."}\<cr>"
else
! let pic = "<++>\<cr>"
endif
if caption != ''
***************
*** 372,378 ****
let format = input("Format ( l r c p{width} | @{text} )? ")
if format == ''
! let format = '«»'
endif
! let ret = ret.foo.'{'.format."}\<cr>ä\<cr>\\end{tabular}«»\<cr>"
if center == 'y'
let ret=ret."\\end{center}\<cr>"
--- 372,378 ----
let format = input("Format ( l r c p{width} | @{text} )? ")
if format == ''
! let format = '<++>'
endif
! let ret = ret.foo.'{'.format."}\<cr><++>\<cr>\\end{tabular}<++>\<cr>"
if center == 'y'
let ret=ret."\\end{center}\<cr>"
***************
*** 384,388 ****
let ret=ret.'\label{tab:'.label."}\<cr>"
endif
! let ret=ret.'\end{table}«»'
return Tex_PutTextWithMovement(ret)
else
--- 384,388 ----
let ret=ret.'\label{tab:'.label."}\<cr>"
endif
! let ret=ret.'\end{table}<++>'
return Tex_PutTextWithMovement(ret)
else
***************
*** 402,408 ****
let format = '{'.format.'}'
endif
! return Tex_PutTextWithMovement('\begin{'.a:env.'}'.pos.format."\<cr> \<cr>\\end{".a:env.'}«»')
else
! return Tex_PutTextWithMovement('\begin{'.a:env.'}[«position»]{«format»}'."\<cr>«»\<cr>\\end{".a:env.'}«»')
endif
endfunction
--- 402,408 ----
let format = '{'.format.'}'
endif
! return Tex_PutTextWithMovement('\begin{'.a:env.'}'.pos.format."\<cr> \<cr>\\end{".a:env.'}<++>')
else
! return Tex_PutTextWithMovement('\begin{'.a:env.'}[<+position+>]{<+format+>}'."\<cr><++>\<cr>\\end{".a:env.'}<++>')
endif
endfunction
***************
*** 421,432 ****
let arrlabel = ''
endif
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."«»\<cr>\\end{".a:env."}«»")
else
if a:env !~ '\*'
! let arrlabel = '\label{«»}«»'
else
! let arrlabel = '«»'
endif
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."\<cr>".'\end{'.a:env.'}«»')
endif
endfunction
--- 421,432 ----
let arrlabel = ''
endif
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."<++>\<cr>\\end{".a:env."}<++>")
else
if a:env !~ '\*'
! let arrlabel = '\label{<++>}<++>'
else
! let arrlabel = '<++>'
endif
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."\<cr>".'\end{'.a:env.'}<++>')
endif
endfunction
***************
*** 445,449 ****
let label = ''
endif
! return Tex_PutTextWithMovement('\begin{list}'.label."\<cr>\\item \<cr>\\end{list}«»")
else
return Tex_PutTextWithMovement(s:list)
--- 445,449 ----
let label = ''
endif
! return Tex_PutTextWithMovement('\begin{list}'.label."\<cr>\\item \<cr>\\end{list}<++>")
else
return Tex_PutTextWithMovement(s:list)
***************
*** 462,466 ****
let foo = foo.'['.opts.']'.'{'.dstyle.'}'
endif
! return Tex_PutTextWithMovement(foo."\<cr>\<cr>\\begin{document}\<cr>«»\<cr>\\end{document}")
else
return Tex_PutTextWithMovement(s:document)
--- 462,466 ----
let foo = foo.'['.opts.']'.'{'.dstyle.'}'
endif
! return Tex_PutTextWithMovement(foo."\<cr>\<cr>\\begin{document}\<cr><++>\<cr>\\end{document}")
else
return Tex_PutTextWithMovement(s:document)
***************
*** 479,483 ****
let foo = foo.'['.pos.']{'.width.'}'
endif
! return Tex_PutTextWithMovement(foo."\<cr>«»\<cr>\\end{minipage}«»")
else
return Tex_PutTextWithMovement(s:minipage)
--- 479,483 ----
let foo = foo.'['.pos.']{'.width.'}'
endif
! return Tex_PutTextWithMovement(foo."\<cr><++>\<cr>\\end{minipage}<++>")
else
return Tex_PutTextWithMovement(s:minipage)
***************
*** 497,501 ****
endif
let bar = bar.'{'.key.'}'
! return Tex_PutTextWithMovement('\begin{thebibliography}'.foo."\<cr>".bar." \<cr>\\end{thebibliography}«»\<Up>")
endfunction
" }}}
--- 497,501 ----
endif
let bar = bar.'{'.key.'}'
! return Tex_PutTextWithMovement('\begin{thebibliography}'.foo."\<cr>".bar." \<cr>\\end{thebibliography}<++>\<Up>")
endfunction
" }}}
***************
*** 580,588 ****
exe 'return Tex_'.a:env.'(a:env)'
elseif a:env == '$$'
! return Tex_PutTextWithMovement('$$«»$$')
elseif a:env == '['
! return Tex_PutTextWithMovement("\\[\<CR>«»\<CR>\\]«»")
else
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr>«»\<cr>\\end{".a:env."}«»")
endif
endfunction " }}}
--- 580,588 ----
exe 'return Tex_'.a:env.'(a:env)'
elseif a:env == '$$'
! return Tex_PutTextWithMovement('$$<++>$$')
elseif a:env == '['
! return Tex_PutTextWithMovement("\\[\<CR><++>\<CR>\\]<++>")
else
! return Tex_PutTextWithMovement('\begin{'.a:env."}\<cr><++>\<cr>\\end{".a:env."}<++>")
endif
endfunction " }}}
Index: main.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -C2 -d -r1.16 -r1.16.2.1
*** main.vim 13 Dec 2002 17:24:06 -0000 1.16
--- main.vim 14 Dec 2002 10:59:18 -0000 1.16.2.1
***************
*** 4,8 ****
" Email: sr...@fa...
" URL:
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Help:
--- 4,8 ----
" Email: sr...@fa...
" URL:
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"
" Help:
***************
*** 75,97 ****
" short forms for latex formatting and math elements. {{{
" taken from auctex.vim or miktexmacros.vim
! call Tex_IMAP ('__', '_{ä}«»', "tex")
! call Tex_IMAP ('()', '(ä)«»', "tex")
! call Tex_IMAP ('[]', '[ä]«»', "tex")
! call Tex_IMAP ('{}', '{ä}«»', "tex")
! call Tex_IMAP ('^^', '^{ä}«»', "tex")
! call Tex_IMAP ('$$', '$ä$«»', "tex")
call Tex_IMAP ('==', '&=& ', "tex")
call Tex_IMAP ('~~', '&\approx& ', "tex")
call Tex_IMAP ('=~', '\approx', "tex")
call Tex_IMAP ('::', '\dots', "tex")
! call Tex_IMAP ('((', '\left( ä \right)«»', "tex")
! call Tex_IMAP ('[[', '\left[ ä \right]«»', "tex")
! call Tex_IMAP ('{{', '\left\{ ä \right\}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'^', '\hat{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'_', '\bar{ä}«»', "tex")
call Tex_IMAP (g:Tex_Leader.'6', '\partial', "tex")
call Tex_IMAP (g:Tex_Leader.'8', '\infty', "tex")
! call Tex_IMAP (g:Tex_Leader.'/', '\frac{ä}{«»}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'%', '\frac{ä}{«»}«»', "tex")
call Tex_IMAP (g:Tex_Leader.'@', '\circ', "tex")
call Tex_IMAP (g:Tex_Leader.'0', '^\circ', "tex")
--- 75,97 ----
" short forms for latex formatting and math elements. {{{
" taken from auctex.vim or miktexmacros.vim
! call Tex_IMAP ('__', '_{<++>}<++>', "tex")
! call Tex_IMAP ('()', '(<++>)<++>', "tex")
! call Tex_IMAP ('[]', '[<++>]<++>', "tex")
! call Tex_IMAP ('{}', '{<++>}<++>', "tex")
! call Tex_IMAP ('^^', '^{<++>}<++>', "tex")
! call Tex_IMAP ('$$', '$<++>$<++>', "tex")
call Tex_IMAP ('==', '&=& ', "tex")
call Tex_IMAP ('~~', '&\approx& ', "tex")
call Tex_IMAP ('=~', '\approx', "tex")
call Tex_IMAP ('::', '\dots', "tex")
! call Tex_IMAP ('((', '\left( <++> \right)<++>', "tex")
! call Tex_IMAP ('[[', '\left[ <++> \right]<++>', "tex")
! call Tex_IMAP ('{{', '\left\{ <++> \right\}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'^', '\hat{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'_', '\bar{<++>}<++>', "tex")
call Tex_IMAP (g:Tex_Leader.'6', '\partial', "tex")
call Tex_IMAP (g:Tex_Leader.'8', '\infty', "tex")
! call Tex_IMAP (g:Tex_Leader.'/', '\frac{<++>}{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'%', '\frac{<++>}{<++>}<++>', "tex")
call Tex_IMAP (g:Tex_Leader.'@', '\circ', "tex")
call Tex_IMAP (g:Tex_Leader.'0', '^\circ', "tex")
***************
*** 108,134 ****
call Tex_IMAP (g:Tex_Leader.'>', '\ge', "tex")
call Tex_IMAP (g:Tex_Leader.',', '\nonumber', "tex")
! call Tex_IMAP (g:Tex_Leader.'~', '\tilde{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.';', '\dot{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.':', '\ddot{ä}«»', "tex")
! call Tex_IMAP (g:Tex_Leader.'2', '\sqrt{ä}«»', "tex")
call Tex_IMAP (g:Tex_Leader.'|', '\Big|', "tex")
! call Tex_IMAP (g:Tex_Leader.'I', "\\int_{ä}^{«»}«»", 'tex')
" }}}
" other miscellaneous stuff taken from imaps.vim. {{{
! call Tex_IMAP ("vb".s:ml, "\\verb|ä|«»", "tex")
! call Tex_IMAP ("bf".s:ml, "{\\bf ä}«»", "tex")
! call Tex_IMAP ("em".s:ml, "{\\em ä}«»", "tex")
! call Tex_IMAP ("it".s:ml, "{\\it ä}«»", "tex")
! call Tex_IMAP ("mb".s:ml, "\\mbox{ä}«»", "tex")
! call Tex_IMAP ("frac".s:ml, "\\frac{ä}{«»}«»", "tex")
! call Tex_IMAP ("sq".s:ml, "\\sqrt{ä}«»", "tex")
! call Tex_IMAP ("eps".s:ml, "\\psfig{figure=ä.eps}«»", "tex")
! call Tex_IMAP ("sum".s:ml, "\\sum{ä}{«»}«»", "tex")
! call Tex_IMAP ("suml".s:ml, "\\sum\\limits_{ä}^{«»}«»", "tex")
! call Tex_IMAP ("int".s:ml, "\\int_{ä}^{«»}«»", "tex")
! call Tex_IMAP ("intl".s:ml, "\\int\\limits_{ä}^{«»}«»", "tex")
! call Tex_IMAP ("bbr".s:ml, "\\left( ä \\right)«»", "tex")
! call Tex_IMAP ("bbc".s:ml, "\\left\\{ ä \\right\\}«»", "tex")
! call Tex_IMAP ("bbs".s:ml, "\\left[ ä \\right]«»", "tex")
call Tex_IMAP ("rr".s:ml, "\\right", "tex")
call Tex_IMAP ("ll".s:ml, "\\left", "tex")
--- 108,134 ----
call Tex_IMAP (g:Tex_Leader.'>', '\ge', "tex")
call Tex_IMAP (g:Tex_Leader.',', '\nonumber', "tex")
! call Tex_IMAP (g:Tex_Leader.'~', '\tilde{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.';', '\dot{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.':', '\ddot{<++>}<++>', "tex")
! call Tex_IMAP (g:Tex_Leader.'2', '\sqrt{<++>}<++>', "tex")
call Tex_IMAP (g:Tex_Leader.'|', '\Big|', "tex")
! call Tex_IMAP (g:Tex_Leader.'I', "\\int_{<++>}^{<++>}<++>", 'tex')
" }}}
" other miscellaneous stuff taken from imaps.vim. {{{
! call Tex_IMAP ("vb".s:ml, "\\verb|<++>|<++>", "tex")
! call Tex_IMAP ("bf".s:ml, "{\\bf <++>}<++>", "tex")
! call Tex_IMAP ("em".s:ml, "{\\em <++>}<++>", "tex")
! call Tex_IMAP ("it".s:ml, "{\\it <++>}<++>", "tex")
! call Tex_IMAP ("mb".s:ml, "\\mbox{<++>}<++>", "tex")
! call Tex_IMAP ("frac".s:ml, "\\frac{<++>}{<++>}<++>", "tex")
! call Tex_IMAP ("sq".s:ml, "\\sqrt{<++>}<++>", "tex")
! call Tex_IMAP ("eps".s:ml, "\\psfig{figure=<++>.eps}<++>", "tex")
! call Tex_IMAP ("sum".s:ml, "\\sum{<++>}{<++>}<++>", "tex")
! call Tex_IMAP ("suml".s:ml, "\\sum\\limits_{<++>}^{<++>}<++>", "tex")
! call Tex_IMAP ("int".s:ml, "\\int_{<++>}^{<++>}<++>", "tex")
! call Tex_IMAP ("intl".s:ml, "\\int\\limits_{<++>}^{<++>}<++>", "tex")
! call Tex_IMAP ("bbr".s:ml, "\\left( <++> \\right)<++>", "tex")
! call Tex_IMAP ("bbc".s:ml, "\\left\\{ <++> \\right\\}<++>", "tex")
! call Tex_IMAP ("bbs".s:ml, "\\left[ <++> \\right]<++>", "tex")
call Tex_IMAP ("rr".s:ml, "\\right", "tex")
call Tex_IMAP ("ll".s:ml, "\\left", "tex")
***************
*** 178,182 ****
" something like ``a (at the beginning of a quote), we immediately get
" `\alpha. Also if there is a \ preceding the `, then do not insert a
! " greek letter so we can insert greek letters such as \`a.
function! TEX_InsertGreekLetter(char)
if a:char =~ '[a-zA-Z]' && getline('.')[col('.')-2] != '`'
--- 178,182 ----
" something like ``a (at the beginning of a quote), we immediately get
" `\alpha. Also if there is a \ preceding the `, then do not insert a
! " greek letter so we can insert accented letters such as \`a.
function! TEX_InsertGreekLetter(char)
if a:char =~ '[a-zA-Z]' && getline('.')[col('.')-2] != '`'
Index: mathmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/mathmacros.vim,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -d -r1.3 -r1.3.2.1
*** mathmacros.vim 13 Dec 2002 17:24:13 -0000 1.3
--- mathmacros.vim 14 Dec 2002 10:59:18 -0000 1.3.2.1
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: macros for everything mathematical in latex.
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"
" Description: macros for everything mathematical in latex.
***************
*** 79,91 ****
" MATH Fonts {{{
let s:pA2a = s:pA."&MathFonts."
! exe s:pA2a.'mathbf{} <plug><C-r>=Tex_PutTextWithMovement("\\mathbf{ä}«»")<cr>'
! exe s:pA2a.'mathrm{} <plug><C-r>=Tex_PutTextWithMovement("\\mathrm{ä}«»")<cr>'
! exe s:pA2a.'mathsf{} <plug><C-r>=Tex_PutTextWithMovement("\\mathsf{ä}«»")<cr>'
! exe s:pA2a.'mathtt{} <plug><C-r>=Tex_PutTextWithMovement("\\mathtt{ä}«»")<cr>'
! exe s:pA2a.'mathit{} <plug><C-r>=Tex_PutTextWithMovement("\\mathit{ä}«»")<cr>'
! exe s:pA2a.'mathfrak{} <plug><C-r>=Tex_PutTextWithMovement("\\mathfrak{ä}«»")<cr>'
! exe s:pA2a.'mathcal{} <plug><C-r>=Tex_PutTextWithMovement("\\mathcal{ä}«»")<cr>'
! exe s:pA2a.'mathscr{} <plug><C-r>=Tex_PutTextWithMovement("\\mathscr{ä}«»")<cr>'
! exe s:pA2a.'mathbb{} <plug><C-r>=Tex_PutTextWithMovement("\\mathbb{ä}«»")<cr>'
" }}}
" Greek Letters small {{{
--- 79,91 ----
" MATH Fonts {{{
let s:pA2a = s:pA."&MathFonts."
! exe s:pA2a.'mathbf{} <plug><C-r>=Tex_PutTextWithMovement("\\mathbf{<++>}<++>")<cr>'
! exe s:pA2a.'mathrm{} <plug><C-r>=Tex_PutTextWithMovement("\\mathrm{<++>}<++>")<cr>'
! exe s:pA2a.'mathsf{} <plug><C-r>=Tex_PutTextWithMovement("\\mathsf{<++>}<++>")<cr>'
! exe s:pA2a.'mathtt{} <plug><C-r>=Tex_PutTextWithMovement("\\mathtt{<++>}<++>")<cr>'
! exe s:pA2a.'mathit{} <plug><C-r>=Tex_PutTextWithMovement("\\mathit{<++>}<++>")<cr>'
! exe s:pA2a.'mathfrak{} <plug><C-r>=Tex_PutTextWithMovement("\\mathfrak{<++>}<++>")<cr>'
! exe s:pA2a.'mathcal{} <plug><C-r>=Tex_PutTextWithMovement("\\mathcal{<++>}<++>")<cr>'
! exe s:pA2a.'mathscr{} <plug><C-r>=Tex_PutTextWithMovement("\\mathscr{<++>}<++>")<cr>'
! exe s:pA2a.'mathbb{} <plug><C-r>=Tex_PutTextWithMovement("\\mathbb{<++>}<++>")<cr>'
" }}}
" Greek Letters small {{{
***************
*** 472,487 ****
" {{{ MathDiacritics
let s:pA12 = s:pA."&MathDiacritics."
! exe s:pA12.'acute{} <plug><C-r>=Tex_PutTextWithMovement("\\acute{ä}«»")<cr>'
! exe s:pA12.'bar{}<Tab>`_ <plug><C-r>=Tex_PutTextWithMovement("\\bar{ä}«»")<cr>'
! exe s:pA12.'breve{} <plug><C-r>=Tex_PutTextWithMovement("\\breve{ä}«»")<cr>'
! exe s:pA12.'check{} <plug><C-r>=Tex_PutTextWithMovement("\\check{ä}«»")<cr>'
! exe s:pA12.'ddot{}<Tab>`: <plug><C-r>=Tex_PutTextWithMovement("\\ddot{ä}«»")<cr>'
! exe s:pA12.'dot{}<Tab>`; <plug><C-r>=Tex_PutTextWithMovement("\\dot{ä}«»")<cr>'
! exe s:pA12.'grave{} <plug><C-r>=Tex_PutTextWithMovement("\\grave{ä}«»")<cr>'
! exe s:pA12.'hat{}<Tab>`^ <plug><C-r>=Tex_PutTextWithMovement("\\hat{ä}«»")<cr>'
! exe s:pA12.'tilde{}<tab>`~ <plug><C-r>=Tex_PutTextWithMovement("\\tilde{ä}«»")<cr>'
! exe s:pA12.'vec{} <plug><C-r>=Tex_PutTextWithMovement("\\vec{ä}«»")<cr>'
! exe s:pA12.'widehat{} <plug><C-r>=Tex_PutTextWithMovement("\\widehat{ä}«»")<cr>'
! exe s:pA12.'widetilde{} <plug><C-r>=Tex_PutTextWithMovement("\\widetilde{ä}«»")<cr>'
exe s:pA12.'imath <plug><C-r>=Tex_PutTextWithMovement("\\imath")<cr>'
exe s:pA12.'jmath <plug><C-r>=Tex_PutTextWithMovement("\\jmath")<cr>'
--- 472,487 ----
" {{{ MathDiacritics
let s:pA12 = s:pA."&MathDiacritics."
! exe s:pA12.'acute{} <plug><C-r>=Tex_PutTextWithMovement("\\acute{<++>}<++>")<cr>'
! exe s:pA12.'bar{}<Tab>`_ <plug><C-r>=Tex_PutTextWithMovement("\\bar{<++>}<++>")<cr>'
! exe s:pA12.'breve{} <plug><C-r>=Tex_PutTextWithMovement("\\breve{<++>}<++>")<cr>'
! exe s:pA12.'check{} <plug><C-r>=Tex_PutTextWithMovement("\\check{<++>}<++>")<cr>'
! exe s:pA12.'ddot{}<Tab>`: <plug><C-r>=Tex_PutTextWithMovement("\\ddot{<++>}<++>")<cr>'
! exe s:pA12.'dot{}<Tab>`; <plug><C-r>=Tex_PutTextWithMovement("\\dot{<++>}<++>")<cr>'
! exe s:pA12.'grave{} <plug><C-r>=Tex_PutTextWithMovement("\\grave{<++>}<++>")<cr>'
! exe s:pA12.'hat{}<Tab>`^ <plug><C-r>=Tex_PutTextWithMovement("\\hat{<++>}<++>")<cr>'
! exe s:pA12.'tilde{}<tab>`~ <plug><C-r>=Tex_PutTextWithMovement("\\tilde{<++>}<++>")<cr>'
! exe s:pA12.'vec{} <plug><C-r>=Tex_PutTextWithMovement("\\vec{<++>}<++>")<cr>'
! exe s:pA12.'widehat{} <plug><C-r>=Tex_PutTextWithMovement("\\widehat{<++>}<++>")<cr>'
! exe s:pA12.'widetilde{} <plug><C-r>=Tex_PutTextWithMovement("\\widetilde{<++>}<++>")<cr>'
exe s:pA12.'imath <plug><C-r>=Tex_PutTextWithMovement("\\imath")<cr>'
exe s:pA12.'jmath <plug><C-r>=Tex_PutTextWithMovement("\\jmath")<cr>'
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -C2 -d -r1.15 -r1.15.2.1
*** packages.vim 13 Dec 2002 17:24:19 -0000 1.15
--- packages.vim 14 Dec 2002 10:59:19 -0000 1.15.2.1
***************
*** 3,7 ****
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
"
" Description: handling packages from within vim
--- 3,7 ----
" Author: Mikolaj Machowski
" Created: Tue Apr 23 06:00 PM 2002 PST
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
"
" Description: handling packages from within vim
***************
*** 248,257 ****
endif
endif
! let l_m_p_o_item = '&'.substitute(p_o_item, 'ä', '', '')
let p_o_end = p_o_item[strlen(p_o_item) - 1]
if p_o_end !~ "[a-zA-Z}]"
! let r_m_p_o_item = "<plug><C-r>=Tex_PutTextWithMovement('".p_o_item.'ä'.p_o_delimiter."«»')<cr>"
elseif p_o_end == '}'
! let r_m_p_o_item = "<plug><C-r>=Tex_PutTextWithMovement('".p_o_item.p_o_delimiter."«»')<cr>"
else
let r_m_p_o_item = '<plug>'.p_o_item.p_o_delimiter
--- 248,257 ----
endif
endif
! let l_m_p_o_item = '&'.substitute(p_o_item, '<++>', '', '')
let p_o_end = p_o_item[strlen(p_o_item) - 1]
if p_o_end !~ "[a-zA-Z}]"
! let r_m_p_o_item = "<plug><C-r>=Tex_PutTextWithMovement('".p_o_item.'<++>'.p_o_delimiter."<++>')<cr>"
elseif p_o_end == '}'
! let r_m_p_o_item = "<plug><C-r>=Tex_PutTextWithMovement('".p_o_item.p_o_delimiter."<++>')<cr>"
else
let r_m_p_o_item = '<plug>'.p_o_item.p_o_delimiter
***************
*** 286,298 ****
let com_type = '{}'
let l_m_item = '\\&'.p_item_name.'{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."{ä}«»')<cr>"
elseif p_item_def == 'brs'
let com_type = '{}'
! let l_m_item = '\\&'.substitute(p_item_name, "[ä«»]", '', 'g')
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."«»')<cr>"
elseif p_item_def == 'brd'
let com_type = '{}{}'
let l_m_item = '\\&'.p_item_name.'{}{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."{ä}{«»}«»')<cr>"
elseif p_item_def == 'sep'
let com_type = ''
--- 286,298 ----
let com_type = '{}'
let l_m_item = '\\&'.p_item_name.'{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."{<++>}<++>')<cr>"
elseif p_item_def == 'brs'
let com_type = '{}'
! let l_m_item = '\\&'.substitute(p_item_name, "[<++><++>]", '', 'g')
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."<++>')<cr>"
elseif p_item_def == 'brd'
let com_type = '{}{}'
let l_m_item = '\\&'.p_item_name.'{}{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."{<++>}{<++>}<++>')<cr>"
elseif p_item_def == 'sep'
let com_type = ''
***************
*** 302,306 ****
let com_type = '(E)'
let l_m_item = '&'.p_item_name.'(E)'
! let r_m_item = '<plug>\begin{'.p_item_name.'}<cr> <cr>\end{'.p_item_name.'}«»<Up><Left>'
elseif p_item_def == 'ens'
let com_type = '(E)'
--- 302,306 ----
let com_type = '(E)'
let l_m_item = '&'.p_item_name.'(E)'
! let r_m_item = '<plug>\begin{'.p_item_name.'}<cr> <cr>\end{'.p_item_name.'}<++><Up><Left>'
elseif p_item_def == 'ens'
let com_type = '(E)'
***************
*** 308,316 ****
let p_env_name = matchstr(p_item_name, '^[^:]*')
let l_m_item = '&'.p_env_name.'(E)'
! let r_m_item = '<plug>\begin{'.p_env_name.'}'.p_env_spec.'<cr>«»<cr>\end{'.p_env_name.'}«»<Up><Up><C-j>'
elseif p_item_def == 'eno'
let com_type = '(E)'
let l_m_item = '&'.p_item_name.'(E)'
! let r_m_item = '<plug>\begin[«»]{'.p_item_name.'}<cr>«»<cr>\end{'.p_item_name.'}«»<Up><Up><C-j>'
elseif p_item_def == 'nor'
let com_type = "\\\\'"
--- 308,316 ----
let p_env_name = matchstr(p_item_name, '^[^:]*')
let l_m_item = '&'.p_env_name.'(E)'
! let r_m_item = '<plug>\begin{'.p_env_name.'}'.p_env_spec.'<cr><++><cr>\end{'.p_env_name.'}<++><Up><Up><C-j>'
elseif p_item_def == 'eno'
let com_type = '(E)'
let l_m_item = '&'.p_item_name.'(E)'
! let r_m_item = '<plug>\begin[<++>]{'.p_item_name.'}<cr><++><cr>\end{'.p_item_name.'}<++><Up><Up><C-j>'
elseif p_item_def == 'nor'
let com_type = "\\\\'"
***************
*** 320,328 ****
let com_type = '\\[]'
let l_m_item = '\\&'.p_item_name.'[]'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."[ä]«»')<cr>"
elseif p_item_def == 'nob'
let com_type = '[]{}'
let l_m_item = '\\&'.p_item_name.'[]{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."[ä]{«»}«»')<cr>"
elseif p_item_def == 'pla'
let com_type = '(p)'
--- 320,328 ----
let com_type = '\\[]'
let l_m_item = '\\&'.p_item_name.'[]'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."[<++>]<++>')<cr>"
elseif p_item_def == 'nob'
let com_type = '[]{}'
let l_m_item = '\\&'.p_item_name.'[]{}'
! let r_m_item = "<plug><C-r>=Tex_PutTextWithMovement('\\".p_item_name."[<++>]{<++>}<++>')<cr>"
elseif p_item_def == 'pla'
let com_type = '(p)'
***************
*** 360,364 ****
exe 'let g:s_p_o = g:TeX_package_option_'.a:supp_pack
if exists('g:s_p_o') && g:s_p_o != ''
! exe 'normal i\usepackage{'.a:supp_pack.'}«»'
exe 'normal F{i[]'."\<Right>"
else
--- 360,364 ----
exe 'let g:s_p_o = g:TeX_package_option_'.a:supp_pack
if exists('g:s_p_o') && g:s_p_o != ''
! exe 'normal i\usepackage{'.a:supp_pack.'}<++>'
exe 'normal F{i[]'."\<Right>"
else
Index: texrc
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -C2 -d -r1.15 -r1.15.2.1
*** texrc 13 Dec 2002 14:47:29 -0000 1.15
--- texrc 14 Dec 2002 10:59:19 -0000 1.15.2.1
***************
*** 4,8 ****
" Author: Srinath Avadhanula
" Created: Mon Apr 01 11:00 AM 2002 PST
! " Last Change: Fri Dec 13 09:00 AM 2002 EST
"
" Description: This file contains resource configuration information for the
--- 4,8 ----
" Author: Srinath Avadhanula
" Created: Mon Apr 01 11:00 AM 2002 PST
! " Last Change: Sat Dec 14 02:00 AM 2002 PST
"
" Description: This file contains resource configuration information for the
***************
*** 185,190 ****
" not allowed.
TexLet g:Imap_UsePlaceHolders = 1
! TexLet g:Imap_PlaceHolderStart = '«'
! TexLet g:Imap_PlaceHolderEnd = '»'
" }}}
--- 185,190 ----
" not allowed.
TexLet g:Imap_UsePlaceHolders = 1
! TexLet g:Imap_PlaceHolderStart = '<+'
! TexLet g:Imap_PlaceHolderEnd = '+>'
" }}}
***************
*** 221,225 ****
" Leader Options: {{{
" The mappings in latex-suite are by default prefixed with the back-tick
! " character. For example, `/ inserts \frac{«»}{«»}«» etc. You can change the
" prefix with the following setting.
" ',', '/', '`' are preferred values. '' or '\' will lead to a _lot_ of
--- 221,225 ----
" Leader Options: {{{
" The mappings in latex-suite are by default prefixed with the back-tick
! " character. For example, `/ inserts \frac{<++>}{<++>}<++> etc. You can change the
" prefix with the following setting.
" ',', '/', '`' are preferred values. '' or '\' will lead to a _lot_ of
***************
*** 237,242 ****
" These mappings insert LaTeX "environments" such as
" \begin{center}
! " «»
! " \end{center}«»
" with the cursor left at the first place-holder.
" (See |placeholders| for what these are.)
--- 237,242 ----
" These mappings insert LaTeX "environments" such as
" \begin{center}
! " <++>
! " \end{center}<++>
" with the cursor left at the first place-holder.
" (See |placeholders| for what these are.)
***************
*** 274,278 ****
" Font Macros: {{{
" These mappings insert font descriptions such as:
! " \textsf{«»}«»
" again with the cursor at the first place-holder.
" Mnemonic:
--- 274,278 ----
" Font Macros: {{{
" These mappings insert font descriptions such as:
! " \textsf{<++>}<++>
" again with the cursor at the first place-holder.
" Mnemonic:
***************
*** 331,335 ****
" insert a template with additional fields, if not, just a bare bones
" \begin{env}
! " «»
" \end{env}
" is inserted.
--- 331,335 ----
" insert a template with additional fields, if not, just a bare bones
" \begin{env}
! " <++>
" \end{env}
" is inserted.
Index: wizardfuncs.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/wizardfuncs.vim,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** wizardfuncs.vim 13 Dec 2002 17:24:24 -0000 1.5
--- wizardfuncs.vim 14 Dec 2002 10:59:19 -0000 1.5.2.1
***************
*** 196,201 ****
endfunction "}}}
function! s:Tex_section_call(section_name) "{{{
! exe "normal! i\\".a:section_name."{«»}«»\<Esc>0\<C-j>"
! " let ret_section = "\\".a:section_name."{«»}«»"
" exe "normal! i\<C-r>=Tex_PutTextWithMovement(ret_section)\<CR>"
" normal f}i
--- 196,201 ----
endfunction "}}}
function! s:Tex_section_call(section_name) "{{{
! exe "normal! i\\".a:section_name."{<++>}<++>\<Esc>0\<C-j>"
! " let ret_section = "\\".a:section_name."{<++>}<++>"
" exe "normal! i\<C-r>=Tex_PutTextWithMovement(ret_section)\<CR>"
" normal f}i
|
|
From: <sri...@us...> - 2002-12-14 10:59:52
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/macros
In directory sc8-pr-cvs1:/tmp/cvs-serv21869/ftplugin/latex-suite/macros
Modified Files:
Tag: b-newimaps
example
Log Message:
Changed ä to <++>
changed « to <+
changed » to +>
No other change.
I will not be posting the actual diff of this commit to the group. Just the
log. Check the web cvs if you want the diff.
Index: example
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/macros/example,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.4.1
diff -C2 -d -r1.1.1.1 -r1.1.1.1.4.1
*** example 30 Apr 2002 00:03:23 -0000 1.1.1.1
--- example 14 Dec 2002 10:59:19 -0000 1.1.1.1.4.1
***************
*** 5,11 ****
% formatting here. the indentation will follow automatically...
\begin{mycomplicatedenvironment}
! \mycommand1{«»}
! \mycommand2{«hint2»}
! \mycommand3{«»}
! \mycommand4{«»}
! \end{mycomplicatedenvironment}«»
--- 5,11 ----
% formatting here. the indentation will follow automatically...
\begin{mycomplicatedenvironment}
! \mycommand1{<++>}
! \mycommand2{<+hint2+>}
! \mycommand3{<++>}
! \mycommand4{<++>}
! \end{mycomplicatedenvironment}<++>
|
|
From: <sri...@us...> - 2002-12-14 10:59:52
|
Update of /cvsroot/vim-latex/vimfiles/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv21869/doc
Modified Files:
Tag: b-newimaps
latex-suite.txt
Log Message:
Changed ä to <++>
changed « to <+
changed » to +>
No other change.
I will not be posting the actual diff of this commit to the group. Just the
log. Check the web cvs if you want the diff.
Index: latex-suite.txt
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.txt,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -C2 -d -r1.9 -r1.9.2.1
*** latex-suite.txt 7 Dec 2002 11:06:53 -0000 1.9
--- latex-suite.txt 14 Dec 2002 10:59:17 -0000 1.9.2.1
***************
*** 1,5 ****
*latex-suite* Tools for an enhanced LaTeX environment in Vim
For Vim version 6.0 and above.
! Last Change: Sat Dec 07 03:00 AM 2002 PST
By Srinath Avadhanula <sr...@fa...>,
--- 1,5 ----
*latex-suite* Tools for an enhanced LaTeX environment in Vim
For Vim version 6.0 and above.
! Last Change: Sat Dec 14 02:00 AM 2002 PST
By Srinath Avadhanula <sr...@fa...>,
***************
*** 165,177 ****
\begin{figure}[h]
! \centerline{\psfig{figure=«eps file»}}
! \caption{«caption text»}
! \label{fig:«label»}
! \end{figure}«»
<
! The text «eps file» will be selected and she will be left in |select-mode| so
that she can continue typing straight away. After having typed in the file
name, she can press Control-J (while still in insert-mode). This will take her
! directly to the next "place-holder". i.e, the «caption text» will be visually
selected with vim in select mode again for typing in the caption. This saves
on a lot of key presses.
--- 165,177 ----
\begin{figure}[h]
! \centerline{\psfig{figure=<+eps file+>}}
! \caption{<+caption text+>}
! \label{fig:<+label+>}
! \end{figure}<++>
<
! The text <+eps file+> will be selected and she will be left in |select-mode| so
that she can continue typing straight away. After having typed in the file
name, she can press Control-J (while still in insert-mode). This will take her
! directly to the next "place-holder". i.e, the <+caption text+> will be visually
selected with vim in select mode again for typing in the caption. This saves
on a lot of key presses.
***************
*** 190,195 ****
These mappings insert LaTeX "environments" such as >
\begin{center}
! «»
! \end{center}«»
with the cursor left at the first |placeholder|. There are various ways of
inserting environments into the source file. If the environment is a standard
--- 190,195 ----
These mappings insert LaTeX "environments" such as >
\begin{center}
! <++>
! \end{center}<++>
with the cursor left at the first |placeholder|. There are various ways of
inserting environments into the source file. If the environment is a standard
***************
*** 258,262 ****
These mappings insert font descriptions such as: >
! \textsf{«»}«»
again with the cursor at the first place-holder.
--- 258,262 ----
These mappings insert font descriptions such as: >
! \textsf{<++>}<++>
again with the cursor at the first place-holder.
***************
*** 298,302 ****
Example:
SSE in insert mode inserts >
! \section{«»}«»
< If you select a word or line and press `se, then you get >
\section{section name}
--- 298,302 ----
Example:
SSE in insert mode inserts >
! \section{<++>}<++>
< If you select a word or line and press `se, then you get >
\section{section name}
***************
*** 314,323 ****
Examples: >
! `^ expands to \hat{«»}«»
! `_ expands to \bar{«»}«»
`6 expands to \partial
`8 expands to \infty
! `/ expands to \frac{«»}{«»}«»
! `% expands to \frac{«»}{«»}«»
`@ expands to \circ
`0 expands to ^\circ
--- 314,323 ----
Examples: >
! `^ expands to \hat{<++>}<++>
! `_ expands to \bar{<++>}<++>
`6 expands to \partial
`8 expands to \infty
! `/ expands to \frac{<++>}{<++>}<++>
! `% expands to \frac{<++>}{<++>}<++>
`@ expands to \circ
`0 expands to ^\circ
***************
*** 334,343 ****
`> expands to \ge
`, expands to \nonumber
! `~ expands to \tilde{«»}«»
! `; expands to \dot{«»}«»
! `: expands to \ddot{«»}«»
! `2 expands to \sqrt{«»}«»
`| expands to \Big|
! `I expands to \int_{«»}^{«»}«»"
<
(again, notice the convenient place-holders)
--- 334,343 ----
`> expands to \ge
`, expands to \nonumber
! `~ expands to \tilde{<++>}<++>
! `; expands to \dot{<++>}<++>
! `: expands to \ddot{<++>}<++>
! `2 expands to \sqrt{<++>}<++>
`| expands to \Big|
! `I expands to \int_{<++>}^{<++>}<++>"
<
(again, notice the convenient place-holders)
***************
*** 759,763 ****
Tex-Packages.Supported.SIunits
option. This will insert a line of form: >
! \usepackage[«»]«»{SIunits}«»
at the beginning of the file (with the cursor placed at the first
|placeholder|. You will also notice that the packages menu now contains a
--- 759,763 ----
Tex-Packages.Supported.SIunits
option. This will insert a line of form: >
! \usepackage[<++>]<++>{SIunits}<++>
at the beginning of the file (with the cursor placed at the first
|placeholder|. You will also notice that the packages menu now contains a
***************
*** 789,793 ****
If options are detected, then the inserted line is of the
form:
! \usepackage[«»]{package_name}
A |latex-package-dictionary| might also be created.
--- 789,793 ----
If options are detected, then the inserted line is of the
form:
! \usepackage[<++>]{package_name}
A |latex-package-dictionary| might also be created.
|
|
From: <sri...@us...> - 2002-12-14 10:59:25
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/tex
In directory sc8-pr-cvs1:/tmp/cvs-serv21869/ftplugin/tex
Modified Files:
Tag: b-newimaps
brackets.vim
Log Message:
Changed ä to <++>
changed « to <+
changed » to +>
No other change.
I will not be posting the actual diff of this commit to the group. Just the
log. Check the web cvs if you want the diff.
Index: brackets.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/tex/brackets.vim,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** brackets.vim 13 Dec 2002 17:24:31 -0000 1.5
--- brackets.vim 14 Dec 2002 10:59:21 -0000 1.5.2.1
***************
*** 2,6 ****
" Author: Carl Mueller
" (incorporated into latex-suite by Srinath Avadhanula)
! " Last Change: Fri Dec 13 12:00 PM 2002 EST
" Description:
" This ftplugin provides the following maps:
--- 2,6 ----
" Author: Carl Mueller
" (incorporated into latex-suite by Srinath Avadhanula)
! " Last Change: Sat Dec 14 01:00 AM 2002 PST
" Description:
" This ftplugin provides the following maps:
***************
*** 93,97 ****
return "\<BS>".'\mathcal{'.toupper(char).'}'
else
! return Tex_PutTextWithMovement('\cite{«»}«»')
endif
endfunction
--- 93,97 ----
return "\<BS>".'\mathcal{'.toupper(char).'}'
else
! return Tex_PutTextWithMovement('\cite{<++>}<++>')
endif
endfunction
***************
*** 103,112 ****
" If the character before typing <M-l> is one of '([{|<q', then do the
" following:
! " 1. (<M-l> \left(«»\right«»
" similarly for [, |
! " {<M-l> \left\{«»\right\}«»
! " 2. <<M-l> \langle«»\rangle«»
! " 3. q<M-l> \lefteqn{«»}«»
! " otherwise insert \label{«»}«»
function! Tex_LeftRight()
let line = getline(line("."))
--- 103,112 ----
" If the character before typing <M-l> is one of '([{|<q', then do the
" following:
! " 1. (<M-l> \left(<++>\right<++>
" similarly for [, |
! " {<M-l> \left\{<++>\right\}<++>
! " 2. <<M-l> \langle<++>\rangle<++>
! " 3. q<M-l> \lefteqn{<++>}<++>
! " otherwise insert \label{<++>}<++>
function! Tex_LeftRight()
let line = getline(line("."))
***************
*** 121,131 ****
endif
let rhs = matchstr(matchedbrackets, char.'\zs.\ze')
! return "\<BS>".Tex_PutTextWithMovement('\left'.add.char.'«»\right'.add.rhs.'«»')
elseif char == '<'
! return "\<BS>".Tex_PutTextWithMovement('langle«»\rangle«»')
elseif char == 'q'
! return "\<BS>".Tex_PutTextWithMovement('\lefteqn{«»}«»')
else
! return '\label{«»}«»'
endif
endfunction " }}}
--- 121,131 ----
endif
let rhs = matchstr(matchedbrackets, char.'\zs.\ze')
! return "\<BS>".Tex_PutTextWithMovement('\left'.add.char.'<++>\right'.add.rhs.'<++>')
elseif char == '<'
! return "\<BS>".Tex_PutTextWithMovement('langle<++>\rangle<++>')
elseif char == 'q'
! return "\<BS>".Tex_PutTextWithMovement('\lefteqn{<++>}<++>')
else
! return '\label{<++>}<++>'
endif
endfunction " }}}
|