在windows下拷贝vimrc到Linux,运行vim命令后,出现错误

vim E492: Not an editor command: ^M

原因:

linux的文件换行符为\n,但windows却非要把\r\n作为换行符,所以,vim在解析从windows拷贝到linux的的vimrc时,因为遇到无法解析的\r,所以报错。

使用

For Ubuntu/Debian:

sudo apt-get install tofrodos; sudo ln -s /usr/bin/fromdos /usr/bin/dos2unix

For CentOS, Fedora, ...:

sudo yum install dos2unix

Then use it this way:

dos2unix ~/.vimrc

That should clean all CRLF from the file

E492: Not an editor command: ^M的更多相关文章

  1. [Ubuntu ] Vim Error E492 - Not an editor command: PluginInstall

    git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/plugin/Vundle.vim https://stackoverflow.co ...

  2. 关于出现Not an editor command: Bundle '**/*.vim'的解决方案【转】

    转自:https://blog.csdn.net/YHM07/article/details/49717933 操作系统: $ uname -r 2.6.32-573.7.1.el6.x86_64 $ ...

  3. Vim 学习

    主要分为三种模式: 一般模式 编辑模式 命令行模式 光标的移动 单词级 比单纯的逐个字符的移动,效率要高 w or W 向移动到下一单词开头 ★★ b or B 向左移动到单词开头 ★★ 块级 gg文 ...

  4. Django 开发blog未完待续

    [root@sishen simpleblog]# python3.5 Python 3.5.4 (default, Sep 20 2017, 20:37:45) [GCC 4.4.7 2012031 ...

  5. 【Python开发】python集成开发环境IDE搭建

    http://blog.csdn.net/pipisorry/article/details/39854707 使用的系统及软件 Ubuntu / windows Python 2.7 / pytho ...

  6. arcmap Command

    The information in this document is useful if you are trying to programmatically find a built-in com ...

  7. CodeForces 670E Correct Bracket Sequence Editor(list和迭代器函数模拟)

    E. Correct Bracket Sequence Editor time limit per test 2 seconds memory limit per test 256 megabytes ...

  8. cf670E Correct Bracket Sequence Editor

    Recently Polycarp started to develop a text editor that works only with correct bracket sequences (a ...

  9. Codeforces Round #350 (Div. 2) E. Correct Bracket Sequence Editor 线段树模拟

    E. Correct Bracket Sequence Editor   Recently Polycarp started to develop a text editor that works o ...

随机推荐

  1. POJ 3660 Cow Contest (dfs)

    Cow Contest Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11129   Accepted: 6183 Desc ...

  2. cpu亲和性绑定

    将进程与cpu绑定,最直观的好处就是减少cpu之间的cache同步和切换,提高了cpu cache的命中率,提高代码的效率.从cpu架构上,NUMA拥有独立的本地内存,节点之间可以通过互换模块做连接和 ...

  3. 微软移除Visual Studio 2015中的UML

    微软已经在Visual Studio 2015中移除了UML(Unified Modeling Language,统一建模语言),原因是该语言使用率过低.因此微软要优化产品结构,把好钢用在刀刃上. V ...

  4. Xamarin XAML语言教程模板页面TemplatedPage

    Xamarin XAML语言教程模板页面TemplatedPage 模板页面TemplatedPage 在上文中我们提到了TemplatedPage,它被称为模板页面,用来显示控件模版.Templat ...

  5. Visual Studio Xamarin中找不到iOS模拟器

    Visual Studio Xamarin中找不到iOS模拟器 Visual Studio可以正常连接Mac系统,但是在测试时候,提示以下错误信息:Failed to start iOS Simula ...

  6. 【枚举】【并查集】Gym - 101243F - Vitamins

    题意:有n片药,有三种颜色,白色比红色重,红色比蓝色重,给你一些它们之间的重量关系,比如1>3,2=4之类,问你它们的颜色,如果没法判断的输出?. 先并查集把等于号全缩起来,然后按照大于号建图, ...

  7. 【二分】Codeforces Round #435 (Div. 2) D. Mahmoud and Ehab and the binary string

    题意:交互题:存在一个至少有一个0和一个1的长度为n的二进制串,你可以进行最多15次询问,每次给出一个长度为n的二进制串,系统返回你此串和原串的海明距离(两串不同的位数).最后要你找到任意一个0的位置 ...

  8. Spring AOP动态代理

    出现org.springframework.aop.framework.ProxyFactoryBean cannot be cast to 错误 在类型转换的时候, 调用getObject()方法, ...

  9. 20172333 2017-2018-2 《Java程序设计》第5周学习总结

    20172333 2017-2018-2 <Java程序设计>第5周学习总结 教材学习内容 1.if语句.if-else语句.switch语句 都是通过对于布尔表达式的结果来进行是否执行下 ...

  10. window下命令行的方式安装svn服务端

    下载Binary Packages类型的 安装文件  https://www.visualsvn.com/server/download/  自己选择版本 第一步 :开始安装到 c:/software ...