Add split handling.
This commit is contained in:
parent
7afbc9ae8f
commit
e4ff3d8f2c
1 changed files with 47 additions and 10 deletions
|
@ -13,20 +13,39 @@ execute pathogen#infect()
|
||||||
set term=xterm-256color
|
set term=xterm-256color
|
||||||
|
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
||||||
colorscheme maxbucknell
|
colorscheme maxbucknell
|
||||||
|
|
||||||
" Leader
|
" Leader
|
||||||
let mapleader = "\<space>"
|
let mapleader = "\<space>"
|
||||||
|
|
||||||
|
" Don't wrap lines
|
||||||
|
set nowrap
|
||||||
|
|
||||||
" Line numbering
|
" Line numbering
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set number
|
set number
|
||||||
|
|
||||||
|
" Write before commands
|
||||||
|
set autowrite
|
||||||
|
|
||||||
|
" Open splits in better places
|
||||||
|
set splitbelow
|
||||||
|
set splitright
|
||||||
|
|
||||||
|
" Quicker window movement
|
||||||
|
nnoremap <C-j> <C-w>j
|
||||||
|
nnoremap <C-k> <C-w>k
|
||||||
|
nnoremap <C-h> <C-w>h
|
||||||
|
nnoremap <C-l> <C-w>l
|
||||||
|
|
||||||
" Set editor shell to bash, for Syntastic compatibility
|
" Set editor shell to bash, for Syntastic compatibility
|
||||||
set shell=bash
|
set shell=bash
|
||||||
|
|
||||||
" Find files
|
" Find files
|
||||||
nnoremap <leader>t :call PickFile()<cr>
|
nnoremap <leader>t :call PickFile()<cr>
|
||||||
|
nnoremap <leader>b :call PickBuffer()<cr>
|
||||||
|
nnoremap <leader>n :call PickFileVerticalSplit()<cr>
|
||||||
|
|
||||||
" Tab config options
|
" Tab config options
|
||||||
set expandtab
|
set expandtab
|
||||||
|
@ -40,19 +59,31 @@ set nobackup
|
||||||
set nowritebackup
|
set nowritebackup
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
|
||||||
|
" What the hell is ex mode
|
||||||
|
nnoremap Q <nop>
|
||||||
|
|
||||||
|
" Faster highlight removal than ;noh
|
||||||
|
nnoremap <silent> <leader>/ :noh<cr>
|
||||||
|
|
||||||
" I am lazy and I don't like holding shift.
|
" I am lazy and I don't like holding shift.
|
||||||
noremap ; :
|
noremap ; :
|
||||||
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!
|
" Paste!
|
||||||
noremap <leader>v "+gp
|
noremap <leader>v "*gp
|
||||||
noremap <leader>V "+gP
|
noremap <leader>V "*gP
|
||||||
noremap <leader>c "+y
|
noremap <leader>c "*y
|
||||||
noremap <leader>C "+Y
|
noremap <leader>C "*Y
|
||||||
|
|
||||||
" Quick exit insert mode
|
" Quick exit insert mode
|
||||||
inoremap hh <esc>
|
inoremap hh <esc>
|
||||||
|
inoremap hhh h<esc>
|
||||||
inoremap <esc> <nop>
|
inoremap <esc> <nop>
|
||||||
|
|
||||||
" Bad arrow keys
|
" Bad arrow keys
|
||||||
|
@ -70,11 +101,17 @@ noremap - ddp
|
||||||
noremap _ ddkP
|
noremap _ ddkP
|
||||||
|
|
||||||
" Uppercase an entire word with <c-u>
|
" Uppercase an entire word with <c-u>
|
||||||
inoremap <c-u> <esc>viwUa
|
nnoremap <leader>u viwU
|
||||||
nnoremap <c-u> viwU
|
|
||||||
|
" Add new line below
|
||||||
|
nnoremap <cr> i<cr><esc>k
|
||||||
|
|
||||||
" Show me when my lines are too long
|
" 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
|
" Prevent K from being annoying
|
||||||
noremap K <nop>
|
noremap K <nop>
|
||||||
|
@ -235,8 +272,8 @@ function! InsertTabWrapper()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
|
" inoremap <tab> <c-r>=InsertTabWrapper()<cr>
|
||||||
inoremap <s-tab> <c-n>
|
" inoremap <s-tab> <c-n>
|
||||||
|
|
||||||
" I don't like the quote concealing
|
" I don't like the quote concealing
|
||||||
let g:vim_json_syntax_conceal = 0
|
let g:vim_json_syntax_conceal = 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue