My vim configuration
git clone https://mcol.xyz/code/vim-misc
Log | Files | Refs | README

commit 00537ed98af6754b684c093302ae29ba43c624e6
parent 3d0b1d3f5bdd02193a3bf759d86b89eb1930fe44
Author: mcol <mcol@posteo.net>
Date:   Sat,  8 Dec 2018 12:13:38 +0000

key bindings to use tmux-vim navigation

Diffstat:
Mplugin/keybindings.vim | 24+++++++++++++++---------
Mvimrc | 8+++++---
2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/plugin/keybindings.vim b/plugin/keybindings.vim @@ -47,15 +47,21 @@ inoremap <C-y> <Esc>"+y " save read-only file with sudo trick cnoremap w!! w !sudo tee > /dev/null % -" move between split views -nnoremap <C-H> <C-W><C-H> -nnoremap <C-J> <C-W><C-J> -nnoremap <C-K> <C-W><C-K> -nnoremap <C-L> <C-W><C-L> -inoremap <C-H> <Esc><C-W><C-H> -inoremap <C-J> <Esc><C-W><C-J> -inoremap <C-K> <Esc><C-W><C-K> -inoremap <C-L> <Esc><C-W><C-L> +" move between split views (these are configured by the vim-tmux plugin) +" except for insert mode: +inoremap <silent> <C-H> <Esc>:TmuxNavigateLeft<cr> +inoremap <silent> <C-J> <Esc>:TmuxNavigateDown<cr> +inoremap <silent> <C-K> <Esc>:TmuxNavigateUp<cr> +inoremap <silent> <C-L> <Esc>:TmuxNavigateRight<cr> +inoremap <silent> <C-\> <Esc>:TmuxNavigatePrevious<cr> +"nnoremap <C-H> <C-W><C-H> +"nnoremap <C-J> <C-W><C-J> +"nnoremap <C-K> <C-W><C-K> +"nnoremap <C-L> <C-W><C-L> +"inoremap <C-H> <Esc><C-W><C-H> +"inoremap <C-J> <Esc><C-W><C-J> +"inoremap <C-K> <Esc><C-W><C-K> +"inoremap <C-L> <Esc><C-W><C-L> " move to start or end of line more easily nnoremap H 0 diff --git a/vimrc b/vimrc @@ -19,11 +19,12 @@ set rtp+=~/.vim/bundle/Vundle.vim " required call vundle#begin() Plugin 'VundleVim/Vundle.vim' " required -"Plugin 'ervandew/supertab' " better tab completion -Plugin 'jpalardy/vim-slime' " send text to IDE and execute +Plugin 'mcolligan/vim-misc' " my vimrc and misc functions Plugin 'vimwiki/vimwiki' " vimwiki Plugin 'mcolligan/vimlab' " vimlab -Plugin 'mcolligan/vim-misc' " misc functions +Plugin 'mcolligan/tide' " tmux ide +Plugin 'jpalardy/vim-slime' " send text to IDE and execute +Plugin 'christoomey/vim-tmux-navigator' " navigate vim and tmux splits seamless call vundle#end() " required filetype plugin indent on " required @@ -46,6 +47,7 @@ set hlsearch " Highlight all search results - toggled by <Leader>h set smartcase " searches ignore case only if all lower case set incsearch " Searches for strings while typing search term set gdefault " use global by default for substitutions +set nowrap " don't wrap really long lines set shiftwidth=4 " Default number of auto-indent spaces set autoindent " Auto-indent new lines