From 4cfc38530dadfb0d1d4f66264b1c561ef8fb4d16 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Thu, 13 Dec 2018 17:25:45 +0000 Subject: [PATCH] fix: use exists instead of has when checking if cmdlineenter event is supported --- vimrc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vimrc b/vimrc index ad43461..05c75b5 100644 --- a/vimrc +++ b/vimrc @@ -12,7 +12,7 @@ let g:vimrc_auto_window_settings = exists('g:vimrc_auto_window_settings') \ ? g:vimrc_auto_window_settings : 0 "}}} - " #plugins {{{ +" #plugins {{{ if empty(glob('~/.vim/autoload/plug.vim'))"{{{ silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim @@ -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 "}}} "}}} -" " #settings {{{ +" #settings {{{ scriptencoding utf-8 syntax on @@ -1028,7 +1028,8 @@ set hidden set number relativenumber set hlsearch -set completeopt=menuone,preview +" set completeopt=menuone,preview +set completeopt=menuone set nospell set spelllang=en_gb @@ -1268,7 +1269,7 @@ iabbrev ct'' content-type: ''; autocmd InsertLeave * :set number relativenumber autocmd WinEnter * :set number relativenumber autocmd WinLeave * set norelativenumber - if has('##CmdlineEnter') + if exists('##CmdlineEnter') autocmd CmdlineEnter * :redraw | :set norelativenumber autocmd CmdlineLeave * :set number relativenumber endif