Skip to content

Instantly share code, notes, and snippets.

@zheyuye
Last active January 24, 2022 14:35
Show Gist options
  • Save zheyuye/af4e3b3b728f8c778275cca9a93e3ddb to your computer and use it in GitHub Desktop.
Save zheyuye/af4e3b3b728f8c778275cca9a93e3ddb to your computer and use it in GitHub Desktop.
" Configuration file for vim
set modelines=0 " CVE-2007-2438
" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible " Use Vim defaults instead of 100% vi compatibility
set autoindent
" Tab键的宽度
set tabstop=4
" 统一缩进为4
set softtabstop=4
set tabstop=4
set softtabstop=4
set shiftwidth=4
set backspace=2
" more powerful backspacing
" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup nobackup
" Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup nobackup
let skip_defaults_vim=1
set nu
syntax enable
# colorscheme Tomorrow-Night-Blue
set syntax=on
"编码设置
set enc=utf-8
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
"语言设置
set langmenu=zh_CN.UTF-8
" 侦测文件类型
filetype on
" 载入文件类型插件
filetype plugin on
" 为特定文件类型载入相关缩进文件
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment