vim编辑器配置修改
2015-12-17 16:52
453 查看
刚上手的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就成这个样子了。
当然还可以用一些插件。
配置当然要去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就成这个样子了。
当然还可以用一些插件。
相关文章推荐
- FreeMarker 文档
- 不改变中间层,如何玩转 .NET 的远程处理功能?
- ubuntu15.04 C客户端操作mysql
- 对话框里面有EdiText,而EdiText获取焦点之后,软件盘会盖住对话框,解决问题
- struts2的基本配置
- GameKit的蓝牙开发代码总结
- Android佳博网络打印机例子
- C# - 引用类型、Class、Interface、泛型
- MySQL配置文件my-innodb-heavy-4G.cnf 中文注释
- IT狂人职场路:揭秘华为百度高管如何炼成?
- UVa 11565 - Simple Equations
- Redis面向java的Client
- highcharts做柱状图与曲线图
- genymotion the file is corrupt 无法下载手机虚拟机问题解决办法
- 性能测试分享:jmeter性能监控(一)
- 使用更简单的共享Action
- HDU 1248 寒冰王座 完全背包
- Android之Notification制作多媒体控制器
- java文件上传和下载
- 一个图像高斯模糊的处理类