Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (42 sloc) 1.37 KB
call plug#begin('~/.vim/plugged')
Plug 'google/vim-ft-bzl'
Plug 'fatih/vim-go'
" BufExplorer
Plug 'wsxiaoys/'
let g:bufExplorerFindActive = 0
Plug 'dcharbon/vim-flatbuffers'
Plug 'scrooloose/nerdtree'
Plug 'ervandew/supertab'
let g:SuperTabDefaultCompletionType = "context"
let g:SuperTabLongestEnhanced = 1
set completeopt=menu,preview,longest
Plug 'vim-scripts/FSwitch'
au! BufEnter *.cc let b:fswitchdst = 'h' | let b:fswitchlocs = './,include/,../include'
au! BufEnter *.h let b:fswitchdst = 'c,cc' | let b:fswitchlocs = './,src/,../src'
call plug#end()
" Mapping
let mapleader=","
let g:mapleader=","
" Tab
set autoindent
set smartindent
au FileType c,cpp,lua,fbs setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab
au FileType go setlocal tabstop=2 shiftwidth=2 softtabstop=2
" Fold
set foldmethod=indent
set nofoldenable
" Display
set nu " Display line number
set nowrap " No line ending auto wrap
set ruler " Display position of caret
set wildmenu " Display wildmenu
set wildmode=list:longest,full
set hlsearch " Highlight search result
set laststatus=2 " Always display status line
" Shorthand
nmap <silent> <leader>nt :NERDTree<CR>
nmap <silent> <leader>cd :cd %:p:h<CR>
nmap <SPACE><SPACE> :noh <CR>
map <C-K> :pyf ~/bin/<cr>
imap <C-K> <c-o>:pyf ~/bin/<cr>
nmap <silent> <leader>a :FSHere<cr>