From 539254078bb5460d3e843a142b28494d260d6167 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 31 Jul 2014 01:53:33 -0400 Subject: [PATCH] move copy/paste stuff to before neocomplcache remaps it --- vim/config/keyboard.vim | 138 ++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 50fd7f8..76e300b 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -114,6 +114,35 @@ " ?N | (N) -> go to the next spelling mistake " ?P | (N) -> go to the previous spelling mistake " +" (copy/paste and undo/redo) +" p | (N) -> view the paste buffers and register contents +" y | (N) -> copies the character at the cursor +" P | (V) -> save selection to the buffer and paste over +" p | (V) -> preserve the buffer pasting over selected text +" Direction | (N) -> paste in the direction entered +" T | (N) -> copy to the end of the line +" T | (V) -> copy to the end of the line +" +" (delete/cut functions) +" x | (N) -> delete the char(s) under and the cursor +" x | (V) -> delete the currently selected text +" X | (N) -> delete the char(s) before the cursor +" X | (V) -> delete the currently selected lines +" D | (N) -> delete chars under and after the cursor on the line +" D | (V) -> delete the currently selected lines +" dw | (N) -> delete chars under and after the cursor in the word +" dd | (N) -> delete lines under and after the one below +" d | (V) -> delete the currently selected text +" +" (improved copy and paste shortcuts) +" | (N) -> paste from buffer +" | (V) -> paste buffer in place of selection +" | (I) -> paste from buffer then return to input +" | (N) -> copy character +" | (V) -> copy selection +" | (N) -> cut character +" | (V) -> cut selection +" " (completion) " , | (A) -> enter after emmet 'word' (ie: html:5) " | (I) -> (neocomp) close the popup and @@ -183,35 +212,6 @@ " " / | (N) -> remove search highlighting " -" (copy/paste and undo/redo) -" p | (N) -> view the paste buffers and register contents -" y | (N) -> copies the character at the cursor -" P | (V) -> save selection to the buffer and paste over -" p | (V) -> preserve the buffer pasting over selected text -" Direction | (N) -> paste in the direction entered -" T | (N) -> copy to the end of the line -" T | (V) -> copy to the end of the line -" -" (delete/cut functions) -" x | (N) -> delete the char(s) under and the cursor -" x | (V) -> delete the currently selected text -" X | (N) -> delete the char(s) before the cursor -" X | (V) -> delete the currently selected lines -" D | (N) -> delete chars under and after the cursor on the line -" D | (V) -> delete the currently selected lines -" dw | (N) -> delete chars under and after the cursor in the word -" dd | (N) -> delete lines under and after the one below -" d | (V) -> delete the currently selected text -" -" (improved copy and paste shortcuts) -" | (N) -> paste from buffer -" | (V) -> paste buffer in place of selection -" | (I) -> paste from buffer then return to input -" | (N) -> copy character -" | (V) -> copy selection -" | (N) -> cut character -" | (V) -> cut selection -" " (remap dangerous functions that skip undo) " | (I) -> undo-able equivalent " | (I) -> undo-able equivalent @@ -487,6 +487,46 @@ nnoremap ?P [s "} + "COPY PASTE AND UNDO REDO:{ + "display contents of paste buffers + nnoremap p ':reg' + + "allow y to copy a single character in normal mode + nnoremap y vy + + "P pastes and replaces the buffer, p pastes and keeps it + vnoremap P p + xmap p ReplaceWithRegisterVisual + + "copy to the end of the line + nnoremap T vg_y + vnoremap T g_y + + "Alternatives to cut/deletion commands that don't replace the buffer + nnoremap x "_x + vnoremap x "_x + nnoremap X "_X + vnoremap X "_X + nnoremap D "_D + vnoremap D "_D + nnoremap dd "_dd + nnoremap dw "_dw + vnoremap d "_d + + "map copy/paste shortcuts to more typical ones + nnoremap P + xmap ReplaceWithRegisterVisual + inoremap p + nnoremap y + vnoremap y + nnoremap x + vnoremap x + + "remap ctrl-u and ctrl-w to safer alternatives + inoremap u + inoremap u + "} + "COMPLETION:{ "emmet switch triggerkey from let g:user_emmet_leader_key='' @@ -588,46 +628,6 @@ "clear search results nnoremap / ':noh:echo "Search results have been cleared"' "} - - "COPY PASTE AND UNDO REDO:{ - "display contents of paste buffers - nnoremap p ':reg' - - "allow y to copy a single character in normal mode - nnoremap y vy - - "P pastes and replaces the buffer, p pastes and keeps it - vnoremap P p - xmap p ReplaceWithRegisterVisual - - "copy to the end of the line - nnoremap T vg_y - vnoremap T g_y - - "Alternatives to cut/deletion commands that don't replace the buffer - nnoremap x "_x - vnoremap x "_x - nnoremap X "_X - vnoremap X "_X - nnoremap D "_D - vnoremap D "_D - nnoremap dd "_dd - nnoremap dw "_dw - vnoremap d "_d - - "map copy/paste shortcuts to more typical ones - nnoremap P - xmap ReplaceWithRegisterVisual - inoremap p - nnoremap y - vnoremap y - nnoremap x - vnoremap x - - "remap ctrl-u and ctrl-w to safer alternatives - inoremap u - inoremap u - "} "}}} "FILETYPE SPECIFIC MAPPINGS: {{{