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>
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 <--->
Mapping `<Tab>` and `<S-Tab>` at insert mode sometimes collide with
other plugins which utilize these for completions (e.g. coc example
mapping).
Since for many users the case for completion is more frequent than table
editing, this patch enables changing these mappings using the options
`<Plug>VimwikiTableNextCell` and `<Plug>VimwikiTablePrevCell`.
This patch makes it easier of those using multiple plugins and have no
desire or knowledge in debugging the collision.
It complements #1030 by providing a more direct and documented method
for setting custom keymappings.
Signed-off-by: Amit Beka <--->
Co-authored-by: Amit Beka <--->
Neovim has a different method of marking applied patches, using neovim
versions, since patches from Vim are not merged by chronological order.
Signed-off-by: Amit Beka <--->
Co-authored-by: Amit Beka <--->
* Allow VimwikiToggleListItem mapping to be replaced
Currently VimwikiToggleListItem mapping cannot be removed but only new mapping
to it can be added. This commit will allow to add custom binding to this
function and release default mapping of <C-space> and <C-@>, which was how it
was before https://github.com/vimwiki/vimwiki/pull/686
* Update changelog + contributor list
* endi -> endif
Co-authored-by: Tinmarino <tinmarino@gmail.com>
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.
Some languages uses comma instead of dot for decimal separator.
When loading vimwiki the following error was occuring
E806: using Float as a String
This is probably a bug in vim, as a workaround when using float can be
str2float.
Similar issue in another project
https://github.com/nathanaelkane/vim-indent-guides/issues/10
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.
Track how many leading spaces a list item has in order to determine whether we should start a blockquote.
Note the extra close tag in the added test: this is a pre-existing issue
already present on `dev`.
Doc: Fix: Changed one occurrence of "vimwiki-global-options" back(?) to "vimwiki-syntax-options".
Problem: Duplicate tag
Solution: Delete one
Co-authored-by: Edward Bassett <edward.bassett@ualberta.net>
Refaction:
- Add g:vimwiki_syntax_list to set syntaxlocal variables
- Delete: syntax/vimwiki_markdown.vim and friends
- Change: vimwiki_syntax_variables -> vimwiki_syntaxlocal_vars for consistency
- Include: some doc in design notes