Last active
August 29, 2015 14:13
-
-
Save anshulguleria/4c4c810daed03b755196 to your computer and use it in GitHub Desktop.
Basic configuration for .vimrc using vundle plugin manager
This file contains hidden or 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
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() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.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 nerd tree | |
Plugin 'scrooloose/nerdtree.git' | |
" vim-javascript | |
Bundle "pangloss/vim-javascript" | |
" vim-jsdoc | |
Plugin 'heavenshell/vim-jsdoc' | |
" Ctrl p fuzzy file searching | |
Plugin 'kien/ctrlp.vim' | |
" emmet coding | |
Plugin 'mattn/emmet-vim' | |
" plugin git-gutter | |
Plugin 'airblade/vim-gitgutter' | |
" easy motion plugin | |
Plugin 'Lokaltog/vim-easymotion' | |
" 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/'} | |
" Avoid a name conflict with L9 | |
"Plugin 'user/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 | |
" setting default color scheme | |
colorscheme torte | |
" managing searches | |
set ignorecase | |
set smartcase | |
set incsearch | |
set hlsearch | |
" handling tabspacing | |
" size of a hard tabstop | |
set tabstop=4 | |
" size of an "indent" | |
set shiftwidth=4 | |
" a combination of spaces and tabs are used to simulate tab stops at a width | |
" other than the (hard)tabstop | |
set softtabstop=4 | |
" make "tab" insert indents instead of tabs at the beginning of a line | |
set smarttab | |
" always uses spaces instead of tab characters | |
set expandtab | |
" set line numbers to be visible | |
set number | |
" WHITESPACE CONFIGURATION | |
" ---------------------------------- | |
" highlight extra whitespaces | |
highlight ExtraWhitespace ctermbg=red guibg=red | |
match ExtraWhitespace /\s\+$/ | |
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ | |
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ | |
autocmd InsertLeave * match ExtraWhitespace /\s\+$/ | |
autocmd BufWinLeave * call clearmatches() | |
" auto-strip white spaces on save | |
function! TrimWhiteSpace() | |
%s/\s\+$//e | |
endfunction | |
autocmd BufWritePre * :call TrimWhiteSpace() | |
" ENDS | |
" highlight current line | |
set cursorline | |
hi CursorLine term=bold cterm=bold guibg=darkred | |
" ENDS | |
" folding settings | |
set foldmethod=indent " fold based on indent | |
set foldnestmax=10 " deepest fold is 10 levels | |
set nofoldenable " don't fold by default | |
set foldlevel=1 " trying this setting | |
" ENDS | |
" easy motion config | |
" type 'l' and match 'l' & 'L' | |
let g:EasyMotion_smartcase = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment