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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user