-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.after
109 lines (85 loc) · 2.8 KB
/
.vimrc.after
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
" Tab width = 8
set shiftwidth=8 " use indents of 8 spaces
set tabstop=8 " an indentation every four columns
set softtabstop=8 " let backspace delete indent
" Map gundo to ,g
map <leader>g :GundoToggle<CR>
" Map NERDTreeFind to ctrl+e
map <leader>e :NERDTreeFind<CR>
"map <C-e> :NERDTreeToggle<CR>:NERDTreeMirror<CR>
" Map yankring show to ,y yankring search to ,,y
"map <leader>y :YRShow<CR>
"map <leader><leader>y :YRSearch<CR>
" Replaced yankring with yankstack, override ctrlp mapping:
nmap <C-p> <Plug>yankstack_substitute_older_paste
nmap <C-n> <Plug>yankstack_substitute_newer_paste
" Fix ack-grep link (ubuntu)
let g:ackprg="ack-grep -H --nocolor --nogroup --column"
" Use tab to cycle tabs
:map <Tab> gt
:map <S-Tab> gT
" Colorscheme stuff
set background=dark
let g:solarized_termtrans=1
let g:solarized_termcolors=256
let g:solarized_contrast="high"
let g:solarized_visibility="high"
colorscheme solarized
"colorscheme desert256
"colorscheme transparent
" Gui font, profont
if has("gui_running")
if has("macunix")
set guifont=ProFont:h9
elseif has("win32")
set guifont=ProFontWindows:h11:b:cANSI,Lucida_Console:h11:b:cANSI
elseif has("x11")
set guifont=-jmk-neep-bold-r-normal--15-*-*-*-*-*-*-*
endif
endif
" Show horizontal cursor
set cursorline
" Fix home and end keybindings for screen, particularly on mac
" - for some reason this fixes the arrow keys too. huh.
map [F $
imap [F $
map [H g0
imap [H g0
" Prevent gundo from stealing F5 (remap DBGp)
map <F5> :python debugger_run()<cr>
" Enable neocomplcache
let g:neocomplcache_enable_at_startup = 1
" always switch to the current file directory.
autocmd BufEnter * if bufname("") !~ "^\[A-Za-z0-9\]*://" | lcd %:p:h | endif
" SplitJoin mappings
:nmap sj :SplitjoinSplit<cr>
:nmap sk :SplitjoinJoin<cr>
" Remap pop as janus / ctrl p overwrites mapping
:nmap <leader>] :pop<cr>
" Load custom tags file
:set tags=~/.ctags/tags
" VimWiki
let g:vimwiki_list = [{'path': '~/Dropbox/Wiki/', 'path_html': '~/Dropbox/WikiHTML/'}]
" Function to strip trailing whitespace
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
" Auto strip trailing whitespace on file save
autocmd FileType css,c,cpp,java,php,ruby,python,html,smarty,javascript autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()
" Linemotion bindings
nmap <c-l> :Lright<cr>
nmap <c-h> :Lleft<cr>
" Gitv bindings
nmap <leader>gv :Gitv --all<cr>
nmap <leader>gV :Gitv! --all<cr>
vmap <leader>gV :Gitv! --all<cr>
" Trying this out recommended in the gitv help for quicker plugin screen
" redrawing
set lazyredraw
" Default .sql files to mysql filetype for syntax highlighting
if has("autocmd")
autocmd BufRead *.sql set filetype=mysql
endif