Last active
December 14, 2015 13:19
-
-
Save abhishek77in/5092957 to your computer and use it in GitHub Desktop.
My sweet n short vimrc (I use vundle)
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
set nocompatible " choose no compatibility with legacy vi | |
syntax enable | |
set encoding=utf-8 | |
set showcmd " display incomplete commands | |
"" Whitespace | |
set nowrap " don't wrap lines | |
set softtabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4) | |
set expandtab " use spaces, not tabs (optional) | |
set backspace=indent,eol,start " backspace through everything in insert mode | |
"" Searching | |
set hlsearch " highlight matches | |
set incsearch " incremental searching | |
set ignorecase " searches are case insensitive... | |
set smartcase " ... unless they contain at least one capital letter | |
" easier navigation between split windows | |
nnoremap <c-j> <c-w>j | |
nnoremap <c-k> <c-w>k | |
nnoremap <c-h> <c-w>h | |
nnoremap <c-l> <c-w>l | |
" Insert a hash rocket with <c-l> | |
imap <c-l> <space>=><space> | |
" Can't be bothered to understand ESC vs <c-c> in insert mode | |
imap <c-c> <esc> | |
" Clear the search buffer when hitting return | |
function! MapCR() | |
nnoremap <cr> :nohlsearch<cr> | |
endfunction | |
call MapCR() | |
" leader | |
let mapleader = "," | |
nnoremap <leader><leader> <c-^> | |
" Start BUNDLES | |
filetype off "required by vundle | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' | |
Bundle 'kien/ctrlp.vim' | |
Bundle 'autocomp.vim' | |
Bundle 'commentary.vim' | |
Bundle 'surround.vim' | |
Bundle 'ack.vim' | |
" END Bundles | |
filetype plugin indent on " load file type plugins + indentation | |
" Set copy paste | |
map <F2> :.w !pbcopy<CR><CR> | |
map <F3> :r !pbpaste<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment