Created
December 28, 2011 21:17
-
-
Save thiagomoretto/1529786 to your computer and use it in GitHub Desktop.
Mini .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
set nocompatible | |
syntax on | |
set ruler | |
set background=dark | |
set wildmenu " turn on wild meno :e <Tab> | |
set wildmode=list:longest,list:full | |
set completeopt=menu,longest,preview " autocomplete opts <C-p> | |
set encoding=utf-8 | |
set nowrap | |
set laststatus=2 | |
set modeline | |
set modelines=10 | |
" Editing and behaviour | |
set noerrorbells visualbell t_vb= | |
set fileformats=unix,mac,dos | |
set showcmd | |
" set autochdir | |
set scrolloff=5 | |
set sidescrolloff=5 | |
set pastetoggle=<F3> | |
set cursorline | |
set mouse=a | |
set nostartofline | |
set formatoptions=tcql " t = autowrap to textwidth | |
" c = autowrap comments to textwidth | |
" r = autoinsert comment leader with <Enter> | |
" q = allow formatting of comments with :gq | |
" l = don't format already long lines | |
hi CursorLine term=none cterm=none ctermbg=0 | |
" Indent and tabs | |
set ts=2 | |
set expandtab | |
set shiftwidth=2 | |
set tabstop=2 | |
set number | |
set backspace=indent,eol,start | |
set showmatch | |
" Search | |
set incsearch ignorecase smartcase hlsearch | |
set gdefault | |
set matchtime=5 | |
set backup | |
set backupdir=/tmp | |
set directory=/tmp | |
filetype on | |
if has("autocmd") | |
filetype plugin indent on | |
endif | |
let maplocalleader=',' | |
cmap w!! %!sudo tee > /dev/null % | |
nmap <LocalLeader>tl :set list!<cr> | |
nmap <LocalLeader>pp :set paste!<cr> | |
map <C-j> :bprev<CR> | |
map <C-k> :bnext<CR> | |
map - :nohls<CR> | |
" Moving between splited-windows | |
map <LocalLeader>j <C-w>j | |
map <LocalLeader>k <C-w>k | |
map <LocalLeader>l <C-w>l | |
map <LocalLeader>h <C-w>h | |
set runtimepath^=~/.vim/bundle/ctrlp.vim | |
map <LocalLeader>p :CtrlP<cr> |
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
CURRENT=$(shell pwd) | |
default: install | |
install: prepare | |
ln -s $(CURRENT)/.vimrc $(HOME)/.vimrc | |
update: pull install | |
pull: | |
git pull | |
prepare: | |
rm -f $(HOME)/.vimrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment