Skip to content

Instantly share code, notes, and snippets.

@yxdb
Created February 23, 2017 03:45
Show Gist options
  • Save yxdb/15fd873f225f20f7023db087c45d54f5 to your computer and use it in GitHub Desktop.
Save yxdb/15fd873f225f20f7023db087c45d54f5 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved, required
set backspace=indent,eol,start
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'majutsushi/tagbar'
Plugin 'scrooloose/nerdtree'
Plugin 'valloric/youcompleteme'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'FSwitch'
Plugin 'scrooloose/nerdcommenter'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'edkolev/promptline.vim'
Plugin 'flazz/vim-colorschemes'
Plugin 'benmills/vimux'
Plugin 'easymotion/vim-easymotion'
"Plugin 'fcitx.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
"Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
"Plugin 'L9'
" Git plugin not hosted on GitHub
"Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
"Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Powerline
"python from powerline.vim import setup as powerline_setup
"python powerline_setup()
"python del powerline_setup
set t_Co=256
" vim-airline
"let g:airline_theme = 'solarized'
let g:airline_powerline_fonts = 0
let g:airline#extensions#tabline#enabled = 1
let g:airline_left_sep=''
let g:airline_right_sep=''
" >>> NERDTree <<<
let NERDTreeIgnore = ['\~$', '\.o$[[file]]', '\.pyc$[[file]]']
" >>> YouCompleteMe <<<
let g:ycm_confirm_extra_conf = 0
let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
" >>> CtrlP <<<
"let g:ctrlp_working_path_mode = 'ra'
"let g:ctrlp_max_files = 0
"let g:ctrlp_max_depth = 40
"let g:AutoClosePumvisible = {"ENTER": "<C-Y>", "ESC": "<ESC>"}
set hls is ru sc cursorline ls=2 "cursorcolumn
set nu ai et ts=4 sw=4 sts=4
"set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣
set listchars+=tab:>-,trail:
autocmd FileType c,cc,cpp,cxx,h,hpp,hxx set cin cino=:0g0t0(sus
syntax enable
"let g:molokai_original = 1
"let g:rehash256 = 1
"colo molokai
"hi Normal ctermbg=none
"hi NonText ctermbg=none
"set background=dark
"colo solarized
"set foldenable foldmethod=syntax
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
"if (empty($TMUX))
"if (has("nvim"))
""For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
"let $NVIM_TUI_ENABLE_TRUE_COLOR=1
"endif
""For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
""Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
"" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
"if (has("termguicolors"))
"set termguicolors
"endif
"endif
set background=dark
colo ron
" key mapping
let mapleader=";"
nnoremap <silent> <Leader>tt :TagbarToggle<CR>
nnoremap <silent> <Leader>tg :TagbarOpenAutoClose<CR>
nnoremap <silent> <Leader>l :NERDTreeToggle<CR>
nnoremap <silent> <Leader>yy :YcmCompleter GoTo<CR>
nnoremap <silent> <Leader>yt :YcmCompleter GetType<CR>
nnoremap <silent> <Leader>yp :YcmCompleter GetParent<CR>
nnoremap <silent> <Leader>yd :YcmCompleter GetDoc<CR>
nnoremap <silent> <Leader>yf :YcmCompleter FixIt<CR>
nnoremap <silent> <Leader>of :FSHere<CR>
nnoremap <silent> <Leader>oh :FSLeft<CR>
nnoremap <silent> <Leader>oj :FSBelow<CR>
nnoremap <silent> <Leader>ok :FSAbove<CR>
nnoremap <silent> <Leader>ol :FSRight<CR>
nnoremap <silent> <Leader>oH :FSSplitLeft<cr>
nnoremap <silent> <Leader>oJ :FSSplitBelow<cr>
nnoremap <silent> <Leader>oK :FSSplitAbove<cr>
nnoremap <silent> <Leader>oL :FSSplitRight<cr>
nnoremap <silent> <C-h> :bp<CR>
nnoremap <silent> <C-l> :bn<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment