Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set nocompatible
- syntax on
- source ~/.plugin.vimrc
- set tabstop=4
- set expandtab
- set autoindent
- set shiftwidth=4
- set ruler
- set number
- set backspace=indent,eol,start
- set visualbell
- set bg=dark
- set hlsearch
- set cursorline
- set nowrap
- set noswapfile
- set wildmode=longest,list,full
- set wildmenu
- set encoding=utf-8 " Required for YouCompleteMe
- " Set backup, swap and undo directories
- "
- " set backupdir=~/.vim/backup//
- " set directory=~/.vim/swap//
- " set undodir=~/.vim/undo//
- " Session options
- set ssop-=options " do not store global and local values in a session
- set ssop-=folds " do not store folds
- " Save session
- nnoremap <C-s> :mks!
- " Search for the selected visual block
- vnoremap // y/<C-R>"<CR>
- vnoremap * y/<C-R>"<CR>
- " Show ctag selection if multiple options
- nnoremap <C-]> g<C-]>
- " Change vim tabs
- nnoremap <C-lt> :tabnext<CR>
- nnoremap <C-gt> :tabprevious<CR>
- " Maximize tabs
- nnoremap <C-w>/ <C-w>\|<C-w>_
- " Map F4 to switch between cpp and h file
- map <F4> :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR>
- " Setting ctags and plugins for MARS development
- set tags=./tags;,tags;
- " Setting vim path per session. Helps with finding files
- set path=$PWD/**
Advertisement