-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
62 lines (50 loc) · 1.4 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
call plug#begin()
Plug '/usr/local/opt/fzf'
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'garbas/vim-snipmate'
Plug 'godlygeek/tabular'
Plug 'junegunn/fzf.vim'
Plug 'scrooloose/nerdtree'
Plug 'tomtom/tlib_vim'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rails'
call plug#end()
set tabstop=2 " width of a tab
set shiftwidth=2 " width of shift (< and >)
set softtabstop=2 " width of expandtab
set smarttab " do the right thing
set expandtab " use spaces instead of tabs
set listchars=tab:▸\ ,eol:¬ " TextMate-style special chars
autocmd FileType php setlocal tabstop=4 shiftwidth=4 softtabstop=4
set number " line numbers
set hidden
set cursorline
set nowrap
" don't underline current line
hi CursorLine cterm=NONE
" http://unix.stackexchange.com/a/76385
set backspace=indent,eol,start
" keep tmp files in a safe place
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
let mapleader = ","
map <leader>d :NERDTreeToggle<CR>
map <leader>D :NERDTreeFind<CR>
map <leader>b :Buffers<CR>
map <leader>f :GFiles<CR>
map <leader>t :GFiles<CR>
" disable arrow keys
nmap <up> <nop>
nmap <down> <nop>
nmap <left> <nop>
nmap <right> <nop>
vmap <up> <nop>
vmap <down> <nop>
vmap <left> <nop>
vmap <right> <nop>
" ctrlp
let g:ctrlp_show_hidden = 1
set wildignore+=*/node_modules/*,*/public/system/*,*/tmp/*
command Strip %s/\s\+$// | w