forked from ryanb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
63 lines (48 loc) · 1.59 KB
/
vimrc
File metadata and controls
63 lines (48 loc) · 1.59 KB
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
filetype on
filetype plugin on
filetype indent on
syntax on
" 2 spaces for a tab
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set smarttab
" Makefiles require tabs...
autocmd FileType make setlocal noexpandtab
set ai
let g:rubycomplete_rails = 1
set background=dark
set incsearch
set hlsearch
" Shows EOL markers (and more?)
"set list
set history=50 " keep 50 lines of command line history
"set ruler " show the cursor position all the time
set showcmd " display incomplete commands
" Show matching brackets.
set showmatch
" have % bounce between angled brackets, as well as t'other kinds:
"set matchpairs+=<:>
set comments=s1:/*,mb:*,ex:*/,f://,b:#,:%,:XCOMM,n:>,fb:-
" This being the 21st century, I use Unicode
set encoding=utf-8
set fileencoding=utf-8
" Store swap files in fixed location, not current directory.
" http://stackoverflow.com/a/4331812/845546
set dir=~/.vimswap//,/var/tmp//,/tmp//,.
" Always display the status line
"set laststatus=2
" Display extra whitespace
" set list listchars=tab:»·,trail:·
" .cfndsl is a ruby file
" http://beerpla.net/2008/04/02/how-to-add-a-vim-file-extension-to-syntax-highlighting/
au BufNewFile,BufRead *.cfndsl set filetype=ruby
" Local config
if filereadable(".vimrc.local")
source .vimrc.local
endif
" https://askubuntu.com/a/1044625
set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:»
" Don't indent comments in yaml files: https://stackoverflow.com/a/54175510/845546
autocmd BufNewFile,BufReadPost * if &filetype == "yaml" | set expandtab shiftwidth=2 indentkeys-=0# | endif