it is a long time confusing me that why my customized key map in vim does not work? Some vim configuration contents in "/etc/vimrc" are as the following:

"在insert mode下也可以 快速移动到行尾和行首"
imap <c-l> <esc>A
inoremap jj <esc>ji
inoremap kk <esc>ki
inoremap hh <esc>ha

After experiencing many times, i suddenly/brusquely recognize that this issue may be caused by the compatibility between vi and vim. In vi mode, everything such as "<", ">", has no special meanings. Therefore, a map like "imap c-l e scA", "e sc" will be interpreted to their original and literal charater expression. That is to say, "e sc" will be displayed "e sc" and not be translated into a "normal mode" command.

And, vim program starts in vi compatible mode by default.

So, make sure to set "no compatible" command and keep it before any key map commands.

vim does not map customized key?的更多相关文章

  1. 理解ThreadLocal —— 一个map的key

    作用: 当工作于多线程中的对象使用ThreadLocal维护变量时,threadLocal为每个使用该变量的线程分配一个独立的变量副本. 接口方法: protected T initialValue( ...

  2. VIM键盘映射 (Map)~转载

    VIM键盘映射 (Map) 设置键盘映射 使用:map命令,可以将键盘上的某个按键与Vim的命令绑定起来.例如使用以下命令,可以通过F5键将单词用花括号括起来: :map <F5> i{e ...

  3. Java Map按键(Key)排序和按值(Value)排序

    Map排序的方式有很多种,两种比较常用的方式:按键排序(sort by key), 按值排序(sort by value).1.按键排序jdk内置的java.util包下的TreeMap<K,V ...

  4. Android 对Map按key和value分别排序

    一.理论准备 Map是键值对的集合接口,它的实现类主要包括:HashMap,TreeMap,Hashtable以及LinkedHashMap等. TreeMap:基于红黑树(Red-Black tre ...

  5. Java Map 按Key排序和按Value排序

    Map排序的方式有很多种,这里记录下自己总结的两种比较常用的方式:按键排序(sort by key), 按值排序(sort by value). 1.按键排序 jdk内置的java.util包下的Tr ...

  6. 对Map按key和value分别排序

    一.理论准备         Map是键值对的集合接口,它的实现类主要包括:HashMap,TreeMap,Hashtable以及LinkedHashMap等.         TreeMap:基于红 ...

  7. 指针做MAP的KEY的TEST

    用struct做map的key会需要"operator <"等等,还会出现奇怪的问题可能. 试了下用指针做key,看看效果: #include <iostream> ...

  8. 关于set或map的key使用自定义类型的问题

    我们都知道set或map的key使用自定义类型时必须重载<关系运算符 但是,还有一个条件,所调用重载的小于操作符,使用的对象必须是const 而对象调用的方法也必须是const的 1 #incl ...

  9. 获取Map API Key

    开发人员在基于Google Maps服务进行开发之前,需要申请一组验证过的Map API Key,这样才可以使用Google Maps服务.申请过程如下:1.在Eclipse中打开“Window”|“ ...

随机推荐

  1. bzoj3283: 运算器

    #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #i ...

  2. CodeForces 125E MST Company

    E. MST Company time limit per test 8 seconds memory limit per test 256 megabytes input standard inpu ...

  3. type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object

    今天在进行代码检查的时候出现下面的异常: type parameters of <T>T cannot be determined; no unique maximal instance ...

  4. Code笔记之:对使用zend加密后的php文件进行解密

    对使用zend加密后的php文件进行解密 使用zend加密后的php文件用notpad++打开会出现类似的乱码 下面使用解密工具进行解密 http://pan.baidu.com/s/1i3n4ysX ...

  5. f.lux for Linux安装

    1.安装f.luxsudo add-apt-repository ppa:kilian/f.lux sudo apt-get update sudo apt-get install fluxgui 2 ...

  6. hibernate----(Hql)另一种查询---利用Criteria类

    package com.etc.test; import java.util.List; import org.hibernate.Criteria;import org.hibernate.Sess ...

  7. CSS3的transition动画功能

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  8. 为什么springMVC和Mybatis逐渐流行起来了?

    http://www.zhihu.com/question/36032573 https://github.com/bingoohuang/eql

  9. <摘录>如何在64位linux强制编译32位应用程序

    GDC注:因为需要解决在linux64机上编译32位的mongodb(没办法,因为编译的php是32位,然后我想将mongdb扩展添加到php中),在网上搜了很多文章,感觉这篇好懂,而且好用.我使用的 ...

  10. Android学习笔记——TableLayout

    该工程的功能是实现在一个activity中显示一个表格 以下代码是MainActivity.java中的代码 package com.example.tablelayout; import andro ...