[nvim] use is# instead of is for comparisons

This commit is contained in:
Dmytro Meleshko 2019-04-22 21:15:29 +03:00
parent 33e4ffe2cc
commit b0707c8993
2 changed files with 4 additions and 4 deletions

View file

@ -62,7 +62,7 @@ set foldmethod=marker
" Mappings {{{ " Mappings {{{
" arguably one of the most useful mappings " arguably one of the most useful mappings
nnoremap <silent><expr> <CR> empty(&buftype) ? ":w\<CR>" : "\<CR>" nnoremap <silent><expr> <CR> &buftype is# '' ? ":w\<CR>" : "\<CR>"
" stay in the Visual mode when using shift commands " stay in the Visual mode when using shift commands
xnoremap < <gv xnoremap < <gv

View file

@ -48,11 +48,11 @@ endif
let l:cmd = a:cmd let l:cmd = a:cmd
if &modified if &modified
let l:answer = confirm("Save changes?", "&Yes\n&No\n&Cancel") let l:answer = confirm("Save changes?", "&Yes\n&No\n&Cancel")
if l:answer is 1 " Yes if l:answer is# 1 " Yes
write write
elseif l:answer is 2 " No elseif l:answer is# 2 " No
let l:cmd .= '!' let l:cmd .= '!'
else " Cancel/Other else " Cancel/Other
return return
endif endif
endif endif