vim-latex-cvs Mailing List for Vim-Latex (Page 27)
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: Benji F. <be...@me...> - 2003-01-14 23:18:43
|
sri...@us... wrote: > Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages > In directory sc8-pr-cvs1:/tmp/cvs-serv27241a > > Added Files: > german > Log Message: > - defining the german quotes here... This makes any file in which > \usepackage{german} is detected use "` and '" as the quote characters... > > > --- NEW FILE: german --- > " For now just define the smart quotes. > let g:Tex_SmartQuoteOpen = '"`' > let g:Tex_SmartQuoteClose = "'\"" > > " vim:ft=vim:ff=unix: OK, this will be simpler than what I had in mind. Better make these variables buffer-local, then modify TexQuotes() to use the usual buffer, global, default system. Remember, I may edit one German file, then switch to English in another file in the same session. I will do this tomorrow if you do not beat me to it. --Benji |
From: <sri...@us...> - 2003-01-14 23:00:10
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages In directory sc8-pr-cvs1:/tmp/cvs-serv27241a Added Files: german Log Message: - defining the german quotes here... This makes any file in which \usepackage{german} is detected use "` and '" as the quote characters... --- NEW FILE: german --- " For now just define the smart quotes. let g:Tex_SmartQuoteOpen = '"`' let g:Tex_SmartQuoteClose = "'\"" " vim:ft=vim:ff=unix: |
From: <sri...@us...> - 2003-01-14 22:51:22
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv26116 Modified Files: main.vim Log Message: - Problem with last commit. Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** main.vim 14 Jan 2003 22:46:56 -0000 1.29 --- main.vim 14 Jan 2003 22:51:19 -0000 1.30 *************** *** 150,154 **** call IMAP('``'.nr2char(i), '``'.nr2char(i), 'tex') call IMAP('\`'.nr2char(i), '\`'.nr2char(i), 'tex') ! call IMAP('"`'.nr2char(i), '\`'.nr2char(i), 'tex') endif let i = i + 1 --- 150,154 ---- call IMAP('``'.nr2char(i), '``'.nr2char(i), 'tex') call IMAP('\`'.nr2char(i), '\`'.nr2char(i), 'tex') ! call IMAP('"`'.nr2char(i), '"`'.nr2char(i), 'tex') endif let i = i + 1 |
From: <sri...@us...> - 2003-01-14 22:46:59
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv25545 Modified Files: main.vim Log Message: - expansion of `g to \gamma makes writing german quotes difficult because correct german quotes are "` and '". Protect this expansion as well... TODO: This seems to getting wierd. A better way would have been to check for math mode. But how to do that? Checking for synIDattr() =~? 'math' is not good enough because \cite and \sum are both 'texStatement's. TODO: Is this getting too annoying to be left enabled by default? Benji suggests disabling this by default. Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** main.vim 14 Jan 2003 13:41:26 -0000 1.28 --- main.vim 14 Jan 2003 22:46:56 -0000 1.29 *************** *** 141,144 **** --- 141,145 ---- " ``[aA] -> ``[aA] (for writing in quotations) " \`[aA] -> \`[aA] (for writing diacritics) + " "`[aA] -> "`[aA] (for writing german quotations) " It does this for all printable lower ascii characters just to make sure " we dont let anything slip by. *************** *** 149,152 **** --- 150,154 ---- call IMAP('``'.nr2char(i), '``'.nr2char(i), 'tex') call IMAP('\`'.nr2char(i), '\`'.nr2char(i), 'tex') + call IMAP('"`'.nr2char(i), '\`'.nr2char(i), 'tex') endif let i = i + 1 |
From: <mi...@us...> - 2003-01-14 22:02:44
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv19595 Modified Files: packages.vim Log Message: - previously created g:Tex_package_detected had a form: inputencgeometrypolski Not declared: inputenc,geometry,polski. Fixed. - Last command in package file (without , at the end) was losing last letter. Fixed by adding , to commandList - Don't create separator if command and option lists in package file are empty. Rare but possible. Index: packages.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** packages.vim 14 Jan 2003 13:40:39 -0000 1.21 --- packages.vim 14 Jan 2003 22:02:42 -0000 1.22 *************** *** 176,180 **** " TODO: This will contain duplicates if the user has duplicates. " Should we bother taking care of this? ! let g:Tex_package_detected = g:Tex_package_detected.@a " Finally convert @a into something like '"pack1","pack2"' --- 176,180 ---- " TODO: This will contain duplicates if the user has duplicates. " Should we bother taking care of this? ! let g:Tex_package_detected = g:Tex_package_detected.','.@a " Finally convert @a into something like '"pack1","pack2"' *************** *** 194,197 **** --- 194,201 ---- endwhile + " Because creating list of detected packages gives string + " ',pack1,pack2,pack3' remove leading , + let g:Tex_package_detected = substitute(g:Tex_package_detected, '^,', '', '') + " Scans whole file (up to \end{document}) for \newcommand and adds this " commands to g:Tex_PromptedCommands variable, it is easily available *************** *** 256,261 **** if exists('g:TeX_package_'.a:pack) - exec 'amenu '.g:Tex_PackagesMenuLocation.'-sep'.a:pack.'- <Nop>' let optionList = g:TeX_package_option_{a:pack}.',' if optionList != '' --- 260,271 ---- if exists('g:TeX_package_'.a:pack) let optionList = g:TeX_package_option_{a:pack}.',' + let commandList = g:TeX_package_{a:pack}.',' + + " Don't create separator if in package file are only Vim commands. + " Rare but possible. + if !(commandList == ',' && optionList == ',') + exec 'amenu '.g:Tex_PackagesMenuLocation.'-sep'.a:pack.'- <Nop>' + endif if optionList != '' *************** *** 267,271 **** endif - let commandList = g:TeX_package_{a:pack} if commandList != '' --- 277,280 ---- |
From: <mi...@us...> - 2003-01-14 22:01:25
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages In directory sc8-pr-cvs1:/tmp/cvs-serv19402 Added Files: textfit Log Message: new package file --- NEW FILE: textfit --- let g:TeX_package_option_textfit = '' let g:TeX_package_textfit = \ 'brd:scaletowidth,' \.'brd:scaletoheight' " vim:ft=vim:ff=unix: |
From: <mi...@us...> - 2003-01-14 22:01:08
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages In directory sc8-pr-cvs1:/tmp/cvs-serv19338 Modified Files: manyfoot Log Message: change in layout of file to make it compatible with the rest of package files Index: manyfoot =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/manyfoot,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** manyfoot 5 Jan 2003 21:47:08 -0000 1.3 --- manyfoot 14 Jan 2003 22:01:05 -0000 1.4 *************** *** 1,9 **** - let g:TeX_package_manyfoot = 'bra:newfootnote,bra:newfootnote[para],' - \ . 'bra:footnoteA,bra:footnoteB,' - \ . 'bra:FootnoteA,bra:FootnoteB,' - \ . 'bra:Footnotemark,bra:Footnotetext,' - \ . 'SplitNote' - let g:TeX_package_option_manyfoot = 'para' " vim:ft=vim:ff=unix: --- 1,10 ---- let g:TeX_package_option_manyfoot = 'para' + + let g:TeX_package_manyfoot = + \ 'bra:newfootnote,bra:newfootnote[para],' + \.'bra:footnoteA,bra:footnoteB,' + \.'bra:FootnoteA,bra:FootnoteB,' + \.'bra:Footnotemark,bra:Footnotetext,' + \.'SplitNote' " vim:ft=vim:ff=unix: |
From: <mi...@us...> - 2003-01-14 22:00:24
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages In directory sc8-pr-cvs1:/tmp/cvs-serv19159 Modified Files: numprint version oldstyle Log Message: critical bugs - missing dot contacenating (WTH is spelling of this word?) string Index: numprint =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/numprint,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** numprint 5 Jan 2003 21:47:08 -0000 1.1 --- numprint 14 Jan 2003 22:00:22 -0000 1.2 *************** *** 3,13 **** let g:TeX_package_numprint = \ 'bra:numprint,' ! \ 'nob:numprint,' ! \ 'bra:thousandsep,' ! \ 'bra:decimalsign,' ! \ 'bra:productsign,' ! \ 'bra:unitseparator,' ! \ 'brd:expnumprint,' ! \ 'global' " vim:ft=vim:ff=unix: --- 3,13 ---- let g:TeX_package_numprint = \ 'bra:numprint,' ! \.'nob:numprint,' ! \.'bra:thousandsep,' ! \.'bra:decimalsign,' ! \.'bra:productsign,' ! \.'bra:unitseparator,' ! \.'brd:expnumprint,' ! \.'global' " vim:ft=vim:ff=unix: Index: version =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/version,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** version 5 Jan 2003 21:47:08 -0000 1.1 --- version 14 Jan 2003 22:00:22 -0000 1.2 *************** *** 3,7 **** let g:TeX_package_version = \ 'bra:includeversion,' ! \ 'bra:excludeversion' " vim:ft=vim:ff=unix: --- 3,7 ---- let g:TeX_package_version = \ 'bra:includeversion,' ! \.'bra:excludeversion' " vim:ft=vim:ff=unix: Index: oldstyle =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages/oldstyle,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** oldstyle 5 Jan 2003 21:47:08 -0000 1.1 --- oldstyle 14 Jan 2003 22:00:22 -0000 1.2 *************** *** 3,7 **** let g:TeX_package_oldstyle = \ 'bra:textos,' ! \ 'bra:mathos' " vim:ft=vim:ff=unix: --- 3,7 ---- let g:TeX_package_oldstyle = \ 'bra:textos,' ! \.'bra:mathos' " vim:ft=vim:ff=unix: |
From: Srinath A. <sr...@fa...> - 2003-01-14 19:24:58
|
Well, a quick overview of your changes to envmacros.vim reveals the following code: if !exists('s:common_com_prompt') call SetUpCommandPrompt() endif in PromptForCommand()... Which ofcourse means that s:common_com_prompt is initialized only once! Also, could you please verify that you have tested the new functionality you have added? I am going to be fixing the "`g problem which was recently reported and will make a release, but don't want to do it if there are still bugs you know about... HTH Srinath On Tue, 14 Jan 2003, Mikolaj Machowski wrote: > On Tue, Jan 14, 2003 at 09:24:24AM -0500, Benji Fisher wrote: > > >- Updating is based on g:Tex_...Default, whole scanning is done from > > > nil, thus it should work for removing \new..., but it doesn't work :( > > > It looks like SetUp...Prompt uses some cached values. > > I did not follow that. If you need help with this, please state > > the problem more explicitly. > > 1. Open file with some \newcommand or \newenvironment commands. > 2. :echo g:Tex_PromptedCommands > 3. Press <F7>. You will see menu. In this menu you will see also > commands defined with \newcommand (the same commands should be in 2.) > 4. Delete or comment one of \newcommand lines. > 5. Make TeX-Packages->UpdateAll > 6. :echo g:Tex_PromptedCommands > you will see, command defined in deleted line(s) does not appear > there > 7. Press <F7>. You will see the same menu as in 2. > > Mikolaj > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Take your first step towards giving > your online business a competitive advantage. Test-drive a Thawte SSL > certificate - our easy online guide will show you how. Click here to get > started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en > _______________________________________________ > Vim-latex-cvs mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-cvs > > |
From: Srinath A. <sr...@fa...> - 2003-01-14 18:42:12
|
On Tue, 14 Jan 2003 mi...@us... wrote: > > - Now you can use two-digit values in SetUpPrompt menus '^[0-9][0-9]$' > I am confused with this... > *************** > *** 530,534 **** > > let inp = input(a:ask.s:common_env_prompt) > ! if inp =~ '^[0-9]$' > let env = Tex_Strntok(g:Tex_PromptedEnvironments, ',', inp) > else > --- 531,535 ---- > > let inp = input(a:ask.s:common_env_prompt) > ! if inp =~ '^[0-9][0-9]$' > let env = Tex_Strntok(g:Tex_PromptedEnvironments, ',', inp) > else Does this mean that if the user has to enter '09' or something similar to say '9'. Dont have time to test but I am reasonably sure this creates a bug. Shouldn't this be: > ! if inp =~ '^[0-9]\+$' ? Please test... Srinath |
From: Mikolaj M. <mi...@wp...> - 2003-01-14 18:35:15
|
On Tue, Jan 14, 2003 at 09:24:24AM -0500, Benji Fisher wrote: > >- Updating is based on g:Tex_...Default, whole scanning is done from > > nil, thus it should work for removing \new..., but it doesn't work :( > > It looks like SetUp...Prompt uses some cached values. > I did not follow that. If you need help with this, please state > the problem more explicitly. 1. Open file with some \newcommand or \newenvironment commands. 2. :echo g:Tex_PromptedCommands 3. Press <F7>. You will see menu. In this menu you will see also commands defined with \newcommand (the same commands should be in 2.) 4. Delete or comment one of \newcommand lines. 5. Make TeX-Packages->UpdateAll 6. :echo g:Tex_PromptedCommands you will see, command defined in deleted line(s) does not appear there 7. Press <F7>. You will see the same menu as in 2. Mikolaj |
From: Benji F. <be...@me...> - 2003-01-14 14:14:12
|
mi...@us... wrote: > Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite > In directory sc8-pr-cvs1:/tmp/cvs-serv19148 > > Modified Files: > packages.vim > Log Message: > - Added to Tex_pack_all() scanning for \newenvironment and \newcommand > lines and adds new names to g:Tex_Prompted variables. > - Updating is based on g:Tex_...Default, whole scanning is done from > nil, thus it should work for removing \new..., but it doesn't work :( > It looks like SetUp...Prompt uses some cached values. I did not follow that. If you need help with this, please state the problem more explicitly. --Benji |
From: <mi...@us...> - 2003-01-14 13:41:30
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv19195 Modified Files: main.vim Log Message: - Added section in SetTeXOptions about TexPromptedCommands Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** main.vim 12 Jan 2003 22:02:39 -0000 1.27 --- main.vim 14 Jan 2003 13:41:26 -0000 1.28 *************** *** 485,488 **** --- 485,491 ---- call Tex_SetFastEnvironmentMaps() endif + if g:Tex_PromptedCommands != '' + call Tex_SetFastCommandMaps() + endif " viewing/searching |
From: <mi...@us...> - 2003-01-14 13:41:00
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv19225 Modified Files: texrc Log Message: - Added short description of g:Tex_PromptedCommands and basic TexLet value Index: texrc =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** texrc 12 Jan 2003 22:02:40 -0000 1.19 --- texrc 14 Jan 2003 13:40:56 -0000 1.20 *************** *** 366,369 **** --- 366,377 ---- \ 'eqnarray*,eqnarray,bmatrix' + " Similar to above mechanisms works <F7> key. It prompts for command with list + " of commands from g:Tex_PromptedCommands. There are not HotKeys for commands. + " It works for commands of style \com{}. Changing of current command is done + " with <S-F7> + + TexLet g:Tex_PromptedCommands = + \ 'footnote,cite,pageref,label' + " }}} " Smart Key Mappings: {{{ |
From: <mi...@us...> - 2003-01-14 13:40:48
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv19108 Modified Files: envmacros.vim Log Message: - Implementation of Fast Environment set of macros for LaTeX commands - Basically these are the same functions but rewritten to work for commands - there are some oddities thus I decided to separate it functionality from env macro - it is easier to read code. Maybe integrate it later. - New mapping <F7> and <S-F7> to insert and change command name from menu. It works properly only for \com{} style commands (not for $ and \( ) - There is one strange thing about updating g:Tex_PromptedCommands/Environments (more about updating in log for packages.vim). When I run UpdateAll string g:Tex_PromptedCommands is corrected, but it looks like SetUpCommandPrompt still use old value of variable. - Now you can use two-digit values in SetUpPrompt menus '^[0-9][0-9]$' Index: envmacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** envmacros.vim 11 Jan 2003 20:42:02 -0000 1.22 --- envmacros.vim 14 Jan 2003 13:40:44 -0000 1.23 *************** *** 504,507 **** --- 504,508 ---- " Description: " + let g:Tex_PromptedEnvironmentsDefault = g:Tex_PromptedEnvironments function! SetUpEnvironmentsPrompt() let num_common = GetListCount(g:Tex_PromptedEnvironments) *************** *** 530,534 **** let inp = input(a:ask.s:common_env_prompt) ! if inp =~ '^[0-9]$' let env = Tex_Strntok(g:Tex_PromptedEnvironments, ',', inp) else --- 531,535 ---- let inp = input(a:ask.s:common_env_prompt) ! if inp =~ '^[0-9][0-9]$' let env = Tex_Strntok(g:Tex_PromptedEnvironments, ',', inp) else *************** *** 862,867 **** endfunction " }}} " this statement has to be at the end. let s:doneOnce = 1 ! " vim:fdm=marker:nowrap:noet --- 863,1079 ---- endfunction " }}} + " ============================================================================== + " Implementation of Fast Environment commands for LaTeX commands + " ============================================================================== + " SetUpCommandPrompt: sets up a prompt string using g:Tex_PromptedCommands {{{ + " Description: + " + + " This variable is default string for promting useful with updating new + " commands + let g:Tex_PromptedCommandsDefault = g:Tex_PromptedCommands + + function! SetUpCommandPrompt() + let num_common = GetListCount(g:Tex_PromptedCommands) + + let i = 1 + let s:common_com_prompt = "\n" + + while i < num_common + + let com1 = Tex_Strntok(g:Tex_PromptedCommands, ',', i) + let com2 = Tex_Strntok(g:Tex_PromptedCommands, ',', i + 1) + + let s:common_com_prompt = s:common_com_prompt.'('.i.') '.com1."\t".( strlen(com1) < 4 ? "\t" : '' ).'('.(i+1).') '.com2."\n" + + let i = i + 2 + endwhile + let s:common_com_prompt = s:common_com_prompt.'Enter number or name of command: ' + endfunction " }}} + " PromptForCommand: prompts for a command {{{ + " Description: + function! PromptForCommand(ask) + + if !exists('s:common_com_prompt') + call SetUpCommandPrompt() + endif + + let inp = input(a:ask.s:common_com_prompt) + if inp =~ '^[0-9][0-9]$' + let com = Tex_Strntok(g:Tex_PromptedCommands, ',', inp) + else + let com = inp + endif + + return com + endfunction " }}} + " Tex_DoCommand: fast insertion of commands {{{ + " Description: + " + function! Tex_DoCommand(...) + if a:0 < 1 + let com = PromptForCommand('Choose which command to insert: ') + if com != '' + return Tex_PutCommand(com) + else + return '' + endif + else + return Tex_PutCommand(a:1) + endif + endfunction " }}} + " Tex_PutCommand: calls various specialized functions {{{ + " Description: + " Based on input argument, it calls various specialized functions. + function! Tex_PutCommand(com) + + if exists("s:isvisual") && s:isvisual == "yes" + + let s:isvisual = 'no' + + if a:com == '$' + return VEnclose('$', '$', '$', '$') + elseif a:com == '\\(' + return VEnclose('\\(', '\\)', '\\(', '\\)') + else + return VEnclose("\\".a:com.'{', '}', "\\".a:com.'{', '}') + endif + + else + + if a:com == '$' + return IMAP_PutTextWithMovement('$<++>$') + else + return IMAP_PutTextWithMovement("\\".a:com.'{<++>}<++>') + endif + + endif + + endfunction " }}} + " Mapping the <F7> key to prompt/insert for command {{{ + " and <S-F7> to prompt/replace command + " + " g:Tex_PromptedCommands is a variable containing a comma seperated list + " of commands. + " + " Leaving this empty is equivalent to disabling the feature. + if g:Tex_PromptedCommands != '' + + let b:DoubleDollars = 0 + + " Provide only <plug>s here. main.vim will create the actual maps. + inoremap <silent> <Plug>Tex_FastCommandInsert <C-r>=Tex_FastCommandInsert('no')<cr> + nnoremap <silent> <Plug>Tex_FastCommandInsert i<C-r>=Tex_FastCommandInsert('no')<cr> + inoremap <silent> <Plug>Tex_FastCommandChange <C-O>:call Tex_ChangeCommand('no')<CR> + nnoremap <silent> <Plug>Tex_FastCommandChange :call Tex_ChangeCommand('no')<CR> + vnoremap <silent> <Plug>Tex_FastCommandInsert <C-\><C-N>:call Tex_FastCommandInsert('yes')<CR> + + " Tex_FastEnvironmentInsert: maps <F7> to prompt for command and insert it " {{{ + " Description: + " Here we are not solving if we are in preamble, behaviour is always the + " same. + " + function! Tex_FastCommandInsert(isvisual) + + let start_line = line('.') + let pos = line('.').' | normal! '.virtcol('.').'|' + let s:isvisual = a:isvisual + + return Tex_DoCommand() + + endfunction + + " }}} + " Tex_ChangeEnvironments: calls ChangeCommand() to change the environment {{{ + " Description: + " Finds out which environment the cursor is positioned in and changes + " that to the chosen new environment. This function knows the changes + " which need to be made to change one env to another and calls + " ChangeCommand() with the info. + " + function! Tex_ChangeCommand(isvisual) + + let s:pos_com = line('.').' | normal! '.virtcol('.').'|' + + let com_line = searchpair('$\|\\(\|\\\k\{-}{', '', '$\|\\)\|}', 'b') + + if com_line != 0 + if getline(com_line) !~ '\\\k\{-}{' + let com_name = '$' + else + normal l + let com_name = expand('<cword>') + endif + endif + + if !exists('com_name') + echomsg "You are not inside command" + return 0 + endif + + exe 'echomsg "You are within a '.com_name.' command."' + let s:change_com = PromptForCommand('Do you want to change it to (number or name)? ') + + if s:change_com == '$' + call <SID>ChangeCommand('$') + elseif s:change_com == '\\(' + call <SID>ChangeCommand('\\(') + elseif s:change_com == '' + return 0 + else + call <SID>ChangeCommand(s:change_com) + return 0 + endif + + endfunction + + " ChangeCommand: Changes current command according to prompt menu {{{ + " Description: + " + function! s:ChangeCommand(newcom) + + " For now no special treatment form math commands, left loose ends for + " future. + if a:newcom == '$' + return 0 + elseif a:newcom == '\\(' + return 0 + else + exe 'normal ct{'.a:newcom."\<Esc>" + exe s:pos_com + endif + + 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 + + " }}} + + " }}} " this statement has to be at the end. let s:doneOnce = 1 ! " vim:fdm=marker:nowrap:noet:ff=unix |
From: <mi...@us...> - 2003-01-14 13:40:43
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv19148 Modified Files: packages.vim Log Message: - Added to Tex_pack_all() scanning for \newenvironment and \newcommand lines and adds new names to g:Tex_Prompted variables. - Updating is based on g:Tex_...Default, whole scanning is done from nil, thus it should work for removing \new..., but it doesn't work :( It looks like SetUp...Prompt uses some cached values. Index: packages.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** packages.vim 12 Jan 2003 22:02:40 -0000 1.20 --- packages.vim 14 Jan 2003 13:40:39 -0000 1.21 *************** *** 124,127 **** --- 124,130 ---- " and if supported, loads the options and commands found in the " corresponding package file. + " Now scans also for \newenvironment and \newcommand lines and adds names to + " g:Tex_Prompted variables, they can be easy available through <F5> and <F7> + " shortcuts function! Tex_pack_all() *************** *** 143,146 **** --- 146,150 ---- 0 let beginline = search('\\begin{document}', 'W') + let endline = search('\\end{document}', 'W') 0 *************** *** 189,192 **** --- 193,230 ---- endwhile + + " Scans whole file (up to \end{document}) for \newcommand and adds this + " commands to g:Tex_PromptedCommands variable, it is easily available + " through <F7> + 0 + let s:Tex_LookForCommand = g:Tex_PromptedCommandsDefault + while search('^\s*\\newcommand\*\?{.\{-}}', 'W') + + if line('.') > endline + break + endif + + let newcommand = matchstr(getline('.'), '\\newcommand\*\?{\\\zs.\{-}\ze}') + let s:Tex_LookForCommand = s:Tex_LookForCommand . ',' . newcommand + + endwhile + let g:Tex_PromptedCommands = s:Tex_LookForCommand + + " Scans whole file (up to \end{document}) for \newenvironment and adds this + " environments to g:Tex_PromptedEnvironments variable, it is easily available + " through <F5> + 0 + let s:Tex_LookForEnvironment = g:Tex_PromptedEnvironmentsDefault + while search('^\s*\\newenvironment\*\?{.\{-}}', 'W') + + if line('.') > endline + break + endif + + let newenvironment = matchstr(getline('.'), '\\newenvironment\*\?{\zs.\{-}\ze}') + let s:Tex_LookForEnvironment = s:Tex_LookForEnvironment . ',' . newenvironment + + endwhile + let g:Tex_PromptedEnvironments = s:Tex_LookForEnvironment if toquit |
From: <mi...@us...> - 2003-01-12 22:02:43
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv10593 Modified Files: bibtex.vim compiler.vim custommacros.vim diacritics.vim elementmacros.vim folding.vim main.vim mathmacros.vim packages.vim templates.vim texmenuconf.vim wizardfuncs.vim texrc Log Message: unification of modelines (especially ff=unix) and removing Last Change lines Index: bibtex.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/bibtex.vim,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bibtex.vim 22 Dec 2002 03:00:37 -0000 1.3 --- bibtex.vim 12 Jan 2003 22:02:36 -0000 1.4 *************** *** 3,7 **** " Function: BibT " Author: Alan G Isaac <ai...@am...> - " Last Change: Thu Dec 19 03:00 AM 2002 PST "============================================================================= --- 3,6 ---- *************** *** 268,270 **** " }}} ! " vim:fdm=marker --- 267,269 ---- " }}} ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: compiler.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** compiler.vim 2 Dec 2002 19:25:29 -0000 1.18 --- compiler.vim 12 Jan 2003 22:02:37 -0000 1.19 *************** *** 3,7 **** " Author: Srinath Avadhanula " Created: Tue Apr 23 05:00 PM 2002 PST - " Last Change: Thu Nov 28 01:00 AM 2002 PST " " Description: functions for compiling/viewing/searching latex documents --- 3,6 ---- *************** *** 408,410 **** endfunction " }}} ! " vim:fdm=marker:ts=4:sw=4 --- 407,409 ---- endfunction " }}} ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: custommacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/custommacros.vim,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** custommacros.vim 30 Dec 2002 00:23:53 -0000 1.11 --- custommacros.vim 12 Jan 2003 22:02:38 -0000 1.12 *************** *** 4,8 **** " Version: 1.0 " Created: Tue Apr 23 05:00 PM 2002 PST - " Last Change: Sun Dec 29 04:00 PM 2002 PST " " Description: functions for processing custom macros in the --- 4,7 ---- *************** *** 137,139 **** " }}} ! " vim:fdm=marker:ts=4:sw=4:noet --- 136,138 ---- " }}} ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: diacritics.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/diacritics.vim,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** diacritics.vim 22 Dec 2002 03:00:38 -0000 1.3 --- diacritics.vim 12 Jan 2003 22:02:39 -0000 1.4 *************** *** 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. --- 3,6 ---- *************** *** 123,125 **** call IMAP ('+:', "\\^{o}", 'tex') ! " vim:fdm=marker:ts=4:sw=4:noet --- 122,124 ---- call IMAP ('+:', "\\^{o}", 'tex') ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: elementmacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/elementmacros.vim,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** elementmacros.vim 22 Dec 2002 03:00:41 -0000 1.6 --- elementmacros.vim 12 Jan 2003 22:02:39 -0000 1.7 *************** *** 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. --- 3,6 ---- *************** *** 337,339 **** let s:doneOnce = 1 ! " vim:fdm=marker:ts=4:sw=4:noet --- 336,338 ---- let s:doneOnce = 1 ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: folding.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/folding.vim,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** folding.vim 30 Dec 2002 09:04:39 -0000 1.8 --- folding.vim 12 Jan 2003 22:02:39 -0000 1.9 *************** *** 4,8 **** " Version: 1.0 " Created: Tue Apr 23 05:00 PM 2002 PST - " Last Change: Mon Dec 30 01:00 AM 2002 PST " " Description: functions to interact with Syntaxfolds.vim --- 4,7 ---- *************** *** 248,250 **** " }}} ! " vim:fdm=marker:ts=4:sw=4:noet --- 247,249 ---- " }}} ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** main.vim 11 Jan 2003 08:25:12 -0000 1.26 --- main.vim 12 Jan 2003 22:02:39 -0000 1.27 *************** *** 513,515 **** let &cpo = s:save_cpo ! " vim:fdm=marker:nowrap:noet:ts=4:sw=4 --- 513,515 ---- let &cpo = s:save_cpo ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4:nowrap Index: mathmacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/mathmacros.vim,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mathmacros.vim 22 Dec 2002 03:00:46 -0000 1.4 --- mathmacros.vim 12 Jan 2003 22:02:40 -0000 1.5 *************** *** 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. --- 3,6 ---- *************** *** 693,695 **** " 1}}} ! " vim:fdm=marker:ts=4:sw=4:noet --- 692,694 ---- " 1}}} ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: packages.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** packages.vim 5 Jan 2003 02:19:26 -0000 1.19 --- packages.vim 12 Jan 2003 22:02:40 -0000 1.20 *************** *** 3,7 **** " Author: Mikolaj Machowski " Created: Tue Apr 23 06:00 PM 2002 PST - " Last Change: Sat Jan 04 06:00 PM 2003 PST " " Description: handling packages from within vim --- 3,6 ---- *************** *** 402,404 **** endif ! " vim:fdm=marker:ts=4:sw=4:noet:fo-=wa1 --- 401,403 ---- endif ! " vim:fdm=marker:ts=4:sw=4:noet:ff=unix Index: templates.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/templates.vim,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** templates.vim 23 Dec 2002 01:59:18 -0000 1.8 --- templates.vim 12 Jan 2003 22:02:40 -0000 1.9 *************** *** 5,9 **** " Version: 1.0 " Created: Tue Apr 23 05:00 PM 2002 PST - " Last Change: Sun Dec 22 05:00 PM 2002 PST " " Description: functions for handling templates in latex-suite/templates --- 5,8 ---- *************** *** 114,116 **** \| :startinsert ! " vim:fdm=marker:ts=4:sw=4:noet --- 113,115 ---- \| :startinsert ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: texmenuconf.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texmenuconf.vim,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** texmenuconf.vim 11 Nov 2002 08:55:52 -0000 1.6 --- texmenuconf.vim 12 Jan 2003 22:02:40 -0000 1.7 *************** *** 4,10 **** " Description: " - " Installation: - " Last Change: Mon Nov 11 12:00 AM 2002 PST - " TODO: "============================================================================= --- 4,7 ---- *************** *** 127,129 **** endif ! " vim6:fdm=marker --- 124,126 ---- endif ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: wizardfuncs.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/wizardfuncs.vim,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wizardfuncs.vim 22 Dec 2002 03:00:51 -0000 1.6 --- wizardfuncs.vim 12 Jan 2003 22:02:40 -0000 1.7 *************** *** 1,5 **** " File: wizardfuncs.vim " Author: Mikolaj Machowski <mi...@wp...> - " Last change: wto lis 12 09:00 2002 C " Description: " --- 1,4 ---- *************** *** 7,11 **** " History: pluginized by Srinath Avadhanula " ( sr...@fa...) - " TODO: "============================================================================= --- 6,9 ---- *************** *** 201,203 **** " normal f}i endfunction "}}} ! " vim:fdm=marker --- 199,202 ---- " normal f}i endfunction "}}} ! ! " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 Index: texrc =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** texrc 5 Jan 2003 04:39:31 -0000 1.18 --- texrc 12 Jan 2003 22:02:40 -0000 1.19 *************** *** 1,8 **** "============================================================================= ! " vim:ft=vim:ts=4:sw=4:noet:fdm=marker:commentstring=\"\ %s " File: texrc.vim " Author: Srinath Avadhanula " Created: Mon Apr 01 11:00 AM 2002 PST - " Last Change: Sat Jan 04 08:00 PM 2003 PST " " Description: This file contains resource configuration information for the --- 1,7 ---- "============================================================================= ! " vim:ft=vim:ts=4:sw=4:noet:fdm=marker:commentstring=\"\ %s:ff=unix " File: texrc.vim " Author: Srinath Avadhanula " Created: Mon Apr 01 11:00 AM 2002 PST " " Description: This file contains resource configuration information for the |
From: <sri...@us...> - 2003-01-11 20:42:05
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv9165 Modified Files: envmacros.vim Log Message: bug - s:visual was not unset after the call to Tex_PutEnvironment. This cased successive menu items to all regard s:isvisual = 'yes', causing stuff to break. Index: envmacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** envmacros.vim 11 Jan 2003 20:09:40 -0000 1.21 --- envmacros.vim 11 Jan 2003 20:42:02 -0000 1.22 *************** *** 569,572 **** --- 569,573 ---- function! Tex_PutEnvironment(env) if exists("s:isvisual") && s:isvisual == "yes" + let s:isvisual = 'no' if a:env == '\[' return VEnclose('', '', '\[', '\]') |
From: <mi...@us...> - 2003-01-11 20:09:43
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv21015 Modified Files: envmacros.vim Log Message: Fixed problem with undefined s:isvisual in Tex_PutEnvironment by testing with exists() Index: envmacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** envmacros.vim 10 Jan 2003 05:33:42 -0000 1.20 --- envmacros.vim 11 Jan 2003 20:09:40 -0000 1.21 *************** *** 568,572 **** " Based on input argument, it calls various specialized functions. function! Tex_PutEnvironment(env) ! if s:isvisual == "yes" if a:env == '\[' return VEnclose('', '', '\[', '\]') --- 568,572 ---- " Based on input argument, it calls various specialized functions. function! Tex_PutEnvironment(env) ! if exists("s:isvisual") && s:isvisual == "yes" if a:env == '\[' return VEnclose('', '', '\[', '\]') |
From: <sri...@us...> - 2003-01-11 09:05:42
|
Update of /cvsroot/vim-latex/vimfiles/doc In directory sc8-pr-cvs1:/tmp/cvs-serv30863 Modified Files: newlatex-suite.txt Log Message: - temporary commit. Index: newlatex-suite.txt =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/newlatex-suite.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** newlatex-suite.txt 11 Jan 2003 08:42:27 -0000 1.1 --- newlatex-suite.txt 11 Jan 2003 09:05:39 -0000 1.2 *************** *** 1,14 **** Inserting text ! |ls-environments|---------- : environments (``\begin{center} \end{center}'', etc) ! |ls-fonts|----------------- : fonts (\emph{}) ! |ls-sections|-------------- : \section, \subsection etc. ! |ls-greek|----------------- : greek letters ! |ls-math|------------------ : mathematical symbols ! |ls-brackets|-------------- : \left \right etc. ! |ls-smartkeys|------------- : '...' becomes '\dots' etc. ! |ls-templates| ------------ : starting a latex file ! |ls-custommacros| --------- : inserting macros from files ! |ls-bibtex|---------------- : inserting bibtex entry templates Compiling --- 1,24 ---- + =========================================================================== + TABLE OF CONTENTS *latex-suite-toc* {{{ + *latex-suite* Inserting text ! |ls-macros|---------------- : overview of Latex-suite macros ! |ls-environments|-------- : environments (``\begin{center} \end{center}'', etc) ! |ls-fonts|--------------- : fonts (\emph{}) ! |ls-common|-------------- : common shortcuts (`/ becomes \frac{}{}) ! |ls-sections|------------ : \section, \subsection etc. ! |ls-greek|--------------- : greek letters ! |ls-diacritics|---------- : greek letters ! |ls-math-menu|----------- : menu of mathematical symbols ! |ls-brackets|------------ : \left \right etc. ! |ls-smartkeys|----------- : '...' becomes '\dots' etc. ! |ls-bibtex|-------------- : inserting bibtex entry templates ! ! Latex Templates ! |ls-templates| ---------- : starting a latex file ! ! Custom Macros ! |ls-custommacros| ------- : inserting macros from files Compiling *************** *** 39,42 **** --- 49,949 ---- |ls-options|--------------- : latex-suite options |ls-mappings|-------------- : latex-suite mappings + + }}} + =========================================================================== + LATEX MACROS *latex-macros* {{{ + *ls-macros* + + Latex-Suite ships with a very comprehensive set of insert mode and visual mode + mappings and menu items to typeset most of the LaTeX elements. + + *placeholders* *placeholder* + *place-holder* *place-holders* + All these macros implement Stephen Riem's bracketing system and Gergely + Kontra's JumpFunc() for handling place-holders. This consists of using + "place-holders" to mark off locations where the next relevant editing has to + be done. As an example, when the user types in "EFI" in insert mode, she will + get the following: > + + \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. + + NOTE: These mappings are are not standard mappings in the sense that only the + last character is mapped. See plugin/imaps.vim for further documentation. For + example, in the example above, you can press the characters 'E', 'F' and 'I' + as slowly as you wish. The characters are visible as you type them and you can + use the movement or backspace key to correct yourself unlike normal mappings. + + The macros can be divided into the following main categories: + --------------------------------------------------------------------------- + Environment Mappings *ls-environments* {{{ + + 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 + latex environment, then latex suite might also include common fields + associated with it. + + There are various ways of inserting environments. In order of increasing + difficulty to remember, they are: + + Method 1: + If you press <F5> in the insert mode while on an empty line, latex-suite + prompts you with a list of environments you might want to insert. You can + either choose one from the list or type in a new environment name. This + list can be customized. See the 'Macros' section of the |texrc| file for + details. + + Method 2: + If you press <F5> while on a line containing a single word, then + latex-suite creates a environment of that name. + + Method 3: + The shifted function keys, <S-F1> to <S-F4> can also be optionally mapped + to some common environments which you insert most often. The environments + mapped to each key can also be customized. See the |texrc| file for + details. + + Method 4: + Environments can also be inserted by pressing a 3 capital letter sequence + starting with an E. The following subsection describes this in detail. The + sequence of 3 letters generally tries to follow the following rules: + + 1. All environment mappings begin with 'E' + + 2. If the environment can be broken up into 2 distinct words, such as + flushright (flush + right), then the next 2 letters are the first + letters of the 2 words. + Example: > + flushleft (_f_lush + _l_eft) ---> EFL + flushright (_f_lush + _r_ight) ---> EFR + eqnarray (_e_qn + _a_rray) ---> EEA + + < If on the other hand, the environment name cannot be broken up into 2 + distinct words, then the next 2 letters are the first 2 letters of the name + of the environment. + Example: > + equation (_eq_uation) ---> EEQ + + < Of course, not every last one of the environments can follow this rule + because of ambiguities. In case of doubt, pull down the + Tex-Environments menu. The menu item should give the hint for the map. + + Along with the insert mode mappings, a set of visual mode mappings is + provided which encloses the visually selected region in an environment. + These maps are related to the corresponding insert mode mappings by the + following rule: > + ECE --> ,ce + and so on. i.e, the leading E becomes ',' and the next 2 letters are small + case. Some of the visual mode mappings are sensetive to whether you choose + line-wise or character wise. For example, if you choose a word and press + ,ce, then you get \centerline{word}, whereas if you press ,ce on a line-wise + selection, you get: > + \begin{center} + line + \end{center} + + }}} + --------------------------------------------------------------------------- + Font Mappings: *ls-fonts* {{{ + + These mappings insert font descriptions such as: > + \textsf{<++>}<++> + again with the cursor at the first place-holder. + + Mnemonic: + + 1. first letter is always F (F for font) + 2. next 2 letters are the 2 letters describing the font. + + Example: the above mapping is triggered by FSF. + + Just like environment mappings, you can visually select an area and press + `sf to have it enclosed in: > + \textsf{word} + or > + {\sffamily + line + } + depending on character-wise or line-wise selection. + + }}} + --------------------------------------------------------------------------- + Section Mappings: *ls-sections* {{{ + + Inserts LaTeX sections: > + \section + etc. Just as in the case of environments and fonts, can be enclosed with a + visual selection. The enclosing is not sensetive to character or line-wise + selection. + + Mnemonic: (make your own!) > + SPA for part + SCH for chapter + SSE for section + SSS for subsection + SS2 for subsubsection + SPG for paragraph + SSP for subparagraph + + Example: + SSE in insert mode inserts > + \section{<++>}<++> + < If you select a word or line and press ,se, then you get > + \section{section name} + < The menu item in Tex-Environments.Sections have a sub-menu called + 'Advanced'. Choosing an item from this sub-menu asks a couple of questions + (whether you want to include the section in the table of contents, whether + there is a shorter name for the table of contents) and then creates a more + intelligent template. + + }}} + --------------------------------------------------------------------------- + AUC-TEX key bindings: *ls-common* {{{ + + These are simple 2 key expansions for some very commonly used LaTeX elements. + At this time, the following expansions are provided: > + + `^ 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 + `= expands to \equiv + `\ expands to \setminus + `. expands to \cdot + `* expands to \times + `& expands to \wedge + `- expands to \bigcap + `+ expands to \bigcup + `M expands to \sum_{<++>}^{<++>}<++> + `S expands to \sum_{<++>}^{<++>}<++> + `( expands to \subset + `) expands to \supset + `< expands to \le + `> 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) + + In addition the visual mode macros are provided: + > + `( encloses selection in \left( and \right) + `[ encloses selection in \left[ and \right] + `{ encloses selection in \left\{ and \right\} + `$ encloses selection in $$ or \[ \] depending on characterwise or + linewise selection + + NOTE: There is no menu item for these mappings. (as of this writing). + + }}} + --------------------------------------------------------------------------- + Diacritics: *ls-diacritics* {{{ + + Diacritics speed up typing European languages. + + > + +<l> expands to \v{<l>} + =<l> expands to \'{<l>} + < where <l> is a letter ('a' to 'z' and 'A' to 'Z') + > + +} expands to \"{a} + +: expands to \^{o} + < + Latex-Suite also ships with a function SmartBS(), which offers another + convinience, i.e diacritic characters are treated as a single character for + backspacing. + + }}} + --------------------------------------------------------------------------- + Greek Letters: *ls-greek* {{{ + > + Lower case: + `a through `z expand to \alpha through \zeta. + Upper case: + `D = \Delta + `F = \Phi + `G = \Gamma + `Q = \Theta + `L = \Lambda + `X = \Xi + `Y = \Psi + `S = \Sigma + `U = \Upsilon + `W = \Omega + + NOTE: LaTeX does not support upper case for all greek alphabets. + + }}} + --------------------------------------------------------------------------- + LaTeX Math Menu: {{{ + *latex-math-menu* + + This menu contains over 600 commands for inserting math signs into LaTeX + document. They are grouped into submenus as: Arrows, MathFonts, Greek + (letters), BinaryRel(ations) and many others. At the top are basic signs + leading into math mode. Some of symbols have hints for mappings in AUC-TeX + style. + + }}} + --------------------------------------------------------------------------- + + }}} + =========================================================================== + LATEX SMART KEYS *latex-smart-keys* {{{ + *ls-smartkeys* + + Latex suite ships with the following smart keys: + + Smart Backspace + Pressing <BS> in insert mode checks to see whether we are just after + something like \'{a} and if so, deletes all of it. i.e, diacritics are + treated as single characters for backspacing. + + Smart Quotes + Pressing " (english double quote) will insert `` or '' by making an + intelligent guess about whether we intended to open or close a quote. + + Smart Space + Latex-suite maps the <space> key in such a way that $ characters are not + broken across lines. It does this by first setting tw=0 so that vim will + not automatically break lines and then maps the <space> key to insert + newlines keeping $$'s on the same line. + + Smart Dots + Pressing ... (3 dots) results in \ldots outside math mode and \cdots in + math mode. + + }}} + =========================================================================== + CUSTOM TEMPLATES *latex-templates* {{{ + *ls-templates* + + This functionality is available via the TeX-Suite.Templates menu. + + This module provides a way to insert custom templates at the beginning of the + current file. + + When latex-suite first starts up, it scans the latex-suite/templates/ directory + and creates menu items based on the files found there. When you select a + template from this menu, the file will be read in above the first line of the + current file. + + A template file can use |placeholders| for easy cursor movement. In addition, + you can use lines such as the following for inserting dates, names + dynamically: > + % File: ¡expand("%")¡ + + This will create a line of the form: > + % File: name.tex + + if the current file name is name.tex. + + NOTE: Templates are also accessible for non-gui users with the command + |:TexTemplate|. The argument should be name of the corresponding template + file. If the command is called without arguments (preferred usage), then a + list of avaiable templates is displayed and the user is asked to choose one of + them. + + You can ofcourse place your own templates in this directory. + + }}} + =========================================================================== + CUSTOM MACROS *latex-custom-macros* {{{ + + This functionality is available via the TeX-Suite.Macros menu. + + This module provides a way of inserting customized macros into the current + file. + + When latex-suite starts up, it scans the latex-suite/macros/ directory and + creates a menu from the files found there. Each file is considered as a single + macro. You can place your own macros in this directory, using |placeholders| + if wanted. + + When you choose a macro from the menu, the corresponding file is read into the + current buffer after the current cursor position. In non-gui mode, you can + use the |TexMacro| command instead of choosing from the menu. This command + takes the macro file name as an argument. When called without arguments + (preferred usage), then a list of avaiable macro files is displayed and the + user is prompted to choose one of them). + + There are some other tools provided in this menu, namely: + + {New} Creates a new (unnamed) buffer in the latex-suite/macros/ + directory. + Use the command :TexMacroNew in non-gui mode. + + {Edit} Opens up the corresponding macro file for editing. + Use :TexMacroEdit in non-gui mode. + + {Delete} Deletes the corresponding macro. + Use the prefixed numbers for fast navigation of menus. + Use :TexMacroDelete in non-gui mode. + + {Redraw} Rescans the macros/ directory and refreshes the macros list. + + }}} + =========================================================================== + LATEX COMPILING *latex-compiling* {{{ + + This functionality is available via the TeX-Suite menu. + + Latex-suite ships with a set of tools to compile LaTeX files into various + formats and view them. + + If you are using commonly used LaTeX tools, then you should be all set as soon + as you download and install latex-suite. In order to compile a LaTeX file, + simply press \ll while editing the file. This runs latex on the current file + and displays the errors in a |quickfix-window|. You can then scroll through + the errors and press <enter> to be taken to the location of the corresponding + error. Along with the errors being listed in the quickfix window, the + corresponding log file is also opened in |preview| mode. It is scrolled + automatically to keep in sync with the error being viewed in the quickfix + window. + + |latex-compiler-target| : specifying a different target format for + compilation. + |latex-suite-compiler| : specifying a diffrent compiler. + |latex-master-file| : specifying a different file for compilation + instead of file being edited. + |latex-compiler-customization| : customizing the output of the + latex-compiler. + + *latex-compiler-target* + In order to effectively use latex-suite to compile and view formats other than + DVI, you will need to edit the |texrc| file and set the variables: + > + g:Tex_CompileRule_<format> + g:Tex_ViewRule_<format> + + where <format> is a string like "pdf", "dvi" etc. These variables define + ``rules'' for compiling and viewing the corresponding target. + + Example: In texrc, the compilation rule for dvi is by default: > + g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*' + + Default values are also provided for ps and pdf formats. You might want to + change these rules in texrc according to your local tex environment. + + Once a ``rule'' has been set up for a format, you can set the target format by + using the {TeX-Suite.Target Format} menu item. Alternatively, you can use the + |:TTarget| command. You can also set the viewer and compiler to different + formats, by using the menu items or using the commands |:TCTarget| and + |:TVTarget|. + + NOTE: If you try choosing a format for which a rule is not defined, you + will get a short warning message and no action will be taken. + + NOTE: Specifying a different format does not automatically account for + dependencies. For example, if in your case you do: + .tex -> .dvi -> .ps -> .pdf + then you will need to choose dvi first, compile, change format to ps, compile, + change format and so on. + + *latex-suite-compiler* + The simplest way to choose a different compiler is to edit the > + g:Tex_CompileRule_dvi + variable. + + If however, you are only using the compiler/tex.vim module from latex-suite, + there are a couple of other ways to change things. + + Just as in the case of the standard tex compiler, ``if b:tex_flavor or + g:tex_flavor (in this precedence) variable exists, it defines TeX flavor for + :make (actually, this is the name of executed command), and if both variables + do not exist, it defaults to "latex"'' (from |compiler-tex|) + + NOTE: For win32 users user MikTeX, sometimes the latex compiler's output has a + bug where a single number is split across different lines. In this case, put + the included vimlatex utility somehwere in your $PATH, make it executable and + point g:tex_flavor to it. This is not always necessary, and you might want to + try it without vimlatex till you first notice any problem. + + *latex-master-file* + Often times the file you are currently editing is only a fragment being + \input'ed into a master tex file. In such cases you will need to do create a + dummy file in the directory containing the current file. This dummy file is of + the form: + > + <mailfilename>.latexmain + + In other words, if the current file is ~/thesis/chapter.tex, where + chapter.tex is being \input'ed into ~/thesis/main.tex, then create a file + called > + main.tex.latexmain + < + in the ~/thesis directory. This will then run "latex main.tex" + NOTE: Here main.tex.latexmain is a different file from main.tex itself. + main.tex need not be renamed. The contents of main.tex.latexmain are not used. + This ofcourse restricts each directory to have a single master file. + + *latex-compiler-customization* + Latex-suite ships with a modified (enhanced ?) version of the standard tex + compiler plugin maintained by Artem Chuprina. The modifications allow this + version to be customizable. i.e the user can set a verbosity level for the + compiler. + + By default it is set up in a "non-verbose", "ignore-common-warnings" mode, + which means that irrelevant lines from the compilers output will be + ignored and also some very common warnings are ignored. + + Depending on the "ignore-level", (which can be set with the command TCLevel as + described below) the following kinds of messages are ignored. An ignore level + of 3 for instance means that messages of type 1-3 will be ignored. By default, + the ignore level is set to 4. (You can change this by setting + g:Tex_IgnoreLevel in your .vimrc). + + 1. LaTeX Warning: Underfull box ... + 2. LaTeX Warning: Overfull box ... + both these warnings (very common) are due to \hbox settings not being + satisfied nicely. + 3. LaTeX Warning: Specifier 'h' changed to 't'. + This errors occurs when TeX is not able to correctly place a floating + object at a specified location, because of which it defaulted to the + top of the page. + 4. LaTeX Warning: You have requested ..., + This warning occurs in slitex when using the xypic package. + 5. Missing number error: + Usually, when the name of an included eps file is spelled incorrectly, + then the \bb-error message is accompanied by a bunch of "missing + number, treated as zero" error messages. This level ignores these + warnings. + NOTE: number 5 is actually a LaTeX error, not a warning! + + Use > + + TCLevel <level> + + where level is a number to set the ignore level dynamically. This will re-do + the 'efm' so that next time you do \ll, you will not be shown those kinds of + warnings. Use "TCLevel 0" to ignore no warnings at all, but still remain in a + "non-verbose", i.e ignore unmatched lines mode. + + When TCLevel is called with the unquoted string strict as > + + TClevel strict + + then the 'efm' switches to a "verbose", "no-lines-ignored" mode which is + useful when you want to make final checks of your document and want to be + careful not to let things slip by. + + You can also choose to ignore other kinds of patterns by setting + g:IgnoreWarnings in your ~/.vimrc. This is a '¡' seperated list of commands. + Its default value is: > + let g:Tex_IgnoredWarnings = + \'Underfull¡'. + \'Overfull¡'. + \'specifier changed to¡'. + \'You have requested¡'. + \'Missing number, treated as zero.' + + }}} + =========================================================================== + LATEX VIEWING AND SEARCHING *latex-viewing* {{{ + + Latex-suite ships with a set of functios for viewing .dvi files generated by + LaTeX. Press \lv while viewing a tex file. This will start the dvi viewer on + your system and display the current file in it. If the variable g:DviViewer + exists, then it is used as the program for viewing DVI files, otherwise it + defaults to yap for windows or xdvi for unix. + NOTE: These programs are called with some additional arguments. If you DVI + viewer doesnt accept these, then you will need to change the code itself. This + will be configurable by a variable in the future. + + Like in the case of the compiler, you can specify the master file for the + current file (see |latex-master-file|) + + *latex-searching* + Yap for windows, some versions of xdvi for windows and xdvi for unices provide + the ability to do "forward searching" on the .dvi file. This means that you + can have the DVI viewer jump to a specified location. + + Pressing \ls while viewing a LaTeX file will perform this function, i.e the + viewer will jump to the location under the cursor. + + NOTE: MikTeX and xdvi require that the dvi file be generated using the + --src-specials flag in order to enable forward/reverse searching. By default, + latex-suite will call LaTeX with this argument. + + These functions were added after a tip from Dimitri Antoniou on vim.sf.net. + See > + http://vim.sourceforge.net/tips/tip.php?tip_id=225 + for a description on how to get xdvik/yap to play along with Vim. + + }}} + =========================================================================== + LATEX FOLDING *latex-folding* {{{ + + Latex-suite ships with the plugin SyntaxFolds.vim which is a plugin for + creating "fake" syntax folds on the fly. The fold method is actually manual + but the folding is based on LaTeX syntax. This offers a speed increase over + regular syntax folding. Ofcourse it has the disadvantage that the folds are + not dynamic, i.e newly created syntax items are not automatically folded up. + (This is a compromise between speed and convinience). + + When you open up a LaTeX file, all the portions will be automatically folded + up. However, no new folds will be created until you press <F6> or \rf. (rf + stands for "refresh folds"). + + The fold-text is set to the first line of the folded text unless the fold is a + table, figure etc. (an environment). In this case, if a \caption and/or a + label is found in the folded region, then those are used to make a more + meaningful fold-tex, otherwise the second line of the environment is displayed + along with the name of the environment. In other words, the following > + + \begin{figure}[h] + \centerline{\psfig{figure=slidercrank.eps,height=6cm}} + \caption{The Slider Crank Mechanism.} + \label{fig:slidercrank} + \end{figure} + % a LaTeX comment. + \begin{eqnarray} + \sin(\pi) = 0 + \end{eqnarray} + < + will be shown as: > + + +--- 5 lines: figure (fig:slidercrank) : The Slider Crank Mechanism. ----- + % a LaTeX comment. + +--- 3 lines: eqnarray () : \sin(\pi) = 0 -------------------------------- + < + }}} + =========================================================================== + PACKAGE HANDLING *latex-packages* {{{ + *latex-menu-packages* + + This functionality is avaiable via the Tex-Packages menu. + + This module provides ways of customizing the menus based on which packages + are being used in the current LaTeX file. When latex-suite first starts up, it + scans the |latex-master-file| for > + \usepackage{name} + lines and if the corresponding package is found in the latex-suite/packages/ + directory, then creates a sub-menu based on the specification found in that + file. + + *latex-package-dictionary* + Furthermore, if a file with the same name is found in the + latex-suite/dictionaries/ directory, then that file will be added to vim's + 'dictionary' setting for use with the |i_CTRL-X_CTRL-K| command. Package + dictionary file should follow outlines specified in 'dictionary'. + + + *latex-package-file* + A latex-package-file is a simple vim script which defines some global + variables. These global variables are used by latex-suite to create the custom + menu. See the |latex-package-file-writing| section how to define a customized + package file. + + If you do make a package file for latex-suite, please consider contacting the + |latex-suite-maintainer|. + + Example: + + From the packages menu, choose the > + 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 + sub-menu called SIunits, which contains the commands and options for the + SIunits package.You can use this sub-menu to insert commands from the package, + add options to the package etc. + + NOTE: Since the package file is a vim-script, you could define custom + functions there, add mappings etc. + + You can perform the following actions via the packages menu: + + {Update} This command is to be invoked with the cursor placed on the + package name. If the corresponding package is found, then a + sub-menu with the supported commands, options is created. + A |latex-package-dictionary| might also be created. + + {UpdateAll} This function reads the preamble of the document for + \usepackage lines and if latexSuite supports the detected + packages, then sub-menus containing the package options and + commands is created. + A |latex-package-dictionary| might also be created. + + {Supported} This sub-menu contains a list of all the package files stored in + latex-suite/packages directory. When you choose one of + these, a \usepackage{package_name} line will inserted in + the preamble of the |latex-master-file| and a sub-menu for + the package will be created. + If options are detected, then the inserted line is of the + form: + \usepackage[<++>]{package_name} + A |latex-package-dictionary| might also be created. + + *latex-package-file-writing* + Writing package files is very easy and gives possibility of creating simple + templates with prefixes to command. Package file have to contain two + variables: + g:TeX_package_option_<package> and g:TeX_package_<package> + + First contain package options, second various commands supplied with + <package>. + + Package option variable: > + g:TeX_package_option_<package> = "Option,Option2=" + = at the end gives: > + Option2=x,<<>> + Here is allowed one prefix: + {sbr:option} Breaks option menu into submenu. {option} is the name of submenu. + + Package variable: > + g:TeX_package_<package> = "pre:Command,pre:Command1" + More detailed example is in latex-suite/packages/exmpl file (slightly + outdated). + Here is short summary of prefixes which can be used in package files: + (x - place with cursor, <<>> - |placeholder|) + + {env:command} Environment: creates simple environment template > + \begin{command} + x + \end{command}<<>> + {eno:command} Environment with option: > + \begin[x]{command} + <<>> + \end{command}<<>> + {ens:command[<<option>>]...} Environment special: > + \begin[<<option>>]...{command} + <<>> + \end{command}<<>> + {bra:command} Brackets: > + \command{x}<<>> + {brd:command} Brackets double: > + \command{x}{<<>>}<<>> + {brs:command[<<option>>]...} Brackets special (as environment special: > + \command[<<x>>]{<<>>}{<<>>}<<>> + {nor:command} Normal: > + \command<Space> + {noo:command} Normal with option: > + \command[x]<<>> + {nob:command} Normal with option and brackets: > + \command[x]{<<>>}<<>> + {pla:command} Plain: > + command<Space> + {spe:command} Special: > + command <-literal insertion of command + {sep:command} creates separator. Good for aesthetics and usability :) + {sbr:command} Breaks menu into submenus. <command> will be title of submenu. + Can be used also in package variable. + + Command can be also given without prefix:. The result is > + \command + + }}} + =========================================================================== + LATEX HELP *latex-help* {{{ + + latexhelp.txt is a collection of latex.info files `translated' into vim help + format. Now you can seek for help for specific LaTeX item without exiting vim. + + Example: > + :help \kill + gives help for the LaTeX \kill command. + + In order to use this help file, you will need to run |:helptags| once after + you download and unzip latex-suite. + + }}} + =========================================================================== + LATEX DICTIONARY *latex-dictionary* {{{ + + Latex-suite ships with a dictionary of over 600 commands from LaTeX and + popular packages. When latex-suite starts up, it automatically adds this + dictionary to vim's 'dictionary' option for use with vim's |i_CTRL-X_CTRL-K| + command. + + It is also possible to load custom dictionaries automatically when packages + load. This will happen if a package definition file > + latex-suite/packages/package.vim + has a corrresponding dictionary > + latex-suite/dictionaries/package + + + }}} + =========================================================================== + LATEX MENU CONFIGURATION *latex-menu-configuration* {{{ + + *latex-menu-configure* + + Generally latex-suite's menus should be configured by setting options in the + |texrc| file. But if you feel the need to change after startup, then use the + 'TeX-Suite.Configure Menu' menu option to turn some of the menus off and on, + control the nested-ness of some of the menus etc. + + }}} + =========================================================================== + LATEX SUITE COMMANDS *latex-suite-commands* {{{ + + LatexSuite defines set of commands for non-GUI and power users. They are + taking care about Macros, Templates and Packages. + + :TMacro [{macro}] *TMacro* + When used without any arguments lists all available macros + defined in latex-suite/macros/ directory and prompts you to + choose one of them. + With one argument |:read| this macro under cursor position. + With more than one argument it will not work :) + + :TMacroEdit [{macro}] *TMacroEdit* + Splits window for editing {macro}. + When used without any arguments lists all available macros + defined in latex-suite/macros/ directory and prompt you to + choose one of them. + + :TMacroNew *TMacroNew* + Splits window to write new macro. Directory in new buffer is + locally changed to latex-suite/macros/. + + :TMacroDelete [{macro}] *TMacroDelete* + Delets {macro} from latex-suite/macros/ directory. + When used without any arguments lists all available macros + defined in latex-suite/macros/ directory and prompt you to + choose one of them. + + :TPackage [{package} [{package} ...]] *TPackage* + When used without any arguments lists name of the packages for + which support is available. Report depends if you are using + GUI version and/or g:Tex_Menus is set to 1 or not. When you + are not using menus command lists files from + latex-suite/dictionaries/ (this is main support for non-menus + version of latexSuite) if menus are on |TPackage| lists + files from latex-suite/packages/ directory. + + When {package} is given command turns on all possible support + for this {package} (|latex-menu-packages|, + |latex-packages-dictionary|). Number of arguments separated + with spaces is limited only with common sense. + + :TPackageUpdate *TPackageUpdate* + This command `reads' name of package under cursor and turns on + possible support. + + :TPackageUpdateAll *TPackageUpdateAll* + After issuing this command latexSuite scans the file in + looking for not declared packages, removing not needed entries + from Packages menu and turning off not necessary packages' + dictionaries. + + :TTemplate [{template}] *TTemplate* + When used without any arguments lists all available templates + from latex-suite/templates/ directory and prompts to choose + one of them. + With one argument :0|read| {template} file. + With more than one argument it will not work :) + + :TSection [{argument}] *TSection* + Used without any arguments inserts last section type + (|latex-sectioning|). + Accepts arguments: + <n> inserts section name in <n> logical level. + Levels are: + 0 part + 1 chapter + 2 section + 3 subsection + 4 subsubsection + 5 paragraph + 6 subparagraph + + +<n> inserts section name <n> logical levels above the last + used comand + + -<n> inserts section name <n> logical levels below the last + used comand + + + inserts section name one logical level below the last + used command (equal to +1). + + ++ inserts section name two logical levels below the last + used command (equal to +2). + + - inserts section name one logical level over the last + used command (equal to -1). + + -- inserts section name two logical levels over the last + used command (equal to -2). + + Command accepts also latexSuite mappings (|latex-macros|) + without preceding S and in lowercase: > + :TSection pa + < will result in \part{}. It is possible to use full names of + sections: > + :TSection part + < + :TSectionAdvanced *TSectionAdvanced* + Accepts the same arguments as |TSection| but leads to a couple + of questions (whether you want to include the section in the + table of contents, whether there is a shorter name for the + table of contents) and then creates a more intelligent + template. + }}} + =========================================================================== + CREDITS *latex-suite-credits* {{{ + + And finally, the credits: + + Lubomir Host : provided the diacritics and also helped in development. + Alexander Wagner : valuable suggestions during development. + Luc Hermitte : his variation of Stephen Riehm's bracketing system is used + in latex-suite. + Gergely Kontra : the clever little JumpFunc() in imaps.vim is due to him. + The implementation of the templates also borrows from + mu-template.vim by him. + Dimitri Antoniou : author of ltags and also provided the nice tip about + forward / reverse search on DVI documents. + Stephen Riehm : the extremely helpful bracketing system is from him. + Alan Schmitt : provided some macros/folding elements. + Hari Krishna Dara : for ExecMap(), the clever little function which makes + typing visual mode mappings so much easier and error-free. + Alan G Isac : for the comprehensive BibT() function for entering bibtex + entries. + Gontran Baerts : for libList.vim + Peter Heslin : useful discussion and also a lot of bug fixes. + the %%fakesection in folding.vim. + + A large number of functions in latex-suite come from various other people. + Some of those people might have been missed here. Each function should however + have the author's name/e-mail above it. Thats the more authoritative place to + check out who has done what. + + *latex-suite-maintainer* + The current maintainer(s) of latex-suite is(are) + + Srinath Avadhanula <sr...@fa...> + Mikolaj Machowski <mi...@wp...> + Benji Fisher <be...@me...> + + }}} + =========================================================================== + + vim:tw=78:et:ts=4:ft=help:norl:fo+=2:fdm=marker:sts=4 vim:ft=help:et:ts=2:sw=2:sts=2 |
From: <sri...@us...> - 2003-01-11 08:42:30
|
Update of /cvsroot/vim-latex/vimfiles/doc In directory sc8-pr-cvs1:/tmp/cvs-serv23876 Added Files: newlatex-suite.txt Log Message: - New file: newlatex-suite.txt This is a temporary file for reworking the documentation. I noticed that the original documentation read too much like a story... In particular, the table of contents was too wordy and the user didn't get a nice overview at a glance. This is an attempt to rework mainly the TOC and maybe some of the sections too... In particular: - add sections for how to customize. A section containing all the available options. - a section containing all available <Plug>'d maps and again how to override the default maps. - add documentation for bibtex.vim, which provides nice support for editing .bbl files. (Alan G Isaac promised some docs for this long ago, but hasn't yet given any). Once we get this file incorporated into the main latex-suite.txt, I will push this into the attic. I could have started a new branch for this, but it felt like too much work... --- NEW FILE: newlatex-suite.txt --- Inserting text |ls-environments|---------- : environments (``\begin{center} \end{center}'', etc) |ls-fonts|----------------- : fonts (\emph{}) |ls-sections|-------------- : \section, \subsection etc. |ls-greek|----------------- : greek letters |ls-math|------------------ : mathematical symbols |ls-brackets|-------------- : \left \right etc. |ls-smartkeys|------------- : '...' becomes '\dots' etc. |ls-templates| ------------ : starting a latex file |ls-custommacros| --------- : inserting macros from files |ls-bibtex|---------------- : inserting bibtex entry templates Compiling |ls-compiling|------------- : compiling via latex-suite |ls-compiler-main|------- : compiling from an \input'ed files. |ls-compiler-custom|----- : customizing the compiler. |ls-compiler-target|----- : specifying a default compiler format. |ls-compiler-rules|------ : specifying ``rules'' for compiling various formats |ls-compiler-trouble|---- : trouble shooting compilation problems Viewing |ls-viewing|--------------- : viewing output files via latex-suite |ls-viewer-rules|-------- : specifying ``rules'' for viewing various formats |ls-forward-search|------ : forward searching |ls-inverse-search|------ : inverse searching Folding |ls-folding|--------------- : folding via latex-suite Packages |ls-packages|-------------- : latex package support in latex-suite |ls-package-writing|----- : writing package support for latex-suite Utilities |ls-dictionary|------------ : dictionary of latex commands. Customizing Latex-suite |ls-options|--------------- : latex-suite options |ls-mappings|-------------- : latex-suite mappings vim:ft=help:et:ts=2:sw=2:sts=2 |
From: <sri...@us...> - 2003-01-11 08:25:15
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv19922 Modified Files: main.vim Log Message: - Protect all printable ascii characters in the range 32-127 from accidental expansion at the beginning of a tex double quote. (Felt a need for this when I realized that ``* and such were still trouble causers). Is this way too agressive? Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** main.vim 10 Jan 2003 05:11:43 -0000 1.25 --- main.vim 11 Jan 2003 08:25:12 -0000 1.26 *************** *** 80,83 **** --- 80,84 ---- call IMAP (g:Tex_Leader.'+', '\bigcup', "tex") call IMAP (g:Tex_Leader.'M', '\sum_{<++>}^{<++>}<++>', 'tex') + call IMAP (g:Tex_Leader.'S', '\sum_{<++>}^{<++>}<++>', 'tex') call IMAP (g:Tex_Leader.'(', '\subset', "tex") call IMAP (g:Tex_Leader.')', '\supset', "tex") *************** *** 140,154 **** " ``[aA] -> ``[aA] (for writing in quotations) " \`[aA] -> \`[aA] (for writing diacritics) ! function! s:ProtectLetters() ! let i = char2nr('a') ! while i <= char2nr('z') ! call IMAP('``'.nr2char(i), '``'.nr2char(i), 'tex') ! call IMAP('\`'.nr2char(i), '\`'.nr2char(i), 'tex') ! call IMAP('``'.nr2char(i-32), '``'.nr2char(i-32), 'tex') ! call IMAP('\`'.nr2char(i-32), '\`'.nr2char(i-32), 'tex') let i = i + 1 endwhile endfunction ! call s:ProtectLetters() " }}} " vmaps: enclose selected region in brackets, environments {{{ --- 141,157 ---- " ``[aA] -> ``[aA] (for writing in quotations) " \`[aA] -> \`[aA] (for writing diacritics) ! " It does this for all printable lower ascii characters just to make sure ! " we dont let anything slip by. ! function! s:ProtectLetters(first, last) ! let i = a:first ! while i <= a:last ! if nr2char(i) =~ '[[:print:]]' ! call IMAP('``'.nr2char(i), '``'.nr2char(i), 'tex') ! call IMAP('\`'.nr2char(i), '\`'.nr2char(i), 'tex') ! endif let i = i + 1 endwhile endfunction ! call s:ProtectLetters(32, 127) " }}} " vmaps: enclose selected region in brackets, environments {{{ |
From: <sri...@us...> - 2003-01-10 05:33:47
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv16368 Modified Files: envmacros.vim Log Message: - removing a few lines which do not seem to be used anywhere. - corrected the placeholder description for the \list command. - adding 'description' to the Lists menu (macro in insert mode is EDE) - changing paragraph macro from SPR to SPG as documented. Index: envmacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** envmacros.vim 10 Jan 2003 01:56:42 -0000 1.19 --- envmacros.vim 10 Jan 2003 05:33:42 -0000 1.20 *************** *** 21,29 **** 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<++>" --- 21,25 ---- 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+>}{<+spacing+>}\<cr>\\item <++>\<cr>\\end{list}<++>" 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<++>" *************** *** 207,210 **** --- 203,207 ---- " Lists {{{ call s:Tex_SpecialMacros('ELI', '&Lists.', 'list', s:list) + call s:Tex_SpecialMacros('EDE', '&Lists.', 'description', s:description) call s:Tex_EnvMacros('EEN', '&Lists.', 'enumerate') call s:Tex_EnvMacros('EIT', '&Lists.', 'itemize') *************** *** 258,262 **** call s:Tex_SectionMacros('SSS', 'subsection') call s:Tex_SectionMacros('SS2', 'subsubsection') ! call s:Tex_SectionMacros('SPR', 'paragraph') call s:Tex_SectionMacros('SSP', 'subparagraph') " }}} --- 255,259 ---- call s:Tex_SectionMacros('SSS', 'subsection') call s:Tex_SectionMacros('SS2', 'subsubsection') ! call s:Tex_SectionMacros('SPG', 'paragraph') call s:Tex_SectionMacros('SSP', 'subparagraph') " }}} |
From: <sri...@us...> - 2003-01-10 05:11:46
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv11387 Modified Files: main.vim Log Message: - Charles Boncelet suggested `M -> \sum_{}^{}. - In order to guard against expanding to \sum.. on typing M at the start of a quotation, create a fake map call IMAP('``M', '``M', 'tex') Since IMAP() always uses the longest lhs ending in a character, this fake map elegantly solves the problem. Use this strategy to "protect" greek letter mappings as well. So now we do not need a special s:TEX_InsertGreekLetter() function... Just create fake maps like ``a -> ``a and \`a -> \`a. Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** main.vim 5 Jan 2003 08:46:52 -0000 1.24 --- main.vim 10 Jan 2003 05:11:43 -0000 1.25 *************** *** 4,31 **** " Email: sr...@fa... " URL: - " Last Change: Sun Jan 05 12:00 AM 2003 PST - " - " Help: - " Changes: {{{ - " Apr 26 2002: 1. Major reworking of files and such. - " Lots of changes are not documented here. see the cvs log for - " change information. - " Apr 04 2002: 1. changed yap to yap -1 (BNF) - " 2. changed g:smartBS to s:smartBS (BNF) - " Apr 04 2002: 1. (BNF) I changed SmartBS() so that it accepts an argument - " instead of using a global variable. - " 2. I made some minor simplifications to - " s:SetTeXOptions() . - " Mar 17 2002: 1. added errorformat and makeprg options for latex. - " Dec 09 2001: 1. took some stuff from auctex.vim - " such as smart quotes and dollar, etc. - " Dec 07 2001: 1. changed things so that most mappings emulate the operator - " pending mode. this greatly facilitates typing by not - " requiring the LHS to be typed quickly. one can infact type - " the LHS (without the <tab>), roam around in the file, come - " back to the end of the file, press <tab> and still have the - " LHS expand properly! - " 2. planning a second release for this. - " }}} " line continuation used here. --- 4,7 ---- *************** *** 103,106 **** --- 79,83 ---- call IMAP (g:Tex_Leader.'-', '\bigcap', "tex") call IMAP (g:Tex_Leader.'+', '\bigcup', "tex") + call IMAP (g:Tex_Leader.'M', '\sum_{<++>}^{<++>}<++>', 'tex') call IMAP (g:Tex_Leader.'(', '\subset', "tex") call IMAP (g:Tex_Leader.')', '\supset', "tex") *************** *** 116,185 **** " }}} " Greek Letters {{{ ! let s:greek_a = "\\alpha" " {{{ ! let s:greek_b = "\\beta" ! let s:greek_c = "\\chi" ! let s:greek_d = "\\delta" ! let s:greek_e = "\\varepsilon" ! let s:greek_f = "\\varphi" ! let s:greek_g = "\\gamma" ! let s:greek_h = "\\eta" ! let s:greek_k = "\\kappa" ! let s:greek_l = "\\lambda" ! let s:greek_m = "\\mu" ! let s:greek_n = "\\nu" ! let s:greek_p = "\\pi" ! let s:greek_q = "\\theta" ! let s:greek_r = "\\rho" ! let s:greek_s = "\\sigma" ! let s:greek_t = "\\tau" ! let s:greek_u = "\\upsilon" ! let s:greek_v = "\\varsigma" ! let s:greek_w = "\\omega" ! " let s:greek_w = "\\wedge" " AUCTEX style ! let s:greek_x = "\\xi" ! let s:greek_y = "\\psi" ! let s:greek_z = "\\zeta" " not all capital greek letters exist in LaTeX! " reference: http://www.giss.nasa.gov/latex/ltx-405.html ! let s:greek_D = "\\Delta" ! let s:greek_F = "\\Phi" ! let s:greek_G = "\\Gamma" ! let s:greek_Q = "\\Theta" ! let s:greek_L = "\\Lambda" ! let s:greek_X = "\\Xi" ! let s:greek_Y = "\\Psi" ! let s:greek_S = "\\Sigma" ! let s:greek_U = "\\Upsilon" ! let s:greek_W = "\\Omega" " }}} - " InsertGreekLetter: inserts greek letter {{{ - " Description: checks the text before the preceeding ` in order to account - " for the start of a double quote, otherwise when we try to write - " 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] != '`' - \ && getline('.')[col('.')-2] != "\\" - exe 'return s:greek_'.a:char - else - return g:Tex_Leader.a:char - end - endfunction " }}} ! " SetupGreekLetters: mappings for greek letters for expansion as `a {{{ ! " Description: ! function! <SID>SetupGreekLetters() 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 endwhile endfunction ! call s:SetupGreekLetters() ! " }}} " }}} " vmaps: enclose selected region in brackets, environments {{{ --- 93,154 ---- " }}} " Greek Letters {{{ ! call IMAP('`a', '\alpha', 'tex') " {{{ ! call IMAP('`b', '\beta', 'tex') ! call IMAP('`c', '\chi', 'tex') ! call IMAP('`d', '\delta', 'tex') ! call IMAP('`e', '\varepsilon', 'tex') ! call IMAP('`f', '\varphi', 'tex') ! call IMAP('`g', '\gamma', 'tex') ! call IMAP('`h', '\eta', 'tex') ! call IMAP('`k', '\kappa', 'tex') ! call IMAP('`l', '\lambda', 'tex') ! call IMAP('`m', '\mu', 'tex') ! call IMAP('`n', '\nu', 'tex') ! call IMAP('`p', '\pi', 'tex') ! call IMAP('`q', '\theta', 'tex') ! call IMAP('`r', '\rho', 'tex') ! call IMAP('`s', '\sigma', 'tex') ! call IMAP('`t', '\tau', 'tex') ! call IMAP('`u', '\upsilon', 'tex') ! call IMAP('`v', '\varsigma', 'tex') ! call IMAP('`w', '\omega', 'tex') ! call IMAP('`w', '\wedge', 'tex') " AUCTEX style ! call IMAP('`x', '\xi', 'tex') ! call IMAP('`y', '\psi', 'tex') ! call IMAP('`z', '\zeta', 'tex') " not all capital greek letters exist in LaTeX! " reference: http://www.giss.nasa.gov/latex/ltx-405.html ! call IMAP('`D', '\Delta', 'tex') ! call IMAP('`F', '\Phi', 'tex') ! call IMAP('`G', '\Gamma', 'tex') ! call IMAP('`Q', '\Theta', 'tex') ! call IMAP('`L', '\Lambda', 'tex') ! call IMAP('`X', '\Xi', 'tex') ! call IMAP('`Y', '\Psi', 'tex') ! call IMAP('`S', '\Sigma', 'tex') ! call IMAP('`U', '\Upsilon', 'tex') ! call IMAP('`W', '\Omega', 'tex') " }}} " }}} ! " ProtectLetters: sets up indentity maps for things like ``a {{{ ! " " Description: If we simply do ! " call IMAP('`a', '\alpha', 'tex') ! " then we will never be able to type 'a' after a tex-quotation. Since ! " IMAP() always uses the longest map ending in the letter, this problem ! " can be avoided by creating a fake map for ``a -> ``a. ! " This function sets up fake maps of the following forms: ! " ``[aA] -> ``[aA] (for writing in quotations) ! " \`[aA] -> \`[aA] (for writing diacritics) ! function! s:ProtectLetters() let i = char2nr('a') while i <= char2nr('z') ! call IMAP('``'.nr2char(i), '``'.nr2char(i), 'tex') ! call IMAP('\`'.nr2char(i), '\`'.nr2char(i), 'tex') ! call IMAP('``'.nr2char(i-32), '``'.nr2char(i-32), 'tex') ! call IMAP('\`'.nr2char(i-32), '\`'.nr2char(i-32), 'tex') let i = i + 1 endwhile endfunction ! call s:ProtectLetters() " }}} " vmaps: enclose selected region in brackets, environments {{{ *************** *** 510,516 **** inoremap <buffer> <silent> . <C-R>=<SID>SmartDots()<CR> endif - call Tex_Debug('checking to see if Tex_SetFastEnvironmentMaps needs to be called.', 'main') if g:Tex_PromptedEnvironments != '' || g:Tex_HotKeyMappings != '' - call Tex_Debug('calling Tex_SetFastEnvironmentMaps', 'main') call Tex_SetFastEnvironmentMaps() endif --- 479,483 ---- |
From: <sri...@us...> - 2003-01-10 01:56:49
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv30670 Modified Files: envmacros.vim Log Message: - Bugfix: <F5> and then choosing option 5 ('\[') inserted \begin{\[} etc instead of just \[. - Support choosing $$ and \[ after <F5> in visual mode as well. Index: envmacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** envmacros.vim 9 Jan 2003 15:31:36 -0000 1.18 --- envmacros.vim 10 Jan 2003 01:56:42 -0000 1.19 *************** *** 572,575 **** --- 572,580 ---- function! Tex_PutEnvironment(env) if s:isvisual == "yes" + if a:env == '\[' + return VEnclose('', '', '\[', '\]') + elseif a:env == '$$' + return VEnclose('', '', '$$', '$$') + endif return VEnclose('\begin{'.a:env.'}', '\end{'.a:env.'}', '\begin{'.a:env.'}', '\end{'.a:env.'}') else *************** *** 586,590 **** elseif a:env == '$$' return IMAP_PutTextWithMovement('$$<++>$$') ! elseif a:env == '[' return IMAP_PutTextWithMovement("\\[\<CR><++>\<CR>\\]<++>") else --- 591,595 ---- elseif a:env == '$$' return IMAP_PutTextWithMovement('$$<++>$$') ! elseif a:env == '\[' return IMAP_PutTextWithMovement("\\[\<CR><++>\<CR>\\]<++>") else |