• 虚拟机配置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

  • 相关阅读:
    mysql mysqldump 本地数据库导入本地数据库的命令
    window mysql5.7 zip 安装
    MySQL存储过程详解 mysql 存储过程
    spring batch 读取多个文件数据导入数据库
    spring batch 以游标的方式 数据库读取数据 然后写入目标数据库
    不同浏览器上中文文件名的下载乱码问题
    spring mvc 文件下载 get请求解决中文乱码问题
    SpringMVC上传文件的三种方式
    NSPort
    iOS NSRunloop
  • 原文地址:https://www.cnblogs.com/haoxinchen/p/8941781.html
Copyright © 2020-2023  润新知