Commits

painyeph  committed 020f0e8

颜色调整,运行代码于 Split Window

  • Participants
  • Parent commits 9c71480

Comments (0)

Files changed (1)

 " current line
 set cursorline
 set cursorcolumn
-hi cursorline ctermbg=1 guibg=#2B2B2B
-hi cursorcolumn ctermbg=1 guibg=#2B2B2B
+hi CursorLine ctermbg=1 guibg=Grey24
+hi CursorColumn ctermbg=1 guibg=Grey24
 " tabstop
 set tabstop=8
 " wrap
 endif
 " line number
 set number
-hi LineNr ctermbg=8 ctermfg=0 guibg=#3C3C3C guifg=#C3C3C3
+hi LineNr ctermbg=8 ctermfg=0 guibg=Gray16 guifg=Grey40
 hi NonText ctermbg=0 ctermfg=0 guibg=Gray20 guifg=Grey20
-autocmd FileType python,c,h,cpp,php,vim set cc=80,120
-autocmd FileType python,c,h,cpp,php,vim hi ColorColumn guibg=#2B2B2B
+autocmd FileType python,c,h,cpp,php,vim
+    \ set cc=80,120 |
+    \ hi ColorColumn guibg=Grey24
 " horizontal scroll bar
 set guioptions+=b
 " no Toolbox
 smap <S-TAB> <C-G><LT><ESC>gv<C-G>
 
 " F4 关闭标签
- map <F4> :tabclose<CR>
-imap <F4> <C-O>:tabclose<CR>
-smap <F4> <ESC><C-O>:tabclose<CR>
+ map <F4> :q<CR>
+imap <F4> <C-O>:q<CR>
+smap <F4> <ESC><C-O>:q<CR>
 
 " F5 编译,F6 运行程序
 function RunCode(state)
   exec "w"
-  let tmp_file = $TEMP . "\\eph_gvim_" . strftime("%y%m%d-%H%M%S")
+  let tmp_file = tempname()
   if &filetype == "python"
     if a:state == 0
       exec "silent !python % 2>&1 | wtee " . tmp_file
   elseif &filetype == "java"
     exec "silent !javac % 2>&1 | wtee " . tmp_file
   endif
-  exec "tabe " . tmp_file
-  "exec "split " . tmp_file
+  exec "belowright split " . tmp_file
 endfunction
  map <F5> :call RunCode(0)<CR>
 imap <F5> <C-O>:call RunCode(0)<CR>