-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
114 lines (91 loc) · 2.88 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
execute pathogen#infect()
set nocompatible
set noswapfile
syntax enable
set t_Co=256 "256 colors
let g:rubycomplete_buffer_loading = 1
let g:rubycomplete_rails = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline#extensions#tabline#enabled = 1
set term=screen-256color
colorscheme vividchalk
let g:solarized_termcolors=256
highlight SignColumn ctermbg=0
set colorcolumn=80
set tabstop=2
set shiftwidth=2
set expandtab
filetype plugin indent on
set nobackup
set nowritebackup
set directory=$HOME/.vim/tmp//,.
set number
set numberwidth=5
set laststatus=2
set ignorecase
set smartcase
set incsearch
set hlsearch
set backspace=2
" set iskeyword-=_ "for ruby
" correct splits
set splitright
set splitbelow
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" FORGET ABOUT ARROW KEYS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <Left> <Nop>
map <Right> <Nop>
map <Up> <Nop>
map <Down> <Nop>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" HANDY WINDOW NAVIGATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <C-J> <C-W>j
map <C-K> <C-W>k
map <C-H> <C-W>h
map <C-L> <C-W>l
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Handy stuff
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"save
nmap <c-s> :w<CR>
imap <c-s> <Esc>:w<CR>a
" Move to last position when reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif
" Better indent / outdent
vmap < <gv
vmap > >gv
" toggle autoindent
:nnoremap <F8> :setl noai nocin nosi inde=<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" POWERLINE SETTINGS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:Powerline_symbols = 'fancy'
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CTRL-P
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("e")': [],
\ 'AcceptSelection("t")': ['<cr>', '<c-m>'],
\ }
let g:ctrlp_custom_ignore = {
\ 'dir': '\vnode_modules$',
\ 'file': '\v\.(exe|so|dll)$',
\ 'link': 'some_bad_symbolic_links',
\ }
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ACK
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:ackprg="ack -H --nocolor --nogroup --column"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CTAGS autoregenerate
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
autocmd BufWritePost *
\ if filereadable('tags') |
\ call system('ctags -a '.expand('%')) |
\ endif