vim-latex-devel Mailing List for Vim-Latex (Page 34)
Brought to you by:
srinathava,
tmaas
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(120) |
Dec
(118) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(145) |
Feb
(23) |
Mar
(30) |
Apr
(50) |
May
(88) |
Jun
(49) |
Jul
(41) |
Aug
(13) |
Sep
(51) |
Oct
(30) |
Nov
(80) |
Dec
(43) |
2004 |
Jan
(15) |
Feb
(25) |
Mar
(48) |
Apr
(12) |
May
(37) |
Jun
(52) |
Jul
(16) |
Aug
(10) |
Sep
(7) |
Oct
(19) |
Nov
(17) |
Dec
(19) |
2005 |
Jan
(15) |
Feb
(5) |
Mar
(7) |
Apr
(3) |
May
(2) |
Jun
(4) |
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(16) |
Dec
(16) |
2006 |
Jan
(15) |
Feb
(27) |
Mar
(49) |
Apr
(31) |
May
(24) |
Jun
(12) |
Jul
(23) |
Aug
(13) |
Sep
(22) |
Oct
(6) |
Nov
(8) |
Dec
(10) |
2007 |
Jan
(3) |
Feb
(13) |
Mar
(19) |
Apr
(1) |
May
(5) |
Jun
(10) |
Jul
(2) |
Aug
(13) |
Sep
(10) |
Oct
(2) |
Nov
(30) |
Dec
(15) |
2008 |
Jan
(11) |
Feb
(9) |
Mar
(27) |
Apr
(27) |
May
(22) |
Jun
(29) |
Jul
|
Aug
(21) |
Sep
(6) |
Oct
(4) |
Nov
(9) |
Dec
(2) |
2009 |
Jan
(52) |
Feb
(21) |
Mar
(9) |
Apr
(41) |
May
(13) |
Jun
(8) |
Jul
(5) |
Aug
(31) |
Sep
(14) |
Oct
(10) |
Nov
(17) |
Dec
(17) |
2010 |
Jan
(25) |
Feb
(22) |
Mar
(22) |
Apr
(24) |
May
(35) |
Jun
(23) |
Jul
(22) |
Aug
(10) |
Sep
(6) |
Oct
(29) |
Nov
(8) |
Dec
(6) |
2011 |
Jan
(12) |
Feb
(89) |
Mar
(41) |
Apr
(8) |
May
(17) |
Jun
(11) |
Jul
(3) |
Aug
(13) |
Sep
(14) |
Oct
(23) |
Nov
(8) |
Dec
(9) |
2012 |
Jan
(15) |
Feb
(27) |
Mar
(6) |
Apr
(17) |
May
(29) |
Jun
(9) |
Jul
(50) |
Aug
(15) |
Sep
(11) |
Oct
(12) |
Nov
(22) |
Dec
(7) |
2013 |
Jan
(24) |
Feb
(32) |
Mar
(6) |
Apr
(5) |
May
(2) |
Jun
(15) |
Jul
(20) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
(7) |
Dec
(4) |
2014 |
Jan
(3) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(4) |
Jun
(5) |
Jul
(4) |
Aug
(3) |
Sep
(9) |
Oct
|
Nov
(2) |
Dec
(3) |
2015 |
Jan
|
Feb
(4) |
Mar
(9) |
Apr
|
May
(1) |
Jun
|
Jul
(5) |
Aug
(6) |
Sep
(2) |
Oct
|
Nov
(6) |
Dec
|
2016 |
Jan
(1) |
Feb
(11) |
Mar
(4) |
Apr
(2) |
May
(8) |
Jun
(9) |
Jul
|
Aug
(9) |
Sep
(2) |
Oct
(7) |
Nov
|
Dec
|
2017 |
Jan
(7) |
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ted P. <te...@te...> - 2010-07-01 20:33:45
|
> I found some good information here: > http://phaseportrait.blogspot.com/2007/12/file-associations-and-path-with-macvim.html I wrote that a long time ago (back when I used to run a PowerPC Mac on OS X 10.4; I'm not on a Mac anymore now, and so I can't verify). Maybe they've removed that preference... Type: :h macvim-login-shell inside Vim to see if that help page still exists. If it does, it should tell you where to find the preference. That help page existed in April of 2010, and so I'm guessing it should still exist now. (either way, I'm starting to suspect the problem has less to do with Vim-LaTeX and more to do with your Vim environment) The vim-mac mailing list (where MacVim discussions go on) can be accessed via Google Groups at: http://groups.google.com/group/vim_mac?pli=1 If you search for "login shell" and sort by date, you'll find recent messages discussing the preference. I get the impression that it is now turned on by default. If it is, you could try turning it off. I don't remember, but I *THINK* using (at a Terminal prompt) defaults write org.vim.MacVim MMLoginShell 0 will turn it off (but maybe that was a hidden setting for something else). There used to be a checkbox in the MacVim preferences that let you control the pref... Maybe they made it all hidden now (via the "MMLoginShell" hidden pref)... The details should be in that ":h macvim-login-shell" --Ted > > <http://phaseportrait.blogspot.com/2007/12/file-associations-and-path-with-macvim.html>However, > I don't see the preference pane you mention that allows you to "launch > Vim processes in a login shell." I am at Snapshot 52 of MacVim, and I > believe that is the latest version. Am I incorrect? > > On Thu, Jul 1, 2010 at 4:01 PM, Abbie Kressner <abb...@gm... > <mailto:abb...@gm...>> wrote: > > I am using MacVim, and :!which bibtex produces the following: > > /usr/texbin//bibtex > > This looks to be my problem since I think it should be > /usr/texbin/bibtex. How would I go about changing that to be correct? > > // Abbie > > > On Thu, Jul 1, 2010 at 3:56 PM, Ted Pavlic <te...@te... > <mailto:te...@te...>> wrote: > > Abbie -- > > It works fine for me -- \ll runs LaTeX and BibTeX and > generates the BBL properly. (however, there was one \end{figure} > that wasn't commented out in the TeX you sent, but you said you > just now commented those out, and so that wouldn't be the source > of the problem) > > I'm starting to suspect that vim isn't picking up your > path the way it should (though I'm not sure why it's not having > trouble running latex). Are you using vim, gvim, or MacVim? I > know you're running a Mac, and there are lots of different ways > to run vim on a Mac. > > Inside vim (however you run it), can you type > > :!which bibtex > > That is, the "colon" puts you into command mode, then the > exclamation point will cause vim to run "which bibtex". You > should see something like... > > /usr/bin/bibtex > > and then be prompted to press ENTER to continue. If you instead > see something like "which: no bibtex in (...)", then vim isn't > importing your path properly (in MacVim, you have to turn on a > special option use login shells so that commands run from vim > are setup with your path). > > --Ted > > > On 07/01/2010 03:12 PM, Abbie Kressner wrote: > > I have attached a tex file where I have commented out the > figures > sections. I have also attached a bib file that I just > created that only > contains the references that I use (there are currently just > two). > > I am not sure what you mean by "status line in Vim". I see > a bunch of > information flash across the window when I compile, and then > it all > disappears when there is no "process-stopping" error. It > goes pretty > fast, so I don't have a chance to see what it says. I > looked at the log > file, but couldn't find anywhere that it specifically says > it compiled > bibtex. The following is the only relevant information I > could find... > > ] > No file *.bbl. > [14 > > > where * is the actual base filename. > > I just recently downloaded Vim-Latex in the last week or so, > so it would > be strange if it was out-dated. I found the following in > compiler.vim > that I believe you were referring to. > > " The first time we see if we need to run bibtex and if the > .bbl file > > " changes, we will rerun latex. > if runCount == 0 && Tex_IsPresentInFile('\\bibdata', > mainFileName_root.'.aux') > let bibFileName = mainFileName_root.'.bbl' > > let biblinesBefore = Tex_CatFile(bibFileName) > > echomsg "Running '".Tex_GetVarValue('Tex_BibtexFlavor')."' ..." > let temp_mp = &mp | let &mp = > Tex_GetVarValue('Tex_BibtexFlavor') > exec 'silent! make '.mainFileName_root > let &mp = temp_mp > > let biblinesAfter = Tex_CatFile(bibFileName) > > " If the .bbl file changed after running bibtex, we need to > " latex again. > if biblinesAfter != biblinesBefore > echomsg 'Need to rerun because bibliography file changed...' > call Tex_Debug('Tex_CompileMultipleTimes: Need to rerun because > bibliography file changed...', 'comp') > let needToRerun = 1 > endif > endif > > Does anything seem to be wrong? > > Once again, thank you so much for taking the time to help me!! > > > On Thu, Jul 1, 2010 at 2:36 PM, Ted Pavlic > <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> wrote: > > Hm. All of that works for me. \ll runs LaTeX three times > with > relevant runs of bibtex in between to build the BBL. > > Could you send a complete minimal non-working example? > Something > that can be immediately opened in Vim (perhaps even with > a minimal > bib, but I don't think the bib will matter; I can sub my > own bib in) > that causes you problems when you \ll it. > > After you run \ll, what does the status line in Vim say? For > example, mine says "Run latex 3 time(s)" right now. > Also, while \ll > is running, can you catch a glimpse of some of the other > status > messages? It should report if/when it tries to run bibtex. > > Also, if you look where Vim-LaTeX is installed (e.g., in > your > .vim/ftplugin/latex-suite/ or in > /usr/share/vim/vimfiles/ftplugin/latex-suite/ or similar > on your > system), you should find a "compiler.vim" that has the > Vim script > that implements \ll. Is it possible that you have a very > very old > version of Vim-LaTeX that doesn't yet run bibtex? Search > through > that file for "bibdata" -- you should find the relevant > section of > code that checks the AUX file for bibdata and runs > bibtex as needed. > You will also notice it references configuration > variables that can > be changed by the user. It's possible that your defaults > are either > set wrong or have been changed (?). > > --Ted > > > On 07/01/2010 01:24 PM, Abbie Kressner wrote: > > As far as I can tell, there are no errors. I > deleted all the files > except the tex file and reran the \ll compile > command. The aux file > contains the following lines. > > \bibstyle{IEEEtran} > \bibdata{/Users/abbiekre/Documents/_Papers/_Papers} > > > Also, here are the relevant lines in my beamer tex file. > > \appendix > \begin{frame}[allowframebreaks] > > \textbf{References} > > \bibliographystyle{IEEEtran} > > \bibliography{_Papers} > \end{frame} > > > Do you see any blaring errors? Any other ideas if not? > > Thanks! > > // Abbie > > Thanks in advance for anymore help! Hopefully I'll > find a solution > eventually. > > On Thu, Jul 1, 2010 at 12:38 PM, Ted Pavlic > <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>> wrote: > > Abbie -- > > Are you sure your LaTeX run isn't causing an error? > Vim-LaTeX will > cease processing on an error. There may be a > subtle LaTeX error > causing the Vim-LaTeX compiler to halt early > (although that > usually > would cause Vim-LaTeX to report an error). > > After LaTeX is run (by Vim-LaTeX), an "AUX" file > should be > created. > That "AUX" file should have a line in it that > has "\bibdata" > in it. > It is that line that causes Vim-LaTeX to call > bibtex. > > Are there other details that might be confusing > Vim-LaTeX? > (e.g., > spaces in file names, etc.?) > > --Ted > > > On 07/01/2010 12:33 PM, Abbie Kressner wrote: > > Thank you, Ted! > > I still haven't been able to get the \ll > compiler command to > successful > compile a .bbl file. Any help would be > greatly appreciated! > > My current workaround is to call bibtex > manually from > Terminal. > Then > when I compile with \ll in MATLAB, the citations > correctly turn > from "?" > to numbers, and my reference page displays > correctly (rather > than being > blank). Removing the extra steps involved > in compiling > would be > fantastic though! > > On Thu, Jul 1, 2010 at 12:14 PM, Ted Pavlic > <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>>> wrote: > > Abbie -- > > > On 06/30/2010 04:46 PM, Abbie Kressner > wrote: > > Do you happen to know what to do if > \ll does not > call > bibtex? > > > I'm responding to this message > via the > vim-latex-devel list. > I've BCC'd you, but I advise you to > continue this > thread on > the list > where others can help too. > > So long as your LaTeX file has a > \bibliography{} > line in it, > the \ll compiler command will issue > bibtex sa needed. If > your LaTeX > file only has a \bibliography style > command but no > \bibliography > command, then Vim-LaTeX won't know to > run bibtex. In > fact, > in these > cases where there is no \bibliography > command, if > you try to run > bibtex manually it will give you an error. > > Of course, there is more than > one way to > skin a cat. > However, I'm confident that if your > LaTeX document is > properly setup > for including a BibTeX bibliogrpahy, > then Vim-LaTeX will > make the > appropriate calls for you (using \ll). > > > Best -- > Ted > > -- > Ted Pavlic <te...@te... > <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>>> > > > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in > the fight to > defeat ALS. > > > > -- > Ted Pavlic <te...@te... > <mailto:te...@te...> <mailto:te...@te... > <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the > fight to defeat ALS. > > > > -- > Ted Pavlic <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to > defeat ALS. > > > > -- > Ted Pavlic <te...@te... <mailto:te...@te...>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to defeat ALS. > > > -- Ted Pavlic <te...@te...> Please visit my 2009 d'Feet ALS walk page: http://web.alsa.org/goto/tedp My family appreciates your support in the fight to defeat ALS. |
From: Ted P. <te...@te...> - 2010-07-01 20:24:40
|
Abbie -- I don't think that will cause a problem. That likely means that your PATH environment variable includes "/usr/texbin/" instead of "/usr/texbin". You can type: echo $PATH at a shell prompt to verify. In fact, typing: :!echo $PATH in vim will tell you what Vim sees as its path. Check to see if "/usr/texbin" is followed by a slash. If it is, find where it's being set. It could be set in a global profile (e.g., /etc/profile or /etc/bash_profile or /etc/bashrc) or in a user profile (e.g., /etc/.bash_profile or /etc/.bashrc) or in a script included from one of those. I don't recall how TeXLive for the Mac organizes itself. I do recommend you try going to MacVim->Preferences and look for a setting to "Run in login shell" or something like that. I don't recall the actual wording (the vim-mac mailing list would be a good place to check), but there is a setting in MacVim preferences that forces all shells to be run as login shells to ensure that the same PATH that gets set when you login is used within Vim. One more thing to try.. execute :!bibtex inside vim. In fact, you can execute :!bibtex %:r inside vim to run bibtex on the TeX file you're working on at the time (and you can make a macro that runs that for you). Either way, does bibtex return an error from the shell about not being found, or does it run? --Ted On 07/01/2010 04:01 PM, Abbie Kressner wrote: > I am using MacVim, and :!which bibtex produces the following: > > /usr/texbin//bibtex > > This looks to be my problem since I think it should be > /usr/texbin/bibtex. How would I go about changing that to be correct? > > // Abbie > > On Thu, Jul 1, 2010 at 3:56 PM, Ted Pavlic <te...@te... > <mailto:te...@te...>> wrote: > > Abbie -- > > It works fine for me -- \ll runs LaTeX and BibTeX and > generates the BBL properly. (however, there was one \end{figure} > that wasn't commented out in the TeX you sent, but you said you just > now commented those out, and so that wouldn't be the source of the > problem) > > I'm starting to suspect that vim isn't picking up your path > the way it should (though I'm not sure why it's not having trouble > running latex). Are you using vim, gvim, or MacVim? I know you're > running a Mac, and there are lots of different ways to run vim on a Mac. > > Inside vim (however you run it), can you type > > :!which bibtex > > That is, the "colon" puts you into command mode, then the > exclamation point will cause vim to run "which bibtex". You should > see something like... > > /usr/bin/bibtex > > and then be prompted to press ENTER to continue. If you instead see > something like "which: no bibtex in (...)", then vim isn't importing > your path properly (in MacVim, you have to turn on a special option > use login shells so that commands run from vim are setup with your > path). > > --Ted > > > On 07/01/2010 03:12 PM, Abbie Kressner wrote: > > I have attached a tex file where I have commented out the figures > sections. I have also attached a bib file that I just created > that only > contains the references that I use (there are currently just two). > > I am not sure what you mean by "status line in Vim". I see a > bunch of > information flash across the window when I compile, and then it all > disappears when there is no "process-stopping" error. It goes > pretty > fast, so I don't have a chance to see what it says. I looked at > the log > file, but couldn't find anywhere that it specifically says it > compiled > bibtex. The following is the only relevant information I could > find... > > ] > No file *.bbl. > [14 > > > where * is the actual base filename. > > I just recently downloaded Vim-Latex in the last week or so, so > it would > be strange if it was out-dated. I found the following in > compiler.vim > that I believe you were referring to. > > " The first time we see if we need to run bibtex and if the .bbl > file > > " changes, we will rerun latex. > if runCount == 0 && Tex_IsPresentInFile('\\bibdata', > mainFileName_root.'.aux') > let bibFileName = mainFileName_root.'.bbl' > > let biblinesBefore = Tex_CatFile(bibFileName) > > echomsg "Running '".Tex_GetVarValue('Tex_BibtexFlavor')."' ..." > let temp_mp = &mp | let &mp = Tex_GetVarValue('Tex_BibtexFlavor') > exec 'silent! make '.mainFileName_root > let &mp = temp_mp > > let biblinesAfter = Tex_CatFile(bibFileName) > > " If the .bbl file changed after running bibtex, we need to > " latex again. > if biblinesAfter != biblinesBefore > echomsg 'Need to rerun because bibliography file changed...' > call Tex_Debug('Tex_CompileMultipleTimes: Need to rerun because > bibliography file changed...', 'comp') > let needToRerun = 1 > endif > endif > > Does anything seem to be wrong? > > Once again, thank you so much for taking the time to help me!! > > > On Thu, Jul 1, 2010 at 2:36 PM, Ted Pavlic <te...@te... > <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> wrote: > > Hm. All of that works for me. \ll runs LaTeX three times with > relevant runs of bibtex in between to build the BBL. > > Could you send a complete minimal non-working example? Something > that can be immediately opened in Vim (perhaps even with a > minimal > bib, but I don't think the bib will matter; I can sub my own > bib in) > that causes you problems when you \ll it. > > After you run \ll, what does the status line in Vim say? For > example, mine says "Run latex 3 time(s)" right now. Also, > while \ll > is running, can you catch a glimpse of some of the other status > messages? It should report if/when it tries to run bibtex. > > Also, if you look where Vim-LaTeX is installed (e.g., in your > .vim/ftplugin/latex-suite/ or in > /usr/share/vim/vimfiles/ftplugin/latex-suite/ or similar on your > system), you should find a "compiler.vim" that has the Vim > script > that implements \ll. Is it possible that you have a very > very old > version of Vim-LaTeX that doesn't yet run bibtex? Search through > that file for "bibdata" -- you should find the relevant > section of > code that checks the AUX file for bibdata and runs bibtex as > needed. > You will also notice it references configuration variables > that can > be changed by the user. It's possible that your defaults are > either > set wrong or have been changed (?). > > --Ted > > > On 07/01/2010 01:24 PM, Abbie Kressner wrote: > > As far as I can tell, there are no errors. I deleted > all the files > except the tex file and reran the \ll compile command. > The aux file > contains the following lines. > > \bibstyle{IEEEtran} > \bibdata{/Users/abbiekre/Documents/_Papers/_Papers} > > > Also, here are the relevant lines in my beamer tex file. > > \appendix > \begin{frame}[allowframebreaks] > > \textbf{References} > > \bibliographystyle{IEEEtran} > > \bibliography{_Papers} > \end{frame} > > > Do you see any blaring errors? Any other ideas if not? > > Thanks! > > // Abbie > > Thanks in advance for anymore help! Hopefully I'll find > a solution > eventually. > > On Thu, Jul 1, 2010 at 12:38 PM, Ted Pavlic > <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>> wrote: > > Abbie -- > > Are you sure your LaTeX run isn't causing an error? > Vim-LaTeX will > cease processing on an error. There may be a subtle > LaTeX error > causing the Vim-LaTeX compiler to halt early > (although that > usually > would cause Vim-LaTeX to report an error). > > After LaTeX is run (by Vim-LaTeX), an "AUX" file > should be > created. > That "AUX" file should have a line in it that has > "\bibdata" > in it. > It is that line that causes Vim-LaTeX to call bibtex. > > Are there other details that might be confusing > Vim-LaTeX? > (e.g., > spaces in file names, etc.?) > > --Ted > > > On 07/01/2010 12:33 PM, Abbie Kressner wrote: > > Thank you, Ted! > > I still haven't been able to get the \ll > compiler command to > successful > compile a .bbl file. Any help would be greatly > appreciated! > > My current workaround is to call bibtex manually > from > Terminal. > Then > when I compile with \ll in MATLAB, the citations > correctly turn > from "?" > to numbers, and my reference page displays > correctly (rather > than being > blank). Removing the extra steps involved in > compiling > would be > fantastic though! > > On Thu, Jul 1, 2010 at 12:14 PM, Ted Pavlic > <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>>> wrote: > > Abbie -- > > > On 06/30/2010 04:46 PM, Abbie Kressner wrote: > > Do you happen to know what to do if \ll > does not > call > bibtex? > > > I'm responding to this message via the > vim-latex-devel list. > I've BCC'd you, but I advise you to continue > this > thread on > the list > where others can help too. > > So long as your LaTeX file has a > \bibliography{} > line in it, > the \ll compiler command will issue bibtex > sa needed. If > your LaTeX > file only has a \bibliography style command > but no > \bibliography > command, then Vim-LaTeX won't know to run > bibtex. In > fact, > in these > cases where there is no \bibliography > command, if > you try to run > bibtex manually it will give you an error. > > Of course, there is more than one way to > skin a cat. > However, I'm confident that if your LaTeX > document is > properly setup > for including a BibTeX bibliogrpahy, then > Vim-LaTeX will > make the > appropriate calls for you (using \ll). > > > Best -- > Ted > > -- > Ted Pavlic <te...@te... > <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>>> > > > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the > fight to > defeat ALS. > > > > -- > Ted Pavlic <te...@te... > <mailto:te...@te...> <mailto:te...@te... > <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to > defeat ALS. > > > > -- > Ted Pavlic <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to defeat ALS. > > > > -- > Ted Pavlic <te...@te... <mailto:te...@te...>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to defeat ALS. > > -- Ted Pavlic <te...@te...> Please visit my 2009 d'Feet ALS walk page: http://web.alsa.org/goto/tedp My family appreciates your support in the fight to defeat ALS. |
From: Ted P. <te...@te...> - 2010-07-01 19:56:46
|
Abbie -- It works fine for me -- \ll runs LaTeX and BibTeX and generates the BBL properly. (however, there was one \end{figure} that wasn't commented out in the TeX you sent, but you said you just now commented those out, and so that wouldn't be the source of the problem) I'm starting to suspect that vim isn't picking up your path the way it should (though I'm not sure why it's not having trouble running latex). Are you using vim, gvim, or MacVim? I know you're running a Mac, and there are lots of different ways to run vim on a Mac. Inside vim (however you run it), can you type :!which bibtex That is, the "colon" puts you into command mode, then the exclamation point will cause vim to run "which bibtex". You should see something like... /usr/bin/bibtex and then be prompted to press ENTER to continue. If you instead see something like "which: no bibtex in (...)", then vim isn't importing your path properly (in MacVim, you have to turn on a special option use login shells so that commands run from vim are setup with your path). --Ted On 07/01/2010 03:12 PM, Abbie Kressner wrote: > I have attached a tex file where I have commented out the figures > sections. I have also attached a bib file that I just created that only > contains the references that I use (there are currently just two). > > I am not sure what you mean by "status line in Vim". I see a bunch of > information flash across the window when I compile, and then it all > disappears when there is no "process-stopping" error. It goes pretty > fast, so I don't have a chance to see what it says. I looked at the log > file, but couldn't find anywhere that it specifically says it compiled > bibtex. The following is the only relevant information I could find... > > ] > No file *.bbl. > [14 > > > where * is the actual base filename. > > I just recently downloaded Vim-Latex in the last week or so, so it would > be strange if it was out-dated. I found the following in compiler.vim > that I believe you were referring to. > > " The first time we see if we need to run bibtex and if the .bbl file > > " changes, we will rerun latex. > if runCount == 0 && Tex_IsPresentInFile('\\bibdata', > mainFileName_root.'.aux') > let bibFileName = mainFileName_root.'.bbl' > > let biblinesBefore = Tex_CatFile(bibFileName) > > echomsg "Running '".Tex_GetVarValue('Tex_BibtexFlavor')."' ..." > let temp_mp = &mp | let &mp = Tex_GetVarValue('Tex_BibtexFlavor') > exec 'silent! make '.mainFileName_root > let &mp = temp_mp > > let biblinesAfter = Tex_CatFile(bibFileName) > > " If the .bbl file changed after running bibtex, we need to > " latex again. > if biblinesAfter != biblinesBefore > echomsg 'Need to rerun because bibliography file changed...' > call Tex_Debug('Tex_CompileMultipleTimes: Need to rerun because > bibliography file changed...', 'comp') > let needToRerun = 1 > endif > endif > > Does anything seem to be wrong? > > Once again, thank you so much for taking the time to help me!! > > > On Thu, Jul 1, 2010 at 2:36 PM, Ted Pavlic <te...@te... > <mailto:te...@te...>> wrote: > > Hm. All of that works for me. \ll runs LaTeX three times with > relevant runs of bibtex in between to build the BBL. > > Could you send a complete minimal non-working example? Something > that can be immediately opened in Vim (perhaps even with a minimal > bib, but I don't think the bib will matter; I can sub my own bib in) > that causes you problems when you \ll it. > > After you run \ll, what does the status line in Vim say? For > example, mine says "Run latex 3 time(s)" right now. Also, while \ll > is running, can you catch a glimpse of some of the other status > messages? It should report if/when it tries to run bibtex. > > Also, if you look where Vim-LaTeX is installed (e.g., in your > .vim/ftplugin/latex-suite/ or in > /usr/share/vim/vimfiles/ftplugin/latex-suite/ or similar on your > system), you should find a "compiler.vim" that has the Vim script > that implements \ll. Is it possible that you have a very very old > version of Vim-LaTeX that doesn't yet run bibtex? Search through > that file for "bibdata" -- you should find the relevant section of > code that checks the AUX file for bibdata and runs bibtex as needed. > You will also notice it references configuration variables that can > be changed by the user. It's possible that your defaults are either > set wrong or have been changed (?). > > --Ted > > > On 07/01/2010 01:24 PM, Abbie Kressner wrote: > > As far as I can tell, there are no errors. I deleted all the files > except the tex file and reran the \ll compile command. The aux file > contains the following lines. > > \bibstyle{IEEEtran} > \bibdata{/Users/abbiekre/Documents/_Papers/_Papers} > > > Also, here are the relevant lines in my beamer tex file. > > \appendix > \begin{frame}[allowframebreaks] > > \textbf{References} > > \bibliographystyle{IEEEtran} > > \bibliography{_Papers} > \end{frame} > > > Do you see any blaring errors? Any other ideas if not? > > Thanks! > > // Abbie > > Thanks in advance for anymore help! Hopefully I'll find a solution > eventually. > > On Thu, Jul 1, 2010 at 12:38 PM, Ted Pavlic <te...@te... > <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> wrote: > > Abbie -- > > Are you sure your LaTeX run isn't causing an error? > Vim-LaTeX will > cease processing on an error. There may be a subtle LaTeX error > causing the Vim-LaTeX compiler to halt early (although that > usually > would cause Vim-LaTeX to report an error). > > After LaTeX is run (by Vim-LaTeX), an "AUX" file should be > created. > That "AUX" file should have a line in it that has "\bibdata" > in it. > It is that line that causes Vim-LaTeX to call bibtex. > > Are there other details that might be confusing Vim-LaTeX? > (e.g., > spaces in file names, etc.?) > > --Ted > > > On 07/01/2010 12:33 PM, Abbie Kressner wrote: > > Thank you, Ted! > > I still haven't been able to get the \ll compiler command to > successful > compile a .bbl file. Any help would be greatly appreciated! > > My current workaround is to call bibtex manually from > Terminal. > Then > when I compile with \ll in MATLAB, the citations > correctly turn > from "?" > to numbers, and my reference page displays correctly (rather > than being > blank). Removing the extra steps involved in compiling > would be > fantastic though! > > On Thu, Jul 1, 2010 at 12:14 PM, Ted Pavlic > <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>> wrote: > > Abbie -- > > > On 06/30/2010 04:46 PM, Abbie Kressner wrote: > > Do you happen to know what to do if \ll does not > call > bibtex? > > > I'm responding to this message via the > vim-latex-devel list. > I've BCC'd you, but I advise you to continue this > thread on > the list > where others can help too. > > So long as your LaTeX file has a \bibliography{} > line in it, > the \ll compiler command will issue bibtex sa needed. If > your LaTeX > file only has a \bibliography style command but no > \bibliography > command, then Vim-LaTeX won't know to run bibtex. In > fact, > in these > cases where there is no \bibliography command, if > you try to run > bibtex manually it will give you an error. > > Of course, there is more than one way to > skin a cat. > However, I'm confident that if your LaTeX document is > properly setup > for including a BibTeX bibliogrpahy, then Vim-LaTeX will > make the > appropriate calls for you (using \ll). > > > Best -- > Ted > > -- > Ted Pavlic <te...@te... > <mailto:te...@te...> <mailto:te...@te... > <mailto:te...@te...>> > <mailto:te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>>> > > > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to > defeat ALS. > > > > -- > Ted Pavlic <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to defeat ALS. > > > > -- > Ted Pavlic <te...@te... <mailto:te...@te...>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to defeat ALS. > > -- Ted Pavlic <te...@te...> Please visit my 2009 d'Feet ALS walk page: http://web.alsa.org/goto/tedp My family appreciates your support in the fight to defeat ALS. |
From: Ted P. <te...@te...> - 2010-07-01 18:36:27
|
Hm. All of that works for me. \ll runs LaTeX three times with relevant runs of bibtex in between to build the BBL. Could you send a complete minimal non-working example? Something that can be immediately opened in Vim (perhaps even with a minimal bib, but I don't think the bib will matter; I can sub my own bib in) that causes you problems when you \ll it. After you run \ll, what does the status line in Vim say? For example, mine says "Run latex 3 time(s)" right now. Also, while \ll is running, can you catch a glimpse of some of the other status messages? It should report if/when it tries to run bibtex. Also, if you look where Vim-LaTeX is installed (e.g., in your .vim/ftplugin/latex-suite/ or in /usr/share/vim/vimfiles/ftplugin/latex-suite/ or similar on your system), you should find a "compiler.vim" that has the Vim script that implements \ll. Is it possible that you have a very very old version of Vim-LaTeX that doesn't yet run bibtex? Search through that file for "bibdata" -- you should find the relevant section of code that checks the AUX file for bibdata and runs bibtex as needed. You will also notice it references configuration variables that can be changed by the user. It's possible that your defaults are either set wrong or have been changed (?). --Ted On 07/01/2010 01:24 PM, Abbie Kressner wrote: > As far as I can tell, there are no errors. I deleted all the files > except the tex file and reran the \ll compile command. The aux file > contains the following lines. > > \bibstyle{IEEEtran} > \bibdata{/Users/abbiekre/Documents/_Papers/_Papers} > > > Also, here are the relevant lines in my beamer tex file. > > \appendix > \begin{frame}[allowframebreaks] > > \textbf{References} > > \bibliographystyle{IEEEtran} > > \bibliography{_Papers} > \end{frame} > > > Do you see any blaring errors? Any other ideas if not? > > Thanks! > > // Abbie > > Thanks in advance for anymore help! Hopefully I'll find a solution > eventually. > > On Thu, Jul 1, 2010 at 12:38 PM, Ted Pavlic <te...@te... > <mailto:te...@te...>> wrote: > > Abbie -- > > Are you sure your LaTeX run isn't causing an error? Vim-LaTeX will > cease processing on an error. There may be a subtle LaTeX error > causing the Vim-LaTeX compiler to halt early (although that usually > would cause Vim-LaTeX to report an error). > > After LaTeX is run (by Vim-LaTeX), an "AUX" file should be created. > That "AUX" file should have a line in it that has "\bibdata" in it. > It is that line that causes Vim-LaTeX to call bibtex. > > Are there other details that might be confusing Vim-LaTeX? (e.g., > spaces in file names, etc.?) > > --Ted > > > On 07/01/2010 12:33 PM, Abbie Kressner wrote: > > Thank you, Ted! > > I still haven't been able to get the \ll compiler command to > successful > compile a .bbl file. Any help would be greatly appreciated! > > My current workaround is to call bibtex manually from Terminal. > Then > when I compile with \ll in MATLAB, the citations correctly turn > from "?" > to numbers, and my reference page displays correctly (rather > than being > blank). Removing the extra steps involved in compiling would be > fantastic though! > > On Thu, Jul 1, 2010 at 12:14 PM, Ted Pavlic <te...@te... > <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> wrote: > > Abbie -- > > > On 06/30/2010 04:46 PM, Abbie Kressner wrote: > > Do you happen to know what to do if \ll does not call > bibtex? > > > I'm responding to this message via the > vim-latex-devel list. > I've BCC'd you, but I advise you to continue this thread on > the list > where others can help too. > > So long as your LaTeX file has a \bibliography{} > line in it, > the \ll compiler command will issue bibtex sa needed. If > your LaTeX > file only has a \bibliography style command but no \bibliography > command, then Vim-LaTeX won't know to run bibtex. In fact, > in these > cases where there is no \bibliography command, if you try to run > bibtex manually it will give you an error. > > Of course, there is more than one way to skin a cat. > However, I'm confident that if your LaTeX document is > properly setup > for including a BibTeX bibliogrpahy, then Vim-LaTeX will > make the > appropriate calls for you (using \ll). > > > Best -- > Ted > > -- > Ted Pavlic <te...@te... <mailto:te...@te...> > <mailto:te...@te... <mailto:te...@te...>>> > > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to defeat ALS. > > > > -- > Ted Pavlic <te...@te... <mailto:te...@te...>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to defeat ALS. > > -- Ted Pavlic <te...@te...> Please visit my 2009 d'Feet ALS walk page: http://web.alsa.org/goto/tedp My family appreciates your support in the fight to defeat ALS. |
From: Ted P. <te...@te...> - 2010-07-01 16:38:20
|
Abbie -- Are you sure your LaTeX run isn't causing an error? Vim-LaTeX will cease processing on an error. There may be a subtle LaTeX error causing the Vim-LaTeX compiler to halt early (although that usually would cause Vim-LaTeX to report an error). After LaTeX is run (by Vim-LaTeX), an "AUX" file should be created. That "AUX" file should have a line in it that has "\bibdata" in it. It is that line that causes Vim-LaTeX to call bibtex. Are there other details that might be confusing Vim-LaTeX? (e.g., spaces in file names, etc.?) --Ted On 07/01/2010 12:33 PM, Abbie Kressner wrote: > Thank you, Ted! > > I still haven't been able to get the \ll compiler command to successful > compile a .bbl file. Any help would be greatly appreciated! > > My current workaround is to call bibtex manually from Terminal. Then > when I compile with \ll in MATLAB, the citations correctly turn from "?" > to numbers, and my reference page displays correctly (rather than being > blank). Removing the extra steps involved in compiling would be > fantastic though! > > On Thu, Jul 1, 2010 at 12:14 PM, Ted Pavlic <te...@te... > <mailto:te...@te...>> wrote: > > Abbie -- > > > On 06/30/2010 04:46 PM, Abbie Kressner wrote: > > Do you happen to know what to do if \ll does not call bibtex? > > > I'm responding to this message via the vim-latex-devel list. > I've BCC'd you, but I advise you to continue this thread on the list > where others can help too. > > So long as your LaTeX file has a \bibliography{} line in it, > the \ll compiler command will issue bibtex sa needed. If your LaTeX > file only has a \bibliography style command but no \bibliography > command, then Vim-LaTeX won't know to run bibtex. In fact, in these > cases where there is no \bibliography command, if you try to run > bibtex manually it will give you an error. > > Of course, there is more than one way to skin a cat. > However, I'm confident that if your LaTeX document is properly setup > for including a BibTeX bibliogrpahy, then Vim-LaTeX will make the > appropriate calls for you (using \ll). > > > Best -- > Ted > > -- > Ted Pavlic <te...@te... <mailto:te...@te...>> > > Please visit my 2009 d'Feet ALS walk page: > http://web.alsa.org/goto/tedp > My family appreciates your support in the fight to defeat ALS. > > -- Ted Pavlic <te...@te...> Please visit my 2009 d'Feet ALS walk page: http://web.alsa.org/goto/tedp My family appreciates your support in the fight to defeat ALS. |
From: Ted P. <te...@te...> - 2010-07-01 16:14:23
|
Abbie -- On 06/30/2010 04:46 PM, Abbie Kressner wrote: > Do you happen to know what to do if \ll does not call bibtex? I'm responding to this message via the vim-latex-devel list. I've BCC'd you, but I advise you to continue this thread on the list where others can help too. So long as your LaTeX file has a \bibliography{} line in it, the \ll compiler command will issue bibtex sa needed. If your LaTeX file only has a \bibliography style command but no \bibliography command, then Vim-LaTeX won't know to run bibtex. In fact, in these cases where there is no \bibliography command, if you try to run bibtex manually it will give you an error. Of course, there is more than one way to skin a cat. However, I'm confident that if your LaTeX document is properly setup for including a BibTeX bibliogrpahy, then Vim-LaTeX will make the appropriate calls for you (using \ll). Best -- Ted -- Ted Pavlic <te...@te...> Please visit my 2009 d'Feet ALS walk page: http://web.alsa.org/goto/tedp My family appreciates your support in the fight to defeat ALS. |
From: <com...@fr...> - 2010-06-29 21:46:05
|
Hello Kay! > Message de Kay Smarczewski: mar 29/06/10, 21:22:36 +0200 > Have you tried snipMate? I use it to map some of my ALT Gr + xx keys > to special unicode characters. Thank you for this suggestion. I didn't know snipmate, it looks pretty powerful. But it doesn't seem to be really devoted to LaTeX macros and unicode characters. I don't want to add NEW shortcuts to access SOME mathematical unicode characters. I want to access EVERY mathematical symbol just by typing the USUAL (for me) corresponding LaTeX macro, not even followed by <TAB> (as snipmate requires) nor anything special. With other words I want to continue typing LaTeX as I always did, it's only what I SEE in vim that I want to change. There are several vim scripts devoted to this goal, and the best I found is undoubtedly unilatex.vim. It just requires some improvement to fit my taste, like using IMAP instead of imap, that's all. > I use the ucs (mathletters) package in LaTex. So LaTex can compile > UTF-8 characters. This is just a workaround for missing unicode > support. But it works for me. On their web site it is written: Due to time restrictions, I am not able to maintain this package anymore. New maintainer welcome. This is typically the kind of problem which makes me very shy on using special LaTeX packages. It happens also that some LaTex files are rejected by preprint servers when they require non standard packages. But most of all I DO LIKE that latex files remain plain ascii. It's only when I'm working on them that I would like to see symbols instead of macros, otherwise I think it's safer to keep this kind of files in plane ascii. Some of my colleagues used inputenc simply to type french accented characters directly in their latex files, but when the default encoding of our system moved from latin1 to utf-8 they experienced some problems: typically they copy and paste between old an new files --not with vim, which deals pretty well with this-- resulting in some cases in completely unrecoverable files where every accented character is replaced by a question mark (this happened to a friend of mine with a document which was something like 100 pages long… he was furious!). And eventually I want to be able to share my LaTeX sources with foreign colleagues without wondering which encoding is used and which package are available in their system. Thanks again for your kind interest but actually my question concerned IMAP, not really what I want to use it for. Best regards, LuX. |
From: Kay S. <kay...@ma...> - 2010-06-29 20:05:10
|
On Mon, Jun 28, 2010 at 11:11:44PM +0200, com...@fr... wrote: > I do not have such keys in my keyboard, I have a plane qwerty keyboard. > What I wanted is an easy access to mathematical unicode symbols from > my keyboard, not necessarily for LaTeX, but for mail, plain text, > whatever. For example I can type in this mail: ∀ ε ≤ 1, ∃ ζ ∈ ℂ… and > so on. (Apparently these characters are displayed properly on > the web site, I hope it is the same for your mail viewer.) Have you tried snipMate? I use it to map some of my ALT Gr + xx keys to special unicode characters. > What I really wanted actually was that when I open a tex file all the > LaTeX macros that it contains for mathematical symbols are converted > to UTF8 glyphs which represent them, and when I save the file the UTF8 > characters are converted back. So that I have a more "wysiwyg" LaTeX > editor, with much more compact and readable formulas, but still have > plain ascii LaTeX file, which latex can compile without problem. I use the ucs (mathletters) package in LaTex. So LaTex can compile UTF-8 characters. This is just a workaround for missing unicode support. But it works for me. Kind regards, Kay -- Kay Smarczewski Web: http://www.smarti.info Jabber: ka...@ja... |
From: <com...@fr...> - 2010-06-28 21:33:47
|
Here is the promised file… ------------------------------------------------------------------- " Mon, 28 Jun 2010 23:15:26 +0200 " WARNING: THIS SCRIPT IS A HACK FOR PRIVATE USE ONLY. " IT HAS NOT BEEND WIDELY TESTED. " PLEASE DO NOT SPREAD IT OUT. " NO WARRANTY, NO SUPPORT. " Description: This is a modified version of the vim plugin imaps.vim " written by Srinath Avadhanula and Benji Fisher, version number: " $Id: imaps.vim 997 2006-03-20 09:45:45Z srinathava $ " The feature implemented here, which is missing in imaps.vim at the " moment, is the possibility to use multibyte characters in the lhs of " the special mappings defined with the IMAP function of imaps.vim. " Example: I want to use IMAP mappings so that vim inserts unicode " glyphs ⊂ and ⊆ when I'm typing \subset and \subseteq respectively. " Doing this does not work: " call IMAP("\\subset", "⊂", "") " call IMAP("\\subseteq", "⊆", "") " Indeed the IMAP mapping for \\subset applies immediately, so that " when I type \\subseteq it results in ⊂eq, hence the IMAP mapping for " \\subseteq never applies. What is needed here is: " call IMAP("\\subset", "⊂", "") " call IMAP("⊂eq", "⊆", "") " This does not work either, because in imaps.vim the function IMAP is " puzzled by multibyte characters in the lhs. For example it calls vim " functions strlen() and strpart() which manipulates the lhs string one " byte a time, instead of one character a time. " The present script provides a work around for this problem, so that " the last two calls to IMAP above work as expected. However it is " only a hack, written by somebody who does not fully understand how " imaps.vim works. So it MUST be rewritten properly. " ========================= Beginning of the script ============================ " One first defines multibyte analogues of strlen() and strpart() {{{ " Example: " :let LL="⊂eq" " :echo strlen(LL) -- result --> 5 " :echo MultiByteStrlen("⊂CD") -- result --> 3 " :echo strpart(LL, 1) -- result --> <8a><82>eq " :echo MultiByteStrpart(LL, 1) -- result --> eq " Note: It might be that vim already implements such multybyte " analogues of strlen() and strpart(), but I couldn't find them. " My vim version: " VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Dec 1 2008 10:41:29) " Patches included : 1-60 function MultiByteStrlen(str) return strlen(substitute(a:str, ".", "x", "g")) endfunction function MultiByteStrpart(src,start,...) let lensrc=MultiByteStrlen(a:src) let start=a:start let len=lensrc-a:start if a:0 != 0 let len=a:1 endif if start < 0 let len=max([0,len+start]) let start=0 endif let len=min([len,lensrc-start]) let end=lensrc - len - start let src=substitute(a:src,"^.\\{".start."\\}","","") return substitute(src,".\\{".end."\\}$","","") endfunction " }}} " The remaining is the source of imaps.vim modified essentially by " using the above two functions at some places (possibly even where " strlen and strpart would work as well: once again, this is only a " blind hack). " line continuation used here. let s:save_cpo = &cpo set cpo&vim " ============================================================================== " Script Options / Variables " ============================================================================== " Options {{{ if !exists('g:Imap_StickyPlaceHolders') let g:Imap_StickyPlaceHolders = 1 endif if !exists('g:Imap_DeleteEmptyPlaceHolders') let g:Imap_DeleteEmptyPlaceHolders = 1 endif " }}} " Variables {{{ " s:LHS_{ft}_{char} will be generated automatically. It will look like " s:LHS_tex_o = 'fo\|foo\|boo' and contain all mapped sequences ending in "o". " s:Map_{ft}_{lhs} will be generated automatically. It will look like " s:Map_c_foo = 'for(<++>; <++>; <++>)', the mapping for "foo". " " }}} " ============================================================================== " functions for easy insert mode mappings. " ============================================================================== " IMAP: Adds a "fake" insert mode mapping. {{{ " For example, doing " IMAP('abc', 'def' ft) " will mean that if the letters abc are pressed in insert mode, then " they will be replaced by def. If ft != '', then the "mapping" will be " specific to the files of type ft. " " Using IMAP has a few advantages over simply doing: " imap abc def " 1. with imap, if you begin typing abc, the cursor will not advance and " long as there is a possible completion, the letters a, b, c will be " displayed on on top of the other. using this function avoids that. " 2. with imap, if a backspace or arrow key is pressed before completing " the word, then the mapping is lost. this function allows movement. " (this ofcourse means that this function is only limited to " left-hand-sides which do not have movement keys or unprintable " characters) " It works by only mapping the last character of the left-hand side. " when this character is typed in, then a reverse lookup is done and if " the previous characters consititute the left hand side of the mapping, " the previously typed characters and erased and the right hand side is " inserted " IMAP: set up a filetype specific mapping. " Description: " "maps" the lhs to rhs in files of type 'ft'. If supplied with 2 " additional arguments, then those are assumed to be the placeholder " characters in rhs. If unspecified, then the placeholder characters " are assumed to be '<+' and '+>' These placeholder characters in " a:rhs are replaced with the users setting of " [bg]:Imap_PlaceHolderStart and [bg]:Imap_PlaceHolderEnd settings. " function! IMAP(lhs, rhs, ft, ...) " Find the place holders to save for IMAP_PutTextWithMovement() . if a:0 < 2 let phs = '<+' let phe = '+>' else let phs = a:1 let phe = a:2 endif let hash = s:Hash(a:lhs) let s:Map_{a:ft}_{hash} = a:rhs let s:phs_{a:ft}_{hash} = phs let s:phe_{a:ft}_{hash} = phe " Add a:lhs to the list of left-hand sides that end with lastLHSChar: let lastLHSChar = MultiByteStrpart(a:lhs,MultiByteStrlen(a:lhs)-1) let hash = s:Hash(lastLHSChar) if !exists("s:LHS_" . a:ft . "_" . hash) let s:LHS_{a:ft}_{hash} = escape(a:lhs, '\') else let s:LHS_{a:ft}_{hash} = escape(a:lhs, '\') .'\|'. s:LHS_{a:ft}_{hash} endif " map only the last character of the left-hand side. if lastLHSChar == ' ' let lastLHSChar = '<space>' end exe 'inoremap <silent>' \ escape(lastLHSChar, '|') \ '<C-r>=<SID>LookupCharacter("' . \ escape(lastLHSChar, '\|"') . \ '")<CR>' endfunction " }}} " IMAP_list: list the rhs and place holders corresponding to a:lhs {{{ " " Added mainly for debugging purposes, but maybe worth keeping. function! IMAP_list(lhs) let char = MultiByteStrpart(a:lhs,MultiByteStrlen(a:lhs)-1) let charHash = s:Hash(char) if exists("s:LHS_" . &ft ."_". charHash) && a:lhs =~ s:LHS_{&ft}_{charHash} let ft = &ft elseif exists("s:LHS__" . charHash) && a:lhs =~ s:LHS__{charHash} let ft = "" else return "" endif let hash = s:Hash(a:lhs) return "rhs = " . s:Map_{ft}_{hash} . " place holders = " . \ s:phs_{ft}_{hash} . " and " . s:phe_{ft}_{hash} endfunction " }}} " LookupCharacter: inserts mapping corresponding to this character {{{ " " This function extracts from s:LHS_{&ft}_{a:char} or s:LHS__{a:char} " the longest lhs matching the current text. Then it replaces lhs with the " corresponding rhs saved in s:Map_{ft}_{lhs} . " The place-holder variables are passed to IMAP_PutTextWithMovement() . function! s:LookupCharacter(char) if IMAP_GetVal('Imap_FreezeImap', 0) == 1 return a:char endif let charHash = s:Hash(a:char) " The line so far, including the character that triggered this function: let text = strpart(getline("."), 0, col(".")-1) . a:char " Prefer a local map to a global one, even if the local map is shorter. " Is this what we want? Do we care? " Use '\V' (very no-magic) so that only '\' is special, and it was already " escaped when building up s:LHS_{&ft}_{charHash} . if exists("s:LHS_" . &ft . "_" . charHash) \ && text =~ "\\C\\V\\(" . s:LHS_{&ft}_{charHash} . "\\)\\$" let ft = &ft elseif exists("s:LHS__" . charHash) \ && text =~ "\\C\\V\\(" . s:LHS__{charHash} . "\\)\\$" let ft = "" else " If this is a character which could have been used to trigger an " abbreviation, check if an abbreviation exists. if a:char !~ '\k' let lastword = matchstr(getline('.'), '\k\+$', '') call IMAP_Debug('getting lastword = ['.lastword.']', 'imap') if lastword != '' " An extremeley wierd way to get around the fact that vim " doesn't have the equivalent of the :mapcheck() function for " abbreviations. let _a = @a exec "redir @a | silent! iab ".lastword." | redir END" let abbreviationRHS = matchstr(@a."\n", "\n".'i\s\+'.lastword.'\s\+@\?\zs.*\ze'."\n") call IMAP_Debug('getting abbreviationRHS = ['.abbreviationRHS.']', 'imap') if @a =~ "No abbreviation found" || abbreviationRHS == "" let @a = _a return a:char endif let @a = _a let abbreviationRHS = escape(abbreviationRHS, '\<"') exec 'let abbreviationRHS = "'.abbreviationRHS.'"' let lhs = lastword.a:char let rhs = abbreviationRHS.a:char let phs = IMAP_GetPlaceHolderStart() let phe = IMAP_GetPlaceHolderEnd() else return a:char endif else return a:char endif endif " Find the longest left-hand side that matches the line so far. " matchstr() returns the match that starts first. This automatically " ensures that the longest LHS is used for the mapping. if !exists('lhs') || !exists('rhs') let lhs = matchstr(text, "\\C\\V\\(" . s:LHS_{ft}_{charHash} . "\\)\\$") let hash = s:Hash(lhs) let rhs = s:Map_{ft}_{hash} let phs = s:phs_{ft}_{hash} let phe = s:phe_{ft}_{hash} endif if MultiByteStrlen(lhs) == 0 return a:char endif " enough back-spaces to erase the left-hand side; -1 for the last " character typed: let bs = substitute(MultiByteStrpart(lhs, 1), ".", "\<bs>", "g") return bs . IMAP_PutTextWithMovement(rhs, phs, phe) endfunction " }}} " IMAP_PutTextWithMovement: returns the string with movement appended {{{ " Description: " If a:str contains "placeholders", then appends movement commands to " str in a way that the user moves to the first placeholder and enters " insert or select mode. If supplied with 2 additional arguments, then " they are assumed to be the placeholder specs. Otherwise, they are " assumed to be '<+' and '+>'. These placeholder chars are replaced " with the users settings of [bg]:Imap_PlaceHolderStart and " [bg]:Imap_PlaceHolderEnd. function! IMAP_PutTextWithMovement(str, ...) " The placeholders used in the particular input string. These can be " different from what the user wants to use. if a:0 < 2 let phs = '<+' let phe = '+>' else let phs = escape(a:1, '\') let phe = escape(a:2, '\') endif let text = a:str " The user's placeholder settings. let phsUser = IMAP_GetPlaceHolderStart() let pheUser = IMAP_GetPlaceHolderEnd() " Problem: depending on the setting of the 'encoding' option, a character " such as "\xab" may not match itself. We try to get around this by " changing the encoding of all our strings. At the end, we have to " convert text back. let phsEnc = s:Iconv(phs, "encode") let pheEnc = s:Iconv(phe, "encode") let phsUserEnc = s:Iconv(phsUser, "encode") let pheUserEnc = s:Iconv(pheUser, "encode") let textEnc = s:Iconv(text, "encode") if textEnc != text let textEncoded = 1 else let textEncoded = 0 endif let pattern = '\V\(\.\{-}\)' .phs. '\(\.\{-}\)' .phe. '\(\.\*\)' " If there are no placeholders, just return the text. if textEnc !~ pattern call IMAP_Debug('Not getting '.phs.' and '.phe.' in '.textEnc, 'imap') return text endif " Break text up into "initial <+template+> final"; any piece may be empty. let initialEnc = substitute(textEnc, pattern, '\1', '') let templateEnc = substitute(textEnc, pattern, '\2', '') let finalEnc = substitute(textEnc, pattern, '\3', '') " If the user does not want to use placeholders, then remove all but the " first placeholder. " Otherwise, replace all occurences of the placeholders here with the " user's choice of placeholder settings. if exists('g:Imap_UsePlaceHolders') && !g:Imap_UsePlaceHolders let finalEnc = substitute(finalEnc, '\V'.phs.'\.\{-}'.phe, '', 'g') else let finalEnc = substitute(finalEnc, '\V'.phs.'\(\.\{-}\)'.phe, \ phsUserEnc.'\1'.pheUserEnc, 'g') endif " The substitutions are done, so convert back, if necessary. if textEncoded let initial = s:Iconv(initialEnc, "decode") let template = s:Iconv(templateEnc, "decode") let final = s:Iconv(finalEnc, "decode") else let initial = initialEnc let template = templateEnc let final = finalEnc endif " Build up the text to insert: " 1. the initial text plus an extra character; " 2. go to Normal mode with <C-\><C-N>, so it works even if 'insertmode' " is set, and mark the position; " 3. replace the extra character with tamplate and final; " 4. back to Normal mode and restore the cursor position; " 5. call IMAP_Jumpfunc(). let template = phsUser . template . pheUser " Old trick: insert and delete a character to get the same behavior at " start, middle, or end of line and on empty lines. let text = initial . "X\<C-\>\<C-N>:call IMAP_Mark('set')\<CR>\"_s" let text = text . template . final let text = text . "\<C-\>\<C-N>:call IMAP_Mark('go')\<CR>" let text = text . "i\<C-r>=IMAP_Jumpfunc('', 1)\<CR>" call IMAP_Debug('IMAP_PutTextWithMovement: text = ['.text.']', 'imap') return text endfunction " }}} " IMAP_Jumpfunc: takes user to next <+place-holder+> {{{ " Author: Luc Hermitte " Arguments: " direction: flag for the search() function. If set to '', search forwards, " if 'b', then search backwards. See the {flags} argument of the " |search()| function for valid values. " inclusive: In vim, the search() function is 'exclusive', i.e we always goto " next cursor match even if there is a match starting from the " current cursor position. Setting this argument to 1 makes " IMAP_Jumpfunc() also respect a match at the current cursor " position. 'inclusive'ness is necessary for IMAP() because a " placeholder string can occur at the very beginning of a map which " we want to select. " We use a non-zero value only in special conditions. Most mappings " should use a zero value. function! IMAP_Jumpfunc(direction, inclusive) " The user's placeholder settings. let phsUser = IMAP_GetPlaceHolderStart() let pheUser = IMAP_GetPlaceHolderEnd() let searchString = '' " If this is not an inclusive search or if it is inclusive, but the " current cursor position does not contain a placeholder character, then " search for the placeholder characters. if !a:inclusive || strpart(getline('.'), col('.')-1) !~ '\V\^'.phsUser let searchString = '\V'.phsUser.'\_.\{-}'.pheUser endif " If we didn't find any placeholders return quietly. if searchString != '' && !search(searchString, a:direction) return '' endif " Open any closed folds and make this part of the text visible. silent! foldopen! " Calculate if we have an empty placeholder or if it contains some " description. let template = \ matchstr(strpart(getline('.'), col('.')-1), \ '\V\^'.phsUser.'\zs\.\{-}\ze\('.pheUser.'\|\$\)') let placeHolderEmpty = !MultiByteStrlen(template) " If we are selecting in exclusive mode, then we need to move one step to " the right let extramove = '' if &selection == 'exclusive' let extramove = 'l' endif " Select till the end placeholder character. let movement = "\<C-o>v/\\V".pheUser."/e\<CR>".extramove " First remember what the search pattern was. s:RemoveLastHistoryItem will " reset @/ to this pattern so we do not create new highlighting. let g:Tex_LastSearchPattern = @/ " Now either goto insert mode or select mode. if placeHolderEmpty && g:Imap_DeleteEmptyPlaceHolders " delete the empty placeholder into the blackhole. return movement."\"_c\<C-o>:".s:RemoveLastHistoryItem."\<CR>" else return movement."\<C-\>\<C-N>:".s:RemoveLastHistoryItem."\<CR>gv\<C-g>" endif endfunction " }}} " Maps for IMAP_Jumpfunc {{{ " " These mappings use <Plug> and thus provide for easy user customization. When " the user wants to map some other key to jump forward, he can do for " instance: " nmap ,f <plug>IMAP_JumpForward " etc. " jumping forward and back in insert mode. imap <silent> <Plug>IMAP_JumpForward <c-r>=IMAP_Jumpfunc('', 0)<CR> imap <silent> <Plug>IMAP_JumpBack <c-r>=IMAP_Jumpfunc('b', 0)<CR> " jumping in normal mode nmap <silent> <Plug>IMAP_JumpForward i<c-r>=IMAP_Jumpfunc('', 0)<CR> nmap <silent> <Plug>IMAP_JumpBack i<c-r>=IMAP_Jumpfunc('b', 0)<CR> " deleting the present selection and then jumping forward. vmap <silent> <Plug>IMAP_DeleteAndJumpForward "_<Del>i<c-r>=IMAP_Jumpfunc('', 0)<CR> vmap <silent> <Plug>IMAP_DeleteAndJumpBack "_<Del>i<c-r>=IMAP_Jumpfunc('b', 0)<CR> " jumping forward without deleting present selection. vmap <silent> <Plug>IMAP_JumpForward <C-\><C-N>i<c-r>=IMAP_Jumpfunc('', 0)<CR> vmap <silent> <Plug>IMAP_JumpBack <C-\><C-N>`<i<c-r>=IMAP_Jumpfunc('b', 0)<CR> " }}} " Default maps for IMAP_Jumpfunc {{{ " map only if there is no mapping already. allows for user customization. " NOTE: Default mappings for jumping to the previous placeholder are not " provided. It is assumed that if the user will create such mappings " hself if e so desires. if !hasmapto('<Plug>IMAP_JumpForward', 'i') imap <C-J> <Plug>IMAP_JumpForward endif if !hasmapto('<Plug>IMAP_JumpForward', 'n') nmap <C-J> <Plug>IMAP_JumpForward endif if exists('g:Imap_StickyPlaceHolders') && g:Imap_StickyPlaceHolders if !hasmapto('<Plug>IMAP_JumpForward', 'v') vmap <C-J> <Plug>IMAP_JumpForward endif else if !hasmapto('<Plug>IMAP_DeleteAndJumpForward', 'v') vmap <C-J> <Plug>IMAP_DeleteAndJumpForward endif endif " }}} nmap <silent> <script> <plug><+SelectRegion+> `<v`> " ============================================================================== " enclosing selected region. " ============================================================================== " VEnclose: encloses the visually selected region with given arguments {{{ " Description: allows for differing action based on visual line wise " selection or visual characterwise selection. preserves the " marks and search history. function! VEnclose(vstart, vend, VStart, VEnd) " its characterwise if " 1. characterwise selection and valid values for vstart and vend. " OR " 2. linewise selection and invalid values for VStart and VEnd if (visualmode() == 'v' && (a:vstart != '' || a:vend != '')) || (a:VStart == '' && a:VEnd == '') let newline = "" let _r = @r let normcmd = "normal! \<C-\>\<C-n>`<v`>\"_s" exe "normal! \<C-\>\<C-n>`<v`>\"ry" if @r =~ "\n$" let newline = "\n" let @r = substitute(@r, "\n$", '', '') endif " In exclusive selection, we need to select an extra character. if &selection == 'exclusive' let movement = 8 else let movement = 7 endif let normcmd = normcmd. \ a:vstart."!!mark!!".a:vend.newline. \ "\<C-\>\<C-N>?!!mark!!\<CR>v".movement."l\"_s\<C-r>r\<C-\>\<C-n>" " this little if statement is because till very recently, vim used to " report col("'>") > length of selected line when `> is $. on some " systems it reports a -ve number. if col("'>") < 0 || col("'>") > MultiByteStrlen(getline("'>")) let lastcol = MultiByteStrlen(getline("'>")) else let lastcol = col("'>") endif if lastcol - col("'<") != 0 let len = lastcol - col("'<") else let len = '' endif " the next normal! is for restoring the marks. let normcmd = normcmd."`<v".len."l\<C-\>\<C-N>" " First remember what the search pattern was. s:RemoveLastHistoryItem " will reset @/ to this pattern so we do not create new highlighting. let g:Tex_LastSearchPattern = @/ silent! exe normcmd " this is to restore the r register. let @r = _r " and finally, this is to restore the search history. execute s:RemoveLastHistoryItem else exec 'normal! `<O'.a:VStart."\<C-\>\<C-n>" exec 'normal! `>o'.a:VEnd."\<C-\>\<C-n>" if &indentexpr != '' silent! normal! `<kV`>j= endif silent! normal! `> endif endfunction " }}} " ExecMap: adds the ability to correct an normal/visual mode mapping. {{{ " Author: Hari Krishna Dara <har...@ya...> " Reads a normal mode mapping at the command line and executes it with the " given prefix. Press <BS> to correct and <Esc> to cancel. function! ExecMap(prefix, mode) " Temporarily remove the mapping, otherwise it will interfere with the " mapcheck call below: let myMap = maparg(a:prefix, a:mode) exec a:mode."unmap ".a:prefix " Generate a line with spaces to clear the previous message. let i = 1 let clearLine = "\r" while i < &columns let clearLine = clearLine . ' ' let i = i + 1 endwhile let mapCmd = a:prefix let foundMap = 0 let breakLoop = 0 echon "\rEnter Map: " . mapCmd while !breakLoop let char = getchar() if char !~ '^\d\+$' if char == "\<BS>" let mapCmd = MultiByteStrpart(mapCmd, 0, MultiByteStrlen(mapCmd) - 1) endif else " It is the ascii code. let char = nr2char(char) if char == "\<Esc>" let breakLoop = 1 else let mapCmd = mapCmd . char if maparg(mapCmd, a:mode) != "" let foundMap = 1 let breakLoop = 1 elseif mapcheck(mapCmd, a:mode) == "" let mapCmd = MultiByteStrpart(mapCmd, 0, MultiByteStrlen(mapCmd) - 1) endif endif endif echon clearLine echon "\rEnter Map: " . mapCmd endwhile if foundMap if a:mode == 'v' " use a plug to select the region instead of using something like " `<v`> to avoid problems caused by some of the characters in " '`<v`>' being mapped. let gotoc = "\<plug><+SelectRegion+>" else let gotoc = '' endif exec "normal ".gotoc.mapCmd endif exec a:mode.'noremap '.a:prefix.' '.myMap endfunction " }}} " ============================================================================== " helper functions " ============================================================================== " Strntok: extract the n^th token from a list {{{ " example: Strntok('1,23,3', ',', 2) = 23 fun! <SID>Strntok(s, tok, n) return matchstr( a:s.a:tok[0], '\v(\zs([^'.a:tok.']*)\ze['.a:tok.']){'.a:n.'}') endfun " }}} " s:RemoveLastHistoryItem: removes last search item from search history {{{ " Description: Execute this string to clean up the search history. let s:RemoveLastHistoryItem = ':call histdel("/", -1)|let @/=g:Tex_LastSearchPattern' " }}} " s:Hash: Return a version of a string that can be used as part of a variable" {{{ " name. " Converts every non alphanumeric character into _{ascii}_ where {ascii} is " the ASCII code for that character... fun! s:Hash(text) return substitute(a:text, '\([^[:alnum:]]\)', \ '\="_".char2nr(submatch(1))."_"', 'g') endfun "" }}} " IMAP_GetPlaceHolderStart and IMAP_GetPlaceHolderEnd: "{{{ " return the buffer local placeholder variables, or the global one, or the default. function! IMAP_GetPlaceHolderStart() if exists("b:Imap_PlaceHolderStart") && MultiByteStrlen(b:Imap_PlaceHolderEnd) return b:Imap_PlaceHolderStart elseif exists("g:Imap_PlaceHolderStart") && MultiByteStrlen(g:Imap_PlaceHolderEnd) return g:Imap_PlaceHolderStart else return "<+" endfun function! IMAP_GetPlaceHolderEnd() if exists("b:Imap_PlaceHolderEnd") && MultiByteStrlen(b:Imap_PlaceHolderEnd) return b:Imap_PlaceHolderEnd elseif exists("g:Imap_PlaceHolderEnd") && MultiByteStrlen(g:Imap_PlaceHolderEnd) return g:Imap_PlaceHolderEnd else return "+>" endfun " }}} " s:Iconv: a wrapper for iconv()" {{{ " Problem: after " let text = "\xab" " (or using the raw 8-bit ASCII character in a file with 'fenc' set to " "latin1") if 'encoding' is set to utf-8, then text does not match itself: " echo text =~ text " returns 0. " Solution: When this happens, a re-encoded version of text does match text: " echo iconv(text, "latin1", "utf8") =~ text " returns 1. In this case, convert text to utf-8 with iconv(). " TODO: Is it better to use &encoding instead of "utf8"? Internally, vim " uses utf-8, and can convert between latin1 and utf-8 even when compiled with " -iconv, so let's try using utf-8. " Arguments: " a:text = text to be encoded or decoded " a:mode = "encode" (latin1 to utf8) or "decode" (utf8 to latin1) " Caution: do not encode and then decode without checking whether the text " has changed, becuase of the :if clause in encoding! function! s:Iconv(text, mode) if a:mode == "decode" return iconv(a:text, "utf8", "latin1") endif if a:text =~ '\V\^' . escape(a:text, '\') . '\$' return a:text endif let textEnc = iconv(a:text, "latin1", "utf8") if textEnc !~ '\V\^' . escape(a:text, '\') . '\$' call IMAP_Debug('Encoding problems with text '.a:text.' ', 'imap') endif return textEnc endfun "" }}} " IMAP_Debug: interface to Tex_Debug if available, otherwise emulate it {{{ " Description: " Do not want a memory leak! Set this to zero so that imaps always " starts out in a non-debugging mode. if !exists('g:Imap_Debug') let g:Imap_Debug = 0 endif function! IMAP_Debug(string, pattern) if !g:Imap_Debug return endif if exists('*Tex_Debug') call Tex_Debug(a:string, a:pattern) else if !exists('s:debug_'.a:pattern) let s:debug_{a:pattern} = a:string else let s:debug_{a:pattern} = s:debug_{a:pattern}.a:string endif endif endfunction " }}} " IMAP_DebugClear: interface to Tex_DebugClear if avaialable, otherwise emulate it {{{ " Description: function! IMAP_DebugClear(pattern) if exists('*Tex_DebugClear') call Tex_DebugClear(a:pattern) else let s:debug_{a:pattern} = '' endif endfunction " }}} " IMAP_PrintDebug: interface to Tex_DebugPrint if avaialable, otherwise emulate it {{{ " Description: function! IMAP_PrintDebug(pattern) if exists('*Tex_PrintDebug') call Tex_PrintDebug(a:pattern) else if exists('s:debug_'.a:pattern) echo s:debug_{a:pattern} endif endif endfunction " }}} " IMAP_Mark: Save the cursor position (if a:action == 'set') in a" {{{ " script-local variable; restore this position if a:action == 'go'. let s:Mark = "(0,0)" let s:initBlanks = '' function! IMAP_Mark(action) if a:action == 'set' let s:Mark = "(" . line(".") . "," . col(".") . ")" let s:initBlanks = matchstr(getline('.'), '^\s*') elseif a:action == 'go' execute "call cursor" s:Mark let blanksNow = matchstr(getline('.'), '^\s*') if MultiByteStrlen(blanksNow) > strlen(s:initBlanks) execute 'silent! normal! '.(MultiByteStrlen(blanksNow) - strlen(s:initBlanks)).'l' elseif MultiByteStrlen(blanksNow) < strlen(s:initBlanks) execute 'silent! normal! '.(MultiByteStrlen(s:initBlanks) - strlen(blanksNow)).'h' endif endif endfunction "" }}} " IMAP_GetVal: gets the value of a variable {{{ " Description: first checks window local, then buffer local etc. function! IMAP_GetVal(name, ...) if a:0 > 0 let default = a:1 else let default = '' endif if exists('w:'.a:name) return w:{a:name} elseif exists('b:'.a:name) return b:{a:name} elseif exists('g:'.a:name) return g:{a:name} else return default endif endfunction " }}} " ============================================================================== " A bonus function: Snip() " ============================================================================== " Snip: puts a scissor string above and below block of text {{{ " Desciption: "-------------------------------------%<------------------------------------- " this puts a the string "--------%<---------" above and below the visually " selected block of lines. the length of the 'tearoff' string depends on the " maximum string length in the selected range. this is an aesthetically more " pleasing alternative instead of hardcoding a length. "-------------------------------------%<------------------------------------- function! <SID>Snip() range let i = a:firstline let maxlen = -2 " find out the maximum virtual length of each line. while i <= a:lastline exe i let length = virtcol('$') let maxlen = (length > maxlen ? length : maxlen) let i = i + 1 endwhile let maxlen = (maxlen > &tw && &tw != 0 ? &tw : maxlen) let half = maxlen/2 exe a:lastline " put a string below exe "norm! o\<esc>".(half - 1)."a-\<esc>A%<\<esc>".(half - 1)."a-" " and above. its necessary to put the string below the block of lines " first because that way the first line number doesnt change... exe a:firstline exe "norm! O\<esc>".(half - 1)."a-\<esc>A%<\<esc>".(half - 1)."a-" endfunction com! -nargs=0 -range Snip :<line1>,<line2>call <SID>Snip() " }}} let &cpo = s:save_cpo " vim:ft=vim:ts=4:sw=4:noet:fdm=marker:commentstring=\"\ %s:nowrap ----- End forwarded message ----- |
From: <com...@fr...> - 2010-06-28 21:11:54
|
Hello Bodo, > Message de Bodo Graumann: Mon 28/06/10, 20:47:57 +0200 > I too have been looking for such a feature but without success so far. > Vims imap / iab commands don't support unicode in my setup. I > understand you have made that possible? I really would be interested in > how, and maybe I could apply this to IMAP... So at least one person except me is interested. :-) I did not succeed (and did not try) to modify imap / iab, but IMAP itself. IMAP accepts multibyte characters in the lhs but works wrongly with it, as I reported in my first post. The reason of the problem is that IMAP uses strlen() and strpart() functions of vim, which change strings byte per byte instead of character per character. I just filled this gap by writing analogous functions dealing with strings character by character and replaced strlen and strpart by my functions in various places. And it works! > btw, why do you want to replace it this way? I myself have those > unicode symbols accessible via my keyboard (neo-layout.org) and would > like to replace them with the latex-command: „call IMAP("∃", "\exists", > "tex");“. But could not imagine the use of the other direction... I do not have such keys in my keyboard, I have a plane qwerty keyboard. What I wanted is an easy access to mathematical unicode symbols from my keyboard, not necessarily for LaTeX, but for mail, plain text, whatever. For example I can type in this mail: ∀ ε ≤ 1, ∃ ζ ∈ ℂ… and so on. (Apparently these characters are displayed properly on the web site, I hope it is the same for your mail viewer.) You may say that this is of limited use. Well, I use it with some of my colleagues and I like it, but I agree that it is sort of a game. What I really wanted actually was that when I open a tex file all the LaTeX macros that it contains for mathematical symbols are converted to UTF8 glyphs which represent them, and when I save the file the UTF8 characters are converted back. So that I have a more "wysiwyg" LaTeX editor, with much more compact and readable formulas, but still have plain ascii LaTeX file, which latex can compile without problem. The plugin unilatex.vim does exactly this, but I experienced some problems with it (it makes non-reversible conversions between UTF8 and LaTeX) and missed some features such as the possibility at some point to see what are the actual macros I typed before continuing. So I needed a function doing conversions for some parts of the file at any moment, not only when loading and saving the file. And moreover I wanted to use IMAP mappings instead of imap mappings as provided by unilatex.vim. So I wrote my own plugin. I would like to share it with other people, and I would prefer it to be fully compatible with the IMAP function coming with imaps.vim (and the latex-suite), instead of replacing it with my own version of IMAP which would not be compatible with the official one. I'll send you my modified version of imaps.vim in the next post, so that you can test it if you want. You just have to move your imaps.vim to imaps.vim.bak, say, in order to disable it, and save my variant in your directory for vim's plugins (~/.vim/plugin in Linux) with name imaps_modified.vim if you want. Best regards, LuX. |
From: Bodo G. <ma...@bo...> - 2010-06-28 18:48:10
|
Hello LuX, hello list I too have been looking for such a feature but without success so far. Vims imap / iab commands don't support unicode in my setup. I understand you have made that possible? I really would be interested in how, and maybe I could apply this to IMAP... btw, why do you want to replace it this way? I myself have those unicode symbols accessible via my keyboard (neo-layout.org) and would like to replace them with the latex-command: „call IMAP("∃", "\exists", "tex");“. But could not imagine the use of the other direction... Best regards, Bodo Am Mon, 28 Jun 2010 19:33:09 +0200 schrieb com...@fr...: | | Hello! | | is there a chance that IMAP (the wonderfull function shipped with | imaps.vim) will accept multitbyte (unicode) characters in lhs strings | in the future? | | This is for use in a personal script which would convert on the fly | LaTeX macros for math symbols in their corresponding unicode | characters, as unilatex.vim from Jos van den Oever, but based on IMAP | instead of imap. Since IMAP applies immediately this requires in some | cases to chain IMAP mappings as follows (I hope the UTF-8 characters | below will be readable for you, they represent \subset and \subseteq): | | call IMAP("\\subset", "⊂", "") | call IMAP("⊂eq", "⊆", "") | | This does not work with my version of imaps.vim, which is puzzled by | the multibyte caracters in the lhs (more than 3 caracters are | cancelled when ⊂eq is replaced by ⊆). Version number: | | imaps.vim 997 2006-03-20 09:45:45Z srinathava $ | VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Dec 1 2008) | | I have succeeded to modify imaps.vim so that it accepts unicode | characters in lhs and the above commands work, without disturbing the | latex-suite (apparently). I can post it here if you are interested, | but it's only a trick, not a patch: I do not understand enough how | imaps.vim (and the latex-suite) works to be sure that this solution | will work properly in other contexts than mine. | | Best regards, | LuX. | | | ------------------------------------------------------------------------------ | This SF.net email is sponsored by Sprint | What will you do first with EVO, the first 4G phone? | Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first | _______________________________________________ | Vim-latex-devel mailing list | Vim...@li... | https://lists.sourceforge.net/lists/listinfo/vim-latex-devel |
From: <com...@fr...> - 2010-06-28 17:49:43
|
Hello! is there a chance that IMAP (the wonderfull function shipped with imaps.vim) will accept multitbyte (unicode) characters in lhs strings in the future? This is for use in a personal script which would convert on the fly LaTeX macros for math symbols in their corresponding unicode characters, as unilatex.vim from Jos van den Oever, but based on IMAP instead of imap. Since IMAP applies immediately this requires in some cases to chain IMAP mappings as follows (I hope the UTF-8 characters below will be readable for you, they represent \subset and \subseteq): call IMAP("\\subset", "⊂", "") call IMAP("⊂eq", "⊆", "") This does not work with my version of imaps.vim, which is puzzled by the multibyte caracters in the lhs (more than 3 caracters are cancelled when ⊂eq is replaced by ⊆). Version number: imaps.vim 997 2006-03-20 09:45:45Z srinathava $ VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Dec 1 2008) I have succeeded to modify imaps.vim so that it accepts unicode characters in lhs and the above commands work, without disturbing the latex-suite (apparently). I can post it here if you are interested, but it's only a trick, not a patch: I do not understand enough how imaps.vim (and the latex-suite) works to be sure that this solution will work properly in other contexts than mine. Best regards, LuX. |
From: Till M. <ope...@ti...> - 2010-06-26 13:20:11
|
Hi, On Tue, Jun 22, 2010 at 05:13:33PM +0200, Mario Santagiuliana wrote: > Nothing in the main trunk? sorry I was very busy and still am pretty busy, but I will try to spend some hours on reducing the backlog for vim-latex patches soon. Regards Till |
From: Mario S. <ma...@ma...> - 2010-06-22 15:33:32
|
Nothing in the main trunk? In data 24/4/2010 11:52:10, Mario Santagiuliana ha scritto: > I resolve partially the problem. > > I change something in compiler.vim. > I add some rule for okular. > In attachment diff file from old compiler.vim file to new. > > Now my configs line in vimrc for vim-latex are: > autocmd FileType tex setlocal spell spelllang=it > let g:tex_flavor='latex' > let g:Tex_CompileRule_dvi='latex -src-specials -interaction=nonstopmode $*' > let g:Tex_ViewRule_dvi = 'okular' > autocmd Filetype tex imap <C-i> <Plug>Tex_InsertItemOnThisLine > let g:Tex_ItemStyle_list = '\item <++>' > > I can start okular and view dvi file with \lv. > I can start search forward in okular with \ls. > > I have got one question: is it possible to start just one time okular with > \ls and the second time I use \ls tell to okular to move the view in the > specific line under the cursor and not open another time another okular > view? > > Can you give me a feedback? > > Thank you. > > In data 24/4/2010 01:17:24, Mario Santagiuliana ha scritto: > > Hy, I'm Mario Santagiuliana. > > I am an Italian Medical Student. Excuse me for my bad English. > > > > I want to configure vim-latex to search forward in dvi file. > > I'm working on fedora 12 64-bit. My desktop enviroment is Kde 4.4.2 so I > > use Okular. > > > > My vim installation: > > $ rpm -qa|grep vim|sort > > vim-common-7.2.411-1.fc12.x86_64 > > vim-enhanced-7.2.411-1.fc12.x86_64 > > vim-latex-1.8.23-1.20091230.r1079.fc12.noarch > > vim-latex-doc-1.8.23-1.20091230.r1079.fc12.noarch > > vim-minimal-7.2.411-1.fc12.x86_64 > > vim-X11-7.2.411-1.fc12.x86_64 > > > > My vimrc configuration for vim-latex: > > autocmd FileType tex setlocal spell spelllang=it > > let g:tex_flavor='latex' > > let g:Tex_CompileRule_dvi='latex -src-specials -interaction=nonstopmode > > $*' let g:Tex_ViewRuleComplete_dvi = 'okular $*.dvi >/dev/null 2>&1 &' > > autocmd Filetype tex imap <C-i> <Plug>Tex_InsertItemOnThisLine > > let g:Tex_ItemStyle_list = '\item <++>' > > > > In Okular I setup my editor with this line: > > vimx --remote-tab-silent +%l %f > > > > I start to edit a tex file without problem in vim. Generally I edit file > > with: $ vimx --servername VIMX file.tex > > so from Okular I can performe inverse search into my vim just opened. > > From vim with \ll I can compile my code. With \lv I can open Okular e > > from that I can do inverse search. > > > > With \ls I have nothing. > > > > From bash I can open my dvi file and view the line that I remember from > > vim session. For example I edit line 45 and I want to view (search > > forward) my change, whit \ls I can't do that, from commad line (bash) I > > can do that: $ okular file.dvi#src:45 > > > > Have you got any suggestion? > > > > Okular from versione 0.10 support forward search: > > http://okular.kde.org/news.php#itemOkular010released > > > > Thank you very much :) -- Mario Santagiuliana www.marionline.it |
From: SourceForge.net <no...@so...> - 2010-06-21 12:01:46
|
Bugs item #3019037, was opened at 2010-06-21 14:01 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=466456&aid=3019037&group_id=52322 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Kay Smarczewski () Assigned to: Nobody/Anonymous (nobody) Summary: Cite completion: included files not searched Initial Comment: It seems that the Tex_UseCiteCompletionVer2 method completing cites can not handle bibtex files included by input command. It only search for Bibtex inclusion in the main file. But it should search in the subfiles, too. The attached patch adds this feature to the new completion method and works for me. SVN revision: 1106 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=466456&aid=3019037&group_id=52322 |
From: SourceForge.net <no...@so...> - 2010-06-21 11:50:22
|
Bugs item #3019029, was opened at 2010-06-21 11:50 Message generated for change (Tracker Item Submitted) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=466456&aid=3019029&group_id=52322 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Cite completion bug Initial Comment: When I use the old cite completion (Tex_UseCiteCompletion2=0 or Tex_UsePhyton=0) I get the following error: Error detected while processing function Tex_Complete..Tex_GrepHelper..Tex_ScanFileForCite: line 67: E344: Can't find directory "fnameescape(expand('/home/kay/protokoll'))" in cdpath E472: Command failed The attached tiny patch solved the problem for me. SVN Revision: 1106 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=466456&aid=3019029&group_id=52322 |
From: Mister T. <me...@gm...> - 2010-06-17 06:15:18
|
Bayard Randel <kit <at> nocturne.net.nz> writes: > > The \lv command returns the following error on a clean install of latex-suite on OS X 10.6.3: > > Error detected while processing function Tex_ViewLaTeX:line 34:E121: Undefined variable: s:viewerE116: Invalid arguments for function strlen(s:viewer)E15: Invalid expression: strlen(s:viewer) > > > Any help would be appreciated, thanks. > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Vim-latex-devel mailing list > Vim-latex-devel <at> lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel > I get the same errors. Tried some solutions, such as renaming "macunix" to "unix" and explicitly calling 'open -a Preview', but neither fixes the problem for me. Some help would be appreciated. I'm on 10.5.8, hackintosh, i386 Using MacVim, Vim-Latex, all installed today. |
From: Dan M. O. H. <dm...@st...> - 2010-06-13 18:17:13
|
Den 5. mai 2010 kl. 02.02 skrev Dan Michael Olsen Heggø: > Den 4. mai 2010 kl. 02.05 skrev Vijay Kaul: >> Den 2. mai 2010 kl. 15.14 skrev iustifico: >>> Am 02.05.2010 um 00:12 schrieb Dan Michael Olsen Heggø: >>>> Den 1. mai 2010 kl. 22.51 skrev iustifico: >>>> >>>>> I tryed the tutorial to get in touch with latex-suite. When I was in the position **** in the example below I typed "e^^" like in the tutorial suggested. To get e^{x}. >>>>> >>>>> But after hitting "^^" this appeared: e^{}<++>}<++>}<++> >>>> >>>> What vim version/variant do you use on what os? On my Mac, I get the same problem as you with MacVim, but I get the correct behaviour with Vim in Terminal. Both vim 7.2. >>> >>> I am using VI Improved 7.2 on MacOS Snow Leopard (latest version). I tried it now in the Terminal and it works fine. We seem to have the same issues. >> >> I can't seem to get the problem to reproduce in Vim or MacVim... Steps to reproduce? > > To reproduce, just type "e^^" in insert mode in a tex-document.... but I just discovered that it depends on the keyboard layout. I can reproduce this with my Norwegian keyboard layout (and many other European ones), but I get the correct behaviour with a US keyboard layout. So this has to do with the caret key acting differently with different keyboard layouts. On many European keyboard layouts, it's main role is as a diacritical mark, so after typing it, the character is actually highlighted until the next character is typed. > > Since everything works fine in Terminal, I think this is more a MacVim issue than a Vim-Latex one. If you define you'r own mappings with carets, they will have the same problems (I tried ":imap ^^ hello"). I will file a MacVim bug on this, but I guess macros with the caret key are generally troublesome with these kinds of keyboard layouts. When I finally filed a bug on this issue a few days ago, the brilliant MacVim developer provided me with a fix to this issue shortly after! In Terminal, type defaults write org.vim.MacVim MMUseInlineIm 0 Then restart MacVim and it should work. |
From: Gary J. <gar...@sp...> - 2010-06-09 22:03:43
|
On 2010-06-09, Xavier Dectot wrote: > Le 09/Jun - 18:56, Xavier Dectot a écrit > > Le 09/Jun - 07:55, Gary Johnson a écrit > > > On 2010-06-09, Xavier Dectot wrote: > > > > Hello, and sorry if this has been asked a hundred times, but I can't > > > > seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and > > > > vim-latex suite, and some keymappings are definitely not working when > > > > I use "normal" vim, while they do work in gvim. Up to now, I've at > > > > least encountered the problem with F9, which capitalises the first > > > > letter of the line instead of launching TeX_Completion, and /rf, which > > > > does nothing at all. Any hint on what might be the problem or how to > > > > work it around ? > > > You can see what kind of terminal vim thinks you're using by > > > executing > > > > > > :set term? > > > > > > Does that match what you're really using? > > > > Well, yes and no. In urxvt, I :set term returns xterm, so something is wrong > > here, but in screen, which is where I am indeed typing, :set term returns > > screen, which is correct. Anyhow, in urxvt as in screen as in xterm, Ctrl-V F9 > > returns ^[[20~, so this should not be the problem. I even tried :set termcap > > tk_9=^[[20~ with no better result. > > :( > Oh, and FWIW, I tried > export TERM=rxvt-unicode > vim > and got the same results... First of all, to set the escape sequence for F9, the command is :set t_k9=^[[20~ where ^[ is a literal escape. You wrote that you set tk_9, which won't work. What does :set termcap show for the "t_k9 <F9>" entry? I have tried three configurations: 1. Cygwin rxvt running a Cygwin vim on Windows XP; 2. Cygwin rxvt running screen, then a Cygwin vim, again on Windows XP; and 3. Cygwin mintty on a different Windows XP box running rlogin across a VPN to a box running RHEL4, and on that box running screen and vim. In all cases, ":set termcap" shows an escape sequence defined for t_k9. Both rxvt and mintty cause 'term' to be "xterm" and screen causes 'term' to be "screen". I don't think I've done anything special to make that all work, so I think we should be able to find some simple fix for your environment. > Thanks for your help, BTW You're welcome. I'm sorry it hasn't done any good so far. Regards, Gary |
From: Xavier D. <xav...@gm...> - 2010-06-09 18:51:42
|
Le 09/Jun - 18:56, Xavier Dectot a écrit > Le 09/Jun - 07:55, Gary Johnson a écrit > > On 2010-06-09, Xavier Dectot wrote: > > > Hello, and sorry if this has been asked a hundred times, but I can't > > > seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and > > > vim-latex suite, and some keymappings are definitely not working when > > > I use "normal" vim, while they do work in gvim. Up to now, I've at > > > least encountered the problem with F9, which capitalises the first > > > letter of the line instead of launching TeX_Completion, and /rf, which > > > does nothing at all. Any hint on what might be the problem or how to > > > work it around ? > > > > When operating in a terminal, vim uses the termcap or terminfo > > database and an internal database to determine the sequence of > > characters that the terminal sends when you type certain keys such > > as F9. The terminal I'm using now, which emulates an xterm, emits > > > > <Esc>[20~ > > > > when I type F9. I determined that by entering insert mode, typing > > Ctrl-V, then hitting F9. If vim doesn't know that that > > sequence means F9, it will execute the sequence as a series of > > key strokes. > > > > <Esc> is a no-op in normal mode. > > [ is the first character of a number of "left bracket" > > commands. > > 2 There is no [2 command, so vim ignores both the [ and > > the 2. > > 0 moves the cursor to the beginning of the row. > > ~ toggles the case of the character under the cursor. > > > > So it appears that your vim is using an incomplete or incorrect > > database for your terminal. This is usually because the value of > > TERM in your environment is incorrect or because your system's > > terminfo database does not have an entry for your TERM. > > > > You can see what kind of terminal vim thinks you're using by > > executing > > > > :set term? > > > > Does that match what you're really using? > > Well, yes and no. In urxvt, I :set term returns xterm, so something is wrong > here, but in screen, which is where I am indeed typing, :set term returns > screen, which is correct. Anyhow, in urxvt as in screen as in xterm, Ctrl-V F9 > returns ^[[20~, so this should not be the problem. I even tried :set termcap > tk_9=^[[20~ with no better result. > :( Oh, and FWIW, I tried export TERM=rxvt-unicode vim and got the same results… Thanks for your help, BTW -- Xavier |
From: Xavier D. <xav...@gm...> - 2010-06-09 17:03:48
|
Le 09/Jun - 07:55, Gary Johnson a écrit > On 2010-06-09, Xavier Dectot wrote: > > Hello, and sorry if this has been asked a hundred times, but I can't > > seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and > > vim-latex suite, and some keymappings are definitely not working when > > I use "normal" vim, while they do work in gvim. Up to now, I've at > > least encountered the problem with F9, which capitalises the first > > letter of the line instead of launching TeX_Completion, and /rf, which > > does nothing at all. Any hint on what might be the problem or how to > > work it around ? > > When operating in a terminal, vim uses the termcap or terminfo > database and an internal database to determine the sequence of > characters that the terminal sends when you type certain keys such > as F9. The terminal I'm using now, which emulates an xterm, emits > > <Esc>[20~ > > when I type F9. I determined that by entering insert mode, typing > Ctrl-V, then hitting F9. If vim doesn't know that that > sequence means F9, it will execute the sequence as a series of > key strokes. > > <Esc> is a no-op in normal mode. > [ is the first character of a number of "left bracket" > commands. > 2 There is no [2 command, so vim ignores both the [ and > the 2. > 0 moves the cursor to the beginning of the row. > ~ toggles the case of the character under the cursor. > > So it appears that your vim is using an incomplete or incorrect > database for your terminal. This is usually because the value of > TERM in your environment is incorrect or because your system's > terminfo database does not have an entry for your TERM. > > You can see what kind of terminal vim thinks you're using by > executing > > :set term? > > Does that match what you're really using? Well, yes and no. In urxvt, I :set term returns xterm, so something is wrong here, but in screen, which is where I am indeed typing, :set term returns screen, which is correct. Anyhow, in urxvt as in screen as in xterm, Ctrl-V F9 returns ^[[20~, so this should not be the problem. I even tried :set termcap tk_9=^[[20~ with no better result. :( -- Xavier |
From: Gary J. <gar...@sp...> - 2010-06-09 14:55:41
|
On 2010-06-09, Xavier Dectot wrote: > Hello, and sorry if this has been asked a hundred times, but I can't > seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and > vim-latex suite, and some keymappings are definitely not working when > I use "normal" vim, while they do work in gvim. Up to now, I've at > least encountered the problem with F9, which capitalises the first > letter of the line instead of launching TeX_Completion, and /rf, which > does nothing at all. Any hint on what might be the problem or how to > work it around ? When operating in a terminal, vim uses the termcap or terminfo database and an internal database to determine the sequence of characters that the terminal sends when you type certain keys such as F9. The terminal I'm using now, which emulates an xterm, emits <Esc>[20~ when I type F9. I determined that by entering insert mode, typing Ctrl-V, then hitting F9. If vim doesn't know that that sequence means F9, it will execute the sequence as a series of key strokes. <Esc> is a no-op in normal mode. [ is the first character of a number of "left bracket" commands. 2 There is no [2 command, so vim ignores both the [ and the 2. 0 moves the cursor to the beginning of the row. ~ toggles the case of the character under the cursor. So it appears that your vim is using an incomplete or incorrect database for your terminal. This is usually because the value of TERM in your environment is incorrect or because your system's terminfo database does not have an entry for your TERM. You can see what kind of terminal vim thinks you're using by executing :set term? Does that match what you're really using? Regards, Gary |
From: Xavier D. <xav...@gm...> - 2010-06-09 13:25:13
|
Hello, and sorry if this has been asked a hundred times, but I can't seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and vim-latex suite, and some keymappings are definitely not working when I use "normal" vim, while they do work in gvim. Up to now, I've at least encountered the problem with F9, which capitalises the first letter of the line instead of launching TeX_Completion, and /rf, which does nothing at all. Any hint on what might be the problem or how to work it around ? TIA -- Xavier |
From: Vitali K. <bis...@gm...> - 2010-06-07 10:27:03
|
hello list, i would like to write my own scripts using the IMAP and the placeholder functions e.g for quick writing in BB-formatted forums. Is it possible and how can i do this without invoking the whole latex-suite? regards, Vitali |
From: Sébastien B. <bar...@cr...> - 2010-06-04 15:48:38
|
Hi Dan, thank you for your help. > I guess what you see is the stdout, which is not really a buffer. You're right, this is stdout. > In general, setting > :let g:Tex_Debug=1 > before you compile, and running > :call Tex_PrintDebug() > afterwards may give some hints. Indeed, I get useful info. comp : Tex_CompileLatex: using the makefile in the current directory comp : Tex_CompileLatex: execing [make! pdf] comp : Tex_RunLaTeX: errlist = [ 5:47 error: Undefined control sequence. \toto 6:5 error: Undefined control sequence. 7:7 error: Undefined control sequence. 8:7 error: Undefined control sequence. 9:9 error: Undefined control sequence.] comp : Tex_RunLaTeX: There were errors in compiling, breaking chain... comp : Tex_SetupErrorWindow: mfnlog = 21-rigidbody.log comp : not finding error pattern anywhere in quickfix window :21-rigidbody.log comp : -Tex_RunLaTeX > I'm not sure if there is a way to retrieve the > stdout afterwards without modifying vim-latex, but there probably is :) I would be happy if the buffer was not closed automatically. Thus no need to retrieve it ;) |