" coding:utf-8 " ζ*'ヮ')ζ ζ(*'ヮ'リ+ " set ignorecase set smartcase set tabstop=2 set expandtab set autoindent set backspace=2 set wrapscan set showmatch set wildmenu set formatoptions+=mM set softtabstop=2 set shiftwidth=4 set fileencodings=utf-8,sjis,cp932,euc-jp,default,latin set number set ruler set nolist set wrap set laststatus=2 set cmdheight=2 set showcmd set title set hlsearch colorscheme evening syntax on set enc=utf8 " ファイル名に大文字小文字の区別がないシステム用の設定: " (例: DOS/Windows/MacOS) " if filereadable($VIM . '/vimrc') && filereadable($VIM . '/ViMrC') " tagsファイルの重複防止 set tags=./tags,tags endif " コンソールでのカラー表示のための設定(暫定的にUNIX専用) if has('unix') && !has('gui_running') let uname = system('uname') if uname =~? "linux" set term=builtin_linux elseif uname =~? "freebsd" set term=builtin_cons25 elseif uname =~? "Darwin" set term=beos-ansi else set term=builtin_xterm endif unlet uname endif " コンソール版で環境変数$DISPLAYが設定されていると起動が遅くなる件へ対応 if !has('gui_running') && has('xterm_clipboard') set clipboard=exclude:cons\\\|linux\\\|cygwin\\\|rxvt\\\|screen endif " タブページの切り替えをWindowsのように " CTRL+Tab SHIFT+Tabで行うように. if v:version >= 700 nnoremap gt nnoremap gT endif if has('+regexpengine') set re=0 endif set nocompatible filetype off if has('vim_starting') set runtimepath+=~/.vim/vim-addon-manager endif call vam#ActivateAddons(['github:Shougo/unite.vim','github:Shougo/vimfiler']) filetype plugin indent on set ww+=h,l,>,<,[,] set mouse=a set ttymouse=xterm2 set clipboard=unnamedplus " ,is: シェルを起動 nnoremap ,is :VimShell " ,ipy: pythonを非同期で起動 nnoremap ,ipy :VimShellInteractive python " ,irb: irbを非同期で起動 nnoremap ,irb :VimShellInteractive irb " ,ss: 非同期で開いたインタプリタに現在の行を評価させる vmap ,ss :VimShellSendString " 選択中に,ss: 非同期で開いたインタプリタに選択行を評価させる nnoremap ,ss :VimShellSendString " ,vs: vimshell nnoremap ,vs :tabnew +VimShell " ,vr: .vimrc nnoremap ,vr :tabnew ~/.vimrc:lcd nnoremap ,so :so ~/.vimrc nnoremap ,nu :tabnew +Unite\ neobundle/update nnoremap ,ll :tabnew +LingrLaunch nnoremap :nohlsearch let g:vimfiler_as_default_explorer = 1 "let g:neocomplcache#sources#rsense#home_directory = '/opt/rsense-0.3/' "tabで補完候補の選択を行う inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" let g:OmniSharp_host = 'http://localhost:2020' let g:OmniSharp_typeLookupInPreview = 1 set noshowmatch autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS autocmd FileType python setlocal omnifunc=pythoncomplete#Complete autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags autocmd FileType cs setlocal omnifunc=OmniSharp#Complete let g:netrw_nogx = 1 nmap gx (openbrowser-smart-search) vmap gx (openbrowser-smart-search) let g:quickrun_config = {} let g:quickrun_config['markdown'] = { \ 'outputter': 'browser' \ } let g:quickrun_config.ruby = { \ 'command': 'ruby', \ 'exec': '/usr/bin/env ruby %s', \ 'tempfile': '{tempname()}.rb' \ } let g:quickrun_config = { \ 'cpp': { \ 'cmdopt': '-std=c++11 -Wall' \ } \ } let g:quickrun_config = { \ '_' : { \ 'hook/close_unite_quickfix/enable_hook_loaded' : 1, \ 'hook/unite_quickfix/enable_failure' : 1, \ 'hook/close_quickfix/enable_exit' : 1, \ 'hook/close_buffer/enable_failure' : 1, \ 'hook/close_buffer/enable_empty_data' : 1, \ 'outputter' : 'multi:buffer:quickfix', \ 'hook/u_nya_/enable' : 1, \ 'hook/sweep/enable' : 0, \ 'outputter/buffer/split' : ':botright 15sp', \ 'outputter/buffer/running_mark' : 'バン(∩`・ω・)バンバンバンバン゙ン', \ 'runner' : 'vimproc', \ 'runner/vimproc/updatetime' : 40, \ 'runner/vimproc/sleep' : 0, \ } \ } let g:lingr_vim_user = 'raa0121' let g:J6uil_display_offline = 0 let g:J6uil_display_online = 0 let g:J6uil_echo_presence = 1 let g:J6uil_display_icon = 0 let g:J6uil_display_interval = 0 let g:J6uil_updatetime = 1000 let QFixHowm_Key = 'g' let howm_dir = '~/howm' let howm_filename = '%Y/%m/%Y-%m-%d-%H%M%S.txt' let howm_fileencoding = 'utf-8' let howm_fileformat = 'unix' let mygrepprg = 'grep' let MyGrep_cygwin17 = 1 augroup plugin-lingr-vim autocmd! autocmd FileType lingr-messages nmap t (lingr-messages-show-say-buffer) autocmd FileType lingr-say let &syntax='clojure' augroup END augroup vimrc autocmd! augroup END function! s:SID_PREFIX() return matchstr(expand(''), '\d\+_') endfunction set titlelen=100 set guioptions-=e autocmd vimrc BufEnter * let &titlestring = '%{' . s:SID_PREFIX() . 'titlestring()}' autocmd vimrc User plugin-lingr-unread let &titlestring = '%{' . s:SID_PREFIX() . 'titlestring()}' if exists('$TMUX') || exists('$WINDOW') set t_ts=k set t_fs=\ endif function! s:titlestring() if &filetype =~ '^lingr' let &titlestring = 'lingr: ' . lingr#unread_count() else let &titlestring = bufname('') endif endfunction " tabline set showtabline=2 " always show tabline let &tabline = '%!' . s:SID_PREFIX() . 'tabline()' function! s:tabline() " show each tab let s = '' for i in range(1, tabpagenr('$')) let list = tabpagebuflist(i) let nr = tabpagewinnr(i) let current_tabnr = tabpagenr() "let title = bufname('') if i == current_tabnr let title = fnamemodify(getcwd(), ':t') . '/' "let title = bufname('') else let title = fnamemodify(gettabvar(i, 'cwd'), ':t') . '/' endif let title = empty(title) ? '[No Name]' : title let s .= i == current_tabnr ? '%#TabLineSel#' : '%#TabLine#' let s .= '%' . i . 'T[' . i . '] ' . title let s .= ' ' endfor " show lingr unread count let lingr_unread = "" if exists('*lingr#unread_count') let lingr_unread_count = lingr#unread_count() if lingr_unread_count > 0 let lingr_unread = "%#ErrorMsg#(" . lingr_unread_count . ")" elseif lingr_unread_count == 0 let lingr_unread = "()" endif endif " build tabline let s .= '%#TabLineFill#%T%=%<[' . getcwd() . ']' . lingr_unread return s endfunction augroup vimrc-scratch-buffer autocmd! " Make a scratch buffer when unnamed buffer. autocmd BufEnter * call s:scratch_buffer() autocmd FileType qfreplace autocmd! vimrc-scratch * function! s:scratch_buffer() if exists('b:scratch_buffer') || bufname('%') !=# '' || &l:buftype !=# '' return endif let b:scratch_buffer = 1 call openbuf#add('scratch', bufnr('%')) setlocal buftype=nofile nobuflisted noswapfile bufhidden=hide augroup vimrc-scratch autocmd! * autocmd BufWriteCmd call s:scratch_on_BufWriteCmd() augroup END endfunction function! s:scratch_on_BufWriteCmd() silent! setl buftype< buflisted< swapfile< bufhidden< nomodified autocmd! vimrc-scratch * if bufname('%') ==# '' && exists('b:scratch_buffer') execute 'saveas' . (v:cmdbang ? '!' : '') ' ' filetype detect endif call openbuf#remove('scratch', bufnr('%')) unlet! b:scratch_buffer endfunction augroup END command! -nargs=? ExtractMatches let s:pat = empty() ? @/ : | let s:result = filter(getline(1, '$'), 'v:val =~# s:pat') | new | put =s:result command! -nargs=? UniGrep let s:pat = empty() ? @/ : | execute 'Unite grep:%::' . escape(s:pat, '\') let g:github_user = 'raa0121' let g:github_token = 'e3ded9cf6669cc31dbca' let g:github#user = 'raa0121'