-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gvimrc
70 lines (53 loc) · 1.38 KB
/
.gvimrc
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
set guifont=Menlo:h13
set transparency=13
set tabstop=2
set shiftwidth=2
colorscheme evening
if has('multi_byte_ime') || has('xim')
highlight CursorIM guibg=DarkCyan guifg=NONE
endif
set incsearch "インクリメンタルさーち
let &directory = &backupdir "swapファイルつくらない
function! ZenkakuSpace()
highlight ZenkakuSpace cterm=reverse ctermfg=DarkMagenta gui=reverse guifg=DarkMagenta
endfunction
if has('syntax')
augroup ZenkakuSpace
autocmd!
autocmd ColorScheme * call ZenkakuSpace()
autocmd VimEnter,WinEnter * match ZenkakuSpace / /
augroup END
call ZenkakuSpace()
endif
let g:save_window_file = expand('~/.vimwinpos')
augroup SaveWindow
autocmd!
autocmd VimLeavePre * call s:save_window()
function! s:save_window()
let options = [
\ 'set columns=' . &columns,
\ 'set lines=' . &lines,
\ 'winpos ' . getwinposx() . ' ' . getwinposy(),
\ ]
call writefile(options, g:save_window_file)
endfunction
augroup END
if filereadable(g:save_window_file)
execute 'source' g:save_window_file
endif
nmap <D-S-Left> :tabp<CR>
nmap <D-S-Right> :tabn<CR>
command! Gcc call s:Gcc()
nmap <D-r> :Gcc<CR>
function! s:Gcc()
:w
:!gcc ./% -o ./%.out
:!./%.out
endfunction
command! Ruby call s:Ruby()
nmap <D-1> :Ruby<CR>
function! s:Ruby()
:w
:!ruby %
endfunction
nmap <ESC><ESC> :noh<CR>