forked from IntuitiveWebSolutions/VimConf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc_custom
executable file
·56 lines (44 loc) · 1.7 KB
/
.vimrc_custom
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
" Save pinkies
nnoremap ; :
" Delete buffers when they become hidden.
" From https://github.com/scrooloose/nerdtree/issues/47#issuecomment-748583
autocmd BufRead * call s:set_hidden()
function s:set_hidden()
if empty(&buftype) "most explorer plugins have buftype=nofile
setlocal bufhidden=delete
endif
endfunction
"Source .bash_profile when running shell command.
" set shell=bash\ --login
"Svn blame selected lines.
vmap gl :<C-U>!svn blame <C-R>=expand("%:p") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR>
" show tabs and trailing (middle dot)
set listchars=tab:>-,trail:·
" Insert pudb breakpoint
au BufNewFile,BufReadPost *.py nnoremap <Leader>u :exec "normal ofrom pudb import set_trace; set_trace()\e"<return>
" Insert rpdb2 breakpoint
au BufNewFile,BufReadPost *.py nnoremap <Leader>rpdb :exec "normal oimport rpdb2; rpdb2.start_embedded_debugger('asdf')\e"<return>
" Color scheme stuff
set background=dark
let g:solarized_termtrans=1
colorscheme solarized
" Search within visual selection (on Mac keyboard, this is <C-/>)
vnoremap <Esc>/\%V
" Make the default behavior to open the file in a new tab.
let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("e")': ['<c-t>'],
\ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
\ }
" Map shortcuts for next and previous tabs, for consistency with pentadactyl
" Note: Remap CtrlP plugin to <c-j>
let g:ctrlp_map = '<C-J>'
nnoremap <C-P> :tabprevious<CR>
nnoremap <C-N> :tabnext<CR>
" Shortcut for flipped vsplit
command -nargs=1 -complete=file Vspr vert belowright split <args>
" Set shortcut for finding function calls
nnoremap <Leader>w /\w\+(<return>
" Turn off syntax highlighting in diff mode
if &diff
syntax off
endif