after playing around with vim viki & deplate I got some
questions and hope to find some answers.
* tabstop
- how can I change the tabsize for the viki plugin?
* foldtext
- Is there a chance to get a custom folding text?
- Can I disable autom. folding at all?
* highlight
(I'm on a white background)
- Anchor marks like this '#myanchor' are invisible
in my colorset.
- How can I influence vikis colorset? Overwriting your
hi groups did not work.
* markup (textstyles)
- When I do this in viki
**This is a bold test**
__This is a underline test__
==This is a typwriter test==
//This is a italic test//
I get, after running deplate, that in html
<p>**This is a bold test**</p>
<p><em>This is a underline test</em></p>
<p>≡This is a typwriter test≡</p>
<p>//This is a italic test//</p>
hmm? Is this a bug or do I use it wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> * tabstop
> - how can I change the tabsize for the viki plugin?
Which tabstop? The viki ftplugin uses &shiftwidth in some places if
that's what you mean.
> * foldtext
> - Is there a chance to get a custom folding text?
Define a function VikiFoldLevel() (see :help 'foldexpr'). You might want
to check ftplugin/viki.vim and g:vikiFolds first as there are already
several versions for this. If you have a better idea, please let me
know.
> - Can I disable autom. folding at all?
set foldlevelstart=99
or
let g:vikiFolds = ''
> * highlight
> (I'm on a white background)
> - Anchor marks like this '#myanchor' are invisible
> in my colorset.
Okay, that's defined in syntax/viki.vim
You could define your own colors in after/syntax/viki.vim, I guess. It's
possible that you have to do
:hi clear vikiAnchor
first.
> - How can I influence vikis colorset?
Which ones? The links are set in autoload/viki_viki.vim and can be
configured via g:viki_highlight_inexistent_{&background} and
g:viki_highlight_hyperlink_{&background}.
> * markup (textstyles)
> **This is a bold test**
> ==This is a typwriter test==
> //This is a italic test//
This isn't viki/deplate markup. For typewriter use ''this is typewriter
test''. There is no single wiki markup. Every wiki has about it's own.
And there are diverging views on which styles should be supported.
deplate doesn't support bold, italic, or underline for the same reason
LaTeX doesn't support them (right away).
If you want to have this markup, you should create your own viki family
and maybe create a deplate input filter -- although it could also be
done using the #DefParticle region. Creating an input filter isn't too
difficult but involves some coding in ruby. You could take a look at
deplate/input/rdoc.rb and deplate/wiki-markup.rb to get some hints.
deplate doesn't support italic and bold (or any other "physical"
markup). You can emulate these styles by setting the style argument --
in conjunction with a css or latex style definition.
Thanks for your fast reply and your usefull tips! I'm
no experienced wiki author. But I like vim and to have
knowledge around in text files.
I haven't figured out my tabsize problem. Sometimes they
are like I've configured them in vim and sometime they are
on their defaults it seems. Maybe it's how I open my *.viki
file.
I want to have as less markup as possible in my vim files. To
have them readable and copyable within vim. Vim is my first
lookup resource, html/latex just when there is no vim around.
Thanks for your great work and help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> I haven't figured out my tabsize problem. Sometimes they
> are like I've configured them in vim and sometime they are
> on their defaults it seems.
You might want to set 'expandtab' when editing viki files. I'm not sure
how the indentation function (viki#GetIndent) deals with tabs.
> Sorry seems I've missunderstood viki help page.
I see. There is an old version (g:vikiTextStyles=1) of the markup and a
new one (g:vikiTextStyles=2). I'm not sure though if the deplate has
ever fully supported the version 1 markup.
> > {text style=bold: bold text}
>
> I want to have as less markup as possible in my vim files. To
> have them readable and copyable within vim.
You could use #DefParticle[1] to do this replacement. Maybe something
like:
Hi
after playing around with vim viki & deplate I got some
questions and hope to find some answers.
* tabstop
- how can I change the tabsize for the viki plugin?
* foldtext
- Is there a chance to get a custom folding text?
- Can I disable autom. folding at all?
* highlight
(I'm on a white background)
- Anchor marks like this '#myanchor' are invisible
in my colorset.
- How can I influence vikis colorset? Overwriting your
hi groups did not work.
* markup (textstyles)
- When I do this in viki
**This is a bold test**
__This is a underline test__
==This is a typwriter test==
//This is a italic test//
I get, after running deplate, that in html
<p>**This is a bold test**</p>
<p><em>This is a underline test</em></p>
<p>≡This is a typwriter test≡</p>
<p>//This is a italic test//</p>
hmm? Is this a bug or do I use it wrong?
> * tabstop
> - how can I change the tabsize for the viki plugin?
Which tabstop? The viki ftplugin uses &shiftwidth in some places if
that's what you mean.
> * foldtext
> - Is there a chance to get a custom folding text?
Define a function VikiFoldLevel() (see :help 'foldexpr'). You might want
to check ftplugin/viki.vim and g:vikiFolds first as there are already
several versions for this. If you have a better idea, please let me
know.
> - Can I disable autom. folding at all?
set foldlevelstart=99
or
let g:vikiFolds = ''
> * highlight
> (I'm on a white background)
> - Anchor marks like this '#myanchor' are invisible
> in my colorset.
Okay, that's defined in syntax/viki.vim
You could define your own colors in after/syntax/viki.vim, I guess. It's
possible that you have to do
:hi clear vikiAnchor
first.
> - How can I influence vikis colorset?
Which ones? The links are set in autoload/viki_viki.vim and can be
configured via g:viki_highlight_inexistent_{&background} and
g:viki_highlight_hyperlink_{&background}.
> * markup (textstyles)
> **This is a bold test**
> ==This is a typwriter test==
> //This is a italic test//
This isn't viki/deplate markup. For typewriter use ''this is typewriter
test''. There is no single wiki markup. Every wiki has about it's own.
And there are diverging views on which styles should be supported.
deplate doesn't support bold, italic, or underline for the same reason
LaTeX doesn't support them (right away).
If you want to have this markup, you should create your own viki family
and maybe create a deplate input filter -- although it could also be
done using the #DefParticle region. Creating an input filter isn't too
difficult but involves some coding in ruby. You could take a look at
deplate/input/rdoc.rb and deplate/wiki-markup.rb to get some hints.
deplate doesn't support italic and bold (or any other "physical"
markup). You can emulate these styles by setting the style argument --
in conjunction with a css or latex style definition.
Example:
{text style=bold: bold text}
{text style=italic: italic text}
When creating a particle class in ruby, one could set the style argument
in the #setup method.
HTH
Thanks for your fast reply and your usefull tips! I'm
no experienced wiki author. But I like vim and to have
knowledge around in text files.
I haven't figured out my tabsize problem. Sometimes they
are like I've configured them in vim and sometime they are
on their defaults it seems. Maybe it's how I open my *.viki
file.
> * markup (textstyles)
>This isn't viki/deplate markup
Sorry seems I've missunderstood viki help page.
>Example:
> {text style=bold: bold text}
I want to have as less markup as possible in my vim files. To
have them readable and copyable within vim. Vim is my first
lookup resource, html/latex just when there is no vim around.
Thanks for your great work and help!
> I haven't figured out my tabsize problem. Sometimes they
> are like I've configured them in vim and sometime they are
> on their defaults it seems.
You might want to set 'expandtab' when editing viki files. I'm not sure
how the indentation function (viki#GetIndent) deals with tabs.
> Sorry seems I've missunderstood viki help page.
I see. There is an old version (g:vikiTextStyles=1) of the markup and a
new one (g:vikiTextStyles=2). I'm not sure though if the deplate has
ever fully supported the version 1 markup.
> > {text style=bold: bold text}
>
> I want to have as less markup as possible in my vim files. To
> have them readable and copyable within vim.
You could use #DefParticle[1] to do this replacement. Maybe something
like:
#DefParticle: \*\*((\\\*|.)*?)\*\* <<--
\{text style=bold: {xarg: 1}\}
--
If you use deplate pre 8.1, you'll probably have to use {arg} instead of
{xarg}.
[1] http://deplate.sourceforge.net/Regions.html#hd0010003002