aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Buckley-Houston2022-05-23 14:10:13 +0000
committerThomas Buckley-Houston2022-05-23 14:10:13 +0000
commit0e8e37a6c7b6f0ff2bbb27593d0b7c83c8ab91b9 (patch)
tree941499312f69f8c39b837a36ac05fbe54c3ffd3d
parentcf041e18f46d95de44ae61dac4785fea68a6a21b (diff)
Fix for deprecated `insertmode` option in NeovimHEADmain
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
-rw-r--r--autoload/novim_mode.vim10
1 files 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 <Esc> <Nop>
+ inoremap <C-L> <Esc>
+ nnoremap <Esc> i
else
- exe "set noinsertmode"
+ exe "stopinsert"
+ inoremap <Esc> <Esc>
+ inoremap <C-L> <C-L>
+ nnoremap <Esc> <Esc>
endif
endfunction