僕の.vimrc晒します。
参考までに。
NERDTreeというプラグインが必要なので、
以下のコマンドでインストールしてから、以下のvimrcを導入してください。
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
.vimrc晒す。
.vimrc
set backupskip=/tmp/*,/private/tmp/*
syntax on
set mouse=a
set ttymouse=xterm2
autocmd QuickFixCmdPost *grep* cwindow
colorscheme molokai
let g:molokai_original = 1
let g:rehash256 = 1
set background=dark
execute pathogen#infect()
let NERDTreeShowHidden = 1
map n :NERDTreeToggle<CR>
map <C-n> :NERDTreeToggle<CR>r
tnoremap <C-x> <C-w><C-w>
nnoremap <C-x> <C-w><C-w>
tnoremap <C-e> <C-w>N
nnoremap <C-a> <C-w><C-w>
tnoremap <C-z> <C-w><C-c>
nnoremap w :w<kenter>
nnoremap qa :qa<kenter>
nnoremap cs :close<kenter>
nnoremap <C-t> :terminal<kenter>
inoremap <C-t> <esc>:terminal<kenter>
nnoremap z :tabNext<kenter>
nnoremap x :tabnext<kenter>
nnoremap t :tabnew<kenter>
nnoremap co :compiler
nnoremap ma :make<kenter>
vnoremap <C-c> yy<esc>i
vnoremap <C-x> dd<esc>i
vnoremap <Backspace> di
inoremap <C-p> <esc>vpi
nnoremap <C-b> :vs<kenter>
nnoremap + <C-w>>
nnoremap - <C-w><
set backspace=indent,eol,start
set splitbelow
set termwinsize=15x0
set number
set title
set tabstop=2
set expandtab
set virtualedit=block
set list
set listchars=tab:»-,trail:-,eol:↲,extends:»,precedes:«,nbsp:%
set smartindent
set shiftwidth=2
set ambiwidth=double
set noswapfile
set whichwrap=b,s,[,],<,>
set showmatch
set laststatus=2
set wildmode=list:longest
set visualbell
set incsearch
function! s:open(args) abort
if empty(term_list())
execute "terminal" a:args
else
let bufnr = term_list()[0]
execute term_getsize(bufnr)[0] . "new"
execute "buffer + " bufnr
endif
endfunction
command! -nargs=*
\ Terminal call s:open(<q-args>)
if &compatible
set nocompatible
endif
" Add the dein installation directory into runtimepath
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('~/.cache/dein')
call dein#begin('~/.cache/dein')
call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim')
call dein#add('Shougo/deoplete.nvim')
if !has('nvim')
call dein#add('roxma/nvim-yarp')
call dein#add('roxma/vim-hug-neovim-rpc')
endif
call dein#end()
call dein#save_state()
endif
execute pathogen#infect()
filetype plugin indent on
syntax enable
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'
Plug 'elmcast/elm-vim'
Plug 'keith/swift.vim'
Plug 'suan/vim-instant-markdown', {'for': 'markdown'}
" Initialize plugin system
call plug#end()
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
" Required:
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
" Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck