Commit Graph

21 Commits

Author SHA1 Message Date
Patrick Stockwell ab301801b0 Improve path normalisation with separate substitutions
This change reverts the original regex and simply adds a second regex
which is called on the result. '/\./' is one literal forward slash, one
literal fullstop (escaped with a leading backslash), and one literal
forward slash. In plain text, `/./` will be replaced with `/`.
2020-05-11 21:08:54 -04:00
Patrick Stockwell b96e82d6cc Generate links when diary & wiki dir are the same
When generating links, we first check that the file is not a diary file
as we don't want to include those in the list. That work is delegated to
the `is_diary_file` function. Prior to this change, the function always
returned true if the file was in the diary directory.
This approach gives false positives for a wiki which has a flat structure
and the wiki files and diary files share a directory. eg:

let wiki.diary_rel_path = './'

This change reuses existing diary functions from the diary.vim module to
get an exact list of diary files to check against.
2020-05-11 21:08:54 -04:00
Tinmarino d9412218e3 Fix relative paths for VimwikiRenameLink. Merge PR #787.
Fixes #90 

__Problem__: VimwikiRenameLink does not rename dir1/toto url in dir2/tata
because the dirs (dir2 and .) were well crossed but badly inspected.
__Solution__: `blob(.ext*)` -> `glob(**/*.ext)` + find the relative URL

* Fasten: VimwikiRenameLink goes faster with cache
More: To compute old_url regex, use a cache dict because it is the same
for files in the same directories

* Util DeleteHiddenBuffer -> do not delete Vader buffer

* Test: Prettify: Util: teardown delete defined function

* Remove unnecessary trailing spaces
Note: list_VimwikiReturn.vader has some necessary trailing spaces
2020-01-04 21:21:52 -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 37f020d21a Omnicompletion fix for Windows (#660)
* Temporary fix for omnicomplete of vimwiki links - #456.

This fixes the omnicomplete of wiki links under Windows which were
not working since paths on Windows use '\' instead of '/'. This is
a temporary fix until path refactoring is done.

* Update changelog with description of fix for #456
2019-04-20 17:28:32 +02: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 7d4254a75d Cherry-pick the changes from dev -- part2 2018-02-16 17:47:32 +01:00
EinfachToll 23ee20887a Use new access functions for global variables -- part 3
Ref #256
2016-12-21 22:11:44 +01:00
EinfachToll ff90e980de Locate the .tags file correctly on windows
Ref #184
2016-01-21 13:27:08 +01:00
EinfachToll 99494655c2 Support for absolute links when converting to HTML
Also, Fix #124
2015-04-09 14:48:26 +02:00
EinfachToll 6922836a0c Wiki links starting with / are always relative to the wiki root
Also, links with the file: scheme are absolute iff they start with / or
drive letter

Ref #105
2015-03-13 16:31:15 +01:00
EinfachToll 8d7d568214 Clean up all file headers
- remove author names. There's git blame for this job
- change home from code.google to github
- add short descriptions
2015-02-23 12:10:42 +01:00
EinfachToll e4de62b7d5 turn all =~ into =~# or =~?; !~ analogically 2015-02-09 20:58:05 +01:00
EinfachToll 9ada4d2041 turn all == into ==# or ==? when comparing strings
or vimwiki#path#is_equal, if the strings are file names
2015-02-09 20:05:25 +01:00
EinfachToll b240b52a3f Small fix for #112
Ref #111
2015-02-09 09:20:30 +01:00
EinfachToll bf1eb62c32 Merge pull request #112 from t7ko/completion-fix-issue111
Use case sensitive/insensitive path comparison depending on the OS
2015-02-09 09:18:21 +01:00
EinfachToll 827b3a8974 Unify yes/no question 2015-02-07 22:12:32 +01:00
Ivan Tishchenko 68b82a15c6 Adjust case sensitivity of path comparison depending on the OS 2015-02-07 01:50:04 +03:00
Ivan Tishchenko 10293f60d7 Use case insensitive path comparison for vimwiki#path#relpath() 2015-02-03 13:34:07 +04:00
EinfachToll eb02e0be9a Move some file system related functions to path.vim 2014-12-04 21:12:04 +01:00