Loading ...
Sorry, an error occurred while loading the content.

Re: Latex-suite command completion

Expand Messages
  • Robert Cussons
    ... Sorry, been away on holiday for a few days and it seems somebody (Szabolcs) has been borrowing my thread, please don t do this as it confuses everybody as
    Message 1 of 19 , Nov 5, 2007
    • 0 Attachment
      A.Politz wrote:
      > Robert Cussons wrote:
      >
      >> Manu Hack wrote:
      >>
      >>
      >>> On 10/12/07, Robert Cussons <r.cussons@...> wrote:
      >>>
      >>>
      >>>> Hi, I've been using some of latex-suite's command completion capability,
      >>>> which is wonderful, so for example, if I type:
      >>>>
      >>>> (
      >>>>
      >>>> then hit:
      >>>>
      >>>> <Alt> L
      >>>>
      >>>> I get:
      >>>>
      >>>> \left(\right)<++>
      >>>>
      >>>> I then want to enter a fraction in side the brackets so I type:
      >>>>
      >>>> \left(frac\right)<++>
      >>>>
      >>>> then hit <F7> with the cursor after the 'c' of frac, normally, this
      >>>> would expand to:
      >>>>
      >>>> \left(\frac{<+n+>}{<+d+>}<++>\right)<++>
      >>>>
      >>>> with the <+n+> highlighted, however in the above case all I get is:
      >>>>
      >>>> \left(frac0\right)<++>
      >>>>
      >>>> can others reproduce this?
      >>>>
      >>>> Many thanks,
      >>>> Rob.
      >>>>
      >>>> P.S. all the above is performed inside the equation environment,
      >>>> achieved by entering EEQ in insert mode :-)
      >>>>
      >>>>
      >>>>
      >>> I can't reproduce your bug under my machine (vim 7.1 on debian).
      >>>
      >>>
      >> I am using
      >> :version
      >> VIM - Vi IMproved 7.1 (2007 May 12, compiled Oct 13 2007 13:28:30)
      >> Included patches: 1-138
      >>
      >> just updated now, under Debian Etch. Problem still exists.
      >>
      >>
      >>
      >>> And I think you don't have to use ALT L to get \left(\right)<++>, just
      >>> type (( it will expand to that. Also for frac + F7 you may use `/.
      >>>
      >>>
      >>
      >> Thanks, these are very useful tips, even faster now ;-). In fact they
      >> even work inside brackets which for some reason the F7 method doesn't,
      >> however there are other functions like sum that I still need the F7
      >> method for and they just produce a zero as explained above when
      >> performed inside brackets, anyone any idea how I can track down the
      >> problem?
      >> Thanks
      >> Rob.
      >>
      >>
      >>
      > Do this :
      >
      >
      > let g:Imap_Debug=1
      > let g:Tex_Debug=1
      > let g:Tex_DebugLog='/tmp/tex.log' " or any other nonexistant file
      >
      > :e newfile.tex
      > <Enter insertmode and type :>
      > frac<f7>
      >
      > Then post the content of the logfile.
      >
      > -ap
      >
      >

      Sorry, been away on holiday for a few days and it seems somebody
      (Szabolcs) has been borrowing my thread, please don't do this as it
      confuses everybody as to the exact subject of the thread, I know it was
      related to start with but it definitely wasn't by the end.

      Anyway, back to the problem at hand, when it works, the log file
      contains this:


      proj : texproject.vim: catching LatexSuiteFileType event
      env : envmacros.vim: Catching LatexSuiteFileType event
      comp : compiler.vim: Catching LatexSuiteFileType event
      fold : folding.vim: catching LatexSuiteFileType
      brak : brackets.vim: Catching LatexSuiteFileType event
      view : texviewer.vim: Catching LatexSuiteFileType event
      main : main.vim: Catching LatexSuiteFileType event
      main : SetTeXOptions: sourcing maps
      comp : +Tex_SetTeXCompilerTarget: setting target to [ps] for Compiler
      comp : +Tex_SetTeXCompilerTarget: setting target to [ps] for Viewr
      comp : compiler/tex.vim: sourcing this file
      pack : packages.vim: Catching LatexSuiteFileType event
      pack : +Tex_pack_updateall
      pack : :Tex_pack_updateall: split
      pack : +Tex_ScanForPackages
      pack : :Tex_ScanForPackages: Begining scans in [newfile.tex], beginline = 0
      pack : :Tex_ScanForPackages: beginning scan for \usepackage lines
      pack : :Tex_ScanForPackages: End scan \usepackage, detected packages =
      pack : :Tex_ScanForPackages: Beginning scan for \newcommand's
      pack : :Tex_ScanForPackages: Beginning scan for \newenvironment's
      pack : -Tex_ScanForPackages
      pack : :Tex_pack_updateall: detected [] in first run
      pack : :Tex_pack_updateall: throwing LatexSuiteScannedPackages event
      pack : -Tex_pack_updateall
      env : Tex_DoCommand: getting lastword = frac
      imap : IMAP_PutTextWithMovement: text = [\frac{X^\^N:call
      IMAP_Mark('set') "_s<+n+>}{<+d+>}<++>^\^N:call IMAP_Mark('go')
      i^R=IMAP_Jumpfunc('', 1) ]

      if I go through the exact same process, but rather than just typing frac
      in newfile.tex, I type:

      EEQ

      that puts me in the equation environment, then I type:

      ((

      that puts me between a pair of brackets, then I type:

      frac<f7>

      my output in vim is:

      \begin{equation}
      \left( frac0 \right)<++>
      \label{<++>}
      \end{equation}<++>

      and /tmp/tex.log reads:

      proj : texproject.vim: catching LatexSuiteFileType event
      env : envmacros.vim: Catching LatexSuiteFileType event
      comp : compiler.vim: Catching LatexSuiteFileType event
      fold : folding.vim: catching LatexSuiteFileType
      brak : brackets.vim: Catching LatexSuiteFileType event
      view : texviewer.vim: Catching LatexSuiteFileType event
      main : main.vim: Catching LatexSuiteFileType event
      main : SetTeXOptions: sourcing maps
      comp : +Tex_SetTeXCompilerTarget: setting target to [ps] for Compiler
      comp : +Tex_SetTeXCompilerTarget: setting target to [ps] for Viewr
      comp : compiler/tex.vim: sourcing this file
      pack : packages.vim: Catching LatexSuiteFileType event
      pack : +Tex_pack_updateall
      pack : :Tex_pack_updateall: split
      pack : +Tex_ScanForPackages
      pack : :Tex_ScanForPackages: Begining scans in [newfile.tex], beginline = 0
      pack : :Tex_ScanForPackages: beginning scan for \usepackage lines
      pack : :Tex_ScanForPackages: End scan \usepackage, detected packages =
      pack : :Tex_ScanForPackages: Beginning scan for \newcommand's
      pack : :Tex_ScanForPackages: Beginning scan for \newenvironment's
      pack : -Tex_ScanForPackages
      pack : :Tex_pack_updateall: detected [] in first run
      pack : :Tex_pack_updateall: throwing LatexSuiteScannedPackages event
      pack : -Tex_pack_updateall
      imap : Not getting <+ and +> in ^R=Tex_PutEnvironment('equation')
      imap : IMAP_PutTextWithMovement: text = [\begin{equation} X^\^N:call
      IMAP_Mark('set') "_s<++> \label{<++>} \end{equation}<++>^\^N:call
      IMAP_Mark('go') i^R=IMAP_Jumpfunc('', 1) ]
      imap : IMAP_PutTextWithMovement: text = [\left( X^\^N:call
      IMAP_Mark('set') "_s<++> \right)<++>^\^N:call IMAP_Mark('go')
      i^R=IMAP_Jumpfunc('', 1) ]
      env : Tex_DoCommand: getting lastword =


      any ideas?

      Many thanks,
      Rob.

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.