-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
57 lines (47 loc) · 2.19 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
set nocompatible " be iMproved, required
filetype off " required
filetype plugin indent on " required
" User interface
set guifont=SauceCodePowerline-Regular:h18
highlight LineNr ctermfg=grey
syntax on
" Autoreload on config save
au! BufWritePost .vimrc so %
au! BufWritePost .gvimrc so %
" Customize highlighting for certain files
au BufRead,BufNewFile Fastfile set filetype=ruby
au BufRead,BufNewFile Gemfile set filetype=ruby
au BufRead,BufNewFile Podfile set filetype=ruby
au BufRead,BufNewFile *.podspec set filetype=ruby
au BufRead,BufNewFile Dangerfile set filetype=ruby
" Searches
set hlsearch " highlight search results
set incsearch " search whilst typing
set ignorecase " case insensitive searching
set smartcase " override ignorecase if upper case typed
" Keep more info in memory to speed things up
set hidden
set history=100
set backspace=indent,eol,start " Backspace settings
set smarttab " Delete entire shiftwidth of tabs when they're inserted
set showcmd " Show command information on the right side of the command line
set nostartofline " Keep cursor in the same place after saves
set autoindent " Indent the next line matching the previous line
set autoindent " Indent the next line matching the previous line
set smartindent " Smart auto-indent when creating a new line
set tabstop=2 " Number of spaces each tab counts for
set shiftwidth=2 " The space << and >> moves the lines
set softtabstop=2 " Number of spaces for some tab operations
set shiftround " Round << and >> to multiples of shiftwidth
set expandtab " Insert spaces instead of actual tabs
set smarttab " Delete entire shiftwidth of tabs when they're inserted
set encoding=utf-8
set number " Show line numbers
augroup trailing_highlight
autocmd!
autocmd BufWinEnter * match ErrorMsg /\s\+$/
autocmd InsertEnter * match ErrorMsg /\s\+\%#\@<!$/
autocmd InsertLeave * match ErrorMsg /\s\+$/
augroup END
" Disable beeping
set noerrorbells visualbell t_vb=