function WidthCheck(str, maxLen){ var w = 0; var tempCount = 0; //length 获取字数数,不区分汉子和英文 for (var i=0; i<str.value.length; i++) { //charCodeAt()获取字符串中某一个字符的编码 var c = str.value.charCodeAt(i); //单字节加1 if ((c >= 0x0001 && c <= 0x007e) || (0x
参考资料:http://my.oschina.net/wugaoxing/blog/121281 环境配置:ubuntu 14.10 1.保存下述代码为 sublime_imfix.c 文件 /* sublime-imfix.c Use LD_PRELOAD to interpose some function to fix sublime input method support for linux. By Cjacker Huang <jianzhong.huang at i-soft.co