diff options
author | Karl Berry <karl@freefriends.org> | 2015-05-15 21:48:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-05-15 21:48:27 +0000 |
commit | 4d401c525d61b9b3c1523cfc58d9f6b5e94f6cfa (patch) | |
tree | e3aab162c3c5cab53d70148a294fec2cb44f5838 /Master/texmf-dist | |
parent | a548ec3bc5488db7ddf39fe5192cd080f5f85374 (diff) |
context-vim (15may15)
git-svn-id: svn://tug.org/texlive/trunk@37413 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/context/third/vim/vim.txt | 29 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv | 8 |
2 files changed, 33 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/context/third/vim/vim.txt b/Master/texmf-dist/doc/context/third/vim/vim.txt index 5079c3058a1..660c208f176 100644 --- a/Master/texmf-dist/doc/context/third/vim/vim.txt +++ b/Master/texmf-dist/doc/context/third/vim/vim.txt @@ -374,7 +374,9 @@ where `<dimen>` is a valid TeX dimension. Wrapping lines --------------- -By default, long lines are not wrapped. If you want to wrap long lines, set +By default, long lines are not wrapped. If your source code has long lines, +there are two alternatives. First, you can allow the lines to break at spaces by +setting \definevimtyping [...] @@ -384,6 +386,31 @@ By default, long lines are not wrapped. If you want to wrap long lines, set The default value is `lines=fixed`. +Second, you can allow lines to break between _compound_ words, such as +`long/path`, `long-path`, `long+path`, etc by setting + + \definevimtyping + [...] + [... + option={packed,hyphenated}, + ...] + +The default value of `option` is `packed`. + +Note that with both these alternatives do not hyphenate a word, merely break +lines at spaces or at the boundary of compound words. If you really need to +hyphenate words, use + + \definevimtyping + [...] + [... + option={packed,hyphenated}, + align=hyphenated, + ...] + +Note that you have to add **both** `option=hyphenated` and `align=hyphenated`. +The default value of align is `nothypenated`. + Highlighting lines ------------------ diff --git a/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv b/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv index fe529086c61..f51ebe2d7b6 100644 --- a/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv +++ b/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv @@ -1,6 +1,6 @@ %D \module
%D [ file=t-syntax-highlight,
-%D version=2014.08.13,
+%D version=2015.05.14,
%D title=\CONTEXT\ User Module,
%D subtitle=Code syntax highlighting,
%D author=Aditya Mahajan,
@@ -9,7 +9,7 @@ %D email=adityam <at> ieee <dot> org,
%D license=Simplified BSD License]
-\writestatus{loading}{Code syntax highlighting (ver: 2014.08.13)}
+\writestatus{loading}{Code syntax highlighting (ver: 2015.05.14)}
\startmodule [syntax-highlight]
\usemodule [syntax-groups]
@@ -86,11 +86,13 @@ {\dorecurse{##1}{\obeyedspace}}%
\forgetall
+ \usealignparameter\externalfilterparameter
\doifinset{\externalfilterparameter\c!option}{\v!packed}
{\setupwhitespace[\v!none,\v!flexible]}%
\doadaptleftskip{\externalfilterparameter\c!margin}%
+ \setbreakpoints[compound]% Only works is `option=hyphenated` is set.
\doifnotinset{\externalfilterparameter\c!option}{\v!hyphenated}
{\language\minusone}%
@@ -155,7 +157,7 @@ \c!location=\v!paragraph,
\c!style=\tttf,
\c!color=,
- \c!align={\v!flushleft,\v!nothyphenated}, %Does not work due to \forgetall
+ \c!align={\v!flushleft,\v!nothyphenated},
\c!filtercommand=echo, % placeholder
\c!continue=yes,
\c!read=\v!yes,
|