Skip to content

Instantly share code, notes, and snippets.

@rainerborene
Created December 2, 2018 15:51
Show Gist options
  • Save rainerborene/1013356030fd8a9cae3c5a31295c52ff to your computer and use it in GitHub Desktop.
Save rainerborene/1013356030fd8a9cae3c5a31295c52ff to your computer and use it in GitHub Desktop.
function! s:setup_insmode()
inoremap <buffer> <silent> <nowait> <Esc> <C-r>=lexima#insmode#escape()<CR><Esc>
endfun
function! Multiple_cursors_before()
let b:lexima_disabled = 1
silent! iunmap <buffer> <esc>
augroup lexima
au!
augroup END
endfunction
function! Multiple_cursors_after()
let b:lexima_disabled = 0
augroup lexima
au!
au InsertEnter * call lexima#insmode#clear_stack()
au InsertEnter * call <sid>setup_insmode()
augroup END
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment