Commit Graph

959 Commits

Author SHA1 Message Date
Amit Beka 609fc5f509 Map: Enable changing insert mode table mappings (#1048)
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 <--->
2020-11-19 09:55:19 -03:00
Amit Beka 523986df4b enable strikethrough for Neovim (#1054)
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 <--->
2020-11-15 09:21:41 -03:00
Rajesh Sharma 48baa1f4cd Allow VimwikiToggleListItem mapping to be replaced (#1047)
* 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>
2020-11-12 22:22:25 -03:00
Tomas Janousek dc2b16a587 Fix vint warning introduced by #1039 2020-10-24 19:43:01 -03:00
Tomas Janousek c34b37e195 Doc: Fix inconsistent naming of some option help tags 2020-10-24 19:43:01 -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
Daniel Moura a040c42264 fix: not throwing error when loading for some languages
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
2020-10-22 12:19:03 -03:00
mtourneb e2a6b825de Doc: Update changelog (@davidsierradz) 2020-10-19 23:47:10 -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
Michael F. Schönitzer ea4a5e3bb2 Update README.md 2020-10-19 22:57:10 -03:00
Marek Šuppa a6878015e6 docs: Fix typo (#1017)
* Change `commando` -> `command`

Signed-off-by: mr.Shu <mr@shu.io>
2020-09-22 20:17:18 +02: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
mtourneb 990b25ce37 Fix: Folding by 'syntax' does nothing with Markdown syntax (Issue #1009) 2020-09-05 16:19:21 -04:00
Ryan Winograd 1ea97303fd Fix: HTML Conversion: List with wrapped lines (#1008)
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`.
2020-09-05 11:45:50 -04:00
mtourneb a7f34cd8cf Feature: Add command VimwikiColorize (Issue #990)
Only colorize the current line to start
2020-09-03 23:43:56 -04:00
Edward Bassett dbbadc8035 [Issue #999] Fix duplicate help tags (#1000)
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>
2020-09-01 20:13:12 -04:00
Tinmarino dc63a5dacc Fix: Html convertion: Blockquote: multiline and in number list (Issue #55)
- Issue 5 indented multiline

Transoform blockquotes by precode
```
<blockquote>
Block quote line 1
Block quote line 2
</blockquote>
```
->

```
<pre><code>line 1
line 2
</code></pre>
```

- Issue 2: BlockQuote restarts list numbering

Allow indent precode in list
2020-08-24 01:14:18 -04:00
Tinmarino 8e5274b1a2 Test: Batchify all && Lint run_test.sh
All tests in the same batch, in other words, no independant test
2020-08-23 03:42:02 -04:00
Tinmarino 817641e551 Fix: Indentation broken within lists (Issue #991)
Side effect, formatoption+=c in order to also keep the joining behavior
with lists
2020-08-23 01:59:12 -04:00
Tinmarino d1b3fe34c9 Fix: Vimwiki2HTMLBrowse broken when using a custom converter (Issue #992) 2020-08-22 12:40:54 -04:00
Tinmarino a51052cbe6 Feature: VimwikiVar to list, get and set variables
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
2020-08-17 23:51:48 -04:00
kraem ee2d67751e Fix typo in help file 2020-08-17 09:21:05 -04:00
Tinmarino 5c64ced22d Feature: Utility function: linkify to extract link title from url (PR #982 from @jeromg) 2020-08-14 01:30:04 -04:00
Tinmarino d93858509d Prettyfy: Plugin: Comment and one antipattern 2020-08-13 01:59:47 -04:00
Tinmarino 0b85dd1a7b Feature: Syntax typeface delimiters can end at punctuation 2020-08-13 01:59:21 -04:00
Tinmarino 22d9d012ba Fix: Broken TOC links format when using default syntax (Issue #981)
- Not normalising for default
- SetExt header missed a `^` in the regex so mateched the trailing ===
of === head3 ===
2020-08-12 23:59:45 -04:00
Tinmarino 212cd8e09b Doc: rename DesignNotes.md -> design_notes.md 2020-08-12 11:17:00 -04:00
Tinmarino 4431caf7ff Fix: Vars.vim error in parsing: key not present (Issue #980) 2020-08-12 10:35:40 -04:00
Tinmarino 11337f5b34 Test: remove vader_setup and vader_teardon 2020-08-12 09:12:17 -04:00
Tinmarino 39407014c8 Syntax: Stricter typeface and fix preCode (alias inline) nested in bold
Fix: Syntax bug precode nested in bold apperead bold

Problem:
1. `that_ HERE _was` italic
2. `__that ``HERE`` was__  bold => PreCode should not receive typeface
region changes

Solution:
1. Stricter regex (and add \* to VimwikiError)
2. Add VikiError and WikiPre to nestables syntaxes
2020-08-12 01:37:27 -04:00
Tinmarino a241d458ab Syntax: Emoji faster conceal with keyword 2020-08-12 01:20:55 -04:00
Tinmarino a1f1b9c290 Syntax: Stricter italic match: match '_that_' not 'a_ that _a'
See: https://github.github.com/gfm/#emphasis-and-strong-emphasis

`A single * character can open emphasis iff (if and only if) it is part of a left-flanking delimiter run.`

Tim Pope default is too permissive (leads to too much emphasis openener): `\S\@<=_\|_\S\@=` -> `_\S\@=`
2020-08-09 16:29:39 -04:00
Tinmarino 21c5a7f796 Feature: Better joining bullet and task lists (set comments) 2020-08-09 16:14:31 -04:00
Tinmarino 7144df6b96 Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
Tinmarino 4b041a606a Refactor: Mutualize messaging (echo) 2020-08-09 16:06:35 -04:00
Tinmarino 188ead55db Config: Permit tag configuration for syntax, search and match (Issue #922 #928)
Affects: (via user configurated regexp)

- VimwikiGenerateTagLinks
- follow_link
- completion
- Syntax Highlighting
2020-08-08 04:06:20 -04:00
Tinmarino dede5a1eea Change: VimwikiCheckLinks work on current wiki or on given range
Problem: VimwikiCheckLinks can be slow
Solution: Work only on current wiki or accept a range
2020-08-08 04:01:31 -04:00
Tinmarino 659ca62b29 Fix: Accessing other filetypes within vimwiki (Issue #979)
Note: Viwiki no longer rules them all
2020-08-07 13:26:14 -04:00
Tinmarino 4aa3ca5c16 Fix: VimwikiGenerateLinks crash with single quote in filename (Issue #886 #881) 2020-08-07 12:27:05 -04:00
Tinmarino dd239c58fb Comment: tipo (for faster grep) 2020-08-07 12:27:05 -04:00
Tinmarino f18bf3dafb Fix: Html convertion regex Bold and Italic (Issue #977)
Problem: I copied rxBold from markdown (mea culpa)
Solution: Use the one that was defined in default
2020-08-07 12:27:05 -04:00
Tinmarino 348b014957 Fix: Typeface should not be nested in single equation (#977)
Solution: make thos a tex nested region and let tex decide the syntax
2020-08-07 12:27:04 -04:00
Tinmarino aa628f8a12 Feature: Emoji support conceal and complete 2020-08-07 02:39:53 -04:00
Tinmarino 0693e41132 Fix: VimwikiTOC removes next non-empty line (Issue #910) 2020-08-06 17:04:58 -04:00
Tinmarino 8a50d022b1 Fix: follow_link (suffix) and VimwikiGenerateTagLinks (__FileExtension__) (Issue #914)
Problem:
- follow_link failed with header with number at the end
- VimwikiGenerateTagLinks did not replace the __FileExtension__

Solution:
- follow_link try first 1 time with suffix number n and then n times without
- VimwikiGenerateTagLinks replace the __FileExtension__
2020-08-06 11:21:48 -04:00
Tinmarino 69ead3bf3c Fix: VimwikiTOC is broken against headers with link (Issue #182)
Problem: VimwikiTOC and follow_link do not support header (anchor) with
link in their body

Solution:
- VimwikiTOC (easy): Create function base.vim s:clean_header_text that
converts [DESC](URL) -> DESC
- follow_link (hard):
-- [[URL]]: was already working due to punctuation removal.
-- [DESC](URL): Search for a potential `]([^)]*)` after every character
2020-08-05 22:26:05 -04:00
Tinmarino e4186adc3d Fix: iMap <Cr> Interfere in completion (alias popup-menu, pum) (Issue: #813)
Problem: When pum opened, the mapping of <CR> is triggered but user
want the default behaviour: to choose a completion item

Solution: Conditional mapping:
inoremap <expr><silent><buffer> <CR> pumvisible() ? '<CR>' : ':<Esc>:VimwikiReturn 1 5<Cr>'
                         The previous mapping  -----------------^
2020-08-05 12:13:13 -04:00
Tinmarino 8cc99c00c2 Fix VimwikiRenameLink ruins window layout (Issue #592) 2020-08-05 10:22:32 -04:00