-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
137 lines (116 loc) · 2.95 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
packadd minpac
if !exists('*minpac#init')
" minpac is not available.
else
call minpac#init()
call minpac#add('k-takata/minpac', {'type': 'opt'})
call minpac#add('kien/ctrlp.vim')
call minpac#add('vim-ruby/vim-ruby')
call minpac#add('ervandew/supertab')
call minpac#add('airblade/vim-rooter')
call minpac#add('nazgob/grb256')
call minpac#add('vim-airline/vim-airline')
call minpac#add('tpope/vim-fugitive')
call minpac#add('tpope/vim-endwise')
call minpac#add('tpope/vim-commentary')
call minpac#add('tpope/vim-rails')
call minpac#add('tpope/vim-sleuth')
call minpac#add('tpope/vim-unimpaired')
endif
command! PackUpdate packadd minpac | source $MYVIMRC | call minpac#update('', {'do': 'call minpac#status()'})
command! PackClean packadd minpac | source $MYVIMRC | call minpac#clean()
command! PackStatus packadd minpac | source $MYVIMRC | call minpac#status()
syntax enable
set background=dark
set t_Co=256
colorscheme grb256
"tab settings
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
"invisible stuff
set list
set listchars=tab:..,trail:_
"shift key fixes
cmap W w
cmap WQ wq
cmap wQ wq
cmap Q q
cmap Tabe tabe
nore , ;
"arrow keys fixes
map <Left> :echo "not!"<cr>
map <Right> :echo "not!"<cr>
map <Up> :echo "not!"<cr>
map <Down> :echo "not!"<cr>
"visual shifting
vnoremap < <gv
vnoremap > >gv
"searching/moving
set ignorecase
set smartcase
set incsearch
set showmatch
set hlsearch
"make things better
set guioptions=rh
set encoding=utf-8
set scrolloff=5
set autoindent
set showmode
set showcmd
set hidden
set wildmenu
set wildmode=list:longest,list:full
set visualbell
set cursorline
set number
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
set cul
set noswapfile
set cpoptions+=$
set nowrap
set autoread
set autowrite
let mapleader = " "
" Edit this very file
nmap <leader>v :tabedit $MYVIMRC<cr>
" Look for files
nmap <leader>f <c-p>
" Clear trailing spaces with F5
noremap <F5> :%s/\s\+$<CR>:w<CR>
"Clear the search buffer when hitting return
nnoremap <CR> :nohlsearch<cr>
" Switch between the last two files
nnoremap <leader><leader> <c-^>
" Fast save
nmap <leader>w :w<cr>
" Copy to system clipboard
map <leader>y "y
" Bubble single lines
nmap <C-Up> [e
nmap <C-Down> ]e
" Bubble multiple lines
vmap <C-Up> [egv
vmap <C-Down> ]egv
set wildignore=*.o,*.out,*.obj,.git,*.rbc,*.class,.svn,*.gem
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
set wildignore+=*.jpg,*.jpeg,*.png,*.xpm,*.gif,*.bmp
set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/*
set wildignore+=*/tmp/*,*/log/*,*.log,*/coverage/*
set wildignore+=*.swp,*~,._*
if has ("autocmd")
autocmd bufwritepost .vimrc source $MYVIMRC
endif
filetype plugin indent on
let g:ctrlp_custom_ignore = 'build\|.agility-shared\|.git'
autocmd BufWritePre *.rb :%s/\s\+$//e
set backup
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set backupskip=/tmp/*,/private/tmp/*
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set writebackup