Refractor: Path Add utility unixify #478

Basically unixify all before workingm then transofom in function os os

Util: Add function sort_len that a list of string according to the lenght of its content
Fix: VimwikiRenameLink doesn't update links in diary #90
Test: VimwikiRenameLink with nested directories
Prettify comments in autoload/path + remove antipattern
Define osxify function helper to solve windows Vs Unix : see #478
Path: remove useless temporary fix convertion before calling relpath (redundant) : see #478
Test: Fix typo
Path corrected (Thanks to test)
This commit is contained in:
Tinmarino
2020-07-25 03:40:50 -04:00
parent 81c67f97e4
commit c9ba53e204
5 changed files with 78 additions and 62 deletions
+10
View File
@@ -62,6 +62,16 @@ endfunction
" Trim spaces: leading and trailing
function! vimwiki#u#sort_len(list) abort
function! s:len_compare(s1, s2) abort
let i1 = len(a:s1)
let i2 = len(a:s2)
return i1 == i2 ? 0 : i1 > i2 ? 1 : -1
endfunction
return sort(a:list, 's:len_compare')
endfunction
function! vimwiki#u#trim(string, ...) abort
let chars = ''
if a:0 > 0