Skip to content

Commit

Permalink
docs(CoC): add to vim help
Browse files Browse the repository at this point in the history
style(pre-commit): add vint. Fix double quotes.

style(linkcheck): replace http with https. Fix broken links. Sort
reference links.
  • Loading branch information
jfishe committed Mar 30, 2024
1 parent ccfa2f5 commit 87e6325
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 36 deletions.
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ repos:

## If you want to automatically "modernize" your Python code:
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: ["--py37-plus"]

## If you want to avoid flake8 errors due to unused vars or imports:
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
rev: v2.3.1
hooks:
- id: autoflake
args:
Expand All @@ -40,7 +40,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.3.0
hooks:
- id: black
language_version: python3
Expand Down Expand Up @@ -75,3 +75,8 @@ repos:
args:
- "--ignore"
- "tests/**/*.md"
## Vint Vim script linting
- repo: https://github.com/Vimjas/vint
rev: v0.4a3
hooks:
- id: vint
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to
- Conquer of Completion (CoC) source *\[Zettelkasten\]* for YAML header fields.
- `type:` note, literature, reference, or index.
- `status:` Create, Process, or Reviewed.
- Pre-commit with [Vimjas/vint](https://github.com/Vimjas/vint).

### Removed

Expand Down Expand Up @@ -77,7 +78,7 @@ and this project adheres to
- `:VimwikiReference` no longer converts to reference-links, preferring
compatibility with pandoc conversion to `HTML`.
- DOCS: Update `:help panvimwiki`.
- DOCS: Host at <http://panvimwiki.readthedocs.io/>
- DOCS: Host at <https://panvimwiki.readthedocs.io/>

## [0.6] - 2024-01-01

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ trim trailing whitespace.................................................Failed

## Code Contributions

Pandoc filters rely on [Panflute](http://scorreia.com/software/panflute/) and
Pandoc filters rely on [Panflute](https://scorreia.com/software/panflute/) and
use the template
[located here](https://github.com/sergiocorreia/panflute/blob/master/docs/source/_static/template.py).

Expand Down
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,9 @@ buffer (cf. Warning `:h W12`). If you choose not to reload the buffer,
##### VimwikiMarkdownFormat

If in markdown format, convert `:h vimwiki-syntax-links`
[wikilinks_title_after_pipe](https://pandoc.org/MANUAL.html#extension-wikilinks_title_after_pipe)
to [Inline links](https://pandoc.org/MANUAL.html#inline-links), without the
"wikilink" title that pandoc adds by default. Preserve `:h vimwiki-todo-lists`,
using [task_lists](https://pandoc.org/MANUAL.html#inline-linksInline).
[wikilinks_title_after_pipe] to [Inline links],
without the "wikilink" title that pandoc adds by default.
Preserve `:h vimwiki-todo-lists`, using [task_lists].

`VimwikiMarkdownFormat` overwrites the file, so Vim may prompt to reload the
buffer (cf. Warning `:h W12`). If you choose not to reload the buffer,
Expand Down Expand Up @@ -330,28 +329,31 @@ information on PyScaffold see <https://pyscaffold.org/>.

<!-- References -->

[Documentation Status]: https://readthedocs.org/projects/panvimwiki/badge/?version=latest
[1]: https://panvimwiki.readthedocs.io/en/latest/?badge=latest
[PyPI-Server]: https://img.shields.io/pypi/v/panvimwiki.svg
[2]: https://pypi.org/project/panvimwiki/
[Test and Publish Python 🐍 distribution 📦 to PyPI and TestPyPI]: https://github.com/jfishe/panvimwiki/actions/workflows/ci.yml/badge.svg
[3]: https://github.com/jfishe/panvimwiki/actions/workflows/ci.yml
[Project generated with PyScaffold]: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold
[4]: https://pyscaffold.org/
[Pandoc]: https://pandoc.org/
[Pypandoc]: https://github.com/JessicaTegner/pypandoc?tab=readme-ov-file#installing-via-pip
[:python3]: https://neovim.io/doc/user/if_pyth.html#python3
[vimrc]: https://neovim.io/doc/user/starting.html
[:buffer]: https://neovim.io/doc/user/windows.html#%3Abuffer
[:filetype-plugin-on]: https://neovim.io/doc/user/filetype.html#filetype
[:packadd]: https://neovim.io/doc/user/repeat.html#%3Apackadd
[delete_task_pending]: #delete_task_pending
[:python3]: https://neovim.io/doc/user/if_pyth.html#python3
[Citation Style Language (CSL)]: https://pandoc.org/MANUAL.html#specifying-a-citation-style
[Conquer of Completion (CoC)]: https://github.com/neoclide/coc.nvim
[Documentation Status]: https://readthedocs.org/projects/panvimwiki/badge/?version=latest
[Inline links]: https://pandoc.org/MANUAL.html#inline-links
[Pandoc Citations]: https://pandoc.org/MANUAL.html#citation-syntax
[Pandoc]: https://pandoc.org/
[Project generated with PyScaffold]: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold
[PyPI-Server]: https://img.shields.io/pypi/v/panvimwiki.svg
[Pypandoc]: https://github.com/JessicaTegner/pypandoc?tab=readme-ov-file#installing-via-pip
[Test and Publish Python 🐍 distribution 📦 to PyPI and TestPyPI]: https://github.com/jfishe/panvimwiki/actions/workflows/ci.yml/badge.svg
[VimwikiConvert]: #vimwikiconvert
[delete_tag_lines]: #delete_tag_lines
[:buffer]: https://neovim.io/doc/user/windows.html#%3Abuffer
[delete_task_pending]: #delete_task_pending
[quoteplus]: https://neovim.io/doc/user/provider.html#quoteplus
[VimwikiConvert]: #vimwikiconvert
[Pandoc Citations]: https://pandoc.org/MANUAL.html#citation-syntax
[specify the bibliographic data]: https://pandoc.org/MANUAL.html#specifying-bibliographic-data
[Citation Style Language (CSL)]: https://pandoc.org/MANUAL.html#specifying-a-citation-style
[Conquer of Completion (CoC)]: https://github.com/neoclide/coc.nvim
[task_lists]: https://pandoc.org/MANUAL.html#extension-task_lists
[vimrc]: https://neovim.io/doc/user/starting.html
[wikilinks_title_after_pipe]: https://pandoc.org/MANUAL.html#extension-wikilinks_title_after_pipe
<!-- markdownlint-disable MD051 -->
[g:panvimwiki_settings]: #g-panvimwiki-settings
20 changes: 10 additions & 10 deletions after/ftplugin/vimwiki.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@ set cpo&vim

let b:undo_ftplugin = get(b:, 'undo_ftplugin', '')
if !empty('b:undo_ftplugin')
let b:undo_ftplugin ..= " | unlet b:did_ftplugin_panvimwiki"
let b:undo_ftplugin ..= ' | unlet b:did_ftplugin_panvimwiki'
else
let b:undo_ftplugin = "unlet b:did_ftplugin_panvimwiki"
let b:undo_ftplugin = 'unlet b:did_ftplugin_panvimwiki'
endif

if !exists(":VimwikiConvert")
if !exists(':VimwikiConvert')
command -buffer -bang -nargs=0 VimwikiConvert
\ call panvimwiki#convert(<bang>0)
let b:undo_ftplugin ..= " | delcommand VimwikiConvert"
let b:undo_ftplugin ..= ' | delcommand VimwikiConvert'
endif
if !exists(":VimwikiConvertWeek")
if !exists(':VimwikiConvertWeek')
command -buffer -bang -nargs=0 VimwikiConvertWeek
\ call panvimwiki#convert(<bang>0, 1)
let b:undo_ftplugin ..= " | delcommand VimwikiConvertWeek"
let b:undo_ftplugin ..= ' | delcommand VimwikiConvertWeek'
endif

if vimwiki#vars#get_wikilocal('syntax') ==# 'markdown'
if !exists(":VimwikiReference")
if !exists(':VimwikiReference')
python3 from panvimwiki.wiki2pandoc import expand_citeproc
command -buffer -nargs=0 VimwikiReference
\ call ExpandCiteproc()
let b:undo_ftplugin ..= " | delcommand VimwikiReference"
let b:undo_ftplugin ..= ' | delcommand VimwikiReference'
endif
if !exists(":VimwikiMarkdownFormat")
if !exists(':VimwikiMarkdownFormat')
python3 from panvimwiki.wiki2pandoc import vimwiki_task_link
command -buffer -nargs=0 VimwikiMarkdownFormat
\ call VimwikiTaskLink()
let b:undo_ftplugin ..= " | delcommand VimwikiMarkdownFormat"
let b:undo_ftplugin ..= ' | delcommand VimwikiMarkdownFormat'
endif
endif

Expand Down
14 changes: 13 additions & 1 deletion doc/panvimwiki.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Table of Contents *panvimwiki-table-of-contents*
1. Introduction |panvimwiki-introduction|
2. Installation |panvimwiki-installation|
3. Usage |panvimwiki-usage|
- Completion |panvimwiki-completion|
- Command Line Shell |panvimwiki-command-line-shell|
- Commands |panvimwiki-commands|
- Settings |panvimwiki-settings|
Expand Down Expand Up @@ -66,11 +67,22 @@ install panvimwiki in `pack/*/start/panvimwiki`.
endif
<

Install Conquer of Completion (CoC) <https://github.com/neoclide/coc.nvim> to
use CoC source _[Zettelkasten]_.


==============================================================================
3. Usage *panvimwiki-usage*


COMPLETION *panvimwiki-completion*

- Conquer of Completion (CoC) source _[Zettelkasten]_ for YAML header fields
completes:
- `type:` note, literature, reference, or index.
- `status:` Create, Process, or Reviewed.


COMMAND LINE SHELL *panvimwiki-command-line-shell*

Panvimwiki provides plain text pre-filters and pandoc filters for use from the
Expand Down Expand Up @@ -290,7 +302,7 @@ wikilinks_title_after_pipe
<https://pandoc.org/MANUAL.html#extension-wikilinks_title_after_pipe> to Inline
links <https://pandoc.org/MANUAL.html#inline-links>, without the "wikilink"
title that pandoc adds by default. Preserve |vimwiki-todo-lists|, using
task_lists <https://pandoc.org/MANUAL.html#inline-linksInline>.
task_lists <https://pandoc.org/MANUAL.html#extension-task_lists>.

`VimwikiMarkdownFormat` overwrites the file, so Vim may prompt to reload the
buffer (cf. Warning |W12|). If you choose not to reload the buffer,
Expand Down
2 changes: 1 addition & 1 deletion plugin/panvimwiki.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
" Last Change: 2024-01-01

" Should we load? {{{1
if exists('g:panvimwiki_loaded') || !has("python3") || &compatible
if exists('g:panvimwiki_loaded') || !has('python3') || &compatible
finish
endif
let g:panvimwiki_loaded = 1
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ long_description_content_type = text/markdown; charset=UTF-8; variant=GFM
url = https://github.com/jfishe/panvimwiki
# Add here related links, for example:
project_urls =
Documentation = http://panvimwiki.readthedocs.io/
Documentation = https://panvimwiki.readthedocs.io/
Source = https://github.com/jfishe/panvimwiki
Tracker = https://github.com/jfishe/panvimwiki/issues
Changelog = https://panvimwiki.readthedocs.io/en/latest/changelog.html
Expand Down

0 comments on commit 87e6325

Please sign in to comment.