-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_vimrc
77 lines (56 loc) · 2.51 KB
/
dot_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
" Blake Matheny vimrc
" ========== First Settings ==========
" These are settings that should be first, so that when plug loads plugins they are respected
set nocompatible
let mapleader="," " , is just easier to type than \
" This must be set before nerdtree is loaded. Allows you to specify per directory bookmarks
if filereadable(".NERDTreeBookmarks")
let NERDTreeBookmarksFile=".NERDTreeBookmarks"
endif
" ========== Plug Initialization ==========
if filereadable(expand("~/.vim/autoload/plug.vim"))
if filereadable(expand("~/.vim/plug.vim"))
source ~/.vim/plug.vim
endif
endif
" ========== General Configuration ==========
set hidden " Allow buffers to exist in the background
set showcmd " Show incomplete commands at the bottom
set visualbell " Tell me when I mess up
syn sync fromstart " Sync whole file
" ========== Search Settings ==========
set hlsearch " Highlight searches by default
set viminfo='100,f1 " Save up to 100 marks, enable capital marks
set ignorecase " Case insensitive *-style searches
set smartcase " Case sensitive / search if there is a capital letter
" ========== Indentation Settings ==========
set autoindent
set smartindent
set shiftwidth=2
set softtabstop=2
set tabstop=2
set expandtab
set textwidth=80
" ========== Completion ==========
set wildmode=list:longest
set wildignore=*.o,*.obj,*~ " stuff to ignore automatically
set wildignore+=*.lo,*.la,*.class,*.jar,*.gem
set wildignore+=*.rej,.*.rej
set wildignore+=*.png,*.jpg,*.gif,*DS_Store*
set wildignore+=*.swp
set wildignore+=*.orig " ignore mercurial backups
" ========== Swap/Undo File Settings ==========
set backupdir=~/.local/state/vim/swap " Use ~/.local/state/vim/swap
set directory=~/.local/state/vim/swap " Use ~/.local/state/vim/swap
set undodir=~/.local/state/vim/undo " Use ~/.local/state/vim/undo
set undofile " Use it
set updatetime=60000 " Write to swap every 60s
" ========== Visuals ==========
set showmatch " Show matching brace
set showmode " Good if vim-powerline not installed
set rulerformat=%17(%l/%L,%c\ %p%%%) " Good if vim-powerline not installed
set cursorline " Current line is highlighted
set mouse= " Turn off mouse features
for f in split(glob('~/.vim/plugin/settings/*.vim'), '\n')
exe 'source' f
endfor