Commit Graph

601 Commits

Author SHA1 Message Date
Philipp Oberdiek 0690d8ad51 Add description key to tag link entries 2022-04-09 20:14:04 -04:00
Philipp Oberdiek c19e63b1e9 Make tag links relative to current file #794 (#1162)
Also add a vader test case and update the changelog as well as the list
of contributors.

Co-authored-by: Tinmarino <tinmarino@gmail.com>
2021-12-18 12:11:01 -03:00
Jean-Luc Bastarache ee31d45553 Feature: Add wiki page to buffer list using badd (#1185)
Co-authored-by: Tinmarino <tinmarino@gmail.com>
2021-12-18 12:08:54 -03:00
Tinmarino ecce184493 VimwikiTOC: update-listing in buffer more lazy (after #1155) 2021-12-18 11:53:59 -03:00
Tobias Mersmann 1bea2ce40a fix(update_listing_in_buffer): don't update listing if there are no changes
Before updating a listing, check if the update differs from the existing state.
Only then update the buffer, otherwise return early.

Initial reasoning: If `let g:vimwiki_auto_toc = 1` is set, saving a buffer would always update
the `contents`-section, even if there were no updates in this section. This lead to undesired
undo-behavior.

NOTE: this fix was only tested for the toc-listing.
2021-12-18 11:43:31 -03:00
ysftaha 2141fde8b8 Addresses issue #621 (#1181)
* issue#621: html highlighter

* docs for issue#621

* removing windows support for issue#621

Co-authored-by: Tinmarino <tinmarino@gmail.com>
2021-12-18 11:40:17 -03:00
Thomas Leyh 064a8f7ade Fix wildcard expansion in find_autoload_file
When using vim's native mechanism for `packages`, wildcards (*) are used
in the `runtimepath` since package folders can have arbitrary names.
They were not expanded, thus a path to e.g. `default.tpl` could not be
resolved when calling Vimwiki2HTML.

Resolves vimwiki/vimwiki#1193
2021-12-18 11:31:38 -03:00
Tulio Brunoro 95dd2e0d2c Revert breaking changes to customwiki2html.sh file
There is an extra space when calling the `basename` command, which causes the following error:
```
Vimwiki: 'basename: extra operand ‘md’
Try ''basename --help'' for more information.
```
2021-12-11 20:32:27 -07:00
Tomas Janousek 5148f5f601 Fix: Typo VimwikiUmderline → VimwikiUnderline in nested_typeface
(No idea how this typo actually manifests, just stumbled upon this by
chance.)
2021-12-11 20:26:44 -07:00
Lily Foster f28fe1ae43 Fix: Links opening in qutebrowser multiple times #763 2021-09-01 01:08:37 -06:00
paperbenni 22dcb36618 remove echo usage from VimwikiPasteLink 2021-07-29 13:53:27 -06:00
paperbenni 7d937615c1 Feature: VimwikiPasteLink to get absolute wiki link to the current file 2021-07-29 13:53:27 -06:00
Stephan T 1aa417fbd8 Fix typo 2021-07-28 10:33:05 -04:00
Tinmarino 212a66fcd6 Fix: forbid \$ for equation region start or stop #150 2021-06-11 12:06:43 -04:00
Tinmarino 369130edd7 Feature: Add thunderlink to schemes_web #435 2021-06-11 11:24:18 -04:00
Tinmarino c4e78fe310 Fix: Calendar integration if no vinwikilist #290 2021-06-11 10:57:56 -04:00
Tinmarino 45c89ebca4 Feature: Table cells permiting escaped separator (i.e. \|) #281 2021-06-11 10:50:53 -04:00
Tinmarino 7eb6fed581 Pretty: Delete trailing space 2021-06-10 17:17:57 -04:00
Tinmarino 4cc6edf3eb Fix RenameFile with relative to root (prefix with /) #617 2021-06-10 17:15:29 -04:00
Tinmarino 9706f5eee8 Rename rename_link -> rename_file (corresponding to the exported RenameFile) 2021-06-10 16:13:40 -04:00
Tinmarino b4f7c7ba3d Fix: deprecate has been moved from base to u 2021-06-10 16:07:27 -04:00
Tinmarino 1fbe1bc6a8 Feature: Syntax: Provide vimwiki language escape sequences -> \token #1044 2021-06-09 12:42:51 -04:00
Tinmarino 0181009dba Feature: vimwiki#base#linkify() with markdown syntax setting #994 2021-06-09 09:26:52 -04:00
Hugo Hörnquist eedc26bfe6 Fix self-link for TOC links.
Previously TOC links contained a closing </a>-tag, but lacked the
accompanying start tag, leading to invalid HTML. This fixes that, along
with placing class="justcenter" on the correct tag once again.
2021-06-08 17:44:07 -04:00
Tinmarino 760cab232d Test for links_space_char #1132 2021-06-08 17:14:43 -04:00
Vinny Furia 7cea1cfb3c Do not substitute spaces in LinkDescription 2021-06-08 15:43:26 -04:00
Tinmarino 1f77b7e6f6 Table: Fix exception if i<Tab> at end of line if next line is bad (Issue #1126) 2021-05-17 10:36:12 -04:00
Reiner Herrmann 84e9422c7c Add matrix as known URI scheme
It has meanwhile been accepted into the HTML standard:
 https://github.com/whatwg/html/pull/6320
2021-05-13 10:29:05 -06:00
Stefan Schuhbäck f6c419fb87 Add wikilocal option showing description in generated links 2021-05-06 20:36:42 -04:00
Brennen Bearnes f396e8a494 Fix resolution of leading-slash links, add link tests (#1108)
Hopefully this solves #1084, "Page links with leading slash lead to a
file in working directory, not a page at the root of the wiki", introduced
in 850aace.

It also adds a set of tests for different kinds of wiki links:

  - api_base_resolve_link.vader
  - link_syntax_markdown.vader
  - link_syntax_vimwiki.vader

Includes some fixes for locally-failing tests, removes a test from
test/map.vader and comments out test/config_vars.vader entirely for the
moment.

Code by : Brennen Bearnes <code@p1k3.com>
2021-04-06 22:09:37 -04:00
Brennen Bearnes 618893be00 Vimwiki2HTML: remove string concat from variable substitution (#1110)
Problem: I noticed that running :Vimwiki2HTML for a file with a `"` in
the `%title` line would error out.  For example, a title like:

    %title this will die: "

Causes:

    Error detected while processing function vimwiki#html#Wiki2HTML[1]..<SNR>177_convert_file[15]..<SNR>177_convert_file_to_lines
_template:
    line    8:
    E116: Invalid arguments for function substitute(v:val, "%title%", "this will die: "", "g")

Solution: It seems like the string concatenation here was unnecessary.
At least on my vim 8.1, the evaluated code seems to have access to the
correct variables.

I'm sure there are bigger problems with the HTML generation here, but this
allows my ~2000 pages with titles to render without throwing errors.

Also adds a brief test and removes some unnecessary DeleteFile() calls
from html_convert_default.vader.

Co-authored-by: Brennen Bearnes <code@p1k3.com>
2021-04-05 22:07:38 -05:00
Levi Rizki Saputra 61a6ce6686 Fix Renaming and HTML Exporting Issue (#1057)
On Windows.

Commits squashed from first to be committed to most recent:
* fix subdir not correct when path using `\`

* fix slice by variable value not supported in vim 7.3

* remove last '\' from path in CustomWiki2HTML

* fix CSS path in CustomWiki2HTML wrong

* remove unused confirm CustomWiki2HTML

* use ==# rather than == in shellescape html.vim

* remove "FIXME this can terminate in the middle of a path component! from
base#subdir

* update doc/vimwiki.txt

* update contributor to doc/vimwiki.txt

* add comment in html#shellescape
2021-02-05 08:58:02 -03:00
Rane Brown d34abf9fa5 Update variable name used to open markdown image links 2021-02-01 14:55:11 -07:00
Niklas Söderlund 8f92aaffe4 Default to wiki number 0 if diary is called outside a wiki buffer
If a diary page is opened from outside a wiki buffer the diary frequency
and start of week options are not respected as the wiki number is not
yet set for the local buffer.

Fix this by defaulting the wiki number to 0, which is what is done in
vimwiki#diary#make_note() for the diary_rel_path option that suffers
from the same problem.

Example on how to trigger the problem:

    let g:vimwiki_list = [{'path': '~/.vimwiki', 'diary_frequency': 'weekly', 'diary_start_week_day': 'monday'}]

    $ vim -c VimwikiMakeDiaryNote

Fixes: a3be479d5a ("Add a diary frequency option (#884)")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2021-01-12 20:15:30 -03:00
Tinmarino 0a9488f3f1 Feature VimwikiColorize maps in visual and normal mode #990
Colorize working for visual selection
Add map (,wc), test and doc
2021-01-10 19:03:37 -03:00
Tinmarino 850aace465 Conf: #1060 Get configurable schemes_web
Permit opening file with name "ssh: name with spaces.md"
2021-01-10 13:00:54 -03:00
Tinmarino e7124290a2 Fix: Typeface font highlight VimwikiBoldItalicUnderline was not bold
Fix 2: s:setup_cleared_syntax() was reconfiguring badly
Test: for hi VimwikiBold -> cterm=bold
2021-01-10 12:27:35 -03:00
Tinmarino 788a961052 Test: Add option to configure date string format #1073 2021-01-07 22:15:35 -03:00
Tinmarino 29fa4b028b Doc: Indent Docstring inside function 2021-01-06 14:36:06 -03:00
yhu266 036a7d24f9 Add option to configure date string format 2020-12-29 11:38:24 -03:00
Tinmarino 8c7937c765 Fix: #1074 Key not present in Dictionary: lists_return in g:vimwiki_key_mappings
Bug from previous PR #1066
2020-12-29 11:29:09 -03:00
yuuy 84928f7ace feat(vimwiki_key_mappings):add a flag lists_return 2020-12-28 19:45:30 -03:00
Levi Rizki Saputra 8d4cb7f11d Revert "Fix Renaming issue in Windows and ext with two dot (#1051)" (#1056)
This reverts commit e922f7302f.
2020-11-20 11:05:51 -03:00
Levi Rizki Saputra e922f7302f Fix Renaming issue in Windows and ext with two dot (#1051)
* fix subdir not correct when path using `\`

* fix slice by variable value not supported in vim 7.3
2020-11-20 09:08:51 -03:00
Amit Beka 96713548cc configure expression for Todo words (#1053)
Enable the user to conveniently set the regular expression used for the
`VimwikiTodo` syntax group, instead of the defaults which might be
more suitable to code.

This setting is now also local per wiki.

Signed-off-by: Amit Beka <--->

Co-authored-by: Amit Beka <--->
2020-11-20 09:02:55 -03:00
Tomas Janousek 2a31984369 Feature: Optionally disable todo propagation to parents/children (Issue #954)
taskwiki integrates vimwiki with taskwarrior, and in doing so changes
the semantics of checkboxes a bit:

    * [ ] Install Taskwiki   |   pending task
    * [X] Install Taskwiki   |   completed task
    * [D] Install Taskwiki   |   deleted task
    * [S] Install Taskwiki   |   started task
    * [W] Install Taskwiki   |   waiting task

It's still desirable for vimwiki to automatically insert `* [ ]` on
`i_<CR>`, `o` and `O` and to syntax highlight all these five as
checkboxes, so I have this in my .vimrc:

    let g:vimwiki_listsym_rejected = 'D'
    let g:vimwiki_listsyms = ' WSX'

but it results in undesirable behaviour with task hierarchies: when I
add a new subtask (using `i_<CR>`, `o` or `O`)
or mark a subtask done, the parent's checkbox is updated to reflect its
overall completion, to one of ` `, `W`, `S` or `X`, depending on
subtasks completion. This makes little sense in taskwiki. One usually
doesn't want to touch the "parent" task in taskwarrior until the
"subtasks" are done. Setting

    let g:vimwiki_listsym_rejected = 'W'
    let g:vimwiki_listsyms = ' SX'

results in slightly less illogical behaviour, but it still assumes that
(1) all subtasks are visible (not necessarily true in taskwiki) and
(2) that it's a parent/subtask relationship, not a dependency
relationship (not true in taskwarrior, questionable in taskwiki).

This commit adds an option to disable this behaviour.
2020-10-24 19:43:01 -03:00
Tomas Janousek f794f1e284 Fix some typos in vars.vim 2020-10-24 19:43:01 -03:00
David Sierra DiazGranados 527ca1b7a1 Allow overwriting insert mode maps (#1030)
According to `:h hasmapto()` if we don't pass the mode as an argument
then only normal, visual and operator-pending modes are checked.

Lets pass the mode explicitly to allow overwriting insert mode mappings.
2020-10-19 23:30:28 -03:00
mtourneb 78216de25e Fix bug: g:vimwiki_syntaxlocal_vars not initialized (Issue #1013) 2020-09-08 10:27:17 -03:00
Benney Au 842f842100 886 fix generate links on windows (#1011)
* 886 fix generate links on windows

* update docs

* 886
2020-09-06 04:45:48 -03:00