Bug with vimtyping: no line numbers
I think there is a bug in the (latest) beta that was not there earlier this year. In particular, it worked (and still works) in the version current version: 2014.03.19 23:11 but it show *no* line numbers at all in the (latest) beta: current version: 2014.07.30 10:31 A minimal example follows: \usemodule[vim] \setupvimtyping[% numbering=yes,% numberdistance=2em] \definevimtyping[cpp][syntax=cpp] \starttext \startcpp #include <iostream> int main() { std::cout << "Hello, world!" << std::endl; } \stopcpp \stoptext Sadly, I'm not a ConTeXt nor a lua expert so maybe anybody can help? Regards, Günter p.s.: BTW, I still could not resolve the bug with integrating tikz but I verified that it works with the stated version above (2014.03.19 23:11) on my system (nothing else changed).
Hi, On Mon, 11 Aug 2014, Günter Kolousek wrote:
I think there is a bug in the (latest) beta that was not there earlier this year. In particular, it worked (and still works) in the version
current version: 2014.03.19 23:11
but it show *no* line numbers at all in the (latest) beta:
I do not have access to a computer that has the latest context right now. I'll look into it when I get a chance. In the meantime, can you check if \starttext \startlinenumbering \input knuth \stoplinenumbering \stoptext numbers the lines. Aditya
Hi,
this works with the latest beta!
Günter
Am Tue, 12 Aug 2014 11:36:00 -0400 (EDT)
schrieb Aditya Mahajan
Hi,
On Mon, 11 Aug 2014, Günter Kolousek wrote:
I think there is a bug in the (latest) beta that was not there earlier this year. In particular, it worked (and still works) in the version
current version: 2014.03.19 23:11
but it show *no* line numbers at all in the (latest) beta:
I do not have access to a computer that has the latest context right now. I'll look into it when I get a chance.
In the meantime, can you check if
\starttext \startlinenumbering \input knuth \stoplinenumbering \stoptext
numbers the lines.
Aditya
On Mon, 11 Aug 2014, Günter Kolousek wrote:
I think there is a bug in the (latest) beta that was not there earlier this year. In particular, it worked (and still works) in the version
current version: 2014.03.19 23:11
but it show *no* line numbers at all in the (latest) beta:
current version: 2014.07.30 10:31
A minimal example follows:
\usemodule[vim]
\setupvimtyping[% numbering=yes,% numberdistance=2em] \definevimtyping[cpp][syntax=cpp]
\starttext \startcpp #include <iostream>
int main() { std::cout << "Hello, world!" << std::endl; } \stopcpp \stoptext
Sadly, I'm not a ConTeXt nor a lua expert so maybe anybody can help?
A quick work around is to add numberlocation=left in your setup. For example: \usemodule[vim] \setupvimtyping [ numbering=yes, numberdistance=1em, numberlocation=left, ] \definevimtyping[cpp][syntax=cpp] \starttext \startcpp #include <iostream> int main() { std::cout << "Hello, world!" << std::endl; } \stopcpp \stoptext numberlocation=left is the default anyways, so I don't know why the bug occurs. Aditya
On Wed, 13 Aug 2014, Wolfgang Schuster wrote:
Am 13.08.2014 um 16:39 schrieb Aditya Mahajan
: numberlocation=left is the default anyways, so I don't know why the bug occurs.
Could be a inheritance problem (maybe wrong parent setting) and vimtyping doesn’t fall back to the default syntaxhighlightingparameter values.
Was much simpler. A missing % before a comment! https://github.com/adityam/filter/commit/e2608a7c8a83ec190f5e269136cb1f5e96c... This has been around for around 2 years, and I think that a change in the way the linenumbering mechanism works brought this out. I will push an update to vim soon. Aditya
It works with this workaround. Thanx for the help!
Regards
Günter
Am Wed, 13 Aug 2014 10:39:46 -0400 (EDT)
schrieb Aditya Mahajan
On Mon, 11 Aug 2014, Günter Kolousek wrote:
I think there is a bug in the (latest) beta that was not there earlier this year. In particular, it worked (and still works) in the version
current version: 2014.03.19 23:11
but it show *no* line numbers at all in the (latest) beta:
current version: 2014.07.30 10:31
A minimal example follows:
\usemodule[vim]
\setupvimtyping[% numbering=yes,% numberdistance=2em] \definevimtyping[cpp][syntax=cpp]
\starttext \startcpp #include <iostream>
int main() { std::cout << "Hello, world!" << std::endl; } \stopcpp \stoptext
Sadly, I'm not a ConTeXt nor a lua expert so maybe anybody can help?
A quick work around is to add
numberlocation=left
in your setup. For example:
\usemodule[vim]
\setupvimtyping [ numbering=yes, numberdistance=1em, numberlocation=left, ]
\definevimtyping[cpp][syntax=cpp]
\starttext \startcpp #include <iostream>
int main() { std::cout << "Hello, world!" << std::endl; } \stopcpp \stoptext
numberlocation=left is the default anyways, so I don't know why the bug occurs.
Aditya
participants (3)
-
Aditya Mahajan
-
Günter Kolousek
-
Wolfgang Schuster