Skip to content

Instantly share code, notes, and snippets.

@KentaKomai
Created April 30, 2014 00:44
Show Gist options
  • Save KentaKomai/e30a7e05a22e7aa34ea1 to your computer and use it in GitHub Desktop.
Save KentaKomai/e30a7e05a22e7aa34ea1 to your computer and use it in GitHub Desktop.
会社のvimrc
filetype indent plugin on
syntax on
set wildmenu
set autoindent
set smartindent
set number
set tabstop=4
set tw=0
set shiftwidth=4
set whichwrap=b,s,h,l,<,>,[,]
set showmatch
set incsearch
set wrapscan
set list
set listchars=tab:>\ ,trail:~,eol:$
set cursorline
" encoding setting
set termencoding=utf-8
set encoding=utf-8
set fileencoding=utf-8
set nowrap
" swap file and backup file setting
set backup
set backupdir=~/Documents/vim_backups/
set directory=~/Documents/vim_backups/
" setting markdown filetype
autocmd Filetype modula2 set filetype=markdown
" setting ruby indent setting
autocmd Filetype ruby set tabstop=2
autocmd Filetype ruby set autoindent
autocmd Filetype ruby set expandtab
autocmd Filetype ruby set shiftwidth=2
" setting scala indent setting
autocmd BufNewFile,BufRead *.scala setf scala
autocmd Filetype scala set tabstop=2
autocmd Filetype scala set autoindent
autocmd Filetype scala set expandtab
autocmd Filetype scala set shiftwidth=2
" NOTE: -------------PLUGIN SETTINGS------------------ """
" " Lokaltog/vim-easymotion
" http://blog.remora.cx/2012/08/vim-easymotion.html
" ホームポジションに近いキーを使う
let g:EasyMotion_keys='hjklasdfgyuiopqwertnmzxcvbHJKLASDFGYUIOPQWERTNMZXCVB'
" 「;」 + 何かにマッピング
let g:EasyMotion_leader_key=";"
" 1 ストローク選択を優先する
let g:EasyMotion_grouping=1
" カラー設定変更
hi EasyMotionTarget ctermbg=none ctermfg=red
hi EasyMotionShade ctermbg=none ctermfg=blue
let g:neocomplete#enable_at_startup = 1
"" unite.vim {{{
" The prefix key.
nnoremap [unite] <Nop>
nmap , [unite]
" unite.vim keymap
" https://github.com/alwei/dotfiles/blob/3760650625663f3b08f24bc75762ec843ca7e112/.vimrc
nnoremap [unite]u :<C-u>Unite -no-split<Space>
nnoremap <silent> [unite]f :<C-u>Unite<Space>buffer<CR>
nnoremap <silent> [unite]b :<C-u>Unite<Space>bookmark<CR>
nnoremap <silent> [unite]m :<C-u>Unite<Space>file_mru<CR>
nnoremap <silent> [unite]uu :<C-u>Unite<Space>file_mru file<CR>
nnoremap <silent> [unite]r :<C-u>UniteWithBufferDir file<CR>
nnoremap <silent> [unite]o :<C-u>Unite<Space>outline<CR>
nnoremap <silent> [unite]on :<C-u>Unite<Space>-no-quit<Space>-vertical<Space>-winwidth=30<Space>outline<CR>
nnoremap <silent> ,vr :UniteResume<CR>
" ウィンドウを分割して開く
au FileType unite nnoremap <silent> <buffer> <expr> <C-J> unite#do_action('split')
au FileType unite inoremap <silent> <buffer> <expr> <C-J> unite#do_action('split')
" ウィンドウを縦に分割して開く
au FileType unite nnoremap <silent> <buffer> <expr> <C-K> unite#do_action('vsplit')
au FileType unite inoremap <silent> <buffer> <expr> <C-K> unite#do_action('vsplit')
" ESCキーを2回押すと終了する
au FileType unite nnoremap <silent> <buffer> <ESC><ESC> q
au FileType unite inoremap <silent> <buffer> <ESC><ESC> <ESC><ESC>q
"--------------------------------------------------------------------------
" neobundle
set nocompatible " Be iMproved
filetype off " Required!
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
filetype plugin indent on " Required!
" Installation check.
if neobundle#exists_not_installed_bundles()
echomsg 'Not installed bundles : ' .
\ string(neobundle#get_not_installed_bundle_names())
echomsg 'Please execute ":NeoBundleInstall" command.'
"finish
endif
" enable matchit.vim
source $VIMRUNTIME/macros/matchit.vim
NeoBundle 'The-NERD-tree'
NeoBundle 'open-browser.vim'
NeoBundle 'Lokaltog/vim-powerline'
NeoBundle 'kannokanno/previm'
NeoBundle 'gregsexton/gitv'
NeoBundle 'Shougo/vimshell.vim'
NeoBundle 'Shougo/neocomplete.vim'
NeoBundle 'Shougo/vinarise.vim'
NeoBundle 'Shougo/vimproc', {
\ 'build' : {
\ 'windows' : 'make -f make_mingw32.mak',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'unix' : 'make -f make_unix.mak',
\ },
\ }
NeoBundle 'Shougo/unite.vim'
NeoBundle 'Shougo/unite-outline'
NeoBundle 'soh335/unite-qflist'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'Shougo/unite-ssh'
NeoBundle 'ujihisa/unite-colorscheme'
NeoBundle 'ujihisa/quicklearn'
NeoBundle 'guns/xterm-color-table.vim'
NeoBundle 'thinca/vim-quickrun'
NeoBundle 'groovy.vim'
NeoBundle 'haya14busa/vim-easymotion'
NeoBundle 'wincent/Command-T'
NeoBundle 'derekwyatt/vim-scala'
NeoBundle 'actionscript.vim'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment