[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 {{{
" 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
xnoremap < <gv

View file

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