重新审视 Vim
虽然号称使用 Vim 多年,但是实际上一直没有仔细研究过,平常用的也就是 Vim 的基本快捷键而已,虽然经常写 Rails 代码,但是除了自己定义了一个在 erb 文件中输入 <%= %> 代码的快捷键之外,就没有任何其他配置了,插件也只是偶尔用用 NERDCommenter 之类。
最丢人的是,目前还不习惯用 hjkl 移动,因为平常也经常用其他的普通编辑器,所以即使在 Vim 下,每次也都是用着用着就去摸箭头键了,至今没有调整过来。
不过前天看到一篇非常好的 Vim 文章:
Coming Home to Vim / Steve Losh
受其影响,开始重新审视 Vim。
文章中提到的一些 Tips 比较有启发性,比如对于不知不觉去摸箭头键而不使用 hjkl 的问题,可以用下面的配置代码,将箭头键屏蔽:
nnoremap <up> <nop> nnoremap <down> <nop> nnoremap <left> <nop> nnoremap <right> <nop> inoremap <up> <nop> inoremap <down> <nop> inoremap <left> <nop> inoremap <right> <nop>
这样每次就会被强迫去用 hjkl 了,对于 Vim 初学者来说尤其实用。
此外,对于回到命令模式用的 Esc 太远的问题,除了通过某种方法把无用的 CapsLock 键映射为 Esc 之外,还可以使用“jj”:
inoremap jj <ESC>
因为单词中很少有输入 jj 的情况,所以并不会干扰输入。映射为“,,”也可以,当然也可以使用脚踏板 :)。
此外还知道了一个可以像 TextMate 那样智能打开文件的插件 PeepOpen:
虽然要收费,但是效果比 Command-T 之类的要好多了,所以等有了资金就去买一个用。有了这个东西,NERDTree 之类的就不需要了~ :)
最后,就是再定义一些快捷键了,Vim 的快捷键定义语法 nnoremap 和 inoremap 非常直观,一直都想不出应该定义什么真是不应该啊。
2010年9月24日 08:58
PeepOpen是Mac专用的啊,我还是安心地用Lusty-explorer + mru.vim好了。那几个映射到 <nop> 的键映射很不错,以后一定要给初学者推荐 :-)
BTW,“全局相关文章”里有两篇文章都是我的呵~
2010年9月24日 13:47
是啊,PeepOpen 是个外挂程序,所以还支持 Emacs 什么的。
因为都打了 vim 的 tag,所以就自动关联到了一起啦~ :)
2010年9月24日 18:17
请问页面下面的 “全局相关文章” 是怎么弄出来的?
2010年9月24日 21:22
在工作台的 外观->文章底栏 下面可以找到设置~
2010年9月24日 21:42
谢谢 :)
2010年9月24日 22:07
要是你还是适应不了 hjkl 的按键,我写了一篇关于这个的文章:
http://bluegene8210.is-programmer.com/posts/21509.html
希望能对你有帮助。
2010年9月25日 03:24
这个方法也不错,让我想起了格斗游戏~
2010年11月17日 05:43
这个模板好漂亮!
2018年4月27日 17:33
The article you have shared here very awesome. I really like and appreciated your work. I read deeply your article, the points you have mentioned in this article are useful
2018年6月05日 14:58
Your writing very well and provide a lot of useful information. But if you tap water more than half as compared to another article, I would definitely be great
2018年7月02日 16:34
This one is great. keep doing awesome! download any track!
2019年2月01日 12:16
I love to read your article and get so much information through your blog and learn new thing about blogging
2019年2月16日 05:35
Whoa! This blog looks exactly like my old one! It's on a completely different topic but it has pretty much the same page
layout and design.
2019年9月28日 15:02
I think it could be more general if you get a football sports activity
2020年11月11日 22:08
There are solutions by which exceptional behavior procedures are employed more info to support folks recognize the particular desire to draw tresses prior to urge gets far too formidable for you to fight. The patient finds approaches to withstand the actual want so the actual need becomes less strong then goes away completely. best smm panel
2020年11月14日 17:57
It is challenging to discover knowledgeable people on this subject, but you sound like you know what you are talking about! Thanks Get well soon
2021年5月30日 18:30
I was impressed with the site that you created, so memotipasi many people to be more advanced, there also kunjugi me, as a comparison sauna
2021年5月31日 17:45
Thankyou for sharing the data which is beneficial for me and others likewise to see. credit
2021年6月03日 16:49
Thankyou for sharing the data which is beneficial for me and others likewise to see. Door installation Companies
2021年6月06日 21:23
Extraordinary things you've generally imparted to us. Simply continue written work this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks Indoor sauna
2021年6月08日 20:57
Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. Face mask
2021年9月23日 17:21
What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. น้ำยาบุหรี่ไฟฟ้า pod
2021年11月05日 17:32
it has the seriously brilliant site. it has the realy informational including a this sort of fine occupation. everyone loves the following. how long does shein take to ship
2021年11月09日 20:11
Brilliant text. A posting has effects on loads of imperative complications one's world. Most people can't be uninvolved so that you can every one of these complications. The next posting supplies plans plus basics. Pretty enlightening plus simple. Home improvement
2022年2月24日 02:38
Thanks for taking the time to discuss that, I feel strongly about this and so really like getting to know more on this kind of field. Do you mind updating your blog post with additional insight? It should be really useful for all of us. slotxo โปรสมาชิกใหม่
2022年2月25日 03:04
It is a fantastic post – immense clear and easy to understand. I am also holding out for the sharks too that made me laugh. Telephonic Interpreters
2022年3月08日 02:58
Nice to read your article! I am looking forward to sharing your adventures and experiences. elo boost wild rift
2022年3月18日 03:12 I’ve been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before. Toepassingen voeding industrie
2022年3月18日 03:13
n fascinating discussion is value comment. I think that it is best to write extra on this matter, it won’t be a taboo topic however generally people are not enough to talk on such topics. To the next. Cheers Toepassingen Logistiek en transport
2022年3月19日 03:13
We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work. Covid testing at home
2022年3月19日 20:18
Thank you a bunch for sharing this with all people you actually know what you are talking approximately!
2022年4月24日 01:09
I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You. Cheap smm panel
2022年4月26日 05:27
I appreciate everything you have added to my knowledge base.Admiring the time and effort you put into your blog and detailed information you offer.Thanks. Judiking88
2022年5月10日 02:13
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. Stamped Concrete Nashville TN Stamped Concrete Near me
2022年5月15日 03:41
Thanks for another wonderful post. Where else could anybody get that type of info in such an ideal way of writing? 먹튀검증
2022年5月29日 01:49
I found this is an informative and interesting post so i think so it is very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this article. judi online
2022年5月30日 03:06
This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses. 신촌룸싸롱
2022年6月07日 23:29
I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work. Kirkland, WA Commercial Pest control Service
2022年6月24日 02:30
Thank you very much for this great post. wild rift coaching
2022年7月27日 22:07
It really looks great, I've seen many other posts, that's the info I needed, thanks for sharing. spbo
2022年7月31日 13:26
The Food Security Card is also known as Ration Card provides to the middle-class income group and economically backward group to get the ration at subsidy rates. <a href="https://99employee.com/food-security-card-apply-search-fsc/">Food Security Card</a> The purchase of pulses and other essential commodities of the kitchen may provide at very low cost in the Ration Shops placed by Government at a subsidy rate. It is also proof of the identification of an individual and their family in India. Every Government application or any address proof will ask for a Ration Card as an option to prove your identity. The motive of this card is to provide support to economically backward class people, by which they can have their livelihood without much difficulty. Here 99employee will provide some details about FSC, just check-in
2022年7月31日 13:27
The Food Security Card is also known as Ration Card provides to the middle-class income group and economically backward group to get the ration at subsidy rates. Food Security Card The purchase of pulses and other essential commodities of the kitchen may provide at very low cost in the Ration Shops placed by Government at a subsidy rate. It is also proof of the identification of an individual and their family in India. Every Government application or any address proof will ask for a Ration Card as an option to prove your identity. The motive of this card is to provide support to economically backward class people, by which they can have their livelihood without much difficulty. Here 99employee will provide some details about FSC, just check-in
2022年8月05日 02:38
I am happy to find this post Very useful for me, as it contains lot of information. I Always prefer to read The Quality and glad I found this thing in you post. Thanks facebook login and sign in
2022年8月17日 01:32
Succeed! It could be one of the most useful blogs we have ever come across on the subject. Excellent info! I’m also an expert in this topic so I can understand your effort very well. Thanks for the huge help. pullman residence
2022年8月31日 03:38
Thanks for your insight for your fantastic posting. I’m glad I have taken the time to see this. gmail-pva-accounts
2022年9月06日 17:52
Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though. spbo indonesia
2022年10月13日 01:29
This particular is usually apparently essential and moreover outstanding truth along with for sure fair-minded and moreover admittedly useful My business is looking to find in advance designed for this specific useful stuffs… дело за делба на имот
2022年11月08日 18:04
Fantastic day! This is totally attractive information and data right here.
2022年12月18日 22:17
Wow Da weiss man, wo es hingehen muss Viele Grüsse Mirta
2022年12月18日 22:17
Thank you of this blog. That’s all I’m able to say. You definitely have made this web site into an item thats attention opening in addition to important. You definitely know a great deal of about the niche, youve covered a multitude of bases. Great stuff from this the main internet. All over again, thank you for the blog.
2023年1月09日 20:55
Thanks so much for this information. I have to let you know I concur on several of the points you make here and others may require some further review, but I can see your viewpoint. เว็บบอลออนไลน์
2023年1月11日 18:39
I love long jackets & this one is very unique Leather Jacket NYC
2023年1月15日 22:30
I have been checking out a few of your stories and i can state pretty good stuff. I will definitely bookmark your blog Molly pills
2023年1月16日 19:35
This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great. https://www.edocr.com/v/6dvklg3j/vukucy/getting-into-your-current-home-business
2023年1月17日 18:53
This content is written very well. Your use of formatting when making your points makes your observations very clear and easy to understand. Thank you. https://www.ukmedsman.com/
2023年1月21日 18:36
Your work is truly appreciated round the clock and the globe. It is an incredibly comprehensive and helpful blog. spbo live score dan prediksi
2023年1月25日 19:43
I am happy to find this post Very useful for me, as it contains lot of information. I Always prefer to read The Quality and glad I found this thing in you post. Thanks 90bola
2023年1月27日 04:43
hi was just seeing if you minded a comment. i like your website and the thme you picked is super. I will be back. ikaria juice
2023年1月30日 18:35
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. pialabola
2023年2月03日 02:59
Hey There. I found your blog using msn. This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely return. pialabola
2023年2月16日 04:22
I love long jackets & this one is very unique Leather Jacket in NYC
2023年2月20日 02:51
I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information. handyman
2023年2月21日 15:59
Very instructive and good bodily structure of subject matter, now that’s user pleasant (:. forum backlink service
2023年3月08日 20:30
Cool stuff you have got and you keep update all of us. Trb System
2023年3月13日 04:23
Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though. trb system card
2023年3月21日 18:25
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. situs judi bola
2023年3月23日 20:53
This content is written very well. Your use of formatting when making your points makes your observations very clear and easy to understand. Thank you. Ikaria juice recipe
2023年4月15日 19:35
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. live score tercepat
2023年7月10日 00:03
Your weblog is too much first rate. i've found conveniently what i used to be searching. furthermore, the content great is extraordinary. thank you for the nudge!
2023年8月31日 21:11
We have sell some products of different custom boxes.Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts.This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!
2023年9月19日 20:49
Deference to op , some superb entropy. แทงบอลออนไลน์
2023年9月23日 16:46
Nice site. On your blogs very interest and i will tell a friends. เว็บบอลไม่ผ่านเอเย่นต์