Skip to content

Instantly share code, notes, and snippets.

@oldsharp
Last active February 7, 2017 08:30
Show Gist options
  • Save oldsharp/a29856efac8f4dd974ce to your computer and use it in GitHub Desktop.
Save oldsharp/a29856efac8f4dd974ce to your computer and use it in GitHub Desktop.
A basic vimrc without fancy features
" A basic Vim configure file without fancy features.
"
" Author: Ray Chen <oldsharp@gmail.com>
" License: Public Domain
set nocompatible
colorscheme default
set number
set wrap
set showcmd
set showmatch
set ignorecase
set smartcase
set incsearch
set autowrite
set hidden
set ruler
set foldmethod=manual
set backspace=indent,eol,start
set history=50
set writebackup
set nobackup
set noswapfile
set tabstop=8
set expandtab
set softtabstop=4
set shiftwidth=4
set smarttab
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,prc,gb18030,taiwan,japan,korea,latin1
set fileformats=unix,dos,mac
set list
set listchars=tab:>-,trail:.,nbsp:%,extends:>,precedes:<
if has('mouse')
set mouse=a
endif
syntax enable
set t_Co=256
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
if has("autocmd")
filetype plugin indent on
augroup vimrcEx
au!
autocmd FileType python set cc=80
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
else
set autoindent
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment