Re: [NTG-context] vim module: modify line wrapping

2015-05-15 Thread Andreas Schneider

Am 14.05.2015 17:26, schrieb Aditya Mahajan:


I just released a newer version to t-vim where the `option=hypenated`
is documented. It is also possible to hyphenate words by using

\definevimtyping[...][..., option={packed,hyphenated}, 
align=hyphenated, ]


Aditya


Thank you for that solution. It doesn't work quite that way, though:

1. Only [...,option=hyphenated,...] breaks many, but not all lines. 
\setupalign[verytolerant,stretch] helps here.
2. [...,option={packed,hyphenated},align=hyphenated,...] doesn't work at 
all
3. Omitting packed, ie. [...,option=hyphenated,align=hyphenated,...] 
works as expected. Even single words are broken then.


I will currently stick with option 1, since option 3 has a negative side 
effect: it inserts hyphen marks (-), which looks weird in source code.


All in all I have two wishes regarding wordwrap and hyphenation, and 
hope they aren't too hard to grant :-)


1. Add an option to omit the hyphenation mark/sign (whatever it is 
actually called).
2. Add an option to indent the wrapped line to the line it was wrapped 
from.


Remark for wish #2:
Currently breaking lines look like:
|  This is an indented and |
|broken line.  |

It would be nicer to have:
|  This is an indented and |
|  broken line.|

Thanks for adjusting the documentation of the vim module and giving me 
all these options. I now have a ConTeXt produced document I can proudly 
release to the customer :-)


Best regards,
Andreas
___
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
___

Re: [NTG-context] vim module: modify line wrapping

2015-05-15 Thread Aditya Mahajan

On Fri, 15 May 2015, Andreas Schneider wrote:


Am 14.05.2015 17:26, schrieb Aditya Mahajan:


I just released a newer version to t-vim where the `option=hypenated`
is documented. It is also possible to hyphenate words by using

\definevimtyping[...][..., option={packed,hyphenated}, 
align=hyphenated, ]


Aditya


Thank you for that solution. It doesn't work quite that way, though:

1. Only [...,option=hyphenated,...] breaks many, but not all lines. 
\setupalign[verytolerant,stretch] helps here.


Depends on a bit on the breakpoints. Can you send an example where it 
doesn't work.


2. [...,option={packed,hyphenated},align=hyphenated,...] doesn't work at 
all


It should. I'll look into this.

3. Omitting packed, ie. [...,option=hyphenated,align=hyphenated,...] 
works as expected. Even single words are broken then.


I will currently stick with option 1, since option 3 has a negative side 
effect: it inserts hyphen marks (-), which looks weird in source code.


I know. That is why, as I say in the documentation, option 3 is a last 
case resort.


All in all I have two wishes regarding wordwrap and hyphenation, and 
hope they aren't too hard to grant :-)


1. Add an option to omit the hyphenation mark/sign (whatever it is 
actually called).


This should be easy (provided someone can tell how to do this in normal 
text :-)


2. Add an option to indent the wrapped line to the line it was wrapped 
from.


This is too difficult to do correctly, and I am not going to implement a 
half-baked solution. One option is to run your code through a formatter 
(prettifier) upfront. It is easy to plug that in to the t-vim module.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] vim module: modify line wrapping

2015-05-14 Thread Aditya Mahajan

On Wed, 13 May 2015, Andreas Schneider wrote:


Here is an example:


\usemodule[vim]
\definevimtyping[JSON][syntax=javascript, lines=split, strip=yes]


Add `option=hyphenated`.


\starttext
The example:

\startJSON
{
	sample_parameter: 
http://some/url/with/a/lot/of/path/elements?and=somevariables=too;

}
\stopJSON

\stoptext


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] vim module: modify line wrapping

2015-05-14 Thread Aditya Mahajan

On Thu, 14 May 2015, Aditya Mahajan wrote:


On Wed, 13 May 2015, Andreas Schneider wrote:


Here is an example:





\usemodule[vim]
\definevimtyping[JSON][syntax=javascript, lines=split, strip=yes]


Add `option=hyphenated`.


I just released a newer version to t-vim where the `option=hypenated` is 
documented. It is also possible to hyphenate words by using


\definevimtyping[...][..., option={packed,hyphenated}, align=hyphenated, 
]


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] vim module: modify line wrapping

2015-05-13 Thread Andreas Schneider

Am 12.05.2015 21:09, schrieb Aditya Mahajan:


Does \setbreakpoints[compound] help? If not, please post a minimal 
example.


Aditya


Unfortunately not.

Here is an example:


\usemodule[vim]
\definevimtyping[JSON][syntax=javascript, lines=split, strip=yes]

\starttext
The example:

\startJSON
{
	sample_parameter: 
http://some/url/with/a/lot/of/path/elements?and=somevariables=too;

}
\stopJSON

\stoptext



___
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
___

[NTG-context] vim module: modify line wrapping

2015-05-12 Thread Andreas Schneider

Hi,

vimtyping already offers line wrapping by specifying lines=split.
However, some /lines/with/very/long/sequences/of/somehow/breakable/chars 
do not break at all.
In that given example, I would like to also allow vimtyping to break 
lines at /. Is something like that possible? And if so: how?


Best regards,
Andreas
___
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
___

Re: [NTG-context] vim module: modify line wrapping

2015-05-12 Thread Aditya Mahajan

On Tue, 12 May 2015, Andreas Schneider wrote:


Hi,

vimtyping already offers line wrapping by specifying lines=split.
However, some /lines/with/very/long/sequences/of/somehow/breakable/chars 
do not break at all.
In that given example, I would like to also allow vimtyping to break 
lines at /. Is something like that possible? And if so: how?


Does \setbreakpoints[compound] help? If not, please post a minimal 
example.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___