vimwiki-markdown: vimwiki markdown file to html with syntax highlighting.
Project description
vimwiki-markdown
vimwiki markdown file to html with syntax highlighting.
Install
pip install vimwiki-markdown
Usage
Add the following to your ~/.vimrc
:
let g:vimwiki_list = [{
\ 'path': '~/vimwiki',
\ 'template_path': '~/vimwiki/templates/',
\ 'template_default': 'default',
\ 'syntax': 'markdown',
\ 'ext': '.md',
\ 'path_html': '~/vimwiki/site_html/',
\ 'custom_wiki2html': 'vimwiki_markdown',
\ 'template_ext': '.tpl'}]
Markdown extensions
The following markdown extensions are activated by default:
But you can add more extensions using VIMWIKI_MARKDOWN_EXTENSIONS
environment
variable, which is a coma separated list of extensions.
Syntax highlighting
Syntax highlighting is provided by Pygments, which will try to guess language by default.
You can use regular markdown indented code blocks:
:::python
for value range(42):
print(value)
Or Fenced Code Blocks
```python
for value range(42):
print(value)
```
You can also highlight line using hl_lines
argument:
```python hl_lines="1 3"
for value range(42):
print(value)
```
Pygments can generate CSS rules for you. Just run the following command from the command line:
pygmentize -S default -f html -a .codehilite > styles.css
If you would like to use a different theme, swap out default
for the desired
theme. For a list of themes installed on your system, run the following
command:
pygmentize -L style
If you are lazy you can juste use the one in this repository inside css
directory which provide the monokai
theme.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for vimwiki_markdown-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1ef59c9563b540faa39a6ed83aaa97f2edf28e05f6328df722942abdaacc2a |
|
MD5 | 49e60b4e0ca2a1351887386c9ddd600d |
|
BLAKE2b-256 | 2170f6e206675090092c1bc7b0f5350ab510d753b55bfc6f970ff82947c9eaf3 |