zoukankan      html  css  js  c++  java
  • 设置win版vim启动项[利刃篇]

      vim默认启动设置有时不太好,想改一下,但是又不像windows其他软件那样,界面设置后就生效,这里需要手动设置文件才可以,那就赶紧设置一下吧!

      修改文件为 vim安装目录/_vimrc 文件,或者在界面打开 编辑 > 启动设置。

      修改项:

      设置主题: colorscheme 主题的名字 ”例 colorscheme darkblue

      显示行号:set number

      启动最大化:

      if has('gui_running') && has("win32")
        au GUIEnter * simalt ~x
      endif

      不生成~备份文件(烦): set nobackup

    gvim有自己的默认设置,如下为其基本设置,需要的自己研究下!!

    set nocompatible
    source $VIMRUNTIME/vimrc_example.vim
    source $VIMRUNTIME/mswin.vim
    behave mswin
    
    set diffexpr=MyDiff()
    function MyDiff()
      let opt = '-a --binary '
      if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
      if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
      let arg1 = v:fname_in
      if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
      let arg2 = v:fname_new
      if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
      let arg3 = v:fname_out
      if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
      let eq = ''
      if $VIMRUNTIME =~ ' '
        if &sh =~ '<cmd'
          let cmd = '""' . $VIMRUNTIME . 'diff"'
          let eq = '"'
        else
          let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . 'diff"'
        endif
      else
        let cmd = $VIMRUNTIME . 'diff'
      endif
      silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
    endfunction
    color ron
    if has('win32')
        au GUIEnter * simalt ~x
    else
        au GUIEnter * call MaximizeWindow()
    endif
    set nu
    "set encoding=utf8
    set encoding=utf-8
    set fileencodings=utf-8,chinese,latin-1
    if has("win32")
    set fileencoding=chinese
    else
    set fileencoding=utf-8
    endif
    "解决菜单乱码
    source $VIMRUNTIME/delmenu.vim
    source $VIMRUNTIME/menu.vim
    "解决consle输出乱码
    language messages zh_CN.utf-8
    "不生成备份文件
    set nobackup

      更多设置命令请参考 网友博客 http://blog.csdn.net/kissmonx/article/details/9995301

  • 相关阅读:
    C#监听文件
    用bootstrapValidator来验证UEditor
    .net 在不同情况下调用带soapheader的webservice的方式
    MyBatis1
    随堂笔记2
    数学复习笔记 2018年-2019年
    药方
    随堂笔记一
    友谊藏在门背后,2
    友谊藏在门背后
  • 原文地址:https://www.cnblogs.com/yougewe/p/4984590.html
Copyright © 2011-2022 走看看