Skip to content

Instantly share code, notes, and snippets.

@nightire
Last active May 25, 2022 03:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nightire/9815652 to your computer and use it in GitHub Desktop.
Save nightire/9815652 to your computer and use it in GitHub Desktop.
Vim 基础配置
set nocompatible " use vim defaults
set t_RV= " http://bugs.debian.org/608242
" set runtimepath=$VIMRUNTIME " turn off user scripts, https://github.com/igrigorik/vimgolf/issues/129
syntax on " turn syntax highlighting on by default
filetype on " detect type of file
filetype indent on " load indent file for specific file type
set nobackup " do not keep a backup file
set novisualbell " turn off visual bell
set visualbell t_vb= " turn off error beep/flash
set ruler " show the current row and column
set number " show line numbers
set showcmd " display incomplete commands
set showmode " display current modes
set scrolloff=3 " keep 3 lines when scrolling
set backspace=indent,eol,start " make that backspace key work the way it should
set showmatch " jump to matches when entering parentheses
set matchtime=1 " tenths of a second to show the matching parenthesis
set hlsearch " highlight searches
set incsearch " do incremental searching
set ignorecase " ignore case when searching
set smartcase " no ignorecase if Uppercase char present
" Identify invisible characters and don't show them by default
set list listchars=eol:¬,tab:▸\ ,trail:.,
" Default indenting options
set autoindent smartindent
set shiftwidth=2 softtabstop=2 tabstop=2 expandtab
set background=dark
colorscheme grb256 " can not live without this two lines
" Make comments and special characters look better
highlight Comment ctermfg=245 guifg=#8a8a8a
highlight NonText ctermfg=240 guifg=#585858
highlight SpecialKey ctermfg=240 guifg=#585858
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment