From 3e97ae117ff5ff88e45607b114d0b59de03c24de Mon Sep 17 00:00:00 2001 From: jdhao Date: Sun, 20 Sep 2020 16:24:36 +0800 Subject: [PATCH] clean usage in mappings --- mappings.vim | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/mappings.vim b/mappings.vim index 5a7bded..00e8b19 100644 --- a/mappings.vim +++ b/mappings.vim @@ -9,13 +9,13 @@ xnoremap ; : nnoremap q; q: " Quicker in insert mode -inoremap jk +inoremap jk " Turn the word under cursor to upper case -inoremap viwUea +inoremap viwUea " Turn the current word into title case -inoremap b~lea +inoremap b~lea " Paste non-linewise text above or below current cursor, " see https://stackoverflow.com/a/1346777/6064933 @@ -30,14 +30,14 @@ nnoremap q :x nnoremap Q :qa " Navigation in the location and quickfix list -nnoremap [l :lpreviouszv -nnoremap ]l :lnextzv -nnoremap [L :lfirstzv -nnoremap ]L :llastzv -nnoremap [q :cpreviouszv -nnoremap ]q :cnextzv -nnoremap [Q :cfirstzv -nnoremap ]Q :clastzv +nnoremap [l :lpreviouszv +nnoremap ]l :lnextzv +nnoremap [L :lfirstzv +nnoremap ]L :llastzv +nnoremap [q :cpreviouszv +nnoremap ]q :cnextzv +nnoremap [Q :cfirstzv +nnoremap ]Q :clastzv " Close location list or quickfix list if they are present, " see https://superuser.com/q/355325/736190 @@ -64,17 +64,17 @@ nnoremap OO 'm`' . v:count1 . 'O``' " nnoremap oo @="m`o\e``" " Insert a space after current character -nnoremap ah +nnoremap ah " Yank from current cursor position to the end of the line (make it " consistent with the behavior of D, C) nnoremap Y y$ " Move the cursor based on physical lines, not the actual lines. -nnoremap j (v:count == 0 ? 'gj' : 'j') -nnoremap k (v:count == 0 ? 'gk' : 'k') -nnoremap ^ g^ -nnoremap 0 g0 +nnoremap j (v:count == 0 ? 'gj' : 'j') +nnoremap k (v:count == 0 ? 'gk' : 'k') +nnoremap ^ g^ +nnoremap 0 g0 " Do not include white space characters when using $ in visual mode, " see https://vi.stackexchange.com/q/12607/15292 @@ -93,17 +93,17 @@ xnoremap L g_ " https://vim.fandom.com/wiki/Fast_window_resizing_with_plus/minus_keys " (bottom page). If you enable mouse support, shorcuts below may not be " necessary. -nnoremap < -nnoremap > -nnoremap - -nnoremap + +nnoremap < +nnoremap > +nnoremap - +nnoremap + " Fast window switching, inspiration from " https://stackoverflow.com/a/4373470/6064933 -nnoremap h -nnoremap l -nnoremap j -nnoremap k +nnoremap h +nnoremap l +nnoremap j +nnoremap k " Continuous visual shifting (does not exit Visual mode), `gv` means " to reselect previous visual area, see https://superuser.com/q/310417/736190