-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
64 lines (53 loc) · 1.37 KB
/
vimrc
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
scriptencoding utf-8
set encoding=utf-8
set nocompatible
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
colorscheme solarized " Solarized color scheme
syntax enable " Syntax highlighting
filetype plugin indent on
set number " Show line numbers
set laststatus=2 " Show a status bar all the time
set showmatch " highlight matching [{()}]
set autoread " reload files changed oustide of vim
set tabstop=4 " \t is shown as 4 spaces
set backspace=indent,eol,start
if has('gui_running')
set background=light
else
set background=dark
endif
let g:lightline = {
\ 'colorscheme': 'solarized',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'fugitive', 'readonly', 'filename' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'MyFugitive',
\ 'readonly': 'MyReadonly',
\ },
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '|', 'right': '|' }
\ }
set noshowmode
function! MyFugitive()
if exists("*fugitive#head")
let _ = fugitive#head()
return strlen(_) ? _ : ''
endif
return ''
endfunction
function! MyReadonly()
if &filetype == "help"
return "?"
elseif &readonly
return "x"
else
return ""
endif
endfunction
" Local config
if filereadable($HOME . "/.vimrc.local")
source ~/.vimrc.local
endif