随笔分类 -  Vim

摘要:Sometimes we want to open another file in the same folder with current editing file, what we can do to avoid typing the whole path?For better understanding, it's better to know the info showing in the table. (when making the table, i learned how to rotate a table in Excel)Now let's see how t 阅读全文

posted @ 2013-08-22 22:29 name2579 阅读(1001) 评论(0) 推荐(0)

摘要:今天在调试一个小脚本时想要注掉几行代码,:(. how?刚接触shell, vim, 还没习惯其思考方式。google了一下,最简单的就是vim中的查找替换了。比如注释掉10到20行::10,20s/^/^#/g又想起来以前看过vim里有个录制宏的功能,温习了一下,步骤如下。将光标移至想要注释掉的第一行行首->ESC->qa->i->#->ESC->j->q qa: q是开始录制,后面紧跟名字,这里是a,也可以是其他最后一个q表示结束录制@a会重复刚刚录制的a10@a会重复10次还有一种方法,就是块操作:Ctrl+v,选中行,I, #, ESC开始的时 阅读全文

posted @ 2013-02-18 17:04 name2579 阅读(3431) 评论(10) 推荐(2)

导航