-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc.win
35 lines (29 loc) · 1.04 KB
/
vimrc.win
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
source ~/dev/dotfile/vimrc
"GitBash terminal --------------------
function! GitBash()
" Setting UTF-8 (Japanese Windows set 'ja' as default)
let l:env = {
\ 'LANG': systemlist('"C:/Program Files/Git/usr/bin/locale.exe" -iU')[0],
\ }
" for remote
if has('clientserver')
call extend(l:env, {
\ 'GVIM': $VIMRUNTIME,
\ 'VIM_SERVERNAME': v:servername,
\ })
endif
" term_start, then GitBash
sp
call term_start(['C:/Program Files/Git/bin/bash.exe', '-l'], {
\ 'term_name': 'Git',
\ 'term_finish': 'close',
\ 'curwin': v:true,
\ 'cwd': expand("%:h"),
\ 'env': l:env,
\ })
endfunction
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | cd ~/dev | NERDTree | endif
nnoremap <Leader>s :source $VIM/_vimrc<CR>
nnoremap <Leader>, :new ~/dev/dotfile/vimrc<CR>
nnoremap <Leader>_ :new $VIM/_vimrc<CR>
nnoremap <Leader>t :call GitBash()<CR>