I have updated the Vim page at ConTeXt Garden: http://wiki.contextgarden.net/Vim It may be considered as the official documentation of the ConTeXt scripts in Vim, as the only other documentation is the source code :) Happy editing! Nicola
Excellent piece of work. Many thanks!
On 1 Nov 2016, at 14:13, Nicola
wrote: I have updated the Vim page at ConTeXt Garden:
http://wiki.contextgarden.net/Vim
It may be considered as the official documentation of the ConTeXt scripts in Vim, as the only other documentation is the source code :)
Happy editing! 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 : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Tue, 1 Nov 2016, Nicola wrote:
I have updated the Vim page at ConTeXt Garden:
http://wiki.contextgarden.net/Vim
It may be considered as the official documentation of the ConTeXt scripts in Vim, as the only other documentation is the source code :)
Hi Nicola, I wonder if you have seen my vim runtime files: https://github.com/adityam/vim-context The main file to look at is the syntax highlighting file. I haven't compared carefully with your version (haven't installed vim 8 yet), but there are a few differences. It may be worthwhile to merge the two syntax files. The metapost syntax highlighting file defines a few keywords that are used by metafun. Could these be merged to your mp syntax highlighting file? The indent file is adapted from (I think) latex-suite's indent file with modificiations that suit my taste. I am not sure these should go into the default vim indent file, but it may be worthwhile for you to take a quick look. The ftplugin file mainly contains shortcuts like `a expand to α, etc; again, adapted from latex-suite (which in-turn borred the idea from auctex). These depend on a ftplugin file provided by latex-suite. There were also a few macros to reflow text, but your code is more robust and has more features. The compiler file is old and I haven't tested it in a few years, so please ignore it. Thanks, Aditya
On 02/11/2016 19:39, Aditya Mahajan wrote:
On Tue, 1 Nov 2016, Nicola wrote:
I have updated the Vim page at ConTeXt Garden:
http://wiki.contextgarden.net/Vim
It may be considered as the official documentation of the ConTeXt scripts in Vim, as the only other documentation is the source code
Hi Nicola,
I wonder if you have seen my vim runtime files: https://github.com/adityam/vim-context
Unfortunately not, I worked only on those already in Vim.
The main file to look at is the syntax highlighting file. I haven't compared carefully with your version (haven't installed vim 8 yet), but there are a few differences. It may be worthwhile to merge the two syntax files.
Ok, I will take a look. I see that your file does not depend on plaintex.vim. It might be a good idea to remove that dependency...
The metapost syntax highlighting file defines a few keywords that are used by metafun. Could these be merged to your mp syntax highlighting file?
The syntax scripts in Vim already cover all of MetaFun. MetaFun keywords are highlighted by default inside ConTeXt documents; for MetaPost files ('mp' filetype), you must put let g:mp_metafun_macros = 1 into your vimrc.
The indent file is adapted from (I think) latex-suite's indent file with modificiations that suit my taste. I am not sure these should go into the default vim indent file, but it may be worthwhile for you to take a quick look.
MetaPost indentation is tough. I have rewritten the indent script in Vim from scratch, and now it works reasonably well. I will try yours, but you might try the one currently in Vim, too.
The ftplugin file mainly contains shortcuts like `a expand to α, etc; again, adapted from latex-suite (which in-turn borred the idea from auctex). These depend on a ftplugin file provided by latex-suite. There were also a few macros to reflow text, but your code is more robust and has more features.
The compiler file is old and I haven't tested it in a few years, so
I will look into those, too. Do you know that Vim has built-in support for digraphs (:h digraphs)? For example, α can be obtained by typing <c-k>a* in Insert mode. please
ignore it.
OK. I could maybe create a GitHub repository, to make it easier to merge your work. Nicola
On Wed, 2 Nov 2016, Nicola wrote:
The syntax scripts in Vim already cover all of MetaFun. MetaFun keywords are highlighted by default inside ConTeXt documents; for MetaPost files ('mp' filetype), you must put
let g:mp_metafun_macros = 1
into your vimrc.
Ah, great!
The indent file is adapted from (I think) latex-suite's indent file with modificiations that suit my taste. I am not sure these should go into the default vim indent file, but it may be worthwhile for you to take a quick look.
MetaPost indentation is tough. I have rewritten the indent script in Vim from scratch, and now it works reasonably well. I will try yours, but you might try the one currently in Vim, too.
I did not change metapost indenting, but defined some rules for indenting of context files. I believe that your indent file does not attempt to indent context files (I may be mistaken because I am just reading the .vim files, not testing it as I don't have vim8 yet).
The ftplugin file mainly contains shortcuts like `a expand to α, etc; again, adapted from latex-suite (which in-turn borred the idea from auctex). These depend on a ftplugin file provided by latex-suite. There were also a few macros to reflow text, but your code is more robust and has more features.
I will look into those, too. Do you know that Vim has built-in support for digraphs (:h digraphs)? For example, α can be obtained by typing <c-k>a* in Insert mode.
I know of digraphis but it can be tricky to remember all the mapping (for example for \subset, \circ, etc.). Auctex uses fairly intuitive shortcuts.
I could maybe create a GitHub repository, to make it easier to merge your work.
That will be nice. Then I can also send you pull requests for specific things. Aditya
On 11/2/2016 11:35 PM, Aditya Mahajan wrote:
On Wed, 2 Nov 2016, Nicola wrote:
The syntax scripts in Vim already cover all of MetaFun. MetaFun keywords are highlighted by default inside ConTeXt documents; for MetaPost files ('mp' filetype), you must put
let g:mp_metafun_macros = 1
into your vimrc.
Ah, great!
if you need a command list .. there are scripts for that (no vim yet, but for scite we ship simple lists of commands)
The indent file is adapted from (I think) latex-suite's indent file with modificiations that suit my taste. I am not sure these should go into the default vim indent file, but it may be worthwhile for you to take a quick look.
MetaPost indentation is tough. I have rewritten the indent script in Vim from scratch, and now it works reasonably well. I will try yours, but you might try the one currently in Vim, too.
I did not change metapost indenting, but defined some rules for indenting of context files. I believe that your indent file does not attempt to indent context files (I may be mistaken because I am just reading the .vim files, not testing it as I don't have vim8 yet).
The ftplugin file mainly contains shortcuts like `a expand to α, etc; again, adapted from latex-suite (which in-turn borred the idea from auctex). These depend on a ftplugin file provided by latex-suite. There were also a few macros to reflow text, but your code is more robust and has more features.
I will look into those, too. Do you know that Vim has built-in support for digraphs (:h digraphs)? For example, α can be obtained by typing <c-k>a* in Insert mode.
I know of digraphis but it can be tricky to remember all the mapping (for example for \subset, \circ, etc.). Auctex uses fairly intuitive shortcuts.
I could maybe create a GitHub repository, to make it easier to merge your work.
That will be nice. Then I can also send you pull requests for specific things.
Aditya
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 03/11/2016 10:45, Hans Hagen wrote:
On 11/2/2016 11:35 PM, Aditya Mahajan wrote:
On Wed, 2 Nov 2016, Nicola wrote:
The syntax scripts in Vim already cover all of MetaFun. MetaFun keywords are highlighted by default inside ConTeXt documents; for MetaPost files ('mp' filetype), you must put
let g:mp_metafun_macros = 1
into your vimrc.
Ah, great!
if you need a command list .. there are scripts for that (no vim yet, but for scite we ship simple lists of commands)
Are these scripts available somewhere? I've rolled out my own, but I will happily use/adapt something "more official".
The indent file is adapted from (I think) latex-suite's indent file with modificiations that suit my taste. I am not sure these should go into the default vim indent file, but it may be worthwhile for you to take a quick look.
MetaPost indentation is tough. I have rewritten the indent script in Vim from scratch, and now it works reasonably well. I will try yours, but you might try the one currently in Vim, too.
I did not change metapost indenting, but defined some rules for indenting of context files. I believe that your indent file does not attempt to indent context files (I may be mistaken because I am just reading the .vim files, not testing it as I don't have vim8 yet).
Correct, no indentation for ConTeXt. This is something that may be worth adding.
I could maybe create a GitHub repository, to make it easier to merge your work.
That will be nice. Then I can also send you pull requests for specific things.
Ok, I'll let you know when I've done it. Pull requests will make my life much easier :) Nicola
On 11/3/2016 11:25 AM, Nicola wrote:
On 03/11/2016 10:45, Hans Hagen wrote:
On 11/2/2016 11:35 PM, Aditya Mahajan wrote:
On Wed, 2 Nov 2016, Nicola wrote:
The syntax scripts in Vim already cover all of MetaFun. MetaFun keywords are highlighted by default inside ConTeXt documents; for MetaPost files ('mp' filetype), you must put
let g:mp_metafun_macros = 1
into your vimrc.
Ah, great!
if you need a command list .. there are scripts for that (no vim yet, but for scite we ship simple lists of commands)
Are these scripts available somewhere?
what kind of datafile do you need?
I've rolled out my own, but I will happily use/adapt something "more official".
The indent file is adapted from (I think) latex-suite's indent file with modificiations that suit my taste. I am not sure these should go into the default vim indent file, but it may be worthwhile for you to take a quick look.
MetaPost indentation is tough. I have rewritten the indent script in Vim from scratch, and now it works reasonably well. I will try yours, but you might try the one currently in Vim, too.
I did not change metapost indenting, but defined some rules for indenting of context files. I believe that your indent file does not attempt to indent context files (I may be mistaken because I am just reading the .vim files, not testing it as I don't have vim8 yet).
Correct, no indentation for ConTeXt. This is something that may be worth adding.
I could maybe create a GitHub repository, to make it easier to merge your work.
That will be nice. Then I can also send you pull requests for specific things.
Ok, I'll let you know when I've done it. Pull requests will make my life much easier :)
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 : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 03/11/2016 12:28, Hans Hagen wrote:
if you need a command list .. there are scripts for that (no vim yet, but for scite we ship simple lists of commands)
Are these scripts available somewhere?
what kind of datafile do you need?
I need the list of all macros, vardefs, internals, and global variables from all MetaFun files. The format should be Vim's syntax format: https://github.com/vim/vim/blob/master/runtime/syntax/mp.vim Nicola
Hans, Nicola, Being a vim user (and not presently taking much advantage of the syntax highlighting), and a MP fan, I will take care of this (in coordination with Hans, eventually). Alan
On 3 Nov 2016, at 08:37, Nicola
wrote: On 03/11/2016 12:28, Hans Hagen wrote:
if you need a command list .. there are scripts for that (no vim yet, but for scite we ship simple lists of commands)
Are these scripts available somewhere?
what kind of datafile do you need?
I need the list of all macros, vardefs, internals, and global variables from all MetaFun files. The format should be Vim's syntax format:
https://github.com/vim/vim/blob/master/runtime/syntax/mp.vim
Nicola
On 05/11/2016 15:45, Alan Braslau wrote:
Hans, Nicola,
Being a vim user (and not presently taking much advantage of the syntax highlighting), and a MP fan, I will take care of this (in coordination with Hans, eventually).
Alan
For what is worth, I attach the Ruby script I am using. It outputs the keywords in a format that can be used directly in Vim. Nicola
Nicola mailto:nvitacolonna@gmail.com 3. November 2016 um 11:25 On 03/11/2016 10:45, Hans Hagen wrote:
On 11/2/2016 11:35 PM, Aditya Mahajan wrote:
On Wed, 2 Nov 2016, Nicola wrote:
The syntax scripts in Vim already cover all of MetaFun. MetaFun keywords are highlighted by default inside ConTeXt documents; for MetaPost files ('mp' filetype), you must put
let g:mp_metafun_macros = 1
into your vimrc.
Ah, great!
if you need a command list .. there are scripts for that (no vim yet, but for scite we ship simple lists of commands)
Are these scripts available somewhere?
I've rolled out my own, but I will happily use/adapt something "more official". I guess Hans means the files under $TEXMF/texmf-context/context/data/scite/context
- scite-context-data-context.properties - scite-context-data-interfaces.properties - scite-context-data-metafun.properties - scite-context-data-metapost.properties - scite-context-data-tex.properties Wolfgang
On 02/11/2016 23:35, Aditya Mahajan wrote:
On Wed, 2 Nov 2016, Nicola wrote:
I could maybe create a GitHub repository, to make it easier to merge your work.
That will be nice. Then I can also send you pull requests for specific things.
Here it is: https://github.com/lifepillar/vim-context-metapost The updates to the above repository will be periodically forwarded for inclusion in Vim. You may use the issue tracker at GitHub to suggest improvements or report bugs (I have already included a syntax highlighting enhancement suggested by Wolfgang Schuster). Pull requests are welcome, too! Nicola
participants (6)
-
Aditya Mahajan
-
Alan Braslau
-
Hans Hagen
-
Jan Willem Flamma
-
Nicola
-
Wolfgang Schuster