-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_vimrc
More file actions
136 lines (118 loc) · 4.09 KB
/
Copy path_vimrc
File metadata and controls
136 lines (118 loc) · 4.09 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
execute pathogen#infect()
set guioptions-=TMrL
set guioptions=c
set noerrorbells
set visualbell
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
" source $VIMRUNTIME/mswin.vim
" behave mswin
language messages en
source $VIMRUNTIME/delmenu.vim
set langmenu=en_US.UTF-8
source $VIMRUNTIME/menu.vim
set diffopt=vertical
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
if empty(&shellxquote)
let l:shxq_sav = ''
set shellxquote&
endif
let cmd = '"' . $VIMRUNTIME . '\diff"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
if exists('l:shxq_sav')
let &shellxquote=l:shxq_sav
endif
endfunction
" Customize my Vim
set encoding=utf-8
set laststatus=2
set cpoptions+=$
set noshowmode
" Setup Solarized colorscheme
let g:solarized_contrast="high" "default value is normal
syntax enable
set background=light
colorscheme solarized
" Set guifont
" set guifont=Source_Code_Pro_Semibold:h12
" set guifont=Menlo:h11:cANSI,Meslo_LG_M:h11:cANSI
" set guifont=Consolas_for_Powerline_FixedD:h13:cANSI:cANSI,Menlo:h11:cANSI,Meslo_LG_M:h11:cANSI
set guifont=PragmataPro_for_Powerline:h13:cANSI:cANSI,Menlo:h11:cANSI,Meslo_LG_M:h11:cANSI
set guitablabel=%N\ %t\ %M
" Only do this part when compiled with support for autocommands
if has("autocmd")
" Enable file type detection
filetype on
" Syntax of these languages is fussy over tabs Vs spaces
autocmd FileType autohotkey setlocal ts=4 sts=4 sw=4 noexpandtab autoindent number
autocmd FileType python setlocal ts=4 sts=4 sw=4 tw=80 smarttab expandtab autoindent number
autocmd FileType dosbatch setlocal ts=4 sts=4 sw=4 noexpandtab autoindent number
" Commenting blocks of code
autocmd FileType autohotkey let b:comment_leader = ";"
autocmd FileType python,vim let b:comment_leader = "#"
autocmd FileType dosbatch let b:comment_leader = "REM"
endif
" Shortcut to rapidly toggle `set list`
nmap <leader>l :set list!<CR>
nmap <leader>h :set hlsearch!<CR>
" Shortcut to show relative line numbers
nmap <leader>r :set relativenumber<CR>
" Key mappings
nmap <silent> <F8> :TagbarToggle<CR>
" Use the same symbols as TextMate for tabstops and EOLs
set listchars=tab:►\ ,eol:¬
set showbreak=…
" Setup grepprg and grepformat for mack
set grepprg=mack\ --nogroup\ --column\ -k\ --nocolor\ $*
set grepformat=%f:%l:%c:%m
" Append modeline after last line in buffer.
" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX
" files.
function! AppendModeline()
let l:modeline = printf(" vim: ts=%d:sts=%d:sw=%d:tw=%d:%set",
\ &tabstop, &softtabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no')
let l:modeline = b:comment_leader . l:modeline
call append(line("$"), l:modeline)
endfunction
nnoremap <silent> <Leader>ml :call AppendModeline()<CR>
" Setup scp
let g:netrw_scp_cmd = 'c:\"Program Files (x86)"\PuTTY\pscp.exe -q'
let g:netrw_silent = 1
" Setup Powerline
let g:Powerline_symbols = 'fancy'
let g:Powerline_dividers_override = ['', '', '', '']
let g:Powerline_symbols_override= {
\ 'BRANCH': [0xE0A0],
\ 'LINE': [0xE0A1],
\ 'RO': [0xE0A2],
\ }
" let g:Powerline_colorscheme = 'solarized256'
" Setup Ultisnips
" Trigger configuration.
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" Set directory for snippets
let g:UltiSnipsSnippetsDir=$VIM . "/vimfiles/UltiSnips"
" Add syntax highlighting for WebSphere logs
nmap log :set syn=log<cr>