From 0e8e37a6c7b6f0ff2bbb27593d0b7c83c8ab91b9 Mon Sep 17 00:00:00 2001 From: Thomas Buckley-Houston Date: Mon, 23 May 2022 11:10:13 -0300 Subject: Fix for deprecated `insertmode` option in Neovim This is just the minimal fix, there may be other side-effects. But I actually think this might make things easier, as it looks like this cleans up Insert mode into a cleaner abstraction. Perhaps now we will stay in Insert mode longer, without randomly being dropped into Normal mode by presumptive plugins. Neovim PR here: https://github.com/neovim/neovim/pull/18547 --- autoload/novim_mode.vim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autoload/novim_mode.vim b/autoload/novim_mode.vim index 169d39a..610d38b 100644 --- a/autoload/novim_mode.vim +++ b/autoload/novim_mode.vim @@ -16,9 +16,15 @@ endfunction " to files that you want to edit. function! s:InsertMode() if s:IsEditableBuffer() == 1 - exe "set insertmode" + exe "startinsert" + inoremap + inoremap + nnoremap i else - exe "set noinsertmode" + exe "stopinsert" + inoremap + inoremap + nnoremap endif endfunction -- cgit v1.2.3-70-g09d2