-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc.Windows
97 lines (92 loc) · 2.49 KB
/
vimrc.Windows
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
" somini.vimrc - Windows
" Data Safety and Managing {{{
let s:user_temp = $TEMP
let s:user_cache = s:user_temp.'\vim'
call CheckDir(s:user_cache)
" Vim Info {{{
let g:viminfo_old = $HOME.'/_viminfo'
let g:viminfo_new = expand(s:user_cache.'/viminfo')
let &viminfo = &viminfo.',r'.s:user_temp
let &viminfo = &viminfo.',n'.g:viminfo_new
"}}}
" Undo {{{
let &undodir = expand(s:user_cache.'/undo')
call CheckDir(&undodir)
" }}}
" Views {{{
let &viewdir = expand(s:user_cache.'/views')
call CheckDir(&viewdir)
"}}}
" Swap Files {{{
let s:swap_dir = s:user_cache.'/swap'
call CheckDir(s:swap_dir)
let &directory = s:swap_dir.'//,'.s:user_temp.'//'.',.'
" }}}
" Backup Files {{{
let s:backup_dir = s:user_cache.'/backup'
call CheckDir(s:backup_dir)
" Same as swap, only on a different folder
let &backupdir = s:backup_dir.','.s:user_temp.'//'.',.'
let &backupskip = &backupskip.','.s:user_temp.'/*'
" }}}
let g:NERDTreeBookmarksFile = expand(s:user_cache.'/NERDTree_Bookmarks')
" }}}
" Plugin Configuration {{{
let g:signify_disable_by_default = 1 "Disable Signify by default, enable on a per-host basis
" CtrlP {{{
let s:ctrlp_cache = expand(s:user_cache.'/plugin/ctrlp')
call CheckDir(s:ctrlp_cache)
let g:ctrlp_cache_dir = s:ctrlp_cache
" Abbreviations {{{
let g:ctrlp_abbrev['abbrevs'] += [
\ {
\ 'pattern': '^@h',
\ 'expanded': '@cd $HOMEDRIVE$HOMEPATH',
\ 'mode': 'pfrz',
\ },
\ {
\ 'pattern': '^@r',
\ 'expanded': '@cd $HOMEDRIVE',
\ 'mode': 'pfrz',
\ },
\ ]
"}}}
let g:ctrlp_funky_cache_dir = expand(s:ctrlp_cache.'/funky')
call CheckDir(g:ctrlp_funky_cache_dir)
" Fallback to dir
unlet g:ctrlp_user_command
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files -oc --exclude-standard'],
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
\ },
\ 'fallback': 'dir %s /-n /b /s /a-d'
\ }
"}}}
" GitGutter {{{
" Don't slow everything down
let g:gitgutter_realtime = 0
let g:gitgutter_eager = 0
"}}}
" EasyClip {{{
let s:easyclip_cache = expand(s:user_cache.'/plugin/easyclip')
call CheckDir(s:easyclip_cache)
let g:EasyClipShareYanksDirectory = s:easyclip_cache
"}}}
" OmniSharp {{{
" Disable it by default on Windows, it needs Python
let g:OmniSharp_loaded = 1
"}}}
"}}}
" Workarounds {{{
autocmd VimEnter * let $HOME = $HOMEDRIVE.$HOMEPATH " Make sure it's the correct path
" Caffeine.exe {{{
map <F15> <NOP>
map! <F15> <NOP>
" }}}
" Force the windows shell
let &shell = 'C:\Windows\System32\cmd.exe'
" }}}
" Modeline {{{
" vim:ft=vim:ts=2:sw=2:fdm=marker
"}}}