Created
May 28, 2017 16:21
-
-
Save arijitvt/1b857a90114df39fa12f1a0509b60b56 to your computer and use it in GitHub Desktop.
vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" This is a sample vimrc file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'fatih/vim-go'
call vundle#end()
filetype on
filetype plugin indent on
syntax on
set nu
set path=.,..,/usr/local/include,/usr/include,,/home/arijit/install/boost_1_55_0/install/include
set bs=indent,eol,start
set smarttab
set autoindent
set smartindent
set cindent
set hlsearch
set incsearch
set ignorecase
set smartcase
set statusline=%<%F\ %h%m%r%y%=%-14.(%l,%c%V%)\ %P
set laststatus=2
set wildmode=list:longest
set noswapfile
set mouse=a
set tags=./tags;/
if !has('gui_running')
"colo dejavu
"colo desert256
"colo desert
set virtualedit=block,insert
set nocursorcolumn
set nocursorline
endif
map :tabn
map :tabp
"set grepprg=ack\ -w\ --no-group
" Use ack for list of files and use vimgrep with it
"map gw :grep :cw
"map gw :vimgrep **/*.[ch] :cw
map gw :vimgrep
ack -f
:cwset shiftwidth=4
set tabstop=4
set noexpandtab
map :shell
" To have control save
nmap :tabprev
nmap :tabnext
nnoremap :tabnew
imap
imap
nmap :w
" This is the customization for the auto completetion"
if v:version >= 600
filetype plugin on
filetype indent on
else
filetype on
endif
if v:version >= 700
set omnifunc=syntaxcomplete#Complete " override built-in C omnicomplete with C++ OmniCppComplete plugin
let OmniCpp_GlobalScopeSearch = 1
let OmniCpp_DisplayMode = 1
let OmniCpp_ShowScopeInAbbr = 0 "do not show namespace in pop-up
let OmniCpp_ShowPrototypeInAbbr = 1 "show prototype in pop-up
let OmniCpp_ShowAccess = 1 "show access in pop-up
let OmniCpp_SelectFirstItem = 1 "select first item in pop-up
set completeopt=menuone,menu,longest
endif
if version >= 700
let g:SuperTabDefaultCompletionType = ""
highlight clear
highlight Pmenu ctermfg=0 ctermbg=2
highlight PmenuSel ctermfg=0 ctermbg=7
highlight PmenuSbar ctermfg=7 ctermbg=0
highlight PmenuThumb ctermfg=0 ctermbg=7
endif
"clang_complete option checking.
let g:clang_library_path = '/home/arijit/Research/RTool/build/Release+Debug+Asserts/lib'
let g:clang_user_options='-std=c++0x -x c++'
let g:clang_user_options='|| exit 0'
function! UpdateTags()
execute ":!ctags -R --languages=C++ --c++-kinds=+p --fields=+iaS --extra=+q ./"
echohl StatusLine | echo "C/C++ tag updated" | echohl None
endfunction
nnoremap :call UpdateTags()
:color desert
:au BufNewFile *.h r ~/.vim/template/template.h
:au BufNewFile Makefile r ~/.vim/template/Makefile
"Nerd Tree Settings