set nocompatible
"------------------------------------------------------------------------------
-" For Vundle
+" For plug
"------------------------------------------------------------------------------
"
-filetype off
-set rtp+=$HOME/.vim/bundle/Vundle.vim
-call vundle#begin('$HOME/.vim/bundle/')
+if empty(glob('$HOME/.vim/autoload/plug.vim'))
+ silent !curl -fLo $HOME/.vim/autoload/plug.vim --create-dirs
+ \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+ autocmd VimEnter * PlugInstall | source $MYVIMRC
+endif
-Plugin 'VundleVim/Vundle.vim'
-Plugin 'thanthese/Tortoise-Typing'
-Plugin 'altercation/vim-colors-solarized.git'
-Plugin 'plasticboy/vim-markdown'
-Plugin 'mileszs/ack.vim'
-Plugin 'brandonbloom/csearch.vim'
-Plugin 'chazy/cscope_maps'
-Plugin 'vim-scripts/taglist.vim'
-Plugin 'airblade/vim-gitgutter'
+call plug#begin('$HOME/.vim/plugged')
-call vundle#end() " required
-filetype plugin indent on " required
-syntax enable
+Plug 'thanthese/Tortoise-Typing'
+Plug 'altercation/vim-colors-solarized'
+Plug 'plasticboy/vim-markdown'
+Plug 'mileszs/ack.vim'
+Plug 'brandonbloom/csearch.vim'
+Plug 'chazy/cscope_maps'
+Plug 'vim-scripts/taglist.vim'
+Plug 'airblade/vim-gitgutter'
+Plug 'junegunn/fzf.vim'
+
+call plug#end()
"------------------------------------------------------------------------------
" Regular setting
set tags+=tags;
" For color
-let g:solarized_menu=0
-colorscheme solarized
+syntax enable
set background=dark
+let g:solarized_menu=0
+try
+ colorscheme solarized
+catch
+ colorscheme default
+endtry
if has("gui_running")
if has("gui_gtk2")
let Tlist_Close_On_Select = 1
nnoremap <C-l> :TlistToggle<CR>
+" %s is replaced with fzf command
+"let g:fzf_launcher = 'xterm -e bash -ic %s'
+let g:fzf_launcher = "In_a_new_term_function %s"
+
" Easy escape
inoremap jj <ESC>
inoremap j<Space> j