aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc.symlink
blob: 04787675590e8fe1267bf7a947da46ba64c219a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
" Vundle
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" Special syntaxes
Plugin 'groenewege/vim-less'        " Less
Plugin 'digitaltoad/vim-jade'       " Jade
Plugin 'lervag/vimtex'              " TeX
Plugin 'norm2782/vim-clean'         " Clean

" Other plugins
Plugin 'terryma/vim-multiple-cursors'     " Multiple cursors
Plugin 'scrooloose/syntastic'             " Syntastic
Plugin 'altercation/vim-colors-solarized' " Colour scheme

call vundle#end()            " required
" End Vundle

" Common settings
set tabstop=4 shiftwidth=4
set cc=80
set linebreak
set nu
set dir=~/swp

filetype plugin indent on
syntax enable

set background=light
colorscheme morning

" Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

" VimTeX
let g:vimtex_latexmk_options = '-pdf -shell-escape -enable-pipes'
let g:vimtex_latexmk_file_line_error = 0
let g:tex_flavor='latex'

" Mutt
au BufRead /tmp/mutt-* set tw=72

" X clipboard manipulation using xsel
" See: http://vim.wikia.com/wiki/Accessing_the_system_clipboard
" Use :cz in visual mode to copy to clipboard, :pz for pasting
" x instead of z for primary selection, v for secondary selection
command -range Cz :silent :<line1>,<line2>w !xsel -i -b
command -range Cx :silent :<line1>,<line2>w !xsel -i -p
command -range Cv :silent :<line1>,<line2>w !xsel -i -s
cabbrev cv Cv
cabbrev cz Cz
cabbrev cx Cx

command -range Pz :silent :r !xsel -o -b
command -range Px :silent :r !xsel -o -p
command -range Pv :silent :r !xsel -o -s

cabbrev pz Pz
cabbrev px Px
cabbrev pv Pv