dotfiles/.vimrc

87 lines
1.5 KiB
VimL
Raw Normal View History

2015-03-16 07:00:25 +01:00
" global settings
set nocompatible
2013-10-26 09:07:26 +02:00
set noswapfile
2015-03-16 07:00:25 +01:00
set undofile
set undodir=$HOME/.vim/undo
2016-01-24 14:50:45 +01:00
set spell spelllang=en_gb
" buffers can be switched despite having changes
set hidden
2015-03-16 07:00:25 +01:00
" file settings
2013-10-26 09:07:26 +02:00
set encoding=utf-8
2013-10-09 10:59:38 +02:00
2013-11-27 18:38:14 +01:00
" key mappings
let mapleader = ","
2013-10-26 16:55:11 +02:00
nmap <leader>p :set paste!<CR>
2013-11-15 21:35:40 +01:00
nmap <leader>h :set hlsearch!<CR>
nmap <leader>t :wa <bar> :Make test<CR>
" navigate buffers by ctrl-b
nmap <C-b> :bprevious<CR>
2013-11-27 18:38:14 +01:00
nnoremap ; :
" no cheating !
2013-11-27 18:38:14 +01:00
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
2013-11-15 21:35:40 +01:00
" for damaged keyboards
map <F1> <Esc>
imap <F1> <Esc>
2013-10-26 09:07:26 +02:00
" special chars
nmap <leader>l :set list!<CR>
set listchars=tab:▸\ ,eol
highlight NonText guifg=#4a4a59
highlight SpecialKey guifg=#4a4a59
" tabs and spaces
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
2013-10-09 14:13:37 +02:00
" plugins
execute pathogen#infect()
filetype plugin indent on
2013-10-26 09:23:08 +02:00
" colours [need pathogen]
set t_Co=256
syntax enable
set background=dark
2013-10-26 09:59:45 +02:00
highlight clear SignColumn
2013-10-26 09:23:08 +02:00
colorscheme solarized
2013-10-26 09:07:26 +02:00
" plugins: airline
2013-10-25 22:46:59 +02:00
let g:bufferline_echo = 0
2013-10-25 23:00:21 +02:00
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
2016-05-15 22:59:29 +02:00
" plugins: rust
let g:rustfmt_autosave = 1
2013-10-26 09:07:26 +02:00
2016-01-13 13:25:34 +02:00
" plugins: ag/ack
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
2013-10-26 09:07:26 +02:00
" appearance
2014-11-15 14:20:41 +01:00
set number
2013-10-26 09:07:26 +02:00
set relativenumber
set laststatus=2
set noshowmode
set showtabline=1 "only show tabline when more than 1 tab
" exclude quickfix from the buffers list
augroup qf
autocmd!
autocmd FileType qf set nobuflisted
augroup END
2014-02-11 15:17:04 +01:00
" vimdiff
set diffopt+=iwhite
set diffexpr=""