zoukankan      html  css  js  c++  java
  • vim编辑器配置修改

    刚上手的vim,黑底白字,看起来笨死了,于是一顿狂找,终于找到了配置方法。

    配置当然要去etc目录下。

    cd /etc/vim

    ls -l                        //找到vimrc文件

    sudo vim vimrc    //注意要用root身份才能修改

    " Vim5 and later versions support syntax highlighting. Uncommenting the next

    " line enables syntax highlighting by default.

    "syntax on

    //取消注释可开默认的启语法高亮

    " If using a dark background within the editing area and syntax highlighting

    " turn on this option as well

    "set background=dark

    //如果背景色是黑色,并开启了语法高亮,则取消注释

    " Uncomment the following to have Vim jump to the last position when
    " reopening a file
    "if has("autocmd")
    "  au BufReadPost * if line("'"") > 1 && line("'"") <= line("$") | exe "normal! g'"" | endif
    "endif

    //取消注释来支持vim打开文件时,光标跳到上次编辑位置

    " Uncomment the following to have Vim load indentation rules and plugins
    " according to the detected filetype.
    "if has("autocmd")
    "  filetype plugin indent on
    "endif

    //取消注释让vim执行自动缩进

    比如最后一项,去掉前面的",就可以了。

    " Uncomment the following to have Vim load indentation rules and plugins
    " according to the detected filetype.
    if has("autocmd")
      filetype plugin indent on
    endif

    最后,vim就成这个样子了。

    当然还可以用一些插件。

     

  • 相关阅读:
    [django]自定义标签和过滤器
    [js]js中6种错误处理机制
    [js] Array.slice和类数组转数组
    [js]this和call.call
    [py]python的time和datetime模块获取星期几
    CentOS 普通用户提升root权限
    CentOS ACL
    CentOS 文件隐藏属性
    CentOS 文件特殊权限SUID,SGID,SBIT
    CentOS 用户管理useradd、usermod等
  • 原文地址:https://www.cnblogs.com/lulipro/p/5054630.html
Copyright © 2011-2022 走看看