xonecas.io
2780
D2

dotfiles-2014 / commit 8680820

The day has come that I moved away from vim.

* I still use it whenever I'm in a shell, and mostly for commit
 messages so I've optimized that use case a little.

sean2015-12-18 86808207b47016c4c340ff9aa5704b205f5b5c9e parent 52653b2

3 files changed

bashrc+2−0
@@ -122,6 +122,8 @@ alias g='git'
122122 alias gst='git status'
123123 alias gc='git commit --verbose'
124124 alias gp='git pull --rebase'
125+alias gpo='git pull --rebase origin'
126+alias gpo='git push origin'
125127 alias ggrep='git grep'
126128 alias mc='git log --pretty=format:"%h - %an, %ar : %s" | grep sean | less'
127129
vim_plugins.txt+1−2
@@ -3,11 +3,10 @@ https://github.com/hynek/vim-python-pep8-indent.git
33 https://github.com/itchyny/lightline.vim.git
44 https://github.com/jelera/vim-javascript-syntax.git
55 https://github.com/kchmck/vim-coffee-script.git
6-https://github.com/kien/ctrlp.vim.git
76 https://github.com/pangloss/vim-javascript.git
87 https://github.com/scrooloose/nerdcommenter.git
98 https://github.com/scrooloose/syntastic.git
109 https://github.com/tpope/vim-fugitive.git
1110 https://github.com/tpope/vim-haml.git
12-https://github.com/xonecas/vim-colors-256.git
1311 https://github.com/morhetz/gruvbox
12+https://github.com/bling/vim-airline.git
vimrc+1−153
@@ -32,8 +32,6 @@ map <leader>x :bdelete<CR>
3232 nmap <leader>h :nohlsearch<CR>
3333 map j gj
3434 map k gk
35-nmap ; :CtrlPBuffer<CR>
36-nmap ' :CtrlPFile<CR>
3735 nmap <leader>n :NERDTreeToggle<CR>
3836
3937 " I always work on 4 or 2 spaces indent files :)
@@ -50,9 +48,8 @@ command! W w
5048
5149 " Colors
5250 set t_Co=256
53-set t_ut=
5451 set background=dark
55-colorscheme jellybeans
52+colorscheme gruvbox
5653
5754
5855 " Plugin stuff
@@ -61,157 +58,8 @@ let g:syntastic_python_checkers = ['pep8']
6158 let g:syntastic_sass_checkers = ['scss_lint']
6259
6360
64-" The Silver Searcher
65-if executable('ag')
66- " Use ag over grep
67- set grepprg=ag\ --nogroup\ --nocolor
68-
69- " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
70- let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
71-
72- " ag is fast enough that CtrlP doesn't need to cache
73- let g:ctrlp_use_caching = 0
74-endif
75-
76-" bind K to grep word under cursor
77-nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
78-
79-
80-" don't remove indent on python comments #
81-autocmd BufNewFile,BufRead *.py inoremap # X<c-h>#<space>
8261 " Set the right indent for each file.
8362 autocmd BufNewFile,BufRead *.py :set ts=4 sw=4
8463 autocmd BufNewFile,BufRead *.html :set ts=2 sw=2 filetype=htmldjango
8564 autocmd BufNewFile,BufRead *.js,*.scss :set ts=2 sw=2
8665 autocmd BufNewFile,BufRead *.json setfiletype json syntax=javascript
87-
88-
89-let g:lightline = {
90- \ 'colorscheme': 'gruvbox',
91- \ 'active': {
92- \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ],
93- \ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
94- \ },
95- \ 'component_function': {
96- \ 'fugitive': 'LightLineFugitive',
97- \ 'filename': 'LightLineFilename',
98- \ 'fileformat': 'LightLineFileformat',
99- \ 'filetype': 'LightLineFiletype',
100- \ 'fileencoding': 'LightLineFileencoding',
101- \ 'mode': 'LightLineMode',
102- \ 'ctrlpmark': 'CtrlPMark',
103- \ },
104- \ 'component_expand': {
105- \ 'syntastic': 'SyntasticStatuslineFlag',
106- \ },
107- \ 'component_type': {
108- \ 'syntastic': 'error',
109- \ },
110- \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
111- \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
112- \ }
113-
114-function! LightLineModified()
115- return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-'
116-endfunction
117-
118-function! LightLineReadonly()
119- return &ft !~? 'help' && &readonly ? 'RO' : ''
120-endfunction
121-
122-function! LightLineFilename()
123- let fname = expand('%:t')
124- return fname == 'ControlP' ? g:lightline.ctrlp_item :
125- \ fname == '__Tagbar__' ? g:lightline.fname :
126- \ fname =~ '__Gundo\|NERD_tree' ? '' :
127- \ &ft == 'vimfiler' ? vimfiler#get_status_string() :
128- \ &ft == 'unite' ? unite#get_status_string() :
129- \ &ft == 'vimshell' ? vimshell#get_status_string() :
130- \ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
131- \ ('' != fname ? fname : '[No Name]') .
132- \ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
133-endfunction
134-
135-function! LightLineFugitive()
136- try
137- if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
138- let mark = '' " edit here for cool mark
139- let _ = fugitive#head()
140- return strlen(_) ? mark._ : ''
141- endif
142- catch
143- endtry
144- return ''
145-endfunction
146-
147-function! LightLineFileformat()
148- return winwidth(0) > 70 ? &fileformat : ''
149-endfunction
150-
151-function! LightLineFiletype()
152- return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''
153-endfunction
154-
155-function! LightLineFileencoding()
156- return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
157-endfunction
158-
159-function! LightLineMode()
160- let fname = expand('%:t')
161- return fname == '__Tagbar__' ? 'Tagbar' :
162- \ fname == 'ControlP' ? 'CtrlP' :
163- \ fname == '__Gundo__' ? 'Gundo' :
164- \ fname == '__Gundo_Preview__' ? 'Gundo Preview' :
165- \ fname =~ 'NERD_tree' ? 'NERDTree' :
166- \ &ft == 'unite' ? 'Unite' :
167- \ &ft == 'vimfiler' ? 'VimFiler' :
168- \ &ft == 'vimshell' ? 'VimShell' :
169- \ winwidth(0) > 60 ? lightline#mode() : ''
170-endfunction
171-
172-function! CtrlPMark()
173- if expand('%:t') =~ 'ControlP'
174- call lightline#link('iR'[g:lightline.ctrlp_regex])
175- return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item
176- \ , g:lightline.ctrlp_next], 0)
177- else
178- return ''
179- endif
180-endfunction
181-
182-let g:ctrlp_status_func = {
183- \ 'main': 'CtrlPStatusFunc_1',
184- \ 'prog': 'CtrlPStatusFunc_2',
185- \ }
186-
187-function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked)
188- let g:lightline.ctrlp_regex = a:regex
189- let g:lightline.ctrlp_prev = a:prev
190- let g:lightline.ctrlp_item = a:item
191- let g:lightline.ctrlp_next = a:next
192- return lightline#statusline(0)
193-endfunction
194-
195-function! CtrlPStatusFunc_2(str)
196- return lightline#statusline(0)
197-endfunction
198-
199-let g:tagbar_status_func = 'TagbarStatusFunc'
200-
201-function! TagbarStatusFunc(current, sort, fname, ...) abort
202- let g:lightline.fname = a:fname
203- return lightline#statusline(0)
204-endfunction
205-
206-augroup AutoSyntastic
207- autocmd!
208- autocmd BufWritePost *.c,*.cpp call s:syntastic()
209-augroup END
210-function! s:syntastic()
211- SyntasticCheck
212- call lightline#update()
213-endfunction
214-
215-let g:unite_force_overwrite_statusline = 0
216-let g:vimfiler_force_overwrite_statusline = 0
217-let g:vimshell_force_overwrite_statusline = 0