Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative colorscheme per vimtyping env #37

Closed
lorenzncode opened this issue Jun 23, 2020 · 2 comments
Closed

Alternative colorscheme per vimtyping env #37

lorenzncode opened this issue Jun 23, 2020 · 2 comments
Assignees
Labels

Comments

@lorenzncode
Copy link

Thanks for the module! I found one limitation/bug in that I cannot apply a unique colorscheme per vimtyping environment. Example where both comments are in blue in the pdf.

\usemodule[vim]

\definevimtyping [pythontest]
    [
        syntax=python,
        alternative=pythoncolor,
        directory=.,
    ]

\startcolorscheme [pythoncolor]
    \definesyntaxgroup
        [Comment]
        [color=red]
\stopcolorscheme

\definevimtyping [contexttest]
    [
        syntax=context,
        alternative=contextcolor,
        directory=.,
    ]

\startcolorscheme [contextcolor]
    \definesyntaxgroup
        [Comment]
        [color=blue]
\stopcolorscheme


\starttext

This is Python:
\startpythontest
# a comment
\stoppythontest

This is ConTeXt:
\startcontexttest
% a comment
\stopcontexttest

\stoptext

version info from log:
system > ConTeXt ver: 2020.01.30 14:13 MKIV beta fmt: 2020.6.9 int: english/english
loading > Vim syntax highlighting (ver: 2020.05.17)

@adityam
Copy link
Owner

adityam commented Jun 23, 2020

I can confirm this and it is a bug. Let me check how to fix it.

@adityam adityam self-assigned this Jun 23, 2020
@adityam adityam added the Bug label Jun 23, 2020
adityam added a commit that referenced this issue Jun 23, 2020
Closes #37

In the old code, the name of the color just depended on the syntaxgroup
but not on the colorscheme. So, if another colorscheme change the color
of the same syntax group, the name of the color got overridden.

The fix includes the name of the colorscheme in the name of the color.
adityam added a commit that referenced this issue Jun 23, 2020
Closes #37

In the old code, the name of the color just depended on the syntaxgroup
but not on the colorscheme. So, if another colorscheme change the color
of the same syntax group, the name of the color got overridden.

The fix includes the name of the colorscheme in the name of the color.
@adityam
Copy link
Owner

adityam commented Jun 23, 2020

I pushed a patch (3ea3bef) that fixed this issue. Thanks for the precise bug-report.

I will release a new version soon with the bugfix.

adityam added a commit that referenced this issue Feb 28, 2021
Fix a regression of issue #37. At some stage, I made a mistake in
merging a feature branch and overwrote the changes in the bugfix
3ea3bef. Reapplying these changes.
adityam added a commit that referenced this issue Mar 2, 2021
Fix a regression of issue #37. At some stage, I made a mistake in
merging a feature branch and overwrote the changes in the bugfix
3ea3bef. Reapplying these changes.

Closes issue #42.
adityam added a commit that referenced this issue Mar 2, 2021
Squashed commit of the following:

commit e7b676dd436dff4694bec325cde87f0cc6349281
Author: Aditya Mahajan <adityam@umich.edu>
Date:   Mon Mar 1 22:33:45 2021 -0500

    Reapplying the changes in 3ea3bef

    Fix a regression of issue #37. At some stage, I made a mistake in
    merging a feature branch and overwrote the changes in the bugfix
    3ea3bef. Reapplying these changes.

    Closes issue #42.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants