From 48752256339630c65fa7535690eb6cc2e45b59ba Mon Sep 17 00:00:00 2001 From: Julian Teu Date: Wed, 11 Apr 2018 17:26:39 +0200 Subject: Added cool ge gb commands to go to end and begin of object --- .vimrc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.vimrc b/.vimrc index 80d00bb..fb8672e 100644 --- a/.vimrc +++ b/.vimrc @@ -51,3 +51,28 @@ inoremap pumvisible() ? "\" : "\" tnoremap + +" Map C-s +noremap :update + +" Make ToBegin and ToEnd +function! InputChar() + let c = getchar() + return type(c) == type(0) ? nr2char(c) : c +endfunction + +function! ToEnd() + let s = InputChar() + if s =~ "\" || s =~ "\" + return + endif + execute "normal! vi". s. "\" +endfunction + +function! ToBegin() + call ToEnd() + execute "'<" +endfunction + +nnoremap ge :call ToEnd() +nnoremap gb :call ToBegin() -- cgit v1.2.3