Skip to content

Instantly share code, notes, and snippets.

@mingc00
Created December 18, 2013 16:24
Show Gist options
  • Save mingc00/8025192 to your computer and use it in GitHub Desktop.
Save mingc00/8025192 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved
filetype off " required!
filetype plugin indent on " required!
"My settings
set encoding=utf-8
set ruler
set autoindent
set smartindent
set number
set t_Co=256
syntax enable
set backspace=indent,eol,start
"tab
set shiftwidth=4
set sts=4
set tabstop=4
set expandtab
"searched highlight
set hlsearch
set ignorecase smartcase
noremap <CR> :nohlsearch<CR>
" ======================================
" custom key and plugin configurations
" ======================================
" remove tailing whitespace
autocmd BufWritePre * :%s/\s\+$//e
" identation
nmap <TAB> v>
nmap <S-TAB> v<
vmap <TAB> >gv
vmap <S-TAB> <gv
" last edit
if has("autocmd")
autocmd BufRead *.txt set tw=78
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment