aboutsummaryrefslogtreecommitdiff
path: root/vimrc
blob: 0d4c5d20fcf876a73410f4e4e84cef01503c174c (plain)
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
" Basics
set nocompatible
syntax on
set encoding=utf-8

" Vim UI
set showmatch
set showcmd
set ruler

" Text Formatting/Layout
set ignorecase
set smartcase

" Tabs, Indentation
set textwidth=79
set tabstop=2
set shiftwidth=2
set cindent
set autoindent
set smarttab
set expandtab
set backspace=indent,eol,start

" Filetypes
filetype off
filetype indent plugin off
set runtimepath+=$GOROOT/misc/vim
filetype on
filetype indent plugin on
autocmd FileType ruby set shiftwidth=2
autocmd FileType c set shiftwidth=4 tabstop=4
autocmd FileType yacc set shiftwidth=4 tabstop=4
autocmd FileType go set shiftwidth=4 tabstop=4

"
" Re-mappings
"

let mapleader = ","

" Control + S in insert mode: switch to normal mode and write to disk.
inoremap <C-S> <ESC>:w<CR>
nnoremap <C-S> :w<CR>