vim-latex-cvs Mailing List for Vim-Latex (Page 25)
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...> - 2003-03-04 22:58:20
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv4129
Modified Files:
compiler.vim
Log Message:
Bug: When there are 2 vertically split windows, compiling causes window
layout to get messed up. (Alan Schmitt)
Cause: UpdatePreviewWindow() was taking focus from the preview window to
the window _above_ it, not the window previously visited. This was
sometimes causing focus to go to one of the edited tex files.
Fix: Goto previous window, not window above.
Index: compiler.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** compiler.vim 17 Jan 2003 18:41:44 -0000 1.21
--- compiler.vim 4 Mar 2003 22:58:13 -0000 1.22
***************
*** 346,350 ****
if &previewwindow
6 wincmd _
! wincmd k
endif
endfunction " }}}
--- 346,350 ----
if &previewwindow
6 wincmd _
! wincmd p
endif
endfunction " }}}
|
|
From: <sri...@us...> - 2003-03-03 20:57:32
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv18043
Modified Files:
folding.vim
Log Message:
Bug: Fold for slide ends with beginning of next slide. (Shawn L Young).
Cause/Fix: syntax fold description for slide used '\end{slide' to terminate fold
beginning with '\begin{slide'
Index: folding.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/folding.vim,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** folding.vim 17 Jan 2003 09:20:35 -0000 1.10
--- folding.vim 3 Mar 2003 20:57:27 -0000 1.11
***************
*** 229,233 ****
call AddSyntaxFoldItem (
\ '^\s*\\begin{slide',
! \ '^\s*\\appendix\W\|^\s*\\chapter\W\|^\s*\\begin{slide\|^\s*\\end{document',
\ 0,
\ 0
--- 229,233 ----
call AddSyntaxFoldItem (
\ '^\s*\\begin{slide',
! \ '^\s*\\appendix\W\|^\s*\\chapter\W\|^\s*\\end{slide\|^\s*\\end{document',
\ 0,
\ 0
|
|
From: <mi...@us...> - 2003-02-28 20:21:56
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv31134
Modified Files:
packages.vim
Log Message:
New command to extract package name from within {}.
exec "normal! /{\<CR>\"ayi}"
Old version was cutting last char under Windows.
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** packages.vim 21 Jan 2003 22:15:05 -0000 1.28
--- packages.vim 28 Feb 2003 20:21:51 -0000 1.29
***************
*** 214,218 ****
" Entering here means that the user has split the \usepackage
" across newlines. Therefore, use yank.
! exec "normal! /\[\<CR>lv/\]\<CR>h\"ay"
let options = @a
else
--- 214,218 ----
" Entering here means that the user has split the \usepackage
" across newlines. Therefore, use yank.
! exec "normal! /{\<CR>\"ayi}"
let options = @a
else
***************
*** 223,227 ****
" \usepackage{stuff,foo} into @a. Do not use matchstr() and the like
" because we can have things split across lines and such.
! exec "normal! /{\<CR>lv/}\<CR>h\"ay"
" now remove all whitespace from @a. We need to remove \n and \r
--- 223,227 ----
" \usepackage{stuff,foo} into @a. Do not use matchstr() and the like
" because we can have things split across lines and such.
! exec "normal! /{\<CR>\"ayi}"
" now remove all whitespace from @a. We need to remove \n and \r
|
|
From: <sri...@us...> - 2003-02-05 23:29:09
|
Update of /cvsroot/vim-latex/vimfiles/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv9901
Modified Files:
imaps.vim
Log Message:
Bug: iabs break when latex-suite is triggered.
(Preben Randhol, Sanip P Deshmukh)
Cause: If a mapping ends in a letter (say '\'), then abbreviations are not
triggered by that letter. For example, if we have
imap \ <C-r>='\'<CR>
iab 12 twelve
Then typing 12\ doesn't expand to twelve\.
(Strangely enough "imap \ ?" doesn't have this problem and we get
twelve?. Vim bug?)
This problem is aggravated by the fact that latex-suite "protects"
most letters to avoid expansions such as ``2 -> `\sqrt{}
Solution: After checking for mappings ending in a letter, if that letter is
not in 'iskeyword', then also check whether the previous word has
an abbreviation. Since vim does not have the equivalent of
mapcheck() for abbreviations, this is complicated (maybe even hacky).
Index: imaps.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** imaps.vim 5 Feb 2003 04:12:28 -0000 1.28
--- imaps.vim 5 Feb 2003 23:29:04 -0000 1.29
***************
*** 227,236 ****
let ft = ""
else
! return a:char
endif
" Find the longest left-hand side that matches the line so far.
" 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
return a:char
--- 227,268 ----
let ft = ""
else
! " If this is a character which could have been used to trigger an
! " abbreviation, check if an abbreviation exists.
! if a:char !~ '\k'
! let lastword = matchstr(getline('.'), '\k\+$', '')
! if lastword != ''
! " An extremeley wierd way to get around the fact that vim
! " doesn't have the equivalent of the :mapcheck() function for
! " abbreviations.
! exec "redir @a | silent! iab ".lastword." | redir END"
! if @a =~ "No abbreviation found"
! return a:char
! endif
! let abbreviationRHS = matchstr(@a, "\n".'i\s\+\k\+\s\+@\?\zs.*')
! let abbreviationRHS = escape(abbreviationRHS, '<')
! exec 'let abbreviationRHS = "'.abbreviationRHS.'"'
!
! let lhs = lastword.a:char
! let rhs = abbreviationRHS.a:char
! let phs = IMAP_GetPlaceHolderStart()
! let phe = IMAP_GetPlaceHolderEnd()
! else
! return a:char
! endif
! else
! return a:char
! endif
endif
" Find the longest left-hand side that matches the line so far.
" matchstr() returns the match that starts first. This automatically
" ensures that the longest LHS is used for the mapping.
! if !exists('lhs') || !exists('rhs')
! let lhs = matchstr(text, '\V\(' . s:LHS_{ft}_{charHash} . '\)\$')
! let hash = s:Hash(lhs)
! let rhs = s:Map_{ft}_{hash}
! let phs = s:phs_{ft}_{hash}
! let phe = s:phe_{ft}_{hash}
! endif
!
if strlen(lhs) == 0
return a:char
***************
*** 239,245 ****
" 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
--- 271,275 ----
" character typed:
let bs = substitute(strpart(lhs, 1), ".", "\<bs>", "g")
! return bs . IMAP_PutTextWithMovement(rhs, phs, phe)
endfunction
***************
*** 682,686 ****
endif
endfunction " }}}
! " IMAP_DebugClear: interface to Tex_DebugClear if avaialable, otherwise emulate it {{{
" Description:
function! IMAP_DebugPrint(pattern)
--- 712,716 ----
endif
endfunction " }}}
! " IMAP_DebugPrint: interface to Tex_DebugPrint if avaialable, otherwise emulate it {{{
" Description:
function! IMAP_DebugPrint(pattern)
|
|
From: <sri...@us...> - 2003-02-05 04:12:31
|
Update of /cvsroot/vim-latex/vimfiles/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv8937
Modified Files:
imaps.vim
Log Message:
- Bug: imaps do not work on default win32 installations of vim because
:behave mswin
is set, which in turn sets &selection=inclusive. This makes
IMAP_Jumpfunc() skip selecting the last character of
Imap_PlaceHolderEnd. (Sumit Bhardwaj)
Solution: Temporarily set &selection = exclusive in IMAP_Jumpfunc().
Index: imaps.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** imaps.vim 9 Jan 2003 01:43:05 -0000 1.27
--- imaps.vim 5 Feb 2003 04:12:28 -0000 1.28
***************
*** 383,386 ****
--- 383,391 ----
let placeHolderEmpty = !strlen(template)
+ " Jumping doesn't work with exclusive
+ let _selection = &selection
+ let &selection = 'inclusive'
+ let restoreselection = "let &selection = '"._selection."'"
+
" Select till the end placeholder character.
let movement = "\<C-o>v/\\V".pheUser."/e\<CR>"
***************
*** 389,395 ****
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
--- 394,400 ----
if placeHolderEmpty && g:Imap_DeleteEmptyPlaceHolders
" delete the empty placeholder into the blackhole.
! return movement."\"_c\<C-o>:".s:RemoveLastHistoryItem."|".restoreselection."\<CR>"
else
! return movement."\<C-\>\<C-N>:".s:RemoveLastHistoryItem."|".restoreselection."\<CR>gv\<C-g>"
endif
|
|
From: <sri...@us...> - 2003-01-29 03:17:23
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/templates In directory sc8-pr-cvs1:/tmp/cvs-serv7821 Added Files: IEEEtran.tex Log Message: Sumit Bhardwaj <b....@ie...> contributed an template file to be used for IEEE transactions. --- NEW FILE: IEEEtran.tex --- <+ +> !comp! !exe! %% Based on <bare_jrnl.tex> in the ieee package available from CTAN, %% I have changed the options so that most useful ones are clubbed together, %% Have a look at <bare_jrnl.tex> to understand the function of each package. %% This code is offered as-is - no warranty - user assumes all risk. %% Free to use, distribute and modify. % *** Authors should verify (and, if needed, correct) their LaTeX system *** % *** with the testflow diagnostic prior to trusting their LaTeX platform *** % *** with production work. IEEE's font choices can trigger bugs that do *** % *** not appear when using other class files. *** % Testflow can be obtained at: % http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/testflow % File: !comp!expand("%:p:t")!comp! % Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! % Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! % \documentclass[journal]{IEEEtran} \begin{document} \usepackage{cite, graphicx, subfigure, amsmath} \interdisplaylinepenalty=2500 % *** Do not adjust lengths that control margins, column widths, etc. *** % *** Do not use packages that alter fonts (such as pslatex). *** % There should be no need to do such things with IEEEtran.cls V1.6 and later. % correct bad hyphenation here \hyphenation{<+op-tical net-works semi-conduc-tor+>} \begin{document} % % paper title \title{<+Skeleton of IEEEtran.cls for Journals in VIM-Latex+>} % % % author names and IEEE memberships % note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break % a structure at a ~ so this keeps an author's name from being broken across % two lines. % use \thanks{} to gain access to the first footnote area % a separate \thanks must be used for each paragraph as LaTeX2e's \thanks % was not built to handle multiple paragraphs \author{<+Sumit Bhardwaj+>~\IEEEmembership{<+Student~Member,~IEEE,+>} <+John~Doe+>,~\IEEEmembership{<+Fellow,~OSA,+>} <+and~Jane~Doe,+>~\IEEEmembership{<+Life~Fellow,~IEEE+>}% <-this % stops a space \thanks{<+Manuscript received January 20, 2002; revised August 13, 2002. This work was supported by the IEEE.+>}% <-this % stops a space \thanks{<+S. Bhardwaj is with the Indian Institute of Technology, Delhi.+>}} % % The paper headers \markboth{<+Journal of VIM-\LaTeX\ Class Files,~Vol.~1, No.~8,~August~2002+>}{ <+Bhardwaj \MakeLowercase{\textit{et al.}+>}: <+Skeleton of IEEEtran.cls for Journals in VIM-Latex+>} % The only time the second header will appear is for the odd numbered pages % after the title page when using the twoside option. % If you want to put a publisher's ID mark on the page % (can leave text blank if you just want to see how the % text height on the first page will be reduced by IEEE) %\pubid{0000--0000/00\$00.00~\copyright~2002 IEEE} % use only for invited papers %\specialpapernotice{(Invited Paper)} % make the title area \maketitle \begin{abstract} <+The abstract goes here.+> \end{abstract} \begin{keywords} <+IEEEtran, journal, \LaTeX, paper, template, VIM, VIM-\LaTeX+>. \end{keywords} \section{Introduction} \PARstart{<+T+>}{<+his+>} <+demo file is intended to serve as a ``starter file" for IEEE journal papers produced under \LaTeX\ using IEEEtran.cls version 1.6 and later.+> % You must have at least 2 lines in the paragraph with the drop letter % (should never be an issue) <+May all your publication endeavors be successful.+> % needed in second column of first page if using \pubid %\pubidadjcol % trigger a \newpage just before the given reference % number - used to balance the columns on the last page % adjust value as needed - may need to be readjusted if % the document is modified later %\IEEEtriggeratref{8} % The "triggered" command can be changed if desired: %\IEEEtriggercmd{\enlargethispage{-5in}} % references section %\bibliographystyle{IEEEtran.bst} %\bibliography{IEEEabrv,../bib/paper} \begin{thebibliography}{1} \bibitem{IEEEhowto:kopka} H.~Kopka and P.~W. Daly, \emph{A Guide to {\LaTeX}}, 3rd~ed.\hskip 1em plus 0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999. \end{thebibliography} % biography section % \begin{biography}{Sumit Bhardwaj} Biography text here. \end{biography} % if you will not have a photo \begin{biographynophoto}{John Doe} Biography text here. \end{biographynophoto} % insert where needed to balance the two columns on the last page %\newpage \begin{biographynophoto}{Jane Doe} Biography text here. \end{biographynophoto} % You can push biographies down or up by placing % a \vfill before or after them. The appropriate % use of \vfill depends on what kind of text is % on the last page and whether or not the columns % are being equalized. %\vfill % Can be used to pull up biographies so that the bottom of the last one % is flush with the other column. %\enlargethispage{-5in} \end{document} |
|
From: <sri...@us...> - 2003-01-21 22:23:12
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages
In directory sc8-pr-cvs1:/tmp/cvs-serv18157
Modified Files:
graphicx
Log Message:
- change syntax for the \includegraphics command. (Diego Caraffini)
Index: graphicx
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/graphicx,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** graphicx 5 Jan 2003 21:47:08 -0000 1.3
--- graphicx 21 Jan 2003 22:23:08 -0000 1.4
***************
*** 30,34 ****
let g:TeX_package_graphicx =
\ 'sbr:Includegraphics,'
! \.'nob:includegraphics,'
\.'spe:height=,'
\.'spe:width=,'
--- 30,34 ----
let g:TeX_package_graphicx =
\ 'sbr:Includegraphics,'
! \.'brs:includegraphics[<++>]{<++>},'
\.'spe:height=,'
\.'spe:width=,'
|
|
From: <sri...@us...> - 2003-01-21 22:15:43
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv13796 Modified Files: templates.vim Log Message: - use the updated syntax of Tex_pack_updateall Index: templates.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/templates.vim,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** templates.vim 17 Jan 2003 06:37:08 -0000 1.10 --- templates.vim 21 Jan 2003 22:15:40 -0000 1.11 *************** *** 70,74 **** 0 d _ ! call Tex_pack_updateall() endfunction --- 70,74 ---- 0 d _ ! call Tex_pack_updateall(1) endfunction |
|
From: <sri...@us...> - 2003-01-21 22:15:11
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv13443
Modified Files:
packages.vim
Log Message:
- make Tex_pack_check() also update g:Tex_package_detected.
- Make Tex_pack_updateall() use another argument force. A recent commit
added some intelligence to Tex_pack_updateall which made it do nothing if
it had scanned this file the last time... Sometimes we might want to
force it to rescan the same file again.
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** packages.vim 17 Jan 2003 09:24:15 -0000 1.27
--- packages.vim 21 Jan 2003 22:15:05 -0000 1.28
***************
*** 18,23 ****
com! -nargs=* TPackage let s:retVal = Tex_pack_one(<f-args>) <bar> normal! i<C-r>=s:retVal<CR>
! com! -nargs=0 TPackageUpdate :silent! call Tex_pack_updateall()
! com! -nargs=0 TPackageUpdateAll :silent! call Tex_pack_updateall()
imap <silent> <plug> <Nop>
--- 18,23 ----
com! -nargs=* TPackage let s:retVal = Tex_pack_one(<f-args>) <bar> normal! i<C-r>=s:retVal<CR>
! com! -nargs=0 TPackageUpdate :silent! call Tex_pack_updateall(1)
! com! -nargs=0 TPackageUpdateAll :silent! call Tex_pack_updateall(1)
imap <silent> <plug> <Nop>
***************
*** 47,55 ****
if filereadable(s:path.'/dictionaries/'.a:package)
exe 'setlocal dict+='.s:path.'/dictionaries/'.a:package
! if !has("gui_running") && filereadable(s:path.'/dictionaries/'.a:package)
! \ && g:Tex_package_supported !~ a:package
let g:Tex_package_supported = g:Tex_package_supported.','.a:package
endif
endif
let g:Tex_package_supported = substitute(g:Tex_package_supported, '^,', '', '')
endfunction
--- 47,58 ----
if filereadable(s:path.'/dictionaries/'.a:package)
exe 'setlocal dict+='.s:path.'/dictionaries/'.a:package
! if filereadable(s:path.'/dictionaries/'.a:package) && g:Tex_package_supported !~ a:package
let g:Tex_package_supported = g:Tex_package_supported.','.a:package
endif
endif
+ if g:Tex_package_detected !~ '\<'.a:package.'\>'
+ let g:Tex_package_detected = g:Tex_package_detected.','.a:package
+ endif
+ let g:Tex_package_detected = substitute(g:Tex_package_detected, '^,', '', '')
let g:Tex_package_supported = substitute(g:Tex_package_supported, '^,', '', '')
endfunction
***************
*** 74,78 ****
" necessary. After that, it 'supports' and 'unsupports' packages as needed
" in such a way as to not repeat work.
! function! Tex_pack_updateall()
call Tex_Debug('+Tex_pack_updateall')
--- 77,81 ----
" necessary. After that, it 'supports' and 'unsupports' packages as needed
" in such a way as to not repeat work.
! function! Tex_pack_updateall(force)
call Tex_Debug('+Tex_pack_updateall')
***************
*** 84,88 ****
endif
" If this is the same as last time, don't repeat.
! if exists('s:lastScannedFile') &&
\ s:lastScannedFile == fname
return
--- 87,91 ----
endif
" If this is the same as last time, don't repeat.
! if !a:force && exists('s:lastScannedFile') &&
\ s:lastScannedFile == fname
return
***************
*** 503,507 ****
if g:Tex_Menus
exe 'amenu '.g:Tex_PackagesMenuLocation.'&UpdatePackage :call Tex_pack(expand("<cword>"))<cr>'
! exe 'amenu '.g:Tex_PackagesMenuLocation.'&UpdateAll :call Tex_pack_updateall()<cr>'
call Tex_pack_supp_menu()
--- 506,510 ----
if g:Tex_Menus
exe 'amenu '.g:Tex_PackagesMenuLocation.'&UpdatePackage :call Tex_pack(expand("<cword>"))<cr>'
! exe 'amenu '.g:Tex_PackagesMenuLocation.'&UpdateAll :call Tex_pack_updateall(1)<cr>'
call Tex_pack_supp_menu()
***************
*** 511,515 ****
au LatexSuite User LatexSuiteFileType
\ call Tex_Debug('packages.vim: Catching LatexSuiteFileType event') |
! \ call Tex_pack_updateall()
augroup END
--- 514,518 ----
au LatexSuite User LatexSuiteFileType
\ call Tex_Debug('packages.vim: Catching LatexSuiteFileType event') |
! \ call Tex_pack_updateall(0)
augroup END
|
|
From: <sri...@us...> - 2003-01-21 22:10:51
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv10832
Modified Files:
envmacros.vim
Log Message:
- If g:Tex_package_detected contains 'graphicx' then use \includegraphics
instead of \psfig in the EFI mapping.
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** envmacros.vim 20 Jan 2003 19:59:00 -0000 1.28
--- envmacros.vim 21 Jan 2003 22:10:46 -0000 1.29
***************
*** 18,21 ****
--- 18,22 ----
" 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:figure_graphicx = "\\begin{figure}[<+htpb+>]\<cr>\\begin{center}\<cr>\\includegraphics{<+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}<++>"
***************
*** 339,343 ****
return IMAP_PutTextWithMovement(figure)
else
! return IMAP_PutTextWithMovement(s:figure)
endif
endfunction
--- 340,348 ----
return IMAP_PutTextWithMovement(figure)
else
! if g:Tex_package_detected =~ '\<graphicx\>'
! return IMAP_PutTextWithMovement(s:figure_graphicx)
! else
! return IMAP_PutTextWithMovement(s:figure)
! endif
endif
endfunction
|
|
From: <sri...@us...> - 2003-01-20 19:59:06
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv19662
Modified Files:
envmacros.vim
Log Message:
- a tentative attempt to make including the graphicx package change the
behavior of EFI from \psfig to \includegraphics. Note that this is far
from ideal. For example, as of now, once the user opens a file with
\usepackage{graphicx}, then EFI will begin using \includegraphics even if
he switches back to a file without \usepackage{graphicx}.
Doing that will require extensive changes to the envmacros.vim file, I
think... (I haven't thought about it enough to find out if a simpler
workaround is possible).
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** envmacros.vim 17 Jan 2003 09:49:34 -0000 1.27
--- envmacros.vim 20 Jan 2003 19:59:00 -0000 1.28
***************
*** 259,263 ****
" Miscellaneous {{{
call s:Tex_SpecialMacros('', '', '-sepenv1-', ' :', 0)
! call s:Tex_SpecialMacros('EFI', '', 'figure', s:figure)
call s:Tex_EnvMacros('', '', 'figure*')
call s:Tex_EnvMacros('ELR', '', 'lrbox')
--- 259,263 ----
" Miscellaneous {{{
call s:Tex_SpecialMacros('', '', '-sepenv1-', ' :', 0)
! call s:Tex_SpecialMacros('EFI', '', 'figure', "\<C-r>=Tex_figure('figure')\<CR>")
call s:Tex_EnvMacros('', '', 'figure*')
call s:Tex_EnvMacros('ELR', '', 'lrbox')
|
|
From: <mi...@us...> - 2003-01-18 18:36:46
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages
In directory sc8-pr-cvs1:/tmp/cvs-serv28859
Modified Files:
babel
Log Message:
added regular latex commands to babel package file
Index: babel
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/babel,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** babel 17 Jan 2003 10:05:36 -0000 1.1
--- babel 18 Jan 2003 18:36:43 -0000 1.2
***************
*** 6,9 ****
--- 6,69 ----
" g:Tex_babel_options contain the necessary information.
+ let g:TeX_package_option_babel =
+ \ 'afrikaans,'
+ \.'bahasa,'
+ \.'basque,'
+ \.'breton,'
+ \.'bulgarian,'
+ \.'catalan,'
+ \.'croatian,'
+ \.'chech,'
+ \.'danish,'
+ \.'dutch,'
+ \.'english,USenglish,american,UKenglish,british,canadian,'
+ \.'esperanto,'
+ \.'estonian,'
+ \.'finnish,'
+ \.'french,francais,canadien,acadian,'
+ \.'galician,'
+ \.'austrian,german,germanb,ngerman,naustrian,'
+ \.'greek,polutonikogreek,'
+ \.'hebrew,'
+ \.'magyar,hungarian,'
+ \.'icelandic,'
+ \.'irish,'
+ \.'italian,'
+ \.'latin,'
+ \.'lowersorbian,'
+ \.'samin,'
+ \.'norsk,nynorsk,'
+ \.'polish,'
+ \.'portuges,portuguese,brazilian,brazil,'
+ \.'romanian,'
+ \.'russian,'
+ \.'scottish,'
+ \.'spanish,'
+ \.'slovak,'
+ \.'slovene,'
+ \.'swedish,'
+ \.'serbian,'
+ \.'turkish,'
+ \.'ukrainian,'
+ \.'uppersorbian,'
+ \.'welsh'
+
+ let g:TeX_package_babel =
+ \ 'bra:selectlanguage,'
+ \.'env:otherlanguage,'
+ \.'env:otherlanguage*,'
+ \.'env:hyphenrules,'
+ \.'brd:foreignlanguage,'
+ \.'spe:iflanguage{<+name+>}{<+true+>}{<+false+>},'
+ \.'languagename,'
+ \.'bra:useshorthands,'
+ \.'brd:defineshorthand,'
+ \.'brd:aliasshorthand,'
+ \.'bra:languageshorthans,'
+ \.'bra:shorthandon,'
+ \.'bra:shorthandoff,'
+ \.'brd:languageattribute'
+
+ " vim:ft=vim:ff=unix:
if exists('s:doneOnce')
finish
***************
*** 23,28 ****
function! <SID>SetQuotes()
if g:Tex_package_detected =~ '\<babel\>'
! if g:Tex_babel_options =~ 'german'
exec 'so '.s:path.'/german'
endif
endif
--- 83,90 ----
function! <SID>SetQuotes()
if g:Tex_package_detected =~ '\<babel\>'
! if g:Tex_babel_options =~ '\<german\>'
exec 'so '.s:path.'/german'
+ elseif g:Tex_babel_options =~ '\<ngerman\>'
+ exec 'so '.s:path.'/ngerman'
endif
endif
|
|
From: <sri...@us...> - 2003-01-17 18:43:24
|
Update of /cvsroot/vim-latex/vimfiles In directory sc8-pr-cvs1:/tmp/cvs-serv12966 Modified Files: makefile Log Message: - make things silent... Otherwise cvs errors, shell errors etc scroll off the screen making things difficult to see. Index: makefile =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** makefile 6 Jan 2003 10:10:18 -0000 1.10 --- makefile 17 Jan 2003 18:43:20 -0000 1.11 *************** *** 9,28 **** latexs: # plugins: ! zip latexSuite.zip plugin/imaps.vim ! zip latexSuite.zip plugin/SyntaxFolds.vim ! zip latexSuite.zip plugin/libList.vim # ftplugins ! zip latexSuite.zip ftplugin/tex_latexSuite.vim ! zip latexSuite.zip ftplugin/tex/*.vim # files in the latex-suite directory. Skip the CVS files. ! zip -R latexSuite.zip `find ftplugin/latex-suite -name '*' | grep -v CVS` # documentation ! zip latexSuite.zip doc/latex*.txt # indentation ! zip latexSuite.zip indent/tex.vim # compiler ! zip latexSuite.zip compiler/tex.vim # external tools ! zip latexSuite.zip ltags # Now to make a tar.gz file from the .zip file. --- 9,28 ---- latexs: # plugins: ! zip -q latexSuite.zip plugin/imaps.vim ! zip -q latexSuite.zip plugin/SyntaxFolds.vim ! zip -q latexSuite.zip plugin/libList.vim # ftplugins ! zip -q latexSuite.zip ftplugin/tex_latexSuite.vim ! zip -q latexSuite.zip ftplugin/tex/*.vim # files in the latex-suite directory. Skip the CVS files. ! zip -q -R latexSuite.zip `find ftplugin/latex-suite -name '*' | grep -v CVS` # documentation ! zip -q latexSuite.zip doc/latex*.txt # indentation ! zip -q latexSuite.zip indent/tex.vim # compiler ! zip -q latexSuite.zip compiler/tex.vim # external tools ! zip -q latexSuite.zip ltags # Now to make a tar.gz file from the .zip file. *************** *** 31,37 **** ( \ cd $(TMP)/latexSuite0793/ ; \ ! unzip -o latexSuite.zip ; \ \rm latexSuite.zip ; \ ! tar cvzf latexSuite.tar.gz * ; \ \mv latexSuite.tar.gz $(DIR1)/ ; \ ) --- 31,37 ---- ( \ cd $(TMP)/latexSuite0793/ ; \ ! unzip -q -o latexSuite.zip ; \ \rm latexSuite.zip ; \ ! tar czf latexSuite.tar.gz * ; \ \mv latexSuite.tar.gz $(DIR1)/ ; \ ) |
|
From: <sri...@us...> - 2003-01-17 18:41:51
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv11979
Modified Files:
compiler.vim
Log Message:
- Bug: When makefile is found,then latex-suite shifts focus to the quicfix
window. (Ulrich Spoerlein)
Fix: mainfname was not being initialized when makefile is found.
TODO: Should we change 'silent!' to 'silent'? RunLaTeX() was actually
throwing vim errors which were supressed.
Index: compiler.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** compiler.vim 17 Jan 2003 09:20:00 -0000 1.20
--- compiler.vim 17 Jan 2003 18:41:44 -0000 1.21
***************
*** 91,94 ****
--- 91,103 ----
pclose!
+ " If a *.latexmain file is found, then use that file to
+ " construct a main file.
+ if Tex_GetMainFileName() != ''
+ let mainfname = Tex_GetMainFileName()
+ else
+ " otherwise just use this file.
+ let mainfname = expand("%:t:r")
+ endif
+
" if a makefile exists, just use the make utility
if glob('makefile') != '' || glob('Makefile') != ''
***************
*** 101,112 ****
endif
let &l:makeprg = _makeprg
- " otherwise if a *.latexmain file is found, then use that file to
- " construct a main file.
- elseif Tex_GetMainFileName() != ''
- let mainfname = Tex_GetMainFileName()
- exec 'make '.mainfname
else
- " otherwise just use this file.
- let mainfname = expand("%:t:r")
exec 'make '.mainfname
endif
--- 110,114 ----
|
|
From: Srinath A. <sr...@ee...> - 2003-01-17 10:40:45
|
... of the large number of changes I made recently. The initial way latex-suite used to get triggered was: 1. tex_latexSuite.vim would get sourced everytime. 2. It would source main.vim once for every buffer. 3. The first time it was sourced, main.vim would source each of the other files and from the second time on, just call SetTeXOptions(). Components which needed to set buffer local mappings would create globally visible functions which SetTeXOptions() would need to call. This had one obvious flaw because of point 2. It doesn't work with components which needed to do something every time we entered a buffer irrespective of whether its the first or the n^th time. For example, its not possible to write elegantly the functionality where the packages menu gets updated on every Filetype event. For example, if we do something like: 1. open a.tex 2. :e b.tex 3. :e a.tex in the original setup, hen after step 3, the packages menu would still show the stuff for b.tex... Apart from this obvious flaw which could have been solved with a little less effort, from a "do the right thing" point of view, it was just plainly bad design. There is too much inter dependency between the various modules, which means main.vim would need to be modified every time we wanted to change some other module. It might seem that one way to avoid interdependencies would have been to reduce tex_latexSuite.vim to: execute 'so '.s:path.'/latex-suite/*.vim' This is however not possible because we want to source the files in a certain order. There are ofcourse more obvious ways to overcome this problem. (like the brute force way of just making package/babel scan for whether the user uses babel with the 'german' option), but I think the present setup is the most scalable. Let me know if what I've done is not too clear or if you have other concerns. In summary, what I have done makes latex-suite behave like: 1. tex_latexSuite.vim gets sourced by vim every time a tex filetype event occurs. 2. It sources main.vim only once. _never again_ 3. It then just throws a LatexSuiteFileType event every time (including the first time). When main.vim gets sourced, it: 1. Sources each file in some nice order. 2. Sets up an au to catch the LatexSuiteFileType event to call SetTeXOptions() each time. Thus buffer local mappings are created for each tex file being edited. Other files which also need to set buffer local mappings follow the same procedure. packages.vim however does something extra 1. It sets up an au to call Tex_pack_updateall() on every LatexSuiteFileType event (which means it gets called for every buffer every time). 2. Tex_pack_updateall throws a LatexSuitePackagesScanned event after it is done "supporting" all the \usepackage's found. Finally, packages/babel catches the LatexSuitePackagesScanned event to customize the smart quotes setting. So to summarize, after about 5 hours of coding, I have a system which enables german users to edit both english and german files in the same vim session using some pretty nifty event handling mechanisms. I am absolutely sure that not more than about 1 person will find this useful. Ho well, if I was concerned with the value of my time, I wouldn't have started this thing in the first place... Besides, my meeting tomorrow got postponed, so I went a little overboard. I think this "little" programming binge has eaten up my quota for the coming week :( Hopefully, we will have some use for all this flexibity in the future. Srinath |
|
From: <sri...@us...> - 2003-01-17 10:05:39
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages
In directory sc8-pr-cvs1:/tmp/cvs-serv16962
Added Files:
babel
Log Message:
- A first go at the babel file. This file is sourced exactly once when it
is first detected by Tex_pack_updateall(). It then sets up an au to catch
the LatexSuiteScannedPackages event which gets thrown by
Tex_pack_updateall(). This enables it to set buffer local smart quote
characters each time \usepackage{babel} is seen.
--- NEW FILE: babel ---
" This package sets some language specific options.
" Since it needs to find out which options the user used with the babel
" package, it needs to wait till latex-suite is done scanning packages. It
" then catches the LatexSuiteScannedPackages event which
" Tex_pack_updateall() throws at which time g:Tex_pack_detected and
" g:Tex_babel_options contain the necessary information.
if exists('s:doneOnce')
finish
endif
let s:doneOnce = 1
augroup LatexSuite
au LatexSuite User LatexSuiteScannedPackages
\ call Tex_Debug('babel: catching LatexSuiteScannedPackages event') |
\ call s:SetQuotes()
augroup END
let s:path = expand('<sfile>:p:h')
" SetQuotes: sets quotes for various languages {{{
" Description:
function! <SID>SetQuotes()
if g:Tex_package_detected =~ '\<babel\>'
if g:Tex_babel_options =~ 'german'
exec 'so '.s:path.'/german'
endif
endif
endfunction " }}}
" vim:ft=vim:ff=unix:
|
|
From: <sri...@us...> - 2003-01-17 09:49:37
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv15407
Modified Files:
envmacros.vim
Log Message:
Oops! Syntax error. Talking about commiting "tested" code!
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** envmacros.vim 17 Jan 2003 09:18:15 -0000 1.26
--- envmacros.vim 17 Jan 2003 09:49:34 -0000 1.27
***************
*** 1029,1033 ****
call Tex_SetFastCommandMaps()
endif
- endif
endfunction " }}}
" Catch the Filetype event so we set maps for each buffer {{{
--- 1029,1032 ----
|
|
From: <sri...@us...> - 2003-01-17 09:24:18
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv13192
Modified Files:
packages.vim
Log Message:
- catch the LatexSuiteFileType event to update the package menu whenever we
switch buffers. This will enable us to reliably use package files which
set buffer variables.
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** packages.vim 17 Jan 2003 06:36:17 -0000 1.26
--- packages.vim 17 Jan 2003 09:24:15 -0000 1.27
***************
*** 506,515 ****
call Tex_pack_supp_menu()
- call Tex_pack_updateall()
-
endif
augroup LatexSuite
! au LatexSuite User LatexSuiteInit call Tex_pack_updateall()
augroup END
--- 506,515 ----
call Tex_pack_supp_menu()
endif
augroup LatexSuite
! au LatexSuite User LatexSuiteFileType
! \ call Tex_Debug('packages.vim: Catching LatexSuiteFileType event') |
! \ call Tex_pack_updateall()
augroup END
|
|
From: <sri...@us...> - 2003-01-17 09:20:38
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv12789
Modified Files:
folding.vim
Log Message:
- catch the LatexSuiteFileType event to set up buffer local maps.
Index: folding.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/folding.vim,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** folding.vim 12 Jan 2003 22:02:39 -0000 1.9
--- folding.vim 17 Jan 2003 09:20:35 -0000 1.10
***************
*** 8,11 ****
--- 8,38 ----
"=============================================================================
+ nnoremap <unique> <Plug>Tex_RefreshFolds :call MakeTexFolds(1)<cr>
+
+ augroup LatexSuite
+ au LatexSuite User LatexSuiteFileType
+ \ call Tex_Debug('folding.vim: catching LatexSuiteFileType') |
+ \ call s:SetFoldOptions()
+ augroup END
+
+ " SetFoldOptions: sets maps for every buffer {{{
+ " Description:
+ function! <SID>SetFoldOptions()
+ if exists('b:doneSetFoldOptions')
+ return
+ endif
+ let b:doneSetFoldOptions = 1
+
+ setlocal foldtext=TexFoldTextFunction()
+
+ if g:Tex_Folding && g:Tex_AutoFolding
+ call MakeTexFolds(0)
+ endif
+
+ if g:Tex_Folding && !hasmapto('<Plug>Tex_RefreshFolds')
+ nmap <silent> <buffer> <Leader>rf <Plug>Tex_RefreshFolds
+ endif
+
+ endfunction " }}}
" MakeTexFolds: function to create fold items for latex. {{{
"
|
|
From: <sri...@us...> - 2003-01-17 09:20:02
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv12707
Modified Files:
compiler.vim
Log Message:
- catch the LatexSuiteFileType event to set up buffer local maps.
Index: compiler.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** compiler.vim 12 Jan 2003 22:02:37 -0000 1.19
--- compiler.vim 17 Jan 2003 09:20:00 -0000 1.20
***************
*** 406,409 ****
--- 406,434 ----
endfunction " }}}
+ " SetCompilerMaps: sets maps for compiling/viewing/searching {{{
+ " " Description:
+ function! <SID>SetCompilerMaps()
+ if exists('b:Tex_doneCompilerMaps')
+ return
+ endif
+ let b:Tex_doneCompilerMaps = 1
+ " viewing/searching
+ if !hasmapto('RunLaTeX')
+ if has("gui")
+ nnoremap <buffer> <Leader>ll :silent! call RunLaTeX()<cr>
+ nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX()<cr>
+ nnoremap <buffer> <Leader>ls :silent! call ForwardSearchLaTeX()<cr>
+ else
+ nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr>
+ nnoremap <buffer> <Leader>lv :call ViewLaTeX()<cr>
+ nnoremap <buffer> <Leader>ls :call ForwardSearchLaTeX()<cr>
+ end
+ end
+ endfunction
+ " }}}
+
+ augroup LatexSuite
+ au LatexSuite User LatexSuiteFileType call <SID>SetCompilerMaps()
+ augroup END
" vim:fdm=marker:ff=unix:noet:ts=4:sw=4
|
|
From: <sri...@us...> - 2003-01-17 09:18:18
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv12518
Modified Files:
envmacros.vim
Log Message:
- catch the LatexSuiteFileType event thrown by tex_latexSuite.vim to set up
buffer local maps for each tex file.
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** envmacros.vim 15 Jan 2003 02:52:47 -0000 1.25
--- envmacros.vim 17 Jan 2003 09:18:15 -0000 1.26
***************
*** 4,8 ****
" Created: Tue Apr 23 08:00 PM 2002 PST
" CVS Header:
- " $Header$
" Description: mappings/menus for environments.
"=============================================================================
--- 4,7 ----
***************
*** 990,1018 ****
endfunction
" }}}
- " Tex_SetFastCommandMaps: function for setting up the <F7> keys {{{
- " Description: This function is made public so it can be called by the
- " SetTeXOptions() function in main.vim
- function! Tex_SetFastCommandMaps()
- if g:Tex_PromptedCommands != ''
- if !hasmapto('<Plug>Tex_FastCommandInsert', 'i')
- imap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
- endif
- if !hasmapto('<Plug>Tex_FastCommandInsert', 'n')
- nmap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
- endif
- if !hasmapto('<Plug>Tex_FastCommandChange', 'i')
- imap <silent> <buffer> <S-F7> <Plug>Tex_FastCommandChange
- endif
- if !hasmapto('<Plug>Tex_FastCommandChange', 'n')
- nmap <silent> <buffer> <S-F7> <Plug>Tex_FastCommandChange
- endif
- if !hasmapto('<Plug>Tex_FastCommandInsert', 'v')
- vmap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
- endif
- endif
- endfunction " }}}
endif
" }}}
--- 989,1040 ----
endfunction
" }}}
endif
+ " }}}
+ " Tex_SetFastCommandMaps: function for setting up the <F7> keys {{{
+ " Description: This function is made public so it can be called by the
+ " SetTeXOptions() function in main.vim
+ function! Tex_SetFastCommandMaps()
+ if g:Tex_PromptedCommands != ''
+ if !hasmapto('<Plug>Tex_FastCommandInsert', 'i')
+ imap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
+ endif
+ if !hasmapto('<Plug>Tex_FastCommandInsert', 'n')
+ nmap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
+ endif
+ if !hasmapto('<Plug>Tex_FastCommandChange', 'i')
+ imap <silent> <buffer> <S-F7> <Plug>Tex_FastCommandChange
+ endif
+ if !hasmapto('<Plug>Tex_FastCommandChange', 'n')
+ nmap <silent> <buffer> <S-F7> <Plug>Tex_FastCommandChange
+ endif
+ if !hasmapto('<Plug>Tex_FastCommandInsert', 'v')
+ vmap <silent> <buffer> <F7> <Plug>Tex_FastCommandInsert
+ endif
+ endif
+ endfunction " }}}
+
+ " SetEnvMacrosOptions: sets mappings for buffers {{{
+ " " Description:
+ function! <SID>SetEnvMacrosOptions()
+ if exists('b:doneTexEnvMaps')
+ return
+ endif
+ let b:doneTexEnvMaps = 1
+ if g:Tex_PromptedEnvironments != '' || g:Tex_HotKeyMappings != ''
+ call Tex_SetFastEnvironmentMaps()
+ endif
+ if g:Tex_PromptedCommands != ''
+ call Tex_SetFastCommandMaps()
+ endif
+ endif
+ endfunction " }}}
+ " Catch the Filetype event so we set maps for each buffer {{{
+ augroup LatexSuite
+ augroup LatexSuite User LatexSuiteFileType
+ \ | call Tex_Debug('envmacros.vim: catching LatexSuiteFileType')
+ \ | call s:SetEnvMacrosOptions()
+ augroup END
" }}}
|
|
From: <sri...@us...> - 2003-01-17 09:13:34
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv12052
Modified Files:
main.vim
Log Message:
- main.vim used to help various other components set up mappings etc. This
was becoming ugly because it caused some unecessary dependencies... The
new tex_latexSuite.vim file enables us to remove these dependencies.
SetTeXOptions() now just sets options local to main.vim. Each of the
other components do their own stuff.
SetTeXOptions() is called by catching the LatexSuiteFileType event thrown
by tex_latexSuite.vim.
Index: main.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** main.vim 16 Jan 2003 17:42:09 -0000 1.34
--- main.vim 17 Jan 2003 09:13:31 -0000 1.35
***************
*** 35,42 ****
exe "so ".s:path.'/texrc'
- augroup LatexSuite User LatexSuiteInit
- au!
- augroup END
-
" }}}
--- 35,38 ----
***************
*** 536,553 ****
" SetTeXOptions: sets options/mappings for this file. {{{
function! <SID>SetTeXOptions()
! exe 'setlocal dict+='.s:path.'/dictionaries/dictionary'
! setlocal foldtext=TexFoldTextFunction()
!
! " fold up things. and mappings for refreshing folds.
! if g:Tex_Folding && g:Tex_AutoFolding
! call MakeTexFolds(0)
! endif
! if g:Tex_Folding
! if mapcheck('<F6>') == ""
! nnoremap <buffer> <F6> :call MakeTexFolds(1)<cr>
! endif
! nnoremap <buffer> <leader>rf :call MakeTexFolds(1)<cr>
endif
" smart functions
if g:Tex_SmartKeyQuote
--- 532,544 ----
" SetTeXOptions: sets options/mappings for this file. {{{
function! <SID>SetTeXOptions()
! " Avoid reinclusion.
! if exists('b:doneSetTeXOptions')
! return
endif
+ let b:doneSetTeXOptions = 1
+ exe 'setlocal dict+='.s:path.'/dictionaries/dictionary'
+
+ call Tex_Debug('SetTeXOptions: sourcing maps')
" smart functions
if g:Tex_SmartKeyQuote
***************
*** 560,582 ****
inoremap <buffer> <silent> . <C-R>=<SID>SmartDots()<CR>
endif
- if g:Tex_PromptedEnvironments != '' || g:Tex_HotKeyMappings != ''
- call Tex_SetFastEnvironmentMaps()
- endif
- if g:Tex_PromptedCommands != ''
- call Tex_SetFastCommandMaps()
- endif
- " viewing/searching
- if !hasmapto('RunLaTeX')
- if has("gui")
- nnoremap <buffer> <Leader>ll :silent! call RunLaTeX()<cr>
- nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX()<cr>
- nnoremap <buffer> <Leader>ls :silent! call ForwardSearchLaTeX()<cr>
- else
- nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr>
- nnoremap <buffer> <Leader>lv :call ViewLaTeX()<cr>
- nnoremap <buffer> <Leader>ls :call ForwardSearchLaTeX()<cr>
- end
- end
" This line seems to be necessary to source our compiler/tex.vim file.
" The docs are unclear why this needs to be done even though this file is
--- 551,555 ----
***************
*** 584,591 ****
runtime compiler/tex.vim
- silent! do LatexSuite User LatexSuiteInit
endfunction
! call <SID>SetTeXOptions()
" }}}
--- 557,565 ----
runtime compiler/tex.vim
endfunction
! augroup LatexSuite
! au LatexSuite User LatexSuiteFileType call <SID>SetTeXOptions()
! augroup END
" }}}
|
|
From: <sri...@us...> - 2003-01-17 09:09:48
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin
In directory sc8-pr-cvs1:/tmp/cvs-serv11628
Modified Files:
tex_latexSuite.vim
Log Message:
- In the initial way of calling latex-suite, main.vim and correspondingly
every file through it would be source'd only once for every buffer. This
means that if a file needs to be called every time a filetype event
occurs (not just the first time), it wasn't possible. This limitation was
making adding a feature such as updating the packages menu when we switch
buffers very ugly to implement.
Adopt a much more elegant apprach. Throw a LatexSuiteFileType event every
time tex_latexSuite is sourced... This enables each component of
latex-suite to function independently without having to depend of
main.vim in the heavy manner they did previously. Components which need
to be sourced only once will ignore this event. Components which need to
set buffer local maps will catch this event and set the maps with some
reinclusion avoiding logic... and so on and so forth...
See the next few commits of main.vim, compiler.vim etc for details.
Index: tex_latexSuite.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/tex_latexSuite.vim,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** tex_latexSuite.vim 30 Apr 2002 00:03:13 -0000 1.1.1.1
--- tex_latexSuite.vim 17 Jan 2003 09:09:43 -0000 1.2
***************
*** 3,12 ****
" Maintainer: Srinath Avadhanula
" Email: sr...@fa...
- " URL:
- " Last Change: Fri Apr 12 09:00 PM 2002 PDT
! if exists('b:didLatexSuite')
! finish
endif
! let b:didLatexSuite = 1
! exec 'so '.expand('<sfile>:p:h').'/latex-suite/main.vim'
--- 3,13 ----
" Maintainer: Srinath Avadhanula
" Email: sr...@fa...
! if !exists('s:initLatexSuite')
! let s:initLatexSuite = 1
! exec 'so '.expand('<sfile>:p:h').'/latex-suite/main.vim'
!
! silent! do LatexSuite User LatexSuiteInitPost
endif
!
! silent! do LatexSuite User LatexSuiteFileType
|
|
From: <sri...@us...> - 2003-01-17 06:51:52
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv32242
Modified Files:
packages.vim
Log Message:
- Transfer intelligence from Tex_pack_all to Tex_pack_updateall. Because we
want to scan every file, therefore do some optimization to speed things
up. Basically, try not to repeat "supporting" packages.
- Also throw a LatexSuiteScannedPackages event at the end of
Tex_pack_updateall... This will be caught by the babel package.
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** packages.vim 17 Jan 2003 05:26:34 -0000 1.25
--- packages.vim 17 Jan 2003 06:36:17 -0000 1.26
***************
*** 41,45 ****
call Tex_pack(a:package)
endif
! let g:Tex_package_supported = g:Tex_package_supported.','.a:package
endif
if filereadable(s:path.'/dictionaries/'.a:package)
--- 41,47 ----
call Tex_pack(a:package)
endif
! if g:Tex_package_supported !~ a:package
! let g:Tex_package_supported = g:Tex_package_supported.','.a:package
! endif
endif
if filereadable(s:path.'/dictionaries/'.a:package)
***************
*** 68,88 ****
" }}}
" Tex_pack_updateall: updates the TeX-Packages menu {{{
function! Tex_pack_updateall()
! if exists('g:Tex_package_supported')
! let i = 1
! while 1
! let old_pack_name = Tex_Strntok(g:Tex_package_supported, ',', i)
! if old_pack_name == ''
! break
! endif
! call Tex_pack_uncheck(old_pack_name)
! let i = i + 1
! endwhile
! let g:Tex_package_supported = ''
! let g:Tex_package_detected = ''
! call Tex_pack_all()
else
! call Tex_pack_all()
endif
endfunction
--- 70,133 ----
" }}}
" Tex_pack_updateall: updates the TeX-Packages menu {{{
+ " Description:
+ " This function first calls Tex_pack_all to scan for \usepackage's etc if
+ " necessary. After that, it 'supports' and 'unsupports' packages as needed
+ " in such a way as to not repeat work.
function! Tex_pack_updateall()
! call Tex_Debug('+Tex_pack_updateall')
!
! " Find out which file we need to scan.
! if Tex_GetMainFileName() != ''
! let fname = Tex_GetMainFileName(':p:r')
else
! let fname = expand('%:p')
! endif
! " If this is the same as last time, don't repeat.
! if exists('s:lastScannedFile') &&
! \ s:lastScannedFile == fname
! return
! endif
! " Remember which file we scanned for next time.
! let s:lastScannedFile = fname
!
! " Remember which packages we detected last time.
! if exists('g:Tex_package_detected')
! let oldpackages = g:Tex_package_detected
! else
! let oldpackages = ''
endif
+
+ " This sets up a global variable of all detected packages.
+ let g:Tex_package_detected = ''
+ call Tex_pack_all(fname)
+ call Tex_Debug('updateall: detected = '.g:Tex_package_detected)
+
+ " Now only support packages we didn't last time.
+ " First remove packages which were used last time but are no longer used.
+ let i = 1
+ let oldPackName = Tex_Strntok(oldpackages, ',', i)
+ while oldPackName != ''
+ if g:Tex_package_detected !~ oldPackName
+ call Tex_pack_uncheck(oldPackName)
+ endif
+ let i = i + 1
+ let oldPackName = Tex_Strntok(oldpackages, ',', i)
+ endwhile
+
+ " Then support packages which are used this time but weren't used last
+ " time.
+ let i = 1
+ let newPackName = Tex_Strntok(g:Tex_package_detected, ',', i)
+ while newPackName != ''
+ if oldpackages !~ newPackName
+ call Tex_pack_one(newPackName)
+ endif
+ let i = i + 1
+ let newPackName = Tex_Strntok(g:Tex_package_detected, ',', i)
+ endwhile
+
+ " Throw an event that we are done scanning packages. Some packages might
+ " use this to change behavior based on which options have been used etc.
+ silent! do LatexSuite User LatexSuiteScannedPackages
endfunction
***************
*** 136,153 ****
" \newcommand lines and adds names to g:Tex_Prompted variables, they can be
" easy available through <F5> and <F7> shortcuts
! function! Tex_pack_all()
let pos = line('.').' | normal! '.virtcol('.').'|'
let currfile = expand('%:p')
- if Tex_GetMainFileName() != ''
- let fname = Tex_GetMainFileName(':p:r')
- else
- let fname = currfile
- endif
-
let toquit = 0
! if fname != currfile
! exe 'split '.fname
let toquit = 1
endif
--- 181,192 ----
" \newcommand lines and adds names to g:Tex_Prompted variables, they can be
" easy available through <F5> and <F7> shortcuts
! function! Tex_pack_all(fname)
let pos = line('.').' | normal! '.virtcol('.').'|'
let currfile = expand('%:p')
let toquit = 0
! if a:fname != currfile
! exe 'split '.a:fname
let toquit = 1
endif
***************
*** 212,222 ****
let @a = substitute(@a, ',', '","', 'g')
- " ... so it can be used using one exec statement. Take care not to
- " call things with an empty argument otherwise, we will get a prompt
- " from the Tex_pack_one function.
- if @a != ''
- exec 'call Tex_pack_one('.@a.')'
- endif
-
" restore @a
let @a = saveA
--- 251,254 ----
***************
*** 474,478 ****
call Tex_pack_supp_menu()
! call Tex_pack_all()
endif
--- 506,510 ----
call Tex_pack_supp_menu()
! call Tex_pack_updateall()
endif
|
|
From: <sri...@us...> - 2003-01-17 06:42:59
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv32303
Modified Files:
templates.vim
Log Message:
- Use Tex_ChooseFromPrompt instead of Tex_ChooseFile
- Use Tex_pack_updateall instead of Tex_pack_all
Index: templates.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/templates.vim,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** templates.vim 12 Jan 2003 22:02:40 -0000 1.9
--- templates.vim 17 Jan 2003 06:37:08 -0000 1.10
***************
*** 46,55 ****
let pwd = getcwd()
exe 'cd '.s:path.'/templates'
! let filename = Tex_ChooseFile('Choose a template file:')
exe 'cd '.pwd
endif
let fname = glob(s:path."/templates/".filename)
! exe "0read ".fname
" The first line of the file contains the specifications of what the
" placeholder characters and the other special characters are.
--- 46,59 ----
let pwd = getcwd()
exe 'cd '.s:path.'/templates'
! let filename =
! \ Tex_ChooseFromPrompt("Choose a template file:\n" .
! \ Tex_CreatePrompt(glob('*'), 2, "\n") .
! \ "\nEnter number or name of file :",
! \ glob('*'), "\n")
exe 'cd '.pwd
endif
let fname = glob(s:path."/templates/".filename)
! silent! exe "0read ".fname
" The first line of the file contains the specifications of what the
" placeholder characters and the other special characters are.
***************
*** 66,70 ****
0 d _
! call Tex_pack_all()
endfunction
--- 70,74 ----
0 d _
! call Tex_pack_updateall()
endfunction
|