1. vim配置:
    vim ~/.vimrc
    set nocompatible
    set number
    set ruler
    set nowrap
    set showcmd
    set history=1000
    set nobackup
    set noswapfile
    "set cursorline
    "set cursorcolumn
    set showmatch
    set autoindent
    set cindent
    syntax enable
    syntax on
    set t_Co=256
    set ignorecase
    "set mouse=a
    set tabstop=4
    set shiftwidth=4
    set softtabstop=4
    set smarttab
    set expandtab
    set encoding=utf-8
    set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
    set ff=unix
    filetype on
    filetype indent on
    filetype plugin on
    filetype plugin indent on
  2. 解决粘贴代码混乱的问题:
    1. 设置为粘贴模式:
      :set paste
    2. 退出粘贴模式:
      :set nopaste
  3. 修改默认编辑器:
    vim /etc/profile
    export EDITOR=/usr/bin/vim
文档更新时间: 2020-08-08 20:40   作者:lee