"--------------------------------------------------------------------------- " 検索の挙動に関する設定: " " 検索時に大文字小文字を無視 (noignorecase:無視しない) set ignorecase " 大文字小文字の両方が含まれている場合は大文字小文字を区別 set smartcase "--------------------------------------------------------------------------- " 編集に関する設定: " " タブの画面上での幅 set tabstop=2 " タブをスペースに展開しない (expandtab:展開する) set expandtab " 自動的にインデントする (noautoindent:インデントしない) set autoindent " バックスペースでインデントや改行を削除できるようにする set backspace=2 " 検索時にファイルの最後まで行ったら最初に戻る (nowrapscan:戻らない) set wrapscan " 括弧入力時に対応する括弧を表示 (noshowmatch:表示しない) set showmatch " コマンドライン補完するときに強化されたものを使う(参照 :help wildmenu) set wildmenu " テキスト挿入中の自動折り返しを日本語に対応させる set formatoptions+=mM set softtabstop=2 set shiftwidth=4 "--------------------------------------------------------------------------- " GUI固有ではない画面表示の設定: " " 行番号を非表示 (number:表示) "set nonumber " ルーラーを表示 (noruler:非表示) set ruler " タブや改行を表示 (list:表示) set nolist " どの文字でタブや改行を表示するかを設定 "set listchars=tab:>-,extends:<,trail:-,eol:< " 長い行を折り返して表示 (nowrap:折り返さない) set wrap " 常にステータス行を表示 (詳細は:he laststatus) set laststatus=2 " コマンドラインの高さ (Windows用gvim使用時はgvimrcを編集すること) set cmdheight=2 " コマンドをステータス行に表示 set showcmd " タイトルを表示 set title " 画面を黒地に白にする (次行の先頭の " を削除すれば有効になる) "colorscheme evening " (Windows用gvim使用時はgvimrcを編集すること) "シンタックスハイライトを有効にする syntax on "--------------------------------------------------------------------------- " ファイル操作に関する設定: " " バックアップファイルを作成しない (次行の先頭の " を削除すれば有効になる) "set nobackup "--------------------------------------------------------------------------- " ファイル名に大文字小文字の区別がないシステム用の設定: " (例: 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 set nocompatible filetype off if has('vim_starting') set runtimepath+=~/.vim/neobundle.vim.git call neobundle#rc(expand('~/.bundle')) endif NeoBundle 'gmarik/vundle' "NeoBundle 'git://github.com/Shougo/clang_complete.git' NeoBundle 'git://github.com/Shougo/echodoc.git' NeoBundle 'git://github.com/Shougo/neocomplcache.git' NeoBundle 'git://github.com/Shougo/neobundle.vim.git' NeoBundle 'git://github.com/Shougo/unite.vim.git' "NeoBundle 'git://github.com/Shougo/vim-vcs.git' NeoBundle 'git://github.com/Shougo/vimfiler.git' NeoBundle 'git://github.com/Shougo/vimshell.git' "NeoBundle 'git://github.com/Shougo/vinarise.git' NeoBundle 'Shougo/vimproc' NeoBundle 'thinca/vim-quickrun' NeoBundle 'tsukkee/lingr-vim' NeoBundle 'Shougo/neocomplcache-snippets-complete' NeoBundle 'browser.vim' NeoBundle 'synmark.vim' NeoBundle 'tyru/open-browser.vim' NeoBundle 'mattn/gist-vim' NeoBundle 'mattn/webapi-vim' NeoBundle 'mru.vim' NeoBundle 'jondistad/vimclojure' NeoBundle 'ujihisa/neco-ghc' filetype plugin on filetype indent on set ww+=h,l,>,<,[,] set number set mouse=a set ttymouse=xterm2 " ,is: シェルを起動 nnoremap ,is :VimShell " ,ipy: pythonを非同期で起動 nnoremap ,ipy :VimShellInteractive python " ,irb: irbを非同期で起動 nnoremap ,irb :VimShellInteractive irb " ,ss: 非同期で開いたインタプリタに現在の行を評価させる vmap ,ss :VimShellSendString " 選択中に,ss: 非同期で開いたインタプリタに選択行を評価させる nnoremap ,ss :VimShellSendString let g:neocomplcache_enable_at_startup = 1 let g:netrw_nogx = 1 " disable netrw's gx mapping. nmap gx (openbrowser-smart-search) vmap gx (openbrowser-smart-search) if has('win32') || has('win64') let g:quickrun_config = { } let g:quickrun_config['cs'] = { \ 'command' : 'c:/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe', \ 'runmode' : 'simple', \ 'exec' : ['%c /nologo %s:gs?/?\\? > /dev/null', '"%S:p:r:gs?/?\\?.exe" %a', ':call delete("%S:p:r.exe")'], \ 'tempfile' : '{tempname()}.cs', \ } endif augroup plugin-lingr-vim autocmd! autocmd FileType lingr-messages nmap t (lingr-messages-show-say-buffer) augroup END "augroup vimrc-plugin-lingr " autocmd! " autocmd User plugin-lingr-* call s:lingr_event( " \ matchstr(expand(''), 'plugin-lingr-\zs\w*')) "augroup END "function! s:lingr_event(event) " if a:event ==# 'message' && exists(':WindowName') == 2 " execute printf('WindowName %s(%d)', 'lingr-vim', lingr#unread_count()) " endif "endfunction " "function! s:set_window_name(name) " let esc = "\" " silent! execute '!echo -n "' . esc . 'k' . escape(a:name, '%#!') " \ . esc . '\\"' " redraw! "endfunction "command! -nargs=? WindowName call s:set_window_name() augroup vimrc autocmd! augroup END function! s:SID_PREFIX() return matchstr(expand(''), '\d\+_') endfunction set titlelen=100 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 = 'vim: [lingr: ' . lingr#unread_count() . ']' else let &titlestring = 'vim: %<' . 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() if i == current_tabnr let title = fnamemodify(getcwd(), ':t') . '/' 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 "set guitablabel = %{s:titlestring()} let g:github_user = 'raa0121' let g:github_token = 'e3ded9cf6669cc31dbca' let g:clj_highlight_builtins = 1 let g:clj_paren_rainbow = 1