dotfiles/.vimrc

135 lines
2.9 KiB
VimL
Raw Normal View History

2015-11-30 15:56:41 +00:00
execute pathogen#infect()
2015-11-17 23:59:57 +00:00
"Turn on syntax highlighting
syntax on
" Colors
set background=dark
2015-12-02 13:58:40 +00:00
colorscheme solarized
2015-11-17 23:59:57 +00:00
hi Search cterm=NONE ctermfg=white ctermbg=red
2015-12-02 13:58:40 +00:00
let g:airline_theme='solarized'
let g:airline_powerline_fonts=1
2015-11-17 23:59:57 +00:00
"Disable vi-compatible backspace behavior
set backspace=indent,eol,start
"Disable vi compatibility (may be redundant with above)
set nocompatible
"Default character encoding
set encoding=utf-8
set fileencoding=utf-8
" All unix, all the time
set ffs=unix
set ff=unix
" Indentation stuff
" 2-space everything
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
" Old school
set textwidth=80
2015-12-08 19:54:45 +00:00
set colorcolumn=+1
2015-11-17 23:59:57 +00:00
" Auto wrap long lines
set formatoptions+=t
set autoindent
" Look and feel
set encoding=utf-8
2015-12-02 13:58:40 +00:00
set noshowmode
2015-11-17 23:59:57 +00:00
set number
set wildmenu
set showmatch
" Silence is golden
set noerrorbells
set novisualbell
" Searching things
set incsearch
set hlsearch
set ignorecase
set smartcase
2015-12-02 13:58:40 +00:00
vnoremap <silent> * :call VisualSelection('f')<CR>
vnoremap <silent> # :call VisualSelection('b')<CR>
2015-11-17 23:59:57 +00:00
" Visually display whitespace (this prevents slowness from match command)
set list
set listchars=tab:>>,trail:-,nbsp:+
"Display each keystroke in the status line
set showcmd
"Always show the status line
set laststatus=2
set hidden
" Remapping things
let mapleader=","
2015-12-02 13:58:40 +00:00
set pastetoggle=<leader>p
2015-11-17 23:59:57 +00:00
" Making my life hard on purpose so it is easier later...
nnoremap <buffer><Left> <nop>
nnoremap <buffer><Right> <nop>
nnoremap <buffer><Up> <nop>
nnoremap <buffer><Down> <nop>
nnoremap <buffer><PageUp> <nop>
nnoremap <buffer><PageDown> <nop>
nnoremap <buffer><Home> <nop>
nnoremap <buffer><Insert> <nop>
nnoremap <buffer><End> <nop>
vnoremap <buffer><Left> <nop>
vnoremap <buffer><Right> <nop>
vnoremap <buffer><Up> <nop>
vnoremap <buffer><Down> <nop>
vnoremap <buffer><PageUp> <nop>
vnoremap <buffer><PageDown> <nop>
vnoremap <buffer><Home> <nop>
vnoremap <buffer><Insert> <nop>
vnoremap <buffer><End> <nop>
inoremap <buffer><Left> <nop>
inoremap <buffer><Right> <nop>
inoremap <buffer><Up> <nop>
inoremap <buffer><Down> <nop>
inoremap <buffer><PageUp> <nop>
inoremap <buffer><PageDown> <nop>
inoremap <buffer><Home> <nop>
inoremap <buffer><Insert> <nop>
inoremap <buffer><End> <nop>
" Because the shift key is a lot of work
nnoremap ; :
inoremap <leader>; <esc>
"Toggle line numbering
nmap <Leader>l :setlocal number!<CR>
2015-12-02 13:58:40 +00:00
nmap <Leader>c :nohlsearch<CR>
2015-11-17 23:59:57 +00:00
map <C-J> :bnext<CR>
map <C-K> :bprev<CR>
map <C-L> :tabn<CR>
map <C-H> :tabp<CR>
"Delete single characters without updating the default register
noremap x "_x
"Paste in visual mode without updating the default register
vnoremap p "_dP
"Enable 256-color mode
set t_Co=256
"Jump five lines when scrolling at edge of screen
set scrolljump=1
"Cause screen to scroll when within three lines of the edge
set scrolloff=5
set sidescrolloff=5
"Folding
set foldmethod=indent
set nofoldenable
"Tell vim to interpret our .vim/after/ftplugin files
2015-12-08 19:54:45 +00:00
filetype plugin indent on
2015-11-17 23:59:57 +00:00
let loaded_matchparen = 1