在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. 洛谷——P1958 上学路线_NOI导刊2009普及(6)

    P1958 上学路线_NOI导刊2009普及(6) 题目描述 你所在城市的街道好像一个棋盘,有a条南北方向的街道和b条东西方向的街道.南北方向的a条街道从西到东依次编号为l到a,而东西方向的b条街道从 ...

  2. 2017江苏省省赛 Roads(全局最小割)

    Roads 时间限制: 2 Sec  内存限制: 256 MB提交: 6  解决: 2[提交][状态][讨论版] 题目描述 In ICPCCamp, there are n towns conveni ...

  3. 【推导】【模拟】AtCoder Regular Contest 082 F - Sandglass

    题意:有个沙漏,一开始bulb A在上,bulb B在下,A内有a数量的沙子,每一秒会向下掉落1.然后在K个时间点ri,会将沙漏倒置.然后又有m个询问,每次给a一个赋值ai,然后询问你在ti时刻,bu ...

  4. 【计算几何】【推导】【补集转化】AtCoder Regular Contest 082 E - ConvexScore

    题意:平面上给你N个点.对于一个“凸多边形点集”(凸多边形点集被定义为一个其所有点恰好能形成凸多边形的点集)而言,其对答案的贡献是2^(N个点内在该凸多边形点集形成的凸包内的点数 - 该凸多边形点集的 ...

  5. Problem E: 矩阵鞍点

    AC代码#include<stdio.h> int main() { ][]; ]; int i,j,t,n; while(scanf("%d",&n)!=EO ...

  6. 【OpenJudge9275】【Usaco2009 Feb】【递推】Bullcow

    Bullcow 总时间限制: 12000ms 单个测试点时间限制: 1000ms 内存限制: 131072kB [描述] 一年一度的展会要来临了,农民约翰想要把N(1 <= N <= 10 ...

  7. C#中的as(转)

    as:用于检查在兼容的引用类型之间执行某些类型的转换.    Employee myEmployee = myObject as Employee;    if (myEmployee != null ...

  8. (转)同步IO 异步IO 阻塞IO 非阻塞IO

    同步(synchronous) IO和异步(asynchronous) IO,阻塞(blocking) IO和非阻塞(non-blocking)IO分别是什么,到底有什么区别?这个问题其实不同的人给出 ...

  9. opensuse语言环境和中文输入法

    Auth: JinDate: 20140414 版本:13.1 步骤 1.安装opensuse 语言选择英文 2.设置最近的源 比如sohu,163 3.update 4.Control Center ...

  10. nio教程二

    要使用Selector,得向Selector注册Channel,然后调用它的select()方法.这个方法会一直阻塞到某个注册的通道有事件就绪.一旦这个方法返回,线程就可以处理这些事件,事件的例子有如 ...