Skip to content

Instantly share code, notes, and snippets.

@masquaremo
Last active October 21, 2018 07:38
Show Gist options
  • Save masquaremo/6e84f1a28ad796b3bc85ea5ed515d420 to your computer and use it in GitHub Desktop.
Save masquaremo/6e84f1a28ad796b3bc85ea5ed515d420 to your computer and use it in GitHub Desktop.
自分用gvimrc
"===================================================
" gvimrc(vim8-Win64 GUIで動確)
"===================================================
colorscheme desert " カラースキーム
set lines=50 " ウィンドウの縦幅
set columns=120 " ウィンドウの横幅
set guifont=MS_Gothic:h9 "半角文字の設定
set guifontwide=MS_Gothic:h9 "全角文字の設定
set guifont=MeiryoKe_Gothic:h10
set guifontwide=MeiryoKe_Gothic:h10
"-----------------------------------------------------
" キーリマップ
" ダブルクリックで単語ハイライト(仮)
:nnoremap <2-LeftMouse> *#
" トリプルクリックで単語選択
:nnoremap <3-LeftMouse> viw
" GUI時のカーソルラインの色
highlight CursorLine gui=NONE guifg=NONE guibg=Grey10
highlight CursorLineNr guifg=Yellow guibg=Grey10
"highlight CursorLineNr guifg=Gray10 guibg=Yellow
" IME ON/OFFによる色がえ
if has('multi_byte_ime')
"BufReadPostを指定しているのは、セッションファイルロード後に、highlight設定がクリアされる対処
"(セッションファイル内で、backgroundが設定されるから)
augroup ime_highlight
autocmd!
autocmd BufReadPost,VimEnter * highlight Cursor guifg=NONE guibg=Yellow
autocmd BufReadPost,VimEnter * highlight CursorIM guifg=NONE guibg=Red
augroup END
endif
" Insert modeでの色がえ
augroup insmode_highlight
autocmd!
autocmd BufReadPost,InsertEnter * highlight CursorLine guibg=Black
autocmd BufReadPost,InsertEnter * highlight CursorLineNr guifg=Yellow guibg=Black
autocmd BufReadPost,InsertLeave * highlight CursorLine guibg=Grey10
autocmd BufReadPost,InsertLeave * highlight CursorLineNr guifg=Yellow guibg=Grey10
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment