{"id":16660,"date":"2012-09-02T15:03:41","date_gmt":"2012-09-02T13:03:41","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=16660"},"modified":"2012-09-02T15:06:49","modified_gmt":"2012-09-02T13:06:49","slug":"avoid-esc-in-vim","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2012\/09\/02\/avoid-esc-in-vim\/","title":{"rendered":"Avoid ESC in Vim"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>OK, this is one of those times when I&#8217;ve been humbled again. \u00a0I&#8217;ve been using Vim for over a decade now, and once in a while it occurred to me that using ESC to exit to normal mode is NOT the most efficient thing ever. \u00a0Maybe my little finger is too little, or maybe my keyboards are too large. \u00a0But reaching ESC with while in the middle of crazy typing session broke my concentration a few times. \u00a0But somehow I just thought that it is one of those most natural Vim things that I had to get used to. \u00a0Today, I came across <a href=\"https:\/\/github.com\/holman\/dotfiles\/blob\/master\/vim\/vimrc.symlink\">something genius<\/a> that told me that I don&#8217;t have to. \u00a0If you have the same problem, edit your <em>.vimrc<\/em> file and add the following lines:<\/p>\n<pre class=\"brush: php; light: true; title: ; notranslate\" title=\"\">\r\n&quot; exit to normal mode with 'jj'\r\ninoremap jj &lt;ESC&gt;\r\n<\/pre>\n<p>Once you load your new configuration, typing &#8216;<strong>jj<\/strong>&#8216; in insert mode will be equivalent to press <strong>ESC<\/strong> key. \u00a0Brilliant!<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>OK, this is one of those times when I&#8217;ve been humbled again. \u00a0I&#8217;ve been using Vim for over a decade now, and once in a while it occurred to me that using ESC to exit to normal mode is NOT the most efficient thing ever. \u00a0Maybe my little finger is too little, or maybe my &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2012\/09\/02\/avoid-esc-in-vim\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Avoid ESC in Vim<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,18,62],"tags":[1336,1079,2297,3094],"keyring_services":[],"class_list":["post-16660","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-programming","category-technology","tag-inspiration","tag-productivity","tag-text-editors","tag-vim"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":27613,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/05\/23\/stack-overflow-helping-one-million-developers-exit-vim\/","url_meta":{"origin":16660,"position":0},"title":"Stack Overflow: Helping One Million Developers Exit Vim","author":"Leonid Mamchenkov","date":"May 23, 2017","format":false,"excerpt":"OK, this one is socially funny and statistically cool - Stack Overflow question on how to exit Vim editor was viewed over a million times in the last few years. \u00a0Now, there's a breakdown of all sorts of statistics about who gets stuck in Vim the most. \u00a0It's pretty amazing\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/05\/exitvim-1024x455-500x222.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":7494,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/05\/10\/vim-for-perl-developers\/","url_meta":{"origin":16660,"position":1},"title":"Vim for Perl developers","author":"Leonid Mamchenkov","date":"May 10, 2004","format":false,"excerpt":"This is my attempt to provide a clear and simple instructions on adopting Vim text editor for programming needs. I am using Perl as the programming language in the examples, but most of this document will apply equally for any other programming language. Update: This post was translated into Portuguese\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14979,"url":"https:\/\/mamchenkov.net\/wordpress\/2011\/05\/28\/vim-tips-of-the-day\/","url_meta":{"origin":16660,"position":2},"title":"Vim tips of the day","author":"Leonid Mamchenkov","date":"May 28, 2011","format":false,"excerpt":"I'm using Vim text editor for more than decade now. \u00a0And I still can't say I really know Vim. \u00a0I'm used to it and my fingers remember the commands. \u00a0And for those commands that I don't remember, I've found some way of working around and got used to it too.\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16644,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/08\/31\/pentadactyle-firefox-add-on-for-vim-and-links-addicts\/","url_meta":{"origin":16660,"position":3},"title":"Pentadactyle Firefox add-on for Vim and Links addicts","author":"Leonid Mamchenkov","date":"August 31, 2012","format":"link","excerpt":"Pentadactyle Firefox add-on for Vim and Links addicts Pentadactyl\u00a0is a free browser add-on for Firefox, designed to make browsing more efficient and especially more keyboard accessible. Largely inspired by the Vim text editor, the appearance and finger feel of Pentadactyl should be familiar to Vim users. Additional web-specific features, such\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10342,"url":"https:\/\/mamchenkov.net\/wordpress\/2006\/08\/15\/vim-tip-quickly-insert-current-filename\/","url_meta":{"origin":16660,"position":4},"title":"Vim tip: quickly insert current filename","author":"Leonid Mamchenkov","date":"August 15, 2006","format":false,"excerpt":"I don't need this functionality very often, but when I do, it's nice to have a quick and easy way to do it. In order to insert the current filename, while in insert mode press Ctrl-r%. Via vim users mailing list.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":42606,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/05\/13\/debugging-in-vim\/","url_meta":{"origin":16660,"position":5},"title":"Debugging in Vim","author":"Leonid Mamchenkov","date":"May 13, 2019","format":false,"excerpt":"Personally, I'm not a frequent user of debuggers. Most of the projects and code that I am involved with is easily debugged with good old \"die('here')\". But if you are looking for some help on how to use Vim with a debugger, have a look at the \"Debugging in Vim\"\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/breakpoints.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/breakpoints.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/breakpoints.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/breakpoints.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/16660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=16660"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/16660\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=16660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=16660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=16660"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=16660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}