Skip to content

Commit

Permalink
vimrc: jk: no error when at EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Apr 19, 2016
1 parent 699ba59 commit 75d0537
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vimrc
Expand Up @@ -2153,7 +2153,12 @@ set wildmode=list:longest,list:full

" Maps for jk and kj to act as Esc (idempotent in normal mode).
" NOTE: jk moves to the right after Esc, leaving the cursor at the current position.
ino jk <esc>l
fun! MyRightWithoutError()
if col(".") < len(getline("."))
normal! l
endif
endfun
inoremap <silent> jk <esc>:call MyRightWithoutError()<cr>
" cno jk <c-c>
ino kj <esc>
" cno kj <c-c>
Expand Down

0 comments on commit 75d0537

Please sign in to comment.