fix: use exists instead of has when checking if cmdlineenter event is supported
This commit is contained in:
parent
20f809d10f
commit
4cfc38530d
7
vimrc
7
vimrc
|
@ -990,7 +990,7 @@ command! Scratch new | setlocal buftype=nofile | setlocal bufhidden=hide | setlo
|
||||||
command! ScratchVertical vnew | setlocal buftype=nofile | setlocal bufhidden=hide | setlocal noswapfile
|
command! ScratchVertical vnew | setlocal buftype=nofile | setlocal bufhidden=hide | setlocal noswapfile
|
||||||
"}}}
|
"}}}
|
||||||
"}}}
|
"}}}
|
||||||
" " #settings {{{
|
" #settings {{{
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
syntax on
|
syntax on
|
||||||
|
@ -1028,7 +1028,8 @@ set hidden
|
||||||
set number relativenumber
|
set number relativenumber
|
||||||
set hlsearch
|
set hlsearch
|
||||||
|
|
||||||
set completeopt=menuone,preview
|
" set completeopt=menuone,preview
|
||||||
|
set completeopt=menuone
|
||||||
|
|
||||||
set nospell
|
set nospell
|
||||||
set spelllang=en_gb
|
set spelllang=en_gb
|
||||||
|
@ -1268,7 +1269,7 @@ iabbrev ct'' content-type: '';
|
||||||
autocmd InsertLeave * :set number relativenumber
|
autocmd InsertLeave * :set number relativenumber
|
||||||
autocmd WinEnter * :set number relativenumber
|
autocmd WinEnter * :set number relativenumber
|
||||||
autocmd WinLeave * set norelativenumber
|
autocmd WinLeave * set norelativenumber
|
||||||
if has('##CmdlineEnter')
|
if exists('##CmdlineEnter')
|
||||||
autocmd CmdlineEnter * :redraw | :set norelativenumber
|
autocmd CmdlineEnter * :redraw | :set norelativenumber
|
||||||
autocmd CmdlineLeave * :set number relativenumber
|
autocmd CmdlineLeave * :set number relativenumber
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue