-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.vimrc
75 lines (59 loc) · 1.79 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
"Must be set first - Makes Vim behave in a way not compatible with Vi. Needed for most modern plugins
set nocompatible
" Buffers do not have to be saved before they can be hidden. Might be confusing for some.
set hidden
" guioptions e = show tabs, m = show menu
set guioptions=em
" Always show status line
set laststatus=2
" My preferred font and size (open source)
set gfn=DejaVu\ Sans\ Mono\ 11
colorscheme vividchalk
" Remember last 1000 commands
set history=1000
" Show line numbers
set number
set ruler
" Searches are case insensitive unless you use a capital letter. /str/i forces case sensitivity
set ignorecase
set smartcase
" Turn on spell checking (i need it)
set spell
" Tabs set to always be two spaces
set tabstop=2
set shiftwidth=2
set expandtab
set softtabstop=2
set autoindent
" Ubuntu uses ack-grep instead of ack.
let g:ackprg="ack-grep -H --nocolor --nogroup --column"
" Edit routes
command! Rroutes :Redit config/routes.rb
command! RSroutes :RSedit config/routes.rb
command! RTroutes :RTedit config/routes.rb
command! RVroutes :RVedit config/routes.rb
" store backups in central location
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
" Automatically highlight scss as css.
autocmd BufNewFile,BufRead *.scss set filetype=css
" Disable arrow keys.
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" MacVim may not need any of this
"copy F7
vmap <F7> "+ygv"zy`>
"paste (Shift-F7 to paste after normal cursor, Ctrl-F7 to paste over visual selection)
nmap <F7> "zgP
nmap <S-F7> "zgp
imap <F7> <C-r><C-o>z
vmap <C-F7> "zp`]
cmap <F7> <C-r><C-o>z
"copy register
autocmd FocusGained * let @z=@+