|
140 | 140 |
|
141 | 141 | highlight clear SignColumn " SignColumn should match background for
|
142 | 142 | " things like vim-gitgutter
|
143 |
| - |
| 143 | + |
144 | 144 | highlight clear LineNr " Current line number row will have same background color in relative mode.
|
145 | 145 | " Things like vim-gitgutter will match LineNr highlight
|
146 | 146 | "highlight clear CursorLineNr " Remove highlight color from current line number
|
|
162 | 162 | set statusline+=\ [%{&ff}/%Y] " Filetype
|
163 | 163 | set statusline+=\ [%{getcwd()}] " Current dir
|
164 | 164 | set statusline+=%=%-14.(%l,%c%V%)\ %p%% " Right aligned file nav info
|
165 |
| - |
166 |
| - let g:airline_theme='powerlineish' " airline users use the powerline theme |
167 | 165 | endif
|
168 | 166 |
|
169 | 167 | set backspace=indent,eol,start " Backspace for dummies
|
|
194 | 192 | set expandtab " Tabs are spaces, not tabs
|
195 | 193 | set tabstop=4 " An indentation every four columns
|
196 | 194 | set softtabstop=4 " Let backspace delete indent
|
| 195 | + set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) |
| 196 | + set splitright " Puts new vsplit windows to the right of the current |
| 197 | + set splitbelow " Puts new split windows to the bottom of the current |
197 | 198 | "set matchpairs+=<:> " Match, to be used with %
|
198 | 199 | set pastetoggle=<F12> " pastetoggle (sane indentation on pastes)
|
199 | 200 | "set comments=sl:/*,mb:*,elx:*/ " auto format comment blocks
|
|
202 | 203 | autocmd FileType go autocmd BufWritePre <buffer> Fmt
|
203 | 204 | autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
|
204 | 205 | autocmd FileType haskell setlocal expandtab shiftwidth=2 softtabstop=2
|
205 |
| - " preceding line best in a plugin but here for now. |
| 206 | + " preceding line best in a plugin but here for now. |
206 | 207 |
|
207 | 208 | autocmd BufNewFile,BufRead *.coffee set filetype=coffee
|
208 | 209 |
|
|
286 | 287 | " Toggle search highlighting
|
287 | 288 | nmap <silent> <leader>/ :set invhlsearch<CR>
|
288 | 289 |
|
| 290 | + " Find merge conflict markers |
| 291 | + map <leader>fc /\v^[<\|=>]{7}( .*\|$)<CR> |
| 292 | +
|
289 | 293 | " Shortcuts
|
290 | 294 | " Change Working Directory to that of the current file
|
291 | 295 | cmap cwd lcd %:p:h
|
|
295 | 299 | vnoremap < <gv
|
296 | 300 | vnoremap > >gv
|
297 | 301 |
|
| 302 | + " Allow using the repeat operator with a visual selection (!) |
| 303 | + " http://stackoverflow.com/a/8064607/127816 |
| 304 | + vnoremap . :normal .<CR> |
| 305 | +
|
298 | 306 | " Fix home and end keybindings for screen, particularly on mac
|
299 | 307 | " - for some reason this fixes the arrow keys too. huh.
|
300 | 308 | map [F $
|
|
365 | 373 |
|
366 | 374 | " Ctags {
|
367 | 375 | set tags=./tags;/,~/.vimtags
|
| 376 | + |
| 377 | + " Make tags placed in .git/tags file available in all levels of a repository |
| 378 | + let gitroot = substitute(system('git rev-parse --show-toplevel'), '[\n\r]', '', 'g') |
| 379 | + if gitroot != '' |
| 380 | + let &tags = &tags . ',' . gitroot . '/.git/tags' |
| 381 | + endif |
368 | 382 | " }
|
369 | 383 |
|
370 | 384 | " AutoCloseTag {
|
|
590 | 604 | set completeopt-=preview
|
591 | 605 | endif
|
592 | 606 | " }
|
| 607 | + |
593 | 608 | " neocomplcache {
|
594 | 609 | if count(g:spf13_bundle_groups, 'neocomplcache')
|
595 | 610 | let g:acp_enableAtStartup = 0
|
|
712 | 727 | let g:indent_guides_enable_on_vim_startup = 1
|
713 | 728 | " }
|
714 | 729 |
|
| 730 | + " airline { |
| 731 | + let g:airline_theme='powerlineish' " airline users use the powerline theme |
| 732 | + let g:airline_left_sep='›' " Slightly fancier separator, instead of '>' |
| 733 | + let g:airline_right_sep='‹' " Slightly fancier separator, instead of '<' |
| 734 | + " } |
| 735 | + |
715 | 736 | " }
|
716 | 737 |
|
717 | 738 | " GUI Settings {
|
|
826 | 847 | endfunction
|
827 | 848 | " }
|
828 | 849 |
|
| 850 | + " Shell command { |
| 851 | + function! s:RunShellCommand(cmdline) |
| 852 | + botright new |
| 853 | + |
| 854 | + setlocal buftype=nofile |
| 855 | + setlocal bufhidden=delete |
| 856 | + setlocal nobuflisted |
| 857 | + setlocal noswapfile |
| 858 | + setlocal nowrap |
| 859 | + setlocal filetype=shell |
| 860 | + setlocal syntax=shell |
| 861 | + |
| 862 | + call setline(1, a:cmdline) |
| 863 | + call setline(2, substitute(a:cmdline, '.', '=', 'g')) |
| 864 | + execute 'silent $read !' . escape(a:cmdline, '%#') |
| 865 | + setlocal nomodifiable |
| 866 | + 1 |
| 867 | + endfunction |
| 868 | + |
| 869 | + command! -complete=file -nargs=+ Shell call s:RunShellCommand(<q-args>) |
| 870 | + " e.g. Grep current file for <search_term>: Shell grep -Hn <search_term> % |
| 871 | + " } |
| 872 | + |
829 | 873 | " }
|
830 | 874 |
|
831 | 875 | " Use fork vimrc if available {
|
|
0 commit comments