diff options
| author | Vito Graffagnino <vito@graffagnino.xyz> | 2020-09-08 18:10:49 +0100 |
|---|---|---|
| committer | Vito Graffagnino <vito@graffagnino.xyz> | 2020-09-08 18:10:49 +0100 |
| commit | 3b0142cedcde39e4c2097ecd916a870a3ced5ec6 (patch) | |
| tree | 2116c49a845dfc0945778f2aa3e2118d72be428b /.config/new_neovim/keys/mappings.vim | |
| parent | 8cc927e930d5b6aafe3e9862a61e81705479a1b4 (diff) | |
Added the relevent parts of the .config directory. Alss add ssh config
Diffstat (limited to '.config/new_neovim/keys/mappings.vim')
| -rw-r--r-- | .config/new_neovim/keys/mappings.vim | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/.config/new_neovim/keys/mappings.vim b/.config/new_neovim/keys/mappings.vim new file mode 100644 index 0000000..929414b --- /dev/null +++ b/.config/new_neovim/keys/mappings.vim @@ -0,0 +1,73 @@ +" g Leader key +let mapleader="," +let localleader=",," +nnoremap <Space> <Nop> +map <leader>v :edit $MYVIMRC<CR> + +" Better indenting +vnoremap < <gv +vnoremap > >gv + +" Better nav for omnicomplete +inoremap <expr> <c-j> ("\<C-n>") +inoremap <expr> <c-k> ("\<C-p>") + +" TAB in general mode will move to text buffer +nnoremap <silent> <TAB> :bnext<CR> +" SHIFT-TAB will go back +nnoremap <silent> <S-TAB> :bprevious<CR> + +" Use control-c instead of escape +nnoremap <silent> <C-c> <Esc> +" <TAB>: completion. +inoremap <silent> <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" + +" Better window navigation +nnoremap <C-h> <C-w>h +nnoremap <C-j> <C-w>j +nnoremap <C-k> <C-w>k +nnoremap <C-l> <C-w>l + +" Use alt + hjkl to resize windows +nnoremap <silent> <M-j> :resize -2<CR> +nnoremap <silent> <M-k> :resize +2<CR> +nnoremap <silent> <M-h> :vertical resize -2<CR> +nnoremap <silent> <M-l> :vertical resize +2<CR> + +" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed): +vnoremap <C-c> "+y +map <C-p> "+P + +" Binary File Settings ---- {{{ +" +" Hex read +nmap <leader>hr :%!xxd<CR> :set filetype=xxd<CR> +" Hex write +nmap <leader>hw :%!xxd -r<CR> :set binary<CR> :set filetype=xxd<CR> +" +" }}} +" Info Pages Settings ----- {{{ +" +" Set up the reading of info from within vim (use :Info whatever) + +nnoremap <F1> :exe ":Info ".expand("<cword>")<CR> + +" +" }}} +" Terminal Emulator ----- {{{ +" +" +tnoremap <Esc> <C-\><C-n> + +" Usel alt+hjkl to move between windows + +tnoremap <A-h> <C-\><C-n><C-w>h +tnoremap <A-j> <C-\><C-n><C-w>j +tnoremap <A-k> <C-\><C-n><C-w>k +tnoremap <A-l> <C-\><C-n><C-w>l +nnoremap <A-h> <C-w>h +nnoremap <A-j> <C-w>j +nnoremap <A-k> <C-w>k +nnoremap <A-l> <C-w>l +" +" }}} |
