• vim note(5)


    .vimrc 的设置

    $HOME/.vimrc 的普通设置,例如以下。

    set nocompatible  "" not compatible with VI
    
    "" Encodings and fonts
    set encoding=utf-8
    set fileencoding=utf-8
    set fileencodings=ucs-bom,gb18030,gbk,gb2312,cp936
    set termencoding=utf-8
    set langmenu=zh_CN.UTF-8
    language messages zh_CN.UTF-8
    set guifontset=wenquanyi,-*-16-*-*-*
    
    "" Tab and Backspace
    set sw=2
    set tabstop=4
    set shiftwidth=4
    set cindent
    set smartindent
    set autoindent
    set backspace=indent,eol,start  "" set backspace
    
    "" Display
    set number        "" show line number
    set ruler         "" always show current position
    set cursorline    "" highlight the current line
    set showcmd
    
    "" Searching
    set ignorecase    "" search setting
    set incsearch
    set hlsearch
    set showmatch
    set history=100
    highlight Search term=reverse ctermbg=4 ctermfg=7
    
    "" Syntax and color scheme
    syntax enable
    filetype plugin indent on
    "colorscheme torte
    colorscheme default
    highlight Comment ctermfg=grey
    highlight Normal ctermfg=grey ctermbg=darkblue
    
    """""""""" 自己主动补全命令 """"""""""
    autocmd Filetype c      set omnifunc=ccomplete#Complete
    autocmd Filetype html   set omnifunc=htmlcomplete#CompleteTags
    autocmd Filetype xml    set omnifunc=xmlcomplete#CompleteTags
    autocmd Filetype python set omnifunc=pythoncomplete#CompleteTags
    autocmd Filetype tex    set omnifunc=syntaxcomplete#Complete
    
    """""""""" 英文拼写检查 """""""""""
    " 拼写错误被画红线,比缺省设置更美观 "
    """"""""""""""""""""""""""""""""""
    set spell spelllang=en_us
    setlocal spell spelllang=en_us
    highlight clear SpellBad
    highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
    highlight clear SpellCap
    highlight SpellCap term=underline cterm=underline
    highlight clear SpellRare
    highlight SpellRare term=underline cterm=underline
    highlight clear SpellLocal
    highlight SpellLocal term=underline cterm=underline
    
    """""""""""" END """"""""""""					
  • 相关阅读:
    C++ 引用详解
    QT的UDP组播技术
    idea快捷键
    window10安装不同版本的mysql(5.7和8.0.25)
    第2篇scrum
    结对项目:四则运算(C语言)
    个人项目wc(C语言)
    修改博客园背景,css
    第一次作业
    第4篇 Scrum 冲刺博客(专✌️团队)
  • 原文地址:https://www.cnblogs.com/wzjhoutai/p/7152049.html
Copyright © 2020-2023  润新知