nvim: disable cursor-styling, clear highlighting with escape

This commit is contained in:
Charles Gould 2020-03-21 21:39:34 -05:00
parent 8daab62185
commit 7f92cd6eea

View File

@ -15,11 +15,14 @@ Plug 'https://github.com/tpope/vim-sleuth' " heuristically set buffer options
Plug 'https://github.com/vim-airline/vim-airline' " fancy statusline Plug 'https://github.com/vim-airline/vim-airline' " fancy statusline
call plug#end() call plug#end()
" display settings " hide line numbers at startup, toggle with F2
set nonumber norelativenumber " show hybrid line numbers at startup set nonumber norelativenumber
noremap <F2> :set number! relativenumber!<CR> " toggle line numbers nnoremap <silent> <F2> :set number! relativenumber!<Return>
" Disable match highlighting " clear highlighting with escape key
nnoremap <silent> <Esc> :noh<Return><Esc>
" disable match highlighting
let g:loaded_matchparen=1 let g:loaded_matchparen=1
" write settings " write settings
@ -28,6 +31,11 @@ set confirm " confirm :q in case of unsaved changes
" clipboard settings " clipboard settings
set clipboard=unnamedplus " enable copy/paste/yank to and from Vim/Neovim set clipboard=unnamedplus " enable copy/paste/yank to and from Vim/Neovim
" disable cursor-styling
" https://github.com/neovim/neovim/wiki/FAQ#how-to-change-cursor-shape-in-the-terminal
set guicursor=
autocmd OptionSet guicursor noautocmd set guicursor=
" paste settings (in Neovim, use plain insert mode) " paste settings (in Neovim, use plain insert mode)
if !has('nvim') if !has('nvim')
set pastetoggle=<F3> set pastetoggle=<F3>