Unify yes/no question
This commit is contained in:
parent
13bdb43a54
commit
827b3a8974
@ -71,7 +71,7 @@ function! vimwiki#base#read_wiki_options(check) " {{{ Attempt to read wiki
|
|||||||
"
|
"
|
||||||
echo "\nFound file : ".local_wiki_options_filename
|
echo "\nFound file : ".local_wiki_options_filename
|
||||||
let query = "Vimwiki: Check for options in this file [Y]es/[n]o? "
|
let query = "Vimwiki: Check for options in this file [Y]es/[n]o? "
|
||||||
if a:check > 0 && (tolower(input(query)) !~ "y")
|
if a:check > 0 && input(query) =~? '^n')
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
"
|
"
|
||||||
@ -86,7 +86,7 @@ function! vimwiki#base#read_wiki_options(check) " {{{ Attempt to read wiki
|
|||||||
if a:check > 0
|
if a:check > 0
|
||||||
echo "\n\nFound wiki options\n g:local_wiki = ".string(g:local_wiki)
|
echo "\n\nFound wiki options\n g:local_wiki = ".string(g:local_wiki)
|
||||||
let query = "Vimwiki: Apply these options [Y]es/[n]o? "
|
let query = "Vimwiki: Apply these options [Y]es/[n]o? "
|
||||||
if tolower(input(query)) !~ "y"
|
if input(query) =~? '^n'
|
||||||
let g:local_wiki = {}
|
let g:local_wiki = {}
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
@ -1210,8 +1210,8 @@ endfunction "}}}
|
|||||||
function! vimwiki#base#delete_link() "{{{
|
function! vimwiki#base#delete_link() "{{{
|
||||||
"" file system funcs
|
"" file system funcs
|
||||||
"" Delete wiki link you are in from filesystem
|
"" Delete wiki link you are in from filesystem
|
||||||
let val = input('Delete ['.expand('%').'] (y/n)? ', "")
|
let val = input('Delete "'.expand('%').'" [y]es/[N]o? ')
|
||||||
if val != 'y'
|
if val !~? '^y'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let fname = expand('%:p')
|
let fname = expand('%:p')
|
||||||
@ -1244,12 +1244,12 @@ function! vimwiki#base#rename_link() "{{{
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let val = input('Rename "'.expand('%:t:r').'" (y/n)? ', "")
|
let val = input('Rename "'.expand('%:t:r').'" [y]es/[N]o? ')
|
||||||
if val!='y'
|
if val !~? '^y'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let new_link = input('Enter new name: ', "")
|
let new_link = input('Enter new name: ')
|
||||||
|
|
||||||
if new_link =~ '[/\\]'
|
if new_link =~ '[/\\]'
|
||||||
" It is actually doable but I do not have free time to do it.
|
" It is actually doable but I do not have free time to do it.
|
||||||
|
@ -116,7 +116,8 @@ function! vimwiki#path#mkdir(path, ...) "{{{
|
|||||||
let path = iconv(path, &enc, g:vimwiki_w32_dir_enc)
|
let path = iconv(path, &enc, g:vimwiki_w32_dir_enc)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if a:0 && a:1 && tolower(input("Vimwiki: Make new directory: ".path."\n [Y]es/[n]o? ")) !~ "^y"
|
if a:0 && a:1 && input("Vimwiki: Make new directory: "
|
||||||
|
\ .path."\n [y]es/[N]o? ") !~? '^y'
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user