虚拟机配置vimrc
1、首先,安装完vim以后,如果需要个性化配置,那么就去/etc/vim/vimrc里面去配置;
以下标配:
set nu " 在左侧行号
set tabstop "tab 长度设置为 4
set nobackup "覆盖文件时不备份
set cursorline "突出显示当前行
set ruler "在右下角显示光标位置的状态行
set autoindent "自动缩进
2、vimrc主题配置
set filetype=python
au BufNewFile,BufRead *.py,*.pyw setf python
" 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 backspace=2 " more powerful backspacing
"set number
set hlsearch "设置搜索高亮显示
" 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
"set number " 显示行号
set confirm " 在处理未保存或只读文件的时候,弹出确认
set autoindent
set smartindent "智能对齐
set expandtab
set tabstop=4
set softtabstop=4
"set shiftwidthd *.py,*.pyw setf python
" 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 backspace=2 " more powerful backspacing
"set number
set hlsearch "设置搜索高亮显示
" 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
set showmatch " 高亮显示对应的括号
"set number " 显示行号
set confirm " 在处理未保存或只读文件的时候,弹出确认
set autoindent
set smartindent "智能对齐
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent " 换行后自动缩进
set filetype=python
au BufNewFile,BufRead *.py,*.pyw setf python
syntax enable " 自动语法高亮
set encoding=utf-8
set fileencodings=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936,utf-16,big5,euc-jp,latin1 " 编码设置
"colorscheme torte " 设置颜色主题
set autoindent " 换行后自动缩进
set filetype=python
au BufNewFile,BufRead *.py,*.pyw setf python
syntax enable " 自动语法高亮
set encoding=utf-8
set fileencodings=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936,utf-16,big5,euc-jp,latin1 " 编码设置
"colorscheme torte " 设置颜色主题
let skip_defaults_vim=1