Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

196 lines (177 sloc) 5.846 kB
" if has('xim') && has('GUI_GTK')
" let $GTK_IM_MODULE = 'xim'
" set imactivatekey=Zenkaku_Hankaku
" set iminsert=0 imsearch=0
" endif
function! s:gvimrc_colorscheme(colors_name)
if a:colors_name == 'luna'
"highlight vimshellError gui=underline
highlight vimshellError gui=undercurl
"highlight! link vimshellError Constant
elseif a:colors_name == 'mustang'
highlight vimshellError gui=undercurl
endif
endfunction
command! -nargs=1 GvimrcColorscheme Tcolorscheme <args> | call <SID>gvimrc_colorscheme(<q-args>)
let g:unite_colorscheme_command = 'GvimrcColorscheme'
" GvimrcColorscheme koehler
" GvimrcColorscheme mrkn256
" GvimrcColorscheme neverland2-darker
GvimrcColorscheme aldmeris
" GvimrcColorscheme neverland-darker
" GvimrcColorscheme luna
" GvimrcColorscheme newspaper
" GvimrcColorscheme monokai
if g:V.is_mac()
GvimrcColorscheme macvim
" for macvim.vim
hi! link Error WarningMsg
hi VertSplit gui=NONE guifg=DarkSlateGray guibg=NONE
hi StatusLineNC gui=NONE guifg=SlateGray guibg=Gray5
hi Pmenu guibg=LightSteelBlue1 guibg=DarkSlateGray
hi MatchParen guifg=White guibg=Gray25
endif
"hi StatusLineNC term=underline cterm=underline gui=undercurl guibg=NONE
"hi VertSplit ctermbg=0 guifg=DarkSlateGray guibg=NONE
hi Folded guibg=NONE guifg=GRAY ctermfg=0
if g:V.is_mac()
"set guifont=Andale\ Mono:h14
set guifont=Menlo:h14
"set guifontwide=Septmber-M-MonoKyohkan:h18
elseif vimproc#system('hostname') =~ '^mbr'
let &guifont = 'Menlo Bold 9'
let &guifontwide = 'Hiragino Kaku Gothic Pro Bold 9'
else
"let &guifont = 'Anonymous Pro Bold 14'
"let &guifontwide = 'Hiragino Kaku Gothic Pro Bold 12'
let &guifont = 'Menlo Bold 10'
let &guifontwide = 'Hiragino Kaku Gothic Pro Bold 10'
endif
let s:gvimrc_default_fonts = {
\ 'guifont': &guifont,
\ 'guifontwide': &guifontwide}
function! s:set_default_guifonts()
let &guifont = s:gvimrc_default_fonts.guifont
let &guifontwide = s:gvimrc_default_fonts.guifontwide
endfunction
nnoremap <M-0> :<C-u>call <SID>set_default_guifonts()<Cr>
if g:V.is_mac()
set transparency=2
let g:transparency = &transparency
endif
"set guioptions-=e
set guioptions-=T " no icons on the top of window
set guioptions-=r " no right-hand scrollbar at any time
set guioptions-=l " no left-hand scrollbar at any time
set guioptions-=L " no left-hand scrollbar at any time
set guioptions-=m " no gui menu (not for MacVim?)
set guioptions+=c " console dialogs. no popup allowed
function! s:relative_tranparency(diff)
let &transparency = a:diff + &transparency
let g:transparency = &transparency
endfunction
if g:V.is_mac()
nnoremap <up> :<C-u>call <SID>relative_tranparency(5)<Cr>
nnoremap <down> :<C-u>call <SID>relative_tranparency(-5)<Cr>
inoremap <up> <C-o>:call <SID>relative_tranparency(5)<Cr>
inoremap <down> <C-o>:call <SID>relative_tranparency(-5)<Cr>
nnoremap <swipeup> :<C-u>call <SID>relative_tranparency(5)<Cr>
nnoremap <swipedown> :<C-u>call <SID>relative_tranparency(-5)<Cr>
inoremap <swipeup> <C-o>:call <SID>relative_tranparency(5)<Cr>
inoremap <swipedown> <C-o>:call <SID>relative_tranparency(-5)<Cr>
endif
" http://vim-users.jp/2010/01/hack120/ {{{
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
" }}}
" macvim specific {{{
if g:V.is_mac()
nnoremap <SwipeLeft> gT
nnoremap <SwipeRight> gt
"set fullscreen
WindowsizeMaximize13
endif
if has('gui')
" termtter {{{
if 0
VimShellInteractive termtter
wincmd W
endif
" }}}
VimShell
normal! <C-u>
redraw!
endif
" }}}
" for vimshell {{{
function! GvimrcVimshellColor()
hi! link Error WarningMsg
endfunction
" }}}
" transparency adjustment based on window focus {{{
if 0
augroup dualvim
autocmd!
if has('mac')
autocmd FocusGained * set transparency=10
autocmd FocusLost * set transparency=50
endif
augroup END
endif
" }}}
" scala syntax tweaks {{{
"highlight scalaNameDefinition gui=underline
highlight scalaNameDefinition gui=italic
"hi scalaType gui=underline
"hi scalaTypeCase gui=underline
" }}}
" tabline for gui {{{
function GuiTabLabel()
"return printf("%s/%s", expand('%:p:h:h:t'), expand('%:p:h:t'))
" depends on kana's tabpagecd
let cwd = get(t:, 'cwd', getcwd())
let tmp = printf("%s/%s",
\ fnamemodify(cwd, ':p:h:h:t'),
\ fnamemodify(cwd, ':p:h:t'))
return tmp . repeat(' ', 20 - len(tmp))
endfunction
set guitablabel=%!GuiTabLabel()
" }}}
" fullscreen {{{
" install winctrl for gentoo
nnoremap <M-f> :<C-u>call vimproc#system("wmctrl -r :ACTIVE: -b toggle,fullscreen")<Cr>
inoremap <M-f> <Esc>:call vimproc#system("wmctrl -r :ACTIVE: -b toggle,fullscreen")<Cr>a
if 0
augroup gvimrc-fullscreen
autocmd!
autocmd VimEnter *
\ let s:window_number =
\ g:V.import('Data.String').chomp(matchstr(
\ vimproc#system('wmctrl -a :ACTIVE: -v'),
\ 'Using window: \zs0x.*'))
autocmd VimEnter * call vimproc#system(printf("wmctrl -i -r %s -b add,fullscreen", s:window_number))
autocmd FocusGained * echo vimproc#system(printf("wmctrl -i -r %s -b add,fullscreen", s:window_number))
autocmd FocusLost * echo vimproc#system(printf("wmctrl -i -r %s -b remove,fullscreen", s:window_number))
augroup END
endif
" }}}
" MacBook Pro Gentoo dirty hack {{{
if executable(expand('~/bin/tmux-send-keys'))
call vimproc#system_bg(expand('~/bin/tmux-send-keys'))
endif
" }}}
" vim: foldmethod=marker
Jump to Line
Something went wrong with that request. Please try again.