From e420a5b0297eabe50c194b58dea6e88b678bc1f5 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 3 May 2017 23:52:33 +0100 Subject: [PATCH] Update mappings to {i,n,v}noremap --- plugin/functions.vim | 10 ++++++++++ plugin/mappings.vim | 27 ++++++++++----------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/plugin/functions.vim b/plugin/functions.vim index c7fec97..dfe4eb9 100644 --- a/plugin/functions.vim +++ b/plugin/functions.vim @@ -114,3 +114,13 @@ function! CheckboxToggle() endfunction command! CheckboxToggle :call CheckboxToggle() nnoremap :CheckboxToggle + +" Show highlight groups under the cursor +function! s:CursorHighlightGroups() + let l:hi = synIDattr(synID(line('.'),col('.'),1),'name') + let l:trans = synIDattr(synID(line('.'),col('.'),0),'name') + let l:lo = synIDattr(synIDtrans(synID(line('.'),col('.'),1)),'name') + echo 'hi<'.l:hi.'> trans<'.l:trans.'> lo<'.l:lo.'>' +endfunction +command! CursorHighlightGroups :call s:CursorHighlightGroups() +nnoremap hi :CursorHighlightGroups diff --git a/plugin/mappings.vim b/plugin/mappings.vim index 5c0e66e..11c5812 100644 --- a/plugin/mappings.vim +++ b/plugin/mappings.vim @@ -60,29 +60,22 @@ nnoremap to :tabonly nnoremap tm :tabmove " Clear search highlights -map :noh - -" Show highlight group under cursor -map hi :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . - \ '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" - \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" +nnoremap :nohlsearch " System clipboard yank/put -map y "+y -map Y "+Y -map p "+p -map P "+P +noremap y "+y +noremap Y "+Y +noremap p "+p +noremap P "+P " Quickly access spelling menu -imap us -nmap ius +inoremap us +nnoremap ius " Disable 'Q' from opening Ex mode -nmap Q -" Disable 'K' from loading man pages in normal mode -nmap K -" Disable 'K' from loading man pages in visual mode -vmap K +nnoremap Q +" Disable 'K' from loading man pages +noremap K " Split line at the cursor nnoremap [j i