Skip to content

Instantly share code, notes, and snippets.

@Idered
Created December 15, 2016 12:30
Show Gist options
  • Save Idered/c1bf3f3381a27ad5b6d7f8c2d22bae7b to your computer and use it in GitHub Desktop.
Save Idered/c1bf3f3381a27ad5b6d7f8c2d22bae7b to your computer and use it in GitHub Desktop.
vimrc
" VIM Configuration
" Cancel the compatibility with Vi.
" To enjoy the features of Vim.
set nocompatible
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Plugins
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-surround'
Plugin 'kien/ctrlp.vim'
Plugin 'altercation/vim-colors-solarized'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'airblade/vim-gitgutter'
Plugin 'shougo/neocomplete.vim'
Plugin 'yggdroot/indentline'
Plugin 'jiangmiao/auto-pairs'
Plugin 'scrooloose/nerdcommenter'
Plugin 'matchit.zip'
Plugin 'ervandew/supertab'
Plugin 'sirver/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'danro/rename.vim'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-session'
Plugin 'Chiel92/vim-autoformat'
Plugin 'majutsushi/tagbar'
call vundle#end() " required
filetype plugin indent on " required
" -- General Settings --
" Map <Leader> = space
let mapleader = " "
" -- Display
set title " Update the title of your window or your terminal
set number " Display line numbers
set relativenumber " Show relative line numbers
set cursorline " Highlight current line
set ruler " Display cursor position
set autoread " Reload files changed outside vim
set scrolloff=3 " Display at least 3 lines around you cursor
set guioptions-=T " Disable the toolbar
set guioptions-=m " Disable the menubar
set guioptions-=r " Remove right-hand scroll bar
set guioptions-=L " Remove left-hand scroll bar
" Smart tab completion from command line
set wildmode=longest:list,full
set mouse=a " Enable mouse support in terminal
set hidden " Allow change buffers without saving
" Copy to clipboard
vnoremap <Leader>y "+y
nnoremap <Leader>y "+y
" Paste from clipboard
nnoremap <Leader>p "+p
vnoremap <Leader>p "+p
" -- Search
set ignorecase " Ignore case when searching
set smartcase " If there is an uppercase in your search term
" search case sensitive again
set incsearch " Highlight search results when typing
set hlsearch " Highlight search results
nmap <silent> <C-n> :noh<CR> " Disable highlighting search with ctrl-n
" -- Beep
set visualbell " Prevent Vim from beeping
set noerrorbells " Prevent Vim from beeping
" Identation
set tabstop=4
set shiftwidth=4
set softtabstop=4
set shiftround
set expandtab
set autoindent
" Enable syntax highlighting
syntax enable
" Use the light version of Solarized
let g:solarized_termcolors=256
set background=dark
colorscheme solarized
hi clear CursorLineNr " Clear highlighting line number.
" Fonts
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 10
set antialias
" Disable cursor blinking
set gcr=n:blinkon0
" -- Plugins configs
" Sintastic configs
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" CtrlP
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
" GitGutter
set updatetime=250
" NeoComplete
let g:neocomplete#enable_at_startup = 1
" The nerdcommenter
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1
" Airline
set laststatus=2
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'
" Load symbols
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" Ultisnips
" Trigger configuration. Do not use <tab> for conflicts with NeoComplete
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" session
let g:session_autosave="yes"
" let g:session_autoload="yes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment