-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
68 lines (47 loc) · 2.1 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
set nocompatible " Must come first because it changes other options.
filetype off
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
syntax enable " Turn on syntax highlighting.
filetype plugin indent on " Turn on file type detection.
let mapleader="," " change the mapleader from \ to ,
" Flag certain files as certain language files
autocmd BufRead,BufNewFile {Rakefile,Gemfile,config.ru,Vagrantfile,Thorfile} set ft=ruby
nnoremap ; :
set history=1000
set undolevels=1000
set noswapfile " No swap needed
set nobackup " Don't make a backup before overwriting a file.
set nowritebackup " And again.
set incsearch " Highlight matches as you type.
set hlsearch " Highlight matches.
set hidden " Handle multiple buffers better.
set nowrap
set encoding=utf-8 " Default encoding: UTF-8
set shiftwidth=2 " Spaces not tabs: size 2
set tabstop=2 " Global tab width.
set expandtab " Use spaces instead of tabs
set autoindent
set copyindent
set number " Show line numbers.
set numberwidth=5 " Give the line numbers some more room
set ruler " Show cursor position.
set shiftround
set showmatch
set showmode " Display the mode you're in.
set ignorecase
set smartcase
set smarttab
" Let's leave the mouse on for now to not completely kill my productivity
" while I get the hang of VIM
set mouse=a
set laststatus=2 " Show the status line all the time
" Useful status information at bottom of screen
set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{exists('*CapsLockStatusline')?CapsLockStatusline():''}%=%-16(\ %l,%c-%v\ %)%P
set background=dark
colorscheme solarized " Use the dark Solarized theme
nnoremap <Left> :echoe "Use h"<CR>
nnoremap <Right> :echoe "Use l"<CR>
nnoremap <Up> :echoe "Use k"<CR>
nnoremap <Down> :echoe "Use j"<CR>
autocmd BufWritePre * :%s/\s\+$//e " Remove trailing whitespace before writing buffer to file