这个是一个更详细的vim的配置了

也是我非常喜欢的

不过vim下函数还是不能高亮啊。。。。

可以直接把这文件复制下来覆盖vimrc用了= =

" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below.  If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed.  It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option." This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
if has("syntax")syntax on
endif" 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" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
"  filetype plugin indent on
"endif" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd        " Show (partial) command in status line.
"set showmatch        " Show matching brackets.
"set ignorecase        " Do case insensitive matching
"set smartcase        " Do smart case matching
"set incsearch        " Incremental search
"set autowrite        " Automatically save before commands like :next and :make
"set hidden             " Hide buffers when they are abandoned
"set mouse=a        " Enable mouse usage (all modes)" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")source /etc/vim/vimrc.local
endif"当文件在外部被修改时,自动重新读取
set autoread"设定默认解码
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936"history文件中需要记录的行数
set history=500"在处理未保存或只读文件的时候,弹出确认
set confirm"与windows共享剪贴板
set clipboard+=unnamed "侦测文件类型
filetype on"载入文件类型插件
filetype plugin on "为特定文件类型载入相关缩进文件
filetype indent on set completeopt=longest,menu"保存全局变量
set viminfo+=! "带有如下符号的单词不要被换行分割
set iskeyword+=_,$,@,%,#,- "不要生成swap文件,当buffer被丢弃的时候隐藏它
setlocal noswapfile
set bufhidden=hide "字符间插入的像素行数目
set linespace=0"增强模式中的命令自动完成操作
set wildmenu"在状态行上显示光标所在位置的行号和列号
set ruler
set rulerformat=%20(%2*%<%f%=\ %m%r\ %3l\ %c\ %p%%%) "命令行(在状态行下)的高度,默认为1,这里是2
set cmdheight=2"通过使用:commands命令,告诉我们文件的哪一行被改变过
set report=0"在被侵害的窗口间显示空白,便于阅读
set fillchars=vert:\ ,stl:\ ,stlnc:\ "在搜索时,输入的词句的逐字符高亮
set incsearch"输入:set list 命令是应该是显示些啥?
set listchars=tab:\|\ ,trail:.,extends:>,precedes:<,eol:$ "不要闪烁
set novisualbell"状态行显示的内容(包括文件类型和解码)
"set statusline=%F%m%r%h%w\[POS=%l,%v][%p%%]\%{strftime(\"%d/%m/%y\ -\ %H:%M\")} "总是显示状态行
"set laststatus=2"自动格式化
set formatoptions=tcrqn set hlsearch"半透明设置
au GUIEnter * call libcallnr("vimtweak.dll", "SetAlpha", 234)"把空格变成 : 
nmap <space> :"显示命令
set showcmdset magicset ai              " 自动缩进
set si              " 智能缩进
inoremap <leader>1 ()<esc>:let leavechar=")"<cr>i
inoremap <leader>2 []<esc>:let leavechar="]"<cr>i
inoremap <leader>3 {}<esc>:let leavechar="}"<cr>i
inoremap <leader>4 {<esc>o}<esc>:let leavechar="}"<cr>O
inoremap <leader>q ''<esc>:let leavechar="'"<cr>i
inoremap <leader>w ""<esc>:let leavechar='"'<cr>i:inoremap ( ()<ESC>i
:inoremap ) <c-r>=ClosePair(')')<CR>
:inoremap { {<CR>}<ESC>O
:inoremap } <c-r>=ClosePair('}')<CR>
:inoremap [ []<ESC>i
:inoremap ] <c-r>=ClosePair(']')<CR>
:inoremap " ""<ESC>i
:inoremap " <c-r>=ClosePair('"')<CR>
:inoremap ' ''<ESC>i
:inoremap ' <c-r>=ClosePair(''')<CR>
function ClosePair(char)if getline('.')[col('.') - 1] == a:charreturn "\<Right>"elsereturn a:charendif
endfunctionset nobackup
"set ecnoding=utf-8
"set encoding=utf-8 fileencoding=ucs-bom,utf-8,cp936set tags=/home/hjw951/arm/linux-2.6.12/tagssyntax enable
set guifont=Courier_New:h11:cANSI
colorscheme evening
syntax on
set tabstop=4      "制表符为4
"统一缩进为4
set softtabstop=4
set shiftwidth=4set cindent      "使用C样式的缩进set showmatch            "高亮显示匹配的括号
set matchtime=5          "匹配括号高亮的时间(0.1s)
set smartindent            "为C程序提供自动缩进
set shiftwidth=4        "»»ÐÐʱ,œ»ŽíʹÓÃ4žö¿Õžñ
set autoindent            "继承前一行的缩进方式,特别适用于多行注释
set ai!                    "ÉèÖÃ×Ô¶¯Ëõœøset cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s
set nu
if &term=="xterm"set t_Co=8set t_Sb=^[[4%dmset t_Sf=^[[3%dm
endifset nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswinset diffexpr=MyDiff()
function MyDiff()let opt = '-a --binary 'if &diffopt =~ 'icase' | let opt = opt . '-i ' | endifif &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endiflet arg1 = v:fname_inif arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endiflet arg2 = v:fname_newif arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endiflet arg3 = v:fname_outif arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endiflet eq = ''if $VIMRUNTIME =~ ' 'if &sh =~ '\<cmd'let cmd = '""' . $VIMRUNTIME . '\diff"'let eq = '"'elselet cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'endifelselet cmd = $VIMRUNTIME . '\diff'endifsilent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

转载于:https://www.cnblogs.com/louzhang/archive/2012/07/03/2575110.html

vim的学习笔记(3)相关推荐

  1. DMU软件 语法高亮 vim设置--学习笔记6

    用vim编程时, DMU的关键词没有语法高亮, 看着不舒服, 就进行一下设置, 并记录过程. 设置的效果如下 设置流程 本次设置的比较简单, 将关键词分为: 模型model, 比如DMU1, DMU2 ...

  2. Linux 中vim编辑器学习笔记

    vim是Linux是非常常用的编辑器,也是编程开发中的神器之一.接下来,是我学习vim编辑器的一些笔记,总结如下: 首先:我们接触的vim编辑器一共有三种模式,分别为命令模式.编辑模式.末行模式. 具 ...

  3. 【Vim】学习笔记day02 Vim的三级窗体切换

    系列说明 本系列为学习随笔, 记录个人觉得容易遗忘的重点内容, 全面的指南请star项目 GitHub上的Learn-Vim 本文是ch 的内容笔记 新手写作, 若有错误的地方, 恳请读者指正, 先行 ...

  4. 【Vim】学习笔记四 多文件编辑、可视模式、视窗操作

    文章目录 1. 多文件编辑 (1) 使用vim编辑多个文件 (2) 进入vim后打开新文件 (3) 恢复文件 2. 可视模式命令简介 3. 视窗操作 (1) 视窗操作简介 4. 创建加密文档 5. 在 ...

  5. mac vim python3_VIM学习笔记 编译源码(Compile Code)-Python

    Python作为一种解释型编程语言,需要解释器来编译并执行Python代码. 测试Python 对于Linux和Mac操作系统,均已预装Python.而在Windows下,可以使用安装包或者直接解压版 ...

  6. linux io100的原因_Linux学习笔记(九)软件包管理

    Linux基础学习笔记精选专栏 目前本专栏包含的内容有: Linux学习笔记(一)使用文本编辑器Vim Linux学习笔记(二)系统基础操作 Linux学习笔记(三)文件和文本的查看 Linux学习笔 ...

  7. DMU-单性状重复力模型-学习笔记3

    单性状重复力模型 本次主要是演示如何使用DMU分析单性状重复力模型. 重复力模型和动物模型的区别: 不是所有的性状都可以分析重复力模型, 首先重复力模型是动物模型的拓展, 它适合一个个体多个观测值的情 ...

  8. DMU-参数介绍-学习笔记1

    DMU软件介绍 DMU是一个数量遗传学工具包,主要功能包括估计方差组分和固定效应,预测育种值.DMU的开发历史可以追溯到25年前,大部分功能基于数量遗传学研究的需求而开发.在丹麦动物育种研究中,DMU ...

  9. DMU-多性状动物模型-学习笔记4

    多性状动物模型 本次主要是演示如何使用DMU分析多性状动物模型. 数据使用learnasreml包中的数据 learnasreml是我编写的辅助学习asreml的R包, 里面有相关的数据和代码, 这里 ...

  10. VIM学习笔记 配置文件(vimrc)

    为什么80%的码农都做不了架构师?>>>    VIM学习笔记 配置文件(vimrc) 在vim启动过程中,首先将查找配置文件并执行其中的命令.而这些初始化文件一般有vimrc.gv ...

最新文章

  1. cas跨域单点登录原理_CAS实现SSO单点登录原理
  2. 跨页数据传递的两种方式
  3. pandas用均值填充nan_python – 如何用pandas中的滚动平均值填充nan值
  4. 鲲鹏服务器php性能,对鲲鹏服务器的内存进行性能优化后的前后数据对比
  5. Assembly Essence-- 程序集深入探讨:程序集结构及部署
  6. mysql 传输表空间_Oracle传输表空间总结
  7. 深度学习(目标检测。图像分割等)图像标注工具汇总
  8. 同一个路由器下的不同网段如何实现ping通
  9. IDEA主题设置,自定义主题
  10. 【资料分享】STM32配置TB6612驱动程序详解
  11. Java类加载机制由浅入深
  12. 大数据开发比赛echarts所有要学习的主要图表 简单化 得分点
  13. Xilinx Zynq实现任意波形发生器仿真
  14. 小块渲染VS渐进式渲染
  15. asp毕业设计——基于asp+access的仓储物流管理系统设计与实现(毕业论文+程序源码)——仓储物流管理系统
  16. Java 对类的重命名
  17. 实现SSR服务端渲染
  18. 罗甸脐橙|“橙”心实意——礼誉生态农业
  19. 【ECCV2016论文速读】回归框架下的人脸对齐和三维重建
  20. 视频监控分屏简单例子

热门文章

  1. yarn-site.xml相关配置参数
  2. js Math对象属性和方法
  3. 听我讲完 redo log、binlog 原理,面试官老脸一红!
  4. 用了几年的 Fastjson,我最终替换成了Jackson!
  5. 看看华为 Java 编程的军规...
  6. 产品经理改需求这件事
  7. html 二级菜单延迟消失,让HTML5通知在延迟后消失? - Let HTML5 Notification disappear after a delay? - 开发者知识库...
  8. ios时间相差多少天_iOS 时间戳和时间互换,计算两日期相隔天数
  9. 外星人台式电脑_2020年双11:高端电竞游戏笔记本电脑本推荐:联想、惠普、雷神、ROG、外星人等品牌游戏本挑选指南...
  10. Obejctive-C 2.0 Mac和iOS开发实践指南(Objective-C 2.0最佳入门指南)