Skip to content

Instantly share code, notes, and snippets.

@hunje
Last active August 29, 2015 13:56
Show Gist options
  • Save hunje/8910932 to your computer and use it in GitHub Desktop.
Save hunje/8910932 to your computer and use it in GitHub Desktop.
VIMRC
" line number and length
set number
" set tw=79 " Width of document
set nowrap
set fo-=t " dont' automaticall wrap text when typing
set colorcolumn=80
highlight ColorColumn ctermbg=233
set ruler
" syntax highlight
filetype off
filetype plugin indent on
syntax on
" code completion
set omnifunc=syntaxcomplete#Complete
set completeopt=longest,menuone
set wildmode=longest,full,list
" hilight cursorline
set cursorline
" indentation
set autoindent
set smartindent
set smarttab
set shiftwidth=2
set tabstop=2
set softtabstop=2
set shiftround
set expandtab
" search
set incsearch
set smartcase
set ignorecase
set hlsearch
" Disable backup and swap file
set nobackup
set nowritebackup
set noswapfile
" press esc twice, search highlight will turn off
nnoremap <ESC><ESC> :nohlsearch<CR>
set showmatch
set list
" set listchars=tab:▸\ ,eol:¬
set listchars=tab:→\ ,eol:¬
set showcmd
colorscheme molokai
let g:molokai_original = 1
let g:rehash256 = 1
" Clipboard
set clipboard=unnamed
" Automatic reloading
autocmd! bufwritepost .vimrc source %
" Better mouse and backspace experience
set mouse=a
" Better indentation
vnoremap < <gv
vnoremap > >gv
" Plugin management
execute pathogen#infect()
" File type and syntax
augroup MyAutoGroup
autocmd MyAutoGroup BufNewFile,BufRead *.{md,mdwn,mkd,mark*} set filetype=markdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment