From e4ff3d8f2c6e67214b6c2de3da15dd8095aac34e Mon Sep 17 00:00:00 2001 From: Max Bucknell Date: Sat, 2 May 2015 18:35:55 +0100 Subject: [PATCH] Add split handling. --- vim/vimrc.symlink | 57 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/vim/vimrc.symlink b/vim/vimrc.symlink index fea0a71..20d0495 100644 --- a/vim/vimrc.symlink +++ b/vim/vimrc.symlink @@ -13,20 +13,39 @@ execute pathogen#infect() set term=xterm-256color set nocompatible + colorscheme maxbucknell " Leader let mapleader = "\" +" Don't wrap lines +set nowrap + " Line numbering set relativenumber set number +" Write before commands +set autowrite + +" Open splits in better places +set splitbelow +set splitright + +" Quicker window movement +nnoremap j +nnoremap k +nnoremap h +nnoremap l + " Set editor shell to bash, for Syntastic compatibility set shell=bash " Find files nnoremap t :call PickFile() +nnoremap b :call PickBuffer() +nnoremap n :call PickFileVerticalSplit() " Tab config options set expandtab @@ -40,19 +59,31 @@ set nobackup set nowritebackup set noswapfile +" What the hell is ex mode +nnoremap Q + +" Faster highlight removal than ;noh +nnoremap / :noh + " I am lazy and I don't like holding shift. noremap ; : noremap ;; ; -cnoreabbrev qq q! + +"Remove caps for dash +cnoremap dash Dash + +" Gain root privs when writing +cnoremap w!! w !sudo tee % > /dev/null " Paste! -noremap v "+gp -noremap V "+gP -noremap c "+y -noremap C "+Y +noremap v "*gp +noremap V "*gP +noremap c "*y +noremap C "*Y " Quick exit insert mode inoremap hh +inoremap hhh h inoremap " Bad arrow keys @@ -70,11 +101,17 @@ noremap - ddp noremap _ ddkP " Uppercase an entire word with -inoremap viwUa -nnoremap viwU +nnoremap u viwU + +" Add new line below +nnoremap ik " Show me when my lines are too long -call matchadd('ColorColumn', '\%81v', 100) +" I wish to limit my lines to 80 characters long. However, Vim creates +" the n+1th character when you have n characters in a line. Hence, when +" my line is 80 characters long, I see the red line. So, this is set to +" 82, meaning that I only see the line when my lines actually are too long. +call matchadd('ColorColumn', '\%82v', 100) " Prevent K from being annoying noremap K @@ -235,8 +272,8 @@ function! InsertTabWrapper() endif endfunction -inoremap =InsertTabWrapper() -inoremap +" inoremap =InsertTabWrapper() +" inoremap " I don't like the quote concealing let g:vim_json_syntax_conceal = 0