Commit Graph

37 Commits

Author SHA1 Message Date
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
d9d14cc3f7 Feature: Config: Normalize link so that user can choose [[]] or []() (Issue #892)
Main change:
        Create function: normalize_syntax_settings(syntax)

Problem:
        Some user prefer [[]] links more than []().
        As vimwiki know both of them, they should be able to choose
        without regex mastery and with tests

Solution:
        let g:vimwiki_syntax_variables.markdown.Link1 = vimwiki#vars#get_global('WikiLinkTemplate1')
2020-07-26 23:46:35 -04:00
Tinmarino
5e564bb10d Comment: code and robustify 2020-06-04 17:29:26 -04:00
Michael F. Schönitzer
c9e6afe856 Prepare for release 2.5
- Format Changelog
- Update version number in docs
- Update list of Contributers
- Update version number in tests
- Update link in README
2020-05-26 23:09:58 +02:00
Rane Brown
87c13f570a Ignore verbatim blocks when scanning tags.
Merge pull request #672.
2020-01-03 15:24:47 -07:00
Rane Brown
cf072ebdf2 Update how tags are written to file.
Ensures older vims are still supported.
2019-12-30 10:24:52 -07:00
Rane Brown
b4e0f738a3 Allow markdown syntax to have tags at top of file.
Previously tags that did not fall under a header caused errors because
the generation code expected an anchor.

Update tags test case.

Closes #790
2019-12-30 10:09:04 -07:00
Rane Brown
b9eec79cc6 Update tags file format. Closes #779. 2019-12-30 10:07:20 -07:00
Rane Brown
1a4e1ed1ae Stylistic changes to pass vint tests.
Two non-stylistic errors were also fixed:
  1. Removed duplicate function with invalid argument usage
  2. Added missing quotes to a function call argument
2019-12-20 20:41:03 -07:00
Rane Brown
eb26a66be5 Add check to generate_tags() to ensure a header is present.
Prior to this fix a file with tags present before any header would
result in vim errors. Now a single Vimwiki message is printed to alert
the user of the issue.
2019-12-14 10:41:22 -07:00
Rane Brown
460fcb692e Make generation functions compatible with older vims.
PR #634, PR #635, and PR #636 introduced new features that broke
compatibility with older version of Vim. This modifies those changes to
ensure compatibility. Closes #781.

Removes usage of funcref(), closure. Fixes filter() call.
Made globpath calls not use the list argument.
Unlet a variable that is reused (sticky type checking)

v7.4.1989 modified filter() to accept a Funcref
v7.4.2120 Added function "closure" argument
v7.4.2137 add funcref()
2019-12-14 10:31:30 -07:00
Rane Brown
4f5d4c9400 Change the tagfile name.
This changes the tags file used by vimwiki to '.vimwiki_tags' to prevent
conflicts with other tools that may generate a tags file using the same
name such as gutentags.
2019-04-01 09:46:41 -06:00
Steven Stallion
fc158ba744 Support automatic generation of links and tags 2019-03-28 20:11:47 -05:00
Steven Stallion
6c2f9f999d Adjust generated header behavior for TOC, etc. 2019-03-26 12:03:09 -05:00
Greg Anders
bb40826def Allow customization of header level of TOC
Instead of forcing the TOC to always be at header level 1, allow the
user to specify via the option g:vimwiki_toc_header_level what level
they want.

This defaults to 1, so if the user does nothing then the old behavior
will remain the same.
2019-03-14 08:34:52 -06:00
EinfachToll
c1dbf90c29 Remove foldmarkers; general reformatting 2018-04-20 07:03:53 +02:00
EinfachToll
b016eab91a Set 'tw' to 99 in all source files. We're not in the middle ages anymore. 2018-02-21 07:11:51 +01:00
EinfachToll
b61ff8b5ee Start refactoring the rest -- part 6
Ref #256
2017-01-11 22:12:33 +01:00
EinfachToll
1806d3edfa Start refactoring the rest -- part 5
Ref #256
2017-01-07 21:51:15 +01:00
EinfachToll
250fd3c47b Use new access functions for wiki-local variables -- part 5
Ref #256
2016-12-23 20:05:53 +01:00
EinfachToll
2329d602a7 Use new access functions for wiki-local variables -- part 4
Ref #256
2016-12-22 21:00:19 +01:00
EinfachToll
f497a4abc7 Use new access functions for wiki-local variables -- part 3
Ref #256
2016-12-22 19:55:20 +01:00
EinfachToll
3f66117894 When sorting tags, always match case because Vim expects it 2016-05-23 22:02:03 +02:00
EinfachToll
0ea8d85b7f Sort links in the list generated by VimwikiGenerateTags
Fix #192
2016-02-19 11:32:58 +01:00
EinfachToll
ff90e980de Locate the .tags file correctly on windows
Ref #184
2016-01-21 13:27:08 +01:00
EinfachToll
bb3026dba8 Include subdir in wiki page name when rebuilding tags
Ref #184
2016-01-21 13:25:04 +01:00
Ivan Tishchenko
7df0405c4e Fix sorting order of tags.
Before the fix, tags file sorting was done alphabetically.  That would
treat line numbers as strings, and so, for example, if the same tag was
placed on the same page on lines, say, 9 and 114, the order you would
get, 114 would go first, instead of 9.

Fix adds proper entries comparison to the sort function.
2015-11-27 01:50:41 +03:00
EinfachToll
b794a3bd3b Restrict the distance of tag to header to two lines
Suffices, I think.
Also, clean the code a bit and correct the help file.

Ref #85
2015-11-21 21:20:33 +01:00
EinfachToll
642a94ffae :VimwikiGenerateTags now updates a potentially existing listing
instead of adding it to the end.
Ref #85
2015-11-09 15:45:56 +01:00
EinfachToll
7aa273fd7c A file tag must be at the very top of the file
Ref #85
2015-06-10 22:08:40 +02:00
EinfachToll
b808dcfdc1 Simplify a function call 2015-06-10 22:00:07 +02:00
EinfachToll
d28b615286 two small things
Ref #85
2015-05-15 11:20:44 +02:00
EinfachToll
8bbe0408f9 Set the 'tags' option correctly
Ref #85
2015-05-15 11:01:55 +02:00
EinfachToll
6c77fd9101 :VimwikiRebuildTags! only reads files newer than .tags file
Ref #85
2015-05-15 10:56:46 +02:00
Ivan Tishchenko
c543f8cfb1 Fixed issue with tags in subfolders not being saved in tags file properly (subdir name lost) 2015-03-25 21:44:44 +03:00
EinfachToll
55adfca6a1 Rename a function, fixes previous commit 2015-02-24 09:39:03 +01:00
EinfachToll
7e87e92954 Move tags-related functions to extra file
also rename some functions from vimwiki#tags#bla() to s:bla()
2015-02-23 11:29:02 +01:00