aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-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