set nobackup
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
:color desert
set nu!
set history=1000 "记录历史的行数
syntax on "语法高亮度显示
set autoindent "vim使用自动对齐,也就是把当前行的对齐格式应用到下一行(自动缩进)
set tabstop=4 "设置tab键为4个空格,
set ai! " 设置自动缩进

set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

vimrc for windows的更多相关文章

  1. windows下安装tern for vim

    操作系统:windows8.1 64位 vim:gvim7.4   1.下载tern for vim,去官网直接下载,连接好像都是到github上(https://github.com/marijnh ...

  2. 【转】Gvim配置(Windows and Linux)for C++

    转载地址:http://blog.csdn.net/onepiecehuiyu/article/details/8934366 http://mawenhao19930620.blog.163.com ...

  3. windows下的_vimrc

    折腾了一天 在https://keelii.github.io/2016/06/13/awsome-window-vimrc/的基础上进行了一些改动 " ------------------ ...

  4. 打开gvim发现菜单栏是乱码

    默认安装将会把中文区域设置为zh_CN.utf8,而GVim能识别的中文区域设置为zh_CN.UTF-8.因此GVim会在启动时报错,且 无法正常加载中文菜单.解决方案:Linux下编辑 ~/.vim ...

  5. vi-11

    vi编辑器linux命令大全 作者:xiaoru  出处:本站整理  发布时间:2013-04-29 13:20:23 -     vi就是linux命令行下的最著名的编辑器之一,Vim常被称作“程序 ...

  6. Vim文本编辑器 指令簿(二)

    常常处理文本以及常常须要写代码的人,都会有自己比較常常使用的编辑器,本人喜欢用Vim.理由就是Vim编辑器灵活,而且能够达到纯键盘操作,使用纯熟情况下,根本不须要鼠标操作.听起来是不是非常酷的?只是别 ...

  7. 最佳vim技巧

    最佳vim技巧----------------------------------------# 信息来源----------------------------------------www.vim ...

  8. 程序员的编辑器——VIM

    from:http://blog.chinaunix.net/uid-11278770-id-148579.html Chinaunix首页 | 论坛 | 认证专区 | 博客 登录 | 注册      ...

  9. vim 打开乱码

    首先,你需要搞清楚vimrc所在的位置.一般来说,在linux系统里,应该是这样 Linux: /usr/share/vim/vimrc在Windows系统,应该是在vim的安装目录 Windows: ...

随机推荐

  1. jQuery实现图片轮播

    之前有碰到过jQuery实现列表自动滚动,这次的图片轮播在原理上与之相同,只有一些细微的差别,就是需要在图片的右下角显示当前图片的序号,效果如下: 先看一看html代码,以及对应的css代码: < ...

  2. linux 常用软件安装-目录

    nginx apache php mysql oracle tomcat memcached mongodb sqlserver

  3. Linux 通过 shell 脚本修改密码

    交互方式修改密码 1. ssh 远程到主机: 2. 切换到root账号: [一般都是切换到root进行密码修改,如果普通用户修改自己的密码,要输入原密码,然后新密码要满足复杂度才OK]: 3. pas ...

  4. 编译安装php Cannot find MySQL header files under /usr/include/mysql.

    编译php-5.5-6的mysql支持,出现Cannot find MySQL header files under /usr/include/mysql. Note that the MySQL c ...

  5. Eclipse经验总结

    1.在Project Explorer中显示src.resource目录:通过Project->properties->java Build Path->Source设置 2.解决J ...

  6. linux命令之ps命令

    1.管道 linux命令管道通过|表示.一般在linux命令中|(管道)之前的命令会输出大量的结果,|(管道)之后的命令一般就是带有条件的,只将|前满足条件的结果显示出来. 2.grep命令 grep ...

  7. centos 7 lNMP 安装之php 篇

    1.准备工作 安装依赖包 yum install -y gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype ...

  8. angularjs--$watch、$watchGroup、$watchCollection含义

    angularjs的$watch.$watchGroup.$watchCollection使用方式   如果想在controller里面随时监听一个值的变化那就用$watch <p>    ...

  9. MIT 2012 分布式课程基础源码解析-底层通讯实现

    本节内容和前节事件管理封装是息息相关的,本节内容主要包含的代码在connection{.h, .cc}中. 这里面最主要的有两个类:connection类和tcpsconn类,connetion类主要 ...

  10. Using jQuery to add a dynamic “Back To Top” floating button with smooth scroll

    Ever read a really long blog post or article and then had to scroll all the way up to the top of the ...