一个包含通用选项的 ~/.vimrc

~/.vimrc
" .vimrc
" 参见: http://vimdoc.sourceforge.net/htmldoc/options.html 获取更多信息set nocompatible  "非兼容模式,使用vim高级特性
" 对于多字节字符支持 (如 CJK 支持):
"set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1set tabstop=4       " 文件中一个 <Tab> 占据的空格数。set shiftwidth=4    " 每一级自动缩进的空格数。set expandtab       " 使用合适数目的空格插入 <Tab>." 当 '自动缩进' 打开时使用 '>' 和 '<' 命令来用空格缩进" 当 'expandtab' 打开时使用 CTRL-V <Tab> 来插入tab.set smarttab        " 当打开时,行首的 <Tab> 会按照 'shiftwidth' 插入空白" 在其他地方使用 'tabstop'" 一个 <退格> 会删除行首的一个 'shiftwidth' 大小的空格set showcmd         " 在状态栏中显示(部分)命令。set number          " 显示行号。set showmatch       " When a bracket is inserted, briefly jump to the matching" one. The jump is only done if the match can be seen on the" screen. The time to show the match can be set with" 'matchtime'.set hlsearch        " 当有一个符合之前搜索的值时,高亮所有匹配set incsearch       " 当输入搜索命令时,离开显示符合与目前输入的模式匹配的内容set ignorecase      " 在搜索中忽略大小写set smartcase       " 如果搜索中有大写字符,忽略 'ignorecase' 选项set backspace=2     " Influences the working of <BS>, <Del>, CTRL-W" and CTRL-U in Insert mode. This is a list of items," separated by commas. Each item allows a way to backspace" over something.set autoindent      " 当开始新行时复制当前行的缩进" (typing <CR> in Insert mode or when using the "o" or "O"" command).
set cindent         " 针对C语言的自动缩进
set textwidth=79    " Maximum width of text that is being inserted. A longer" line will be broken after white space to get this width.set formatoptions=c,q,r,t " This is a sequence of letters which describes how" automatic formatting is to be done."" letter    meaning when present in 'formatoptions'" ------    ---------------------------------------" c         Auto-wrap comments using textwidth, inserting"           the current comment leader automatically." q         Allow formatting of comments with "gq"." r         Automatically insert the current comment leader"           after hitting <Enter> in Insert mode. " t         Auto-wrap text using textwidth (does not apply"           to comments)set ruler           " 显示当前光标位置的行号和列号,用逗号分割set background=dark " 当设置为 "dark" 时,Vim 会尝试使用在暗色背景中合适的颜色。" 当设置为 "light" 时,Vim 会尝试使用在亮色背景中合适的颜色。" 其他值是非法的set mouse=a         " 启用鼠标的使用filetype plugin indent on
syntax on

VIM / .vimrc相关推荐

  1. 强悍的 Vim —— .vimrc(vim 配置文件)

    除了 ~/.vimrc 配置文件,在 /etc/vim/ 下还有配置文件 vimrc(/etc/vim/vimrc) 0. 常规配置 vim显示行号.语法高亮.自动缩进.添加下划线的设置 显示行号:s ...

  2. 【解决】source ~/.vimrc出错bash: /etc/vim/vimrc: line 21: syntax error near unexpected token `syntax'

    执行了"source ~/.vimrc"后,一直报如下错误: bash: All system-wide defaults are set in /debian.vim and s ...

  3. vim ~/.vimrc

    set nu "显示行号 set nowrap "不换行 set shiftwidth=4 "默认缩进4个空格 set softtabstop=4 "使用tab ...

  4. Mac下配置VIM .vimrc

    1.下载第三方vim主题文件放在~/.vim/colors目录下,没有该目录请自行创建 2.在用户目录下新建.vimrc并使用vim打开文件,添加以下内容: 1 setnocompatible &qu ...

  5. [VIM].vimrc設置詳解---配置你的vim

    本文摘自:phpchina折腾王独家配置,灰常牛叉的一套vim配置,另附有详细注释,自己折腾vim的时候可以参照其中的大部分设置进行一些个性化定制. "是否兼容VI,compatible为兼 ...

  6. vim .vimrc 以及securecrt home end 键

    A.  ~/.vimrc  文件 该文件能控制vim的格式,如果没有可以在/etc/vimrc试试 set nocompatible set backspace=indent,eol,start se ...

  7. linux环境编程vimrc,vim设置/etc/vim/vimrc文件

    Linux下vim编辑器(.vimrc文件) 在终端下使用vim进行编辑时,默认情况下,编辑的界面上是没有显示行号.语法高亮度显示.智能缩进等功能的.为了更好的在vim下进行工作,需要手动设置一个配置 ...

  8. vim: vimrc

    2019独角兽企业重金招聘Python工程师标准>>> 打造vim C++IDE http://blog.csdn.net/doc_sgl/article/details/47205 ...

  9. sah服务器怎么修改vim,vim 编辑器(修改/etc/vim/vimrc即可)

    " 不要使用vi的键盘模式,而是vim自己的 set nocompatible " 语法高亮 syntax on " 去掉输入错误的提示声音 set noeb " ...

最新文章

  1. DayDayUp:2019.12.30吴晓波2020年终秀演讲《预见2020:来海边,拾起信心》读后有感
  2. oss导出数据为空时怎么处理_sql数据库导出空库的搜索结果-阿里云开发者社区...
  3. Java实现冒泡排序动画展示
  4. 使用左 右 全 内连接及使用where条件语句的区别
  5. 格力又双叒发福利了 将给所有员工交电话费!
  6. FIT2CLOUD飞致云发布DataEase开源数据可视化分析平台
  7. FAT32 文件系统 实践
  8. OpenPose 参数说明
  9. 利用laravel框架创建todos
  10. DRAM Failures(漏电流与寄生电容)
  11. linux服务器默认使用中文字符集zh_CN.UTF-8
  12. 微软bi报表服务器,为 Power BI 报表服务器创建 Power BI 报表
  13. C++ - Copy Elision
  14. python进阶day6
  15. 运维笔记(三)服务器介绍和XShell使用
  16. html总微软雅黑怎么设置,css怎么设置字体为微软雅黑
  17. 牛客网笔试系统ACM模式下的程序输入格式总结
  18. ImageButton边框问题
  19. sublime text 3 支持gbk及gb2312编码
  20. mysql备份之ZMR应用

热门文章

  1. Floyd算法与Dijkstra算法的区别
  2. linux tomcat定时重启服务
  3. civil marriage是什么意思和marriged有什么区别 secondary / secondary spacial是什么教育程度
  4. 【数据结构和算法】动图详解,链表(单链表/双链表……)(实例讲解)
  5. 2.1 探索性数据分析【斯坦福21秋季:实用机器学习中文版】
  6. python鬼屎表达式
  7. 电脑计算机c盘打不开怎么办,c盘打不开怎么办【解决方法】
  8. 我们曾经在广州北站综合交通枢纽的开发项目里,搞了点厉害的东西
  9. Windows支持多用户远程桌面同时连接的版本有哪些?
  10. Trias CEO阮安邦博士受聘为玉环市科技智库专家