-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathvimrc
95 lines (79 loc) · 2.57 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
"-----------------------------------------------------------------------------
" Vim Starter Configuration (Dotfiles)
"
"-----------------------------------------------------------------------------
set nocompatible
let &t_Co=256
syntax enable
filetype plugin indent on
"-----------------------------------------------------------------------------
" Vundle Config
"-----------------------------------------------------------------------------
" Setting up Vundle
" Found here: http://www.erikzaadi.com/2012/03/19/auto-installing-vundle-from-your-vimrc/
let has_vundle=1
let vundle_readme=expand('~/.dotfiles/vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle..."
echo ""
silent !mkdir -p ~/.dotfiles/vim/bundle
silent !git clone https://github.com/gmarik/vundle ~/.dotfiles/vim/bundle/vundle
let has_vundle=0
endif
" Vundle setup config
set rtp+=~/.dotfiles/vim/bundle/vundle/
call vundle#rc()
" Required Bundle
Bundle 'gmarik/vundle'
" Additional Bundles go here"
"
" Installing plugins the first time
" If exists, skip
if has_vundle == 0
echo "Installing Bundles, please ignore key map error messages"
echo ""
:BundleInstall
endif
"-----------------------------------------------------------------------------
" Encoding and general usability
"-----------------------------------------------------------------------------
" http://stevelosh.com/blog/2010/09/coming-home-to-vim/#important-vimrc-lines
set encoding=utf-8
set visualbell
" Line numbering
set number
" If a file has been changed outside of Vim, reload it inside of Vim
set autoread
" Show tabs and trailing whitespace visually
if (&termencoding == "utf-8") || has("gui_running")
if v:version >= 700
set list listchars=tab:»·,trail:·,extends:…,nbsp:‗
else
set list listchars=tab:»·,trail:·,extends:…
endif
else
if v:version >= 700
set list listchars=tab:>-,trail:.,extends:>,nbsp:_
else
set list listchars=tab:>-,trail:.,extends:>
endif
endif
"-----------------------------------------------------------------------------
" Search, highlight, spelling, etc.
"-----------------------------------------------------------------------------
" Improved searching
nnoremap / /\v
vnoremap / /\v
set ignorecase
set smartcase
set incsearch
" Enable syntax highlighting, if one exists
if has("syntax")
syntax on
endif
"-----------------------------------------------------------------------------
" Spacing
"-----------------------------------------------------------------------------
set autoindent
set smartindent
set tabstop=2 shiftwidth=2 expandtab