From 0d16d52492938dd92591b1278a73d50ef388c633 Mon Sep 17 00:00:00 2001 From: Vito Graffagnino Date: Wed, 9 Sep 2020 14:53:26 +0100 Subject: update/modularised nvim config files --- .config/nvim/keys/mappings.vim | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .config/nvim/keys/mappings.vim (limited to '.config/nvim/keys/mappings.vim') diff --git a/.config/nvim/keys/mappings.vim b/.config/nvim/keys/mappings.vim new file mode 100644 index 0000000..929414b --- /dev/null +++ b/.config/nvim/keys/mappings.vim @@ -0,0 +1,73 @@ +" g Leader key +let mapleader="," +let localleader=",," +nnoremap +map v :edit $MYVIMRC + +" Better indenting +vnoremap < >gv + +" Better nav for omnicomplete +inoremap ("\") +inoremap ("\") + +" TAB in general mode will move to text buffer +nnoremap :bnext +" SHIFT-TAB will go back +nnoremap :bprevious + +" Use control-c instead of escape +nnoremap +" : completion. +inoremap pumvisible() ? "\" : "\" + +" Better window navigation +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +" Use alt + hjkl to resize windows +nnoremap :resize -2 +nnoremap :resize +2 +nnoremap :vertical resize -2 +nnoremap :vertical resize +2 + +" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed): +vnoremap "+y +map "+P + +" Binary File Settings ---- {{{ +" +" Hex read +nmap hr :%!xxd :set filetype=xxd +" Hex write +nmap hw :%!xxd -r :set binary :set filetype=xxd +" +" }}} +" Info Pages Settings ----- {{{ +" +" Set up the reading of info from within vim (use :Info whatever) + +nnoremap :exe ":Info ".expand("") + +" +" }}} +" Terminal Emulator ----- {{{ +" +" +tnoremap + +" Usel alt+hjkl to move between windows + +tnoremap h +tnoremap j +tnoremap k +tnoremap l +nnoremap h +nnoremap j +nnoremap k +nnoremap l +" +" }}} -- cgit v1.2.3