-
Notifications
You must be signed in to change notification settings - Fork 6
/
vimrc
126 lines (91 loc) · 2.2 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
" ---
set nocompatible " turns vi compatibility off.
" ---
let mapleader=" "
if filereadable(expand("~/.dotvim/plug.vim"))
source ~/.dotvim/plug.vim
endif
" ---
colorscheme onedark
set background=light
set cursorline
" ---
syntax on
set regexpengine=1 " speeds up syntax highlighting
set number " displays line numbers.
" ---
set autoindent
set smartindent
set smarttab
set shiftwidth=2
set softtabstop=2
set tabstop=2
set expandtab
set foldmethod=indent
set foldlevelstart=20
" ---
set showbreak=⇇
set wrap
" ---
"" Open new split panes to right and bottom, which feels more natural
set splitbelow
set splitright
" ---
set updatetime=250
set timeoutlen=500
" ---
set noswapfile
set nobackup
set nowb
" ---
set backspace=indent,eol,start " Allow backspace in insert mode
set history=1000 " Store lots of :cmdline history
set showcmd " Show incomplete cmds down the bottom
set noshowmode " Don't Show current mode down the bottom
set gcr=a:blinkon0 " Disable cursor blink
set visualbell " No sounds
set autoread " Reload files changed outside vim
set hidden
" ---
set wildmenu
set wildmode=longest,list,full
set wildignore=*.o,*.obj,*~ "stuff to ignore when tab completing
set wildignore+=*vim/backups*
set wildignore+=*sass-cache*
set wildignore+=*DS_Store*
set wildignore+=vendor/rails/**
set wildignore+=vendor/cache/**
set wildignore+=vendor/gems/**
set wildignore+=*.gem
set wildignore+=log/**
set wildignore+=tmp/**
set wildignore+=*.png,*.jpg,*.gif
" ---
set ignorecase
set smartcase
set hlsearch
nmap // :silent :nohlsearch<CR>
set incsearch
" ---
set scrolloff=8
set sidescrolloff=15
set sidescroll=1
" ---
" Display tabs and trailing spaces visually
set list listchars=tab:▸\ ,trail:·
" ================ Persistent Undo ==================
" Keep undo history across sessions, by storing in file.
" Only works all the time.
if has('persistent_undo')
silent !mkdir ~/.dotvim/backups > /dev/null 2>&1
set undodir=~/.dotvim/backups
set undofile
endif
" ---
source ~/.dotvim/settings.vim
" ---
set rtp+=/usr/local/opt/fzf
" ---
if filereadable(expand("~/.vimrc.after"))
source ~/.vimrc.after
endif