* ANN: Updated Vim scripts for ConTeXt @ 2016-10-10 10:49 Nicola 2016-10-11 6:39 ` Jan Willem Flamma 0 siblings, 1 reply; 10+ messages in thread From: Nicola @ 2016-10-10 10:49 UTC (permalink / raw) To: ntg-context [-- Attachment #1: Type: text/plain, Size: 894 bytes --] Hello, attached you find an update of the Vim scripts for ConTeXt. A few highlights: - jump commands ([[, ]], [{, ]}, ...); - jump to file included with \project, \component, etc... by typing gf when the cursor is above the filename; - tp (TeX paragraph) text object (e.g., use gqap to reflow a paragraph); - i$ and a$ text objects; - better integration with MetaPost (indentation and autocompletion inside \startMP...\stopMP... works automatically); - syntax highglighting can be enabled for any nested filetype (MetaPost and Lua are enabled by default); - compiler plugin, supporting mtxrun and Makefiles; - Asynchronous typesetting with :ConTeXt command. I plan to submit these changes for inclusion in Vim, but I'd like to get some feedback, especially re background typesetting and especially from Windows users. I recommend to test with Vim 8.0 patch 22 or later. Nicola [-- Attachment #2: context.tgz --] [-- Type: application/octet-stream, Size: 5137 bytes --] [-- Attachment #3: Type: text/plain, Size: 0 bytes --] [-- Attachment #4: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-10 10:49 ANN: Updated Vim scripts for ConTeXt Nicola @ 2016-10-11 6:39 ` Jan Willem Flamma 2016-10-11 7:26 ` Nicola 0 siblings, 1 reply; 10+ messages in thread From: Jan Willem Flamma @ 2016-10-11 6:39 UTC (permalink / raw) To: mailing list for ConTeXt users Hi Nicola, I’m relatively new to Vim and currently run it as installed (MacVIm 8.0 latest). Where do I have to place these files in order to use them? (~/.vim folder or do I have to copy the individual files into the respective Vim application subfolders?) After placing the files, is there anything else that needs to be done to ensure Vim picks up these files? Appreciate any help you can provide. Kind regards, Jan Willem Flamma > On 10 okt. 2016, at 12:49, Nicola <nvitacolonna@gmail.com> wrote: > > Hello, > attached you find an update of the Vim scripts for ConTeXt. > A few highlights: > > - jump commands ([[, ]], [{, ]}, ...); > > - jump to file included with \project, \component, etc... by typing > gf when the cursor is above the filename; > > - tp (TeX paragraph) text object (e.g., use gqap to reflow a paragraph); > > - i$ and a$ text objects; > > - better integration with MetaPost (indentation and autocompletion > inside \startMP...\stopMP... works automatically); > > - syntax highglighting can be enabled for any nested filetype (MetaPost > and Lua are enabled by default); > > - compiler plugin, supporting mtxrun and Makefiles; > > - Asynchronous typesetting with :ConTeXt command. > > I plan to submit these changes for inclusion in Vim, but I'd like to > get some feedback, especially re background typesetting and especially > from Windows users. > > I recommend to test with Vim 8.0 patch 22 or later. > > Nicola > <context.tgz>___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-11 6:39 ` Jan Willem Flamma @ 2016-10-11 7:26 ` Nicola 2016-10-11 9:00 ` Nicola 2016-10-11 9:33 ` Henning Hraban Ramm 0 siblings, 2 replies; 10+ messages in thread From: Nicola @ 2016-10-11 7:26 UTC (permalink / raw) To: ntg-context On 2016-10-11 06:39:16 +0000, Jan Willem Flamma said: > Hi Nicola, > > I’m relatively new to Vim and currently run it as installed (MacVIm 8.0 > latest). > > Where do I have to place these files in order to use them? (~/.vim > folder or do I have to copy the individual files into the respective > Vim application subfolders?) The files must be copied into ~/.vim. The structure should be: ~/.vim/ autoload/ context.vim compiler/ context.vim ftplugin/ context.vim indent/ context.vim syntax/ context.vim By doing so, Vim will pick up your files instead of its own. > After placing the files, is there anything else that needs to be done > to ensure Vim picks up these files? No, everything just works(tm) :) See :help ftplugin-overrule for the details. Nicola ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-11 7:26 ` Nicola @ 2016-10-11 9:00 ` Nicola 2016-10-11 9:33 ` Henning Hraban Ramm 1 sibling, 0 replies; 10+ messages in thread From: Nicola @ 2016-10-11 9:00 UTC (permalink / raw) To: ntg-context [-- Attachment #1: Type: text/plain, Size: 837 bytes --] On 2016-10-11 07:26:20 +0000, Nicola said: > No, everything just works(tm) :) Ehm, nearly. There was an error in setting the compiler. Please use the files attached below. You should be able to typeset the current document synchronously with :make or asynchronously with: :ConTeXt This latter command also accepts an optional path, in case you want to typeset a document different from the current buffer. In either case, 'mtxrun' must be in your $PATH. If necessary, you may set the path explicitly with let g:context_mtxrun = '/path/to/mtxrun' Something like let g:context_mtxrun = '$PATH=$HOME/context-beta/tex/texmf-osx-64/bin:$PATH mtxrun' should also work. Finally, you may check the status of the background jobs with :ConTeXtJobStatus and possibly kill all running jobs with :ConTeXtStopJobs Nicola [-- Attachment #2: context.tgz --] [-- Type: application/octet-stream, Size: 5269 bytes --] [-- Attachment #3: Type: text/plain, Size: 0 bytes --] [-- Attachment #4: Type: text/plain, Size: 489 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-11 7:26 ` Nicola 2016-10-11 9:00 ` Nicola @ 2016-10-11 9:33 ` Henning Hraban Ramm 2016-10-11 9:46 ` Nicola 1 sibling, 1 reply; 10+ messages in thread From: Henning Hraban Ramm @ 2016-10-11 9:33 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2016-10-11 um 09:26 schrieb Nicola <nvitacolonna@gmail.com>: > No, everything just works(tm) :) See :help ftplugin-overrule for the details. No, unfortunately not everything: Error detected while processing /Users/hraban/.vim/syntax/context.vim: line 22: E121: Undefined variable: v:t_list E15: Invalid expression: type(s:context_include) ==# v:t_list Error detected while processing /Users/hraban/.vim/ftplugin/context.vim: line 18: E539: Illegal character <j>: formatoptions+=tjcroql2 Maybe my vim is too old? VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 23 2016 20:20:57) Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) GPG Key ID 1C9B22FD ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-11 9:33 ` Henning Hraban Ramm @ 2016-10-11 9:46 ` Nicola 2016-10-12 10:18 ` DesdeChaves 2016-10-20 22:22 ` Sandiford Kevin 0 siblings, 2 replies; 10+ messages in thread From: Nicola @ 2016-10-11 9:46 UTC (permalink / raw) To: ntg-context On 2016-10-11 09:33:36 +0000, Henning Hraban Ramm said: > Am 2016-10-11 um 09:26 schrieb Nicola <nvitacolonna@gmail.com>: > >> No, everything just works(tm) :) See :help ftplugin-overrule for the details. > > No, unfortunately not everything: > > Error detected while processing /Users/hraban/.vim/syntax/context.vim: > line 22: > E121: Undefined variable: v:t_list > E15: Invalid expression: type(s:context_include) ==# v:t_list > Error detected while processing /Users/hraban/.vim/ftplugin/context.vim: > line 18: > E539: Illegal character <j>: formatoptions+=tjcroql2 > > > Maybe my vim is too old? > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 23 2016 20:20:57) Yes, the scripts are meant to be used with Vim 8. You should be able to work around those errors by replacing v:t_list with 3 and removing 'j' from formatoptions, but other things, like asynchronous typesetting, won't work anyway. Nicola ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-11 9:46 ` Nicola @ 2016-10-12 10:18 ` DesdeChaves 2016-10-12 13:51 ` Nicola 2016-10-20 22:22 ` Sandiford Kevin 1 sibling, 1 reply; 10+ messages in thread From: DesdeChaves @ 2016-10-12 10:18 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1818 bytes --] Thanks a lot. Autocompletation don't works for me. Perhaps I have a wrong .vimrc file. Can you share your .vimrc file or a working .vimrc file. I use MacVim only with Context. Thanks a lot. I'm in MacVim 8.0.27. Have a nice day, Jorge 2016-10-11 10:46 GMT+01:00 Nicola <nvitacolonna@gmail.com>: > On 2016-10-11 09:33:36 +0000, Henning Hraban Ramm said: > > Am 2016-10-11 um 09:26 schrieb Nicola <nvitacolonna@gmail.com>: >> >> No, everything just works(tm) :) See :help ftplugin-overrule for the >>> details. >>> >> >> No, unfortunately not everything: >> >> Error detected while processing /Users/hraban/.vim/syntax/context.vim: >> line 22: >> E121: Undefined variable: v:t_list >> E15: Invalid expression: type(s:context_include) ==# v:t_list >> Error detected while processing /Users/hraban/.vim/ftplugin/context.vim: >> line 18: >> E539: Illegal character <j>: formatoptions+=tjcroql2 >> >> >> Maybe my vim is too old? >> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 23 2016 20:20:57) >> > > Yes, the scripts are meant to be used with Vim 8. You should be able to > work around those errors by replacing v:t_list with 3 and removing 'j' > from formatoptions, but other things, like asynchronous typesetting, > won't work anyway. > > Nicola > > > > ____________________________________________________________ > _______________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list > info/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ____________________________________________________________ > _______________________ > -- Atentamente DesdeChaves [-- Attachment #1.2: Type: text/html, Size: 3548 bytes --] [-- Attachment #2: Type: text/plain, Size: 489 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-12 10:18 ` DesdeChaves @ 2016-10-12 13:51 ` Nicola 0 siblings, 0 replies; 10+ messages in thread From: Nicola @ 2016-10-12 13:51 UTC (permalink / raw) To: ntg-context On 2016-10-12 10:18:10 +0000, DesdeChaves said: > Thanks a lot. > > Autocompletation don't works for me. Perhaps I have a wrong .vimrc > file. Can you share your .vimrc file or a working .vimrc file. There is nothing to be configured. The mapping to trigger the completion is <C-X><C-O> (ctrl-x followed by ctrl-o) and it works inside \startMP...\stopMP... blocks. Doesn't that work for you? Maybe you expected the suggestions to pop-up without pressing any key? For that, you need a plugin like NeoComplete or AutoComplPop. Nicola ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-11 9:46 ` Nicola 2016-10-12 10:18 ` DesdeChaves @ 2016-10-20 22:22 ` Sandiford Kevin 2016-10-21 1:05 ` Nicola 1 sibling, 1 reply; 10+ messages in thread From: Sandiford Kevin @ 2016-10-20 22:22 UTC (permalink / raw) To: mailing list for ConTeXt users Hi Nicola, Thanks for the vim scripts, I've been looking for something like this for a while. Just a minor problem, on windows the :make or :ConTeXt commands fail if there is a space in the path or file name. Changing fnameescape() to shellescape() in the definition of l:makeprg in line 21 of compiler/context.vim seems to fix this, i.e. let &l:makeprg = \ 'cd ' . shellescape(fnamemodify(bufname("%"), ':p:h')) \ . ' && ' . get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun')) \ . ' --script context --autogenerate --nonstopmode --synctex=' \ . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0') \ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', '')) \ . ' ' . shellescape(expand('%:p:t')) Regards, Kevin ------ Original Message ------ From: "Nicola" <nvitacolonna@gmail.com> To: ntg-context@ntg.nl Sent: 11/10/2016 10:46:30 Subject: Re: [NTG-context] ANN: Updated Vim scripts for ConTeXt >On 2016-10-11 09:33:36 +0000, Henning Hraban Ramm said: > >>Am 2016-10-11 um 09:26 schrieb Nicola <nvitacolonna@gmail.com>: >> >>>No, everything just works(tm) :) See :help ftplugin-overrule for the >>>details. >> >>No, unfortunately not everything: >> >>Error detected while processing /Users/hraban/.vim/syntax/context.vim: >>line 22: >>E121: Undefined variable: v:t_list >>E15: Invalid expression: type(s:context_include) ==# v:t_list >>Error detected while processing >>/Users/hraban/.vim/ftplugin/context.vim: >>line 18: >>E539: Illegal character <j>: formatoptions+=tjcroql2 >> >> >>Maybe my vim is too old? >>VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 23 2016 20:20:57) > >Yes, the scripts are meant to be used with Vim 8. You should be able to >work around those errors by replacing v:t_list with 3 and removing 'j' >from formatoptions, but other things, like asynchronous typesetting, >won't work anyway. > >Nicola > > >___________________________________________________________________________________ >If your question is of interest to others as well, please add an entry >to the Wiki! > >maillist : ntg-context@ntg.nl / >http://www.ntg.nl/mailman/listinfo/ntg-context >webpage : http://www.pragma-ade.nl / http://context.aanhet.net >archive : http://foundry.supelec.fr/projects/contextrev/ >wiki : http://contextgarden.net >___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ANN: Updated Vim scripts for ConTeXt 2016-10-20 22:22 ` Sandiford Kevin @ 2016-10-21 1:05 ` Nicola 0 siblings, 0 replies; 10+ messages in thread From: Nicola @ 2016-10-21 1:05 UTC (permalink / raw) To: ntg-context [-- Attachment #1: Type: text/plain, Size: 766 bytes --] On 21/10/2016 00:22, Sandiford Kevin wrote: > Hi Nicola, > > Thanks for the vim scripts, I've been looking for something like this > for a while. > > Just a minor problem, on windows the :make or :ConTeXt commands fail if > there is a space in the path or file name. > > Changing fnameescape() to shellescape() in the definition of l:makeprg > in line 21 of compiler/context.vim seems to fix this Good catch, thanks! Could you please try the attached version, which should fix that and has other changes? Please note that in the current version, :make does not `cd` any more (that was causing other issues), so you have to do it yourself before typesetting (using :cd or :lcd). That said, :ConTeXt should be a better option under all circumstances. Nicola [-- Attachment #2: context.tgz --] [-- Type: application/x-gzip, Size: 5847 bytes --] [-- Attachment #3: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-10-21 1:05 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-10-10 10:49 ANN: Updated Vim scripts for ConTeXt Nicola 2016-10-11 6:39 ` Jan Willem Flamma 2016-10-11 7:26 ` Nicola 2016-10-11 9:00 ` Nicola 2016-10-11 9:33 ` Henning Hraban Ramm 2016-10-11 9:46 ` Nicola 2016-10-12 10:18 ` DesdeChaves 2016-10-12 13:51 ` Nicola 2016-10-20 22:22 ` Sandiford Kevin 2016-10-21 1:05 ` Nicola
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).