vim:放弃hjkl
vim放弃使用hjkl,可以加快文本的编辑速度,不信,看我摘录的文章:http://vimcasts.org/blog/2013/02/habit-breaking-habit-making/
Wordwise motions are 5x faster than h
and l
The w
, b
, e
, and ge
commands allow us to move forward or backward to the start or end of a word. The W
, B
, E
, and gE
commands do the same for a WORD (see :help word for the difference between words and WORDs). If we say that the average word length is 5 letters, then moving back and forward a word at a time is approximately five times faster than using h
and l
to move a character at a time.
Start off by adding w
and b
to your repertoire. These move forward and back to the start of a word. When you find yourself wanting to get to the end of a word, add e and ge to your repertoire.
Character search is near-instant for moving within a line
The f
, F
, t
, T
, ;
, and ,
commands make up the suite of character search motions. When you press f{char}
, Vim looks forward from the cursor position for the next occurrence of {char}
on the current line. If it finds a match, the cursor moves directly there. If no match is found, nothing happens. (Vim might beep at you, but you can mute that by setting ‘visualbell’.)
Try this: in Vim, move your cursor to the beginning of a line with lots of text on it. Look ahead for a character that occurs with low frequency, such as a punctuation mark or uppercase letter. Press f
followed by the character that you picked. That’s two keystrokes. Are you there yet?
If your cursor stopped on a match before the one you were aiming for, press ; to repeat the search. Keep pressing ; until you hit your mark. If you overshoot, press , to reverse the search.
谷歌翻译加手动调整,没有全部翻译,把我认为的废话删了:)
单词移动比h和l快5倍
w,b,e和ge命令:允许我们向前或向后移动到单词的开头或结尾。 W,B,E和gE命令对WORD执行相同的操作(在vim中键入 :help word以获取word和WORD之间的区别)。如果我们说平均单词长度是5个字母,那么一次向前和向后移动一个单词大约比使用h和l一次移动一个单词快五倍。
字符搜索几乎可以瞬时移动
f,F,t,T ,;和命令组成了一系列字符搜索动作。当您按f {char}时,Vim会从当前行的下一个{char}出现的光标位置向前看。如果找到匹配,则光标直接移动到那里。如果没有找到匹配,则没有任何反应。 (Vim可能会发出哔哔声,但你可以通过设置'visualbell'来静音。)
如果你的光标在你想要的字符前面,请按;重复搜索。继续按下;直到你达到你找的字符。如果按过了,请按,以向前搜索。
vim:放弃hjkl的更多相关文章
- 001为什么Linux使用~作为家目录?为什么vim用hjkl作为方向键?
- 跟我一起学习VIM
跟我一起学习VIM - The Life Changing Editor 前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教程.虽然准备有限,但分享过程中大家大多带着一种惊叹 ...
- 跟我一起学习VIM - The Life Changing Editor
前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教程.虽然准备有限,但分享过程中大家大多带着一种惊叹的表情,原来编辑器可以这样强大,这算是对我多年来使用VIM的最大鼓舞吧.所以分 ...
- 【转载】跟我一起学习VIM - vim插件
目录 写在前面:Life Changing Editor 什么是VIM 为什么选VIM 为什么选其它 为什么犹豫选择它们 VIM >= SUM(现代编辑器) 如何学习VIM 一秒钟变记事本 VI ...
- (转载)跟我一起学习VIM - The Life Changing Editor
原文: http://ju.outofmemory.cn/entry/79671 前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教程.虽然准备有限,但分享过程中大家大多带着一种 ...
- 跟我一起学习VIM - vim插件合集
2016-06-14 15:04 13333人阅读 评论(0) 收藏 举报 分类: Linux(104) 目录(?)[+] 前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教 ...
- 代码编辑器[0] -> Vim/gVim[3] -> 像编程一样使用Vim
像编程一样使用Vim 目录 为什么是Vim / Why Vim 从hjkl开始上路 -- 使用基本按键进行移动和编辑 / Start from <hjkl> 一次超速和翻车的体验 -- 使 ...
- Vim 编辑器及其基本操作
实验楼某些课程有用 Vim 编辑器来写代码,因此有了这篇博客,据说是上古神器,当然主要目的是基本操作. Vim 编辑器 Vim(Vi IMprove) 是 Linux 系统上的最著名的文本/代码编辑器 ...
- 又来折腾Linux
硬盘坏了之后就没装过Linux了,因为弄了一个很老的台式机的80G并口硬盘,根本不够用的,一直懒得理. 前段时间实验室的老机子得报销了,但是里面的东西还可以拆下来,所以又拆下了两个硬盘,这样就有三个8 ...
随机推荐
- docker 启动MySQL
Docker启动mysql的坑2 正确启动mysql: docker run -p 3306:3306 --name mysql02 -e MYSQL_ROOT_PASSWORD=123456 - ...
- log4j平稳升级到log4j2
一.前言 公司中的项目虽然已经用了很多的新技术了,但是日志的底层框架还是log4j,个人还是不喜欢用这个的.最近项目再生产环境上由于log4j引起了一场血案,于是决定升级到log4j2. 二.现象 虽 ...
- TF-IDF算法解释
http://www.ruanyifeng.com/blog/2013/03/tf-idf.html
- [Python]Flask 源代码分析-config
flask有一个Config类,含from_object, from_pyfile, from_environ等载入命名空间的方法.载入命名空间的本质是载入一个dict[key]=value的字典. ...
- emoji
嗯...闲的... emoji:(博客园的markdown支持emoji编码...惊了) http://getemoji.com/ http://www.fhdq.net/emoji/emojifuh ...
- Spring使用笔记(四) 面向切面的Spring
面向切面的Spring 一.面向切面的概念 在软件开发中,散布于应用多处的功能被称为横切关注点(cross-cutting concern). 通常来讲这些横切关注带点从概念上来讲是与应用逻辑相分离的 ...
- 4535 ACM 礼尚往来 数学排列组合
题目:http://acm.hdu.edu.cn/showproblem.php?pid=4535 题意:每个礼物都不相同的组合个数 数学规律: 将每个女友排序为1···n,对应的女友送男友的礼物排序 ...
- servlet模板的修改
找到myeclipse的安装目录: 找到此目录下的这个jar包 右键以压缩包的方式打开然后找到templates文件夹并打开它: 在打开的templates文件夹找到并以高级记事本打开Servlet. ...
- npm install 提示权限不足 Error: EPERM: operation not permitted, unlink XXX
问题 使用npm install时提示权限不足 原因 这里原因有两个: 没有管理员权限访问C盘下npm路径导致下载失败. NPM官网没有下载权限. 解决方案 第一原因 这里可以使用管理员身份执行以下命 ...
- [P2850][USACO06DEC]虫洞Wormholes (最短路)
死活调不出来 后来是发现这题建边的原因…… 吐血.jpg 所谓的虫洞传说也就是负边了 然后这里打的spfa和原来的不一样 感觉hzwer大佬的spfa好强啊…… 也更易写一点 贴代码 #include ...