Skip to content

Instantly share code, notes, and snippets.

@aiya000
Forked from velengel/vimrc
Last active October 7, 2015 13:42
Show Gist options
  • Save aiya000/ddb04dd7a5f48350d8d0 to your computer and use it in GitHub Desktop.
Save aiya000/ddb04dd7a5f48350d8d0 to your computer and use it in GitHub Desktop.
" vimrcを読み込むと自動でnocompatibleされる
"set nocompatible
set t_Co=256
colorscheme pablo
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
" 関連項目は一度にsetしてみてはいかがかな? ( 提案レベル )
"set list
"set listchars=tab:>-,trail:.
set list listchars=tab:>-,trail:.
augroup highlightIdegraphicSpace
autocmd!
autocmd Colorscheme * highlight IdeographicSpace term=underline ctermbg=DarkGreen guibg=DarkGreen
autocmd VimEnter,WinEnter * match IdeographicSpace / /
augroup END
" syntax enableと効果が被ってるのでこっちはいらない
":syntax on
augroup HighlightPref
autocmd!
autocmd InsertEnter * highlight StatusLine ctermfg=Black ctermbg=Cyan
autocmd InsertLeave * highlight StatusLine ctermfg=Cyan ctermbg=Black
augroup END
syntax enable
if has('gui_running')
set background=light
else
set background=dark
endif
" Enable 256 colors FORCELY on screen
"if $TERM == 'screen'
if $TERM ==# 'screen' " Vim scriptの文字列比較は基本的にこっち
set t_Co=256
endif
augroup HighlightPref
autocmd ColorScheme * highlight Visual cterm=underline ctermfg=White ctermbg=Cyan
autocmd ColorScheme * highlight IncSearch ctermfg=Black ctermbg=Cyan
autocmd ColorScheme * highlight Pmenu cterm=standout ctermfg=Blue
autocmd ColorScheme * highlight PmenuSel ctermfg=Black ctermbg=White
autocmd ColorScheme * highlight TabLine cterm=standout ctermfg=Blue
autocmd ColorScheme * highlight TabLineSel cterm=NONE ctermfg=Cyan
autocmd ColorScheme * highlight TabLineFill cterm=standout ctermfg=Blue
autocmd ColorScheme * highlight VertSplit cterm=NONE ctermfg=Cyan ctermbg=Blue
autocmd ColorScheme * highlight StatusLine ctermfg=Cyan ctermbg=Black
autocmd ColorScheme * highlight StatusLineNC ctermfg=Blue
autocmd ColorScheme * highlight LineNr ctermfg=Blue
augroup END
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment