vim配置文件(本人喜欢的风格)
在/etc/vimrc这个文件
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=utf-8,latin1
endif
set nu
set tabstop=4
set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start " allow backspacing over everything in insert mode
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
" Only do this part when compiled with support for autocommands
if has("autocmd")
augroup redhat
" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
augroup END
endif
if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
if &term=="xterm"
set t_Co=8
set t_Sb=[4%dm
set t_Sf=[3%dm
endif
highlight Comment ctermfg=green guifg=green
vim配置文件(本人喜欢的风格)的更多相关文章
- Ubuntu下更改Vim配置文件打造C/C++风格
转载:Ubuntu下更改Vim配置文件打造C/C++风格 Vim默认的配置使用起来还不能让人满意,还需要自己配置 默认配置文件是:/etc/vim/vimrc我们可以在家目录下建立自己的配置文件切换到 ...
- 我的vim配置文件.vimrc
我的vim配置文件.vimrc map <silent> <F10> :TlistToggle<cr>map <silent> <F8> : ...
- Vim 配置文件===/etc/vimrc
1.替换方法 替换对应的vimrc文件,定制自己的vimrc /etc/vimrc 替换此文件: /home/lmy/.vimrc 只对当前用户有效: Ubuntu9 ...
- Vim配置文件
转载 原文网址:http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim ...
- 转载~vim配置文件
转载自:小码哥的博客 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配置主要有以下优点: 1.按F5可以直接编译并执行C.C++.java代码以及执行shell脚本,按“F8”可进行C. ...
- 【转】强大的vim配置文件,让编程更随意
原文地址:http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配置主 ...
- [转]强大的vim配置文件,让编程更随意
转自:http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配置主要有 ...
- vim 配置文件 ,高亮+自动缩进+行号+折叠+优化
vim 配置文件 ,高亮+自动缩进+行号+折叠+优化 将一下代码copy到 用户目录下 新建文件为 .vimrc保存即可生效: 如果想所有用户生效 请修改 /etc/vimrc (建议先cp一份)& ...
- 实用的VIM配置文件
VIM配置文件名为.vimrc,默认在用户根目录下,或者在命令模式下输入:version可以获取配置文件路径. 在VIM命令行下输入options,然后回车,可以查看VIM所有的参数选项. 双引号&q ...
随机推荐
- Java 拓展之调用其他语言
目前而言,编程语言真的是太多了.每一种都是一种智慧的结晶,但是每个都存在其缺点.网上经常能看到一些程序员争论"XX是世界上最好的语言"之类的话题.其实我们大可不必这样.语言本身只是 ...
- not in 前面/后面存在null值时的处理
表声明 order_header表中有ship_method列: ship_method_map表中ship_method为主键列. 需求 找出order_header表中所有ship_method不 ...
- Struts 1 之文件上传
Struts 1 对Apache的commons-fileupload进行了再封装,把上传文件封装成FormFile对象 定义UploadForm: private FormFilefile; //上 ...
- 18 Ui美化
资源文件的使用: 一: res中文件中放置的文件类型: res/drawable//放处理过的图片 res/drawable-XXX //放的Ui切得图 >res/anim 放动画 >re ...
- [ExtJS5学习笔记]第二十三节 Extjs5中表格gridpanel的列格式设置
本文地址:http://blog.csdn.net/sushengmiyan/article/details/39665979 官方文档:http://docs.sencha.com/extjs/5. ...
- (NO.00005)iOS实现炸弹人游戏(八):游戏主角(一)
大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 最近一直在做另一个RPG游戏,所以本系列迟迟没有更新,上一篇博 ...
- 【一天一道LeetCode】#258. Add Digits
一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder's Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 Given a ...
- 关于大数据时代传统商业存储的思考: 中心存储 VS 分布式存储
尊重原创,转载请注明出处:http://anzhan.me ; http://blog.csdn.net/anzhsoft 今天和我们部门的老大1*1, 大家面对面沟通了一下到新的项目组的想法.而且也 ...
- 关于APP界面布局设计的八种优缺点
学习UI设计的时候,经常要接触到页面的布局,布局的方式会直接影响一个APP的视觉效果,好的布局方式,往往能带来舒服的视觉效果,更能得到用户的接受与好评.然而万变不离其宗,移动端页面常用的布局,不外乎以 ...
- Android 有关于* daemon not running.starting it now on port 5037 *ADB
adb shell时出现以下信息: * daemon not running. starting it now on port5037 * ADB server didn't ACK * fail ...