Add option to set a character which replaces spaces when creating links.
The wikilocal option links_space_char will be used to replace any spaces when creating a new wiki link and page. This only affects link creation with a visual selection.
This commit is contained in:
@ -2134,7 +2134,8 @@ function! s:normalize_link_syntax_v()
|
||||
endif
|
||||
|
||||
" Put substitution in register " and change text
|
||||
call setreg('"', substitute(sub, '\n', '', ''), visualmode())
|
||||
let sc = vimwiki#vars#get_wikilocal('links_space_char')
|
||||
call setreg('"', substitute(substitute(sub, '\n', '', ''), '\s', sc, 'g'), visualmode())
|
||||
normal! `>""pgvd
|
||||
finally
|
||||
call setreg('"', default_register_save, registertype_save)
|
||||
|
Reference in New Issue
Block a user