Advertisement
Guest User

Jeet Sukumaran, fuck your stupid copy protection

a guest
Aug 27th, 2016
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 60.61 KB | None | 0 0
  1. <!--
  2.  
  3. Posting vim configuration tips but disabling copy/paste is really shitty, dude.
  4.  
  5. -->
  6.  
  7. <!DOCTYPE html>
  8. <html lang="en-US">
  9. <head>
  10.     <meta charset="UTF-8">
  11.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  12.     <link rel="profile" href="http://gmpg.org/xfn/11">
  13.     <link rel="pingback" href="http://jeetworks.org/xmlrpc.php">
  14.     <!--[if IE]><script src="http://jeetworks.org/wp-content/themes/destin-basic/library/js/html5.js"></script><![endif]-->
  15.     <title>Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong) &#8211; Jeet Sukumaran</title>
  16. <link rel='dns-prefetch' href='//fonts.googleapis.com'>
  17. <link rel='dns-prefetch' href='//s.w.org'>
  18. <link rel="alternate" type="application/rss+xml" title="Jeet Sukumaran &raquo; Feed" href="http://jeetworks.org/feed/"/>
  19. <link rel="alternate" type="application/rss+xml" title="Jeet Sukumaran &raquo; Comments Feed" href="http://jeetworks.org/comments/feed/"/>
  20. <link rel="alternate" type="application/rss+xml" title="Jeet Sukumaran &raquo; Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong) Comments Feed" href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/feed/"/>
  21.         <script type="text/javascript">window._wpemojiSettings={"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2\/svg\/","svgExt":".svg","source":{"concatemoji":"http:\/\/jeetworks.org\/wp-includes\/js\/wp-emoji-release.min.js?ver=bce91881871d4729f070f5764af032c9"}};!function(a,b,c){function d(a){var c,d,e,f,g,h=b.createElement("canvas"),i=h.getContext&&h.getContext("2d"),j=String.fromCharCode;if(!i||!i.fillText)return!1;switch(i.textBaseline="top",i.font="600 32px Arial",a){case"flag":return i.fillText(j(55356,56806,55356,56826),0,0),!(h.toDataURL().length<3e3)&&(i.clearRect(0,0,h.width,h.height),i.fillText(j(55356,57331,65039,8205,55356,57096),0,0),c=h.toDataURL(),i.clearRect(0,0,h.width,h.height),i.fillText(j(55356,57331,55356,57096),0,0),d=h.toDataURL(),c!==d);case"diversity":return i.fillText(j(55356,57221),0,0),e=i.getImageData(16,16,1,1).data,f=e[0]+","+e[1]+","+e[2]+","+e[3],i.fillText(j(55356,57221,55356,57343),0,0),e=i.getImageData(16,16,1,1).data,g=e[0]+","+e[1]+","+e[2]+","+e[3],f!==g;case"simple":return i.fillText(j(55357,56835),0,0),0!==i.getImageData(16,16,1,1).data[0];case"unicode8":return i.fillText(j(55356,57135),0,0),0!==i.getImageData(16,16,1,1).data[0];case"unicode9":return i.fillText(j(55358,56631),0,0),0!==i.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity","unicode9"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);</script>
  22.         <style type="text/css">img.wp-smiley,img.emoji{display:inline!important;border:none!important;box-shadow:none!important;height:1em!important;width:1em!important;margin:0 .07em!important;vertical-align:-.1em!important;background:none!important;padding:0!important}</style>
  23. <style id='papercite_css-css' media='all'>.papercite_errors:before{content:"Papercite errors"}.papercite_errors{border:1px solid red;background:#eee;padding:5px}.papercite_errors>div{display:list-item}.papercite_bibtex{display:none}.papercite_bibtex pre{white-space:pre-wrap}.papercite_toggle:link,.papercite_toggle:visited{color:gray;text-decoration:none}.papercite_link,.papercite_link:link,.papercite_link:visited{color:#222;font-weight:bold;text-decoration:none;cursor:pointer}.papercite_info{color:#555}.papercite_highlight{font-weight:bold}span.papercite_checked_files{padding:5px;margin:5px;border:1px solid #000;font-size:150%;cursor:pointer;background:#eee;color:red;border-radius:3px}</style>
  24. <link rel='stylesheet' id='justifiedGallery-css' href='http://jeetworks.org/wp-content/plugins/flickr-justified-gallery/css/A.justifiedGallery.min.css,qver=v3.6.pagespeed.cf.rs3VmJ5BKa.css' type='text/css' media='all'/>
  25. <style id='flickrJustifiedGalleryWPPlugin-css' media='all'>.justified-gallery .caption .photo-title-with-desc{font-weight:bold}</style>
  26. <link rel='stylesheet' id='swipebox-css' href='http://jeetworks.org/wp-content/plugins/flickr-justified-gallery/lightboxes/swipebox/css/A.swipebox.min.css,qver=bce91881871d4729f070f5764af032c9.pagespeed.cf.P4aTBYfp7H.css' type='text/css' media='all'/>
  27. <link rel='stylesheet' id='theme_stylesheet-css' href='http://jeetworks.org/wp-content/themes/destin-basic/A.style.css,qver=bce91881871d4729f070f5764af032c9.pagespeed.cf.QsIUyRPe1q.css' type='text/css' media='all'/>
  28. <link rel='stylesheet' id='google_fonts-css' href='//fonts.googleapis.com/css?family=Raleway:300,300italic,600,600italic,800' type='text/css' media='all'/>
  29. <link rel='stylesheet' id='font_awesome-css' href='http://jeetworks.org/wp-content/themes/destin-basic/library/css/A.font-awesome.css,qver=4.3.0.pagespeed.cf.O-mS0UXZZi.css' type='text/css' media='all'/>
  30. <link rel='stylesheet' id='photonic-css' href='http://jeetworks.org/wp-content/plugins/photonic/include/css/A.photonic.css,qver=1.56.pagespeed.cf.HsuA8Btbgq.css' type='text/css' media='all'/>
  31. <script type='text/javascript' src='http://jeetworks.org/wp-includes/js/jquery/jquery.js,qver=1.12.4.pagespeed.jm.pPCPAKkkss.js'></script>
  32. <script src="http://jeetworks.org/wp-includes,_js,_jquery,_jquery-migrate.min.js,qver==1.4.1+wp-content,_plugins,_papercite,_js,_papercite.js,qver==bce91881871d4729f070f5764af032c9+wp-includes,_js,_jquery,_ui,_core.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_widget.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_position.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_tooltip.min.js,qver==1.11.4.pagespeed.jc.dwNiwVVOqM.js"></script><script>eval(mod_pagespeed_mUhmJEi5Tr);</script>
  33. <script>eval(mod_pagespeed_23B$_syXiI);</script>
  34. <script>eval(mod_pagespeed_Dk2M868_qS);</script>
  35. <script>eval(mod_pagespeed_kTL1ZJM98_);</script>
  36. <script>eval(mod_pagespeed_BaeQKFX3LB);</script>
  37. <script>eval(mod_pagespeed_FhPRZ57AfH);</script>
  38. <script type='text/javascript'>var Photonic_JS={"ajaxurl":"http:\/\/jeetworks.org\/wp-admin\/admin-ajax.php","fbox_show_title":"1","fbox_title_position":"inside","flickr_collection_set_title_display":"below","flickr_gallery_title_display":"tooltip","flickr_photo_title_display":"tooltip","picasa_photo_title_display":"tooltip","picasa_photo_pop_title_display":"tooltip","wp_thumbnail_title_display":"tooltip","Dpx_photo_title_display":"tooltip","smug_photo_title_display":"tooltip","smug_photo_pop_title_display":"tooltip","smug_albums_album_title_display":"tooltip","instagram_photo_title_display":"tooltip","instagram_user_title_display":"tooltip","zenfolio_photo_title_display":"tooltip","zenfolio_set_title_display":"tooltip","slideshow_library":"none","bypass_popup":"","random_layout":"","tile_spacing":"2","tile_min_height":"200","slideshow_mode":"1","slideshow_interval":"5000","pphoto_theme":"pp_default","gallery_panel_width":"80","enable_swipebox_mobile_bars":"","lightbox_for_all":""};</script>
  39. <script src="http://jeetworks.org/wp-content/plugins/photonic/include/scripts/photonic.js,qver==1.56+jquery.cycle.all.min.js,qver==1.56.pagespeed.jc._PtHX-8MiR.js"></script><script>eval(mod_pagespeed_Y0RpOg_D5W);</script>
  40. <script>eval(mod_pagespeed_kBg$pH$rea);</script>
  41. <link rel='https://api.w.org/' href='http://jeetworks.org/wp-json/'/>
  42. <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://jeetworks.org/xmlrpc.php?rsd"/>
  43. <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://jeetworks.org/wp-includes/wlwmanifest.xml"/>
  44. <link rel='prev' title='&#8216;Sorcerer&#8217; Vim Color Scheme' href='http://jeetworks.org/sorcerer/'/>
  45. <link rel='next' title='From Eye to Vision: Photography as an Interpretive (Re)-Presentation of Reality' href='http://jeetworks.org/from-eye-to-vision-photography-as-an-interpretive-re-presentation-of-reality/'/>
  46.  
  47. <link rel="canonical" href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/"/>
  48. <link rel='shortlink' href='http://jeetworks.org/?p=30'/>
  49. <link rel="alternate" type="application/json+oembed" href="http://jeetworks.org/wp-json/oembed/1.0/embed?url=http%3A%2F%2Fjeetworks.org%2Fvim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong%2F"/>
  50. <link rel="alternate" type="text/xml+oembed" href="http://jeetworks.org/wp-json/oembed/1.0/embed?url=http%3A%2F%2Fjeetworks.org%2Fvim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong%2F&#038;format=xml"/>
  51. <script type="text/javascript">(function(url){if(/(?:Chrome\/26\.0\.1410\.63 Safari\/537\.31|WordfenceTestMonBot)/.test(navigator.userAgent)){return;}var addEvent=function(evt,handler){if(window.addEventListener){document.addEventListener(evt,handler,false);}else if(window.attachEvent){document.attachEvent('on'+evt,handler);}};var removeEvent=function(evt,handler){if(window.removeEventListener){document.removeEventListener(evt,handler,false);}else if(window.detachEvent){document.detachEvent('on'+evt,handler);}};var evts='contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop keydown keypress keyup mousedown mousemove mouseout mouseover mouseup mousewheel scroll'.split(' ');var logHuman=function(){var wfscr=document.createElement('script');wfscr.type='text/javascript';wfscr.async=true;wfscr.src=url+'&r='+Math.random();(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(wfscr);for(var i=0;i<evts.length;i++){removeEvent(evts[i],logHuman);}};for(var i=0;i<evts.length;i++){addEvent(evts[i],logHuman);}})('//jeetworks.org/?wordfence_logHuman=1&hid=089D79376C60F274E976D6D948D8F58F');</script>
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81. <style>.container{max-width:1170px}</style>
  82.             <style type="text/css">.recentcomments a{display:inline!important;padding:0!important;margin:0!important}</style>
  83.         <style type="text/css" id="custom-background-css">body.custom-background{background-color:#404040}</style>
  84. <style type="text/css">.photonic-pad-photosets{margin:15px}.photonic-pad-galleries{margin:15px}.photonic-flickr-stream .photonic-pad-photos{padding:0 15px;box-sizing:border-box}.photonic-picasa-stream .photonic-pad-photos{padding:0 15px;box-sizing:border-box}.photonic-picasa-stream img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-panel .photonic-picasa-image img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-500px-stream .photonic-pad-photos{padding:0 15px;box-sizing:border-box}.photonic-500px-stream img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-zenfolio-stream .photonic-pad-photos{padding:0 15px;box-sizing:border-box}.photonic-zenfolio-stream .photonic-pad-photosets{margin:0 15px}.photonic-zenfolio-photo img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-zenfolio-set-thumb img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-instagram-stream .photonic-pad-photos{padding:0 15px;box-sizing:border-box}.photonic-instagram-photo img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-instagram-stream .photonic-pad-users{margin:0 15px}.photonic-instagram-user img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-pad-albums{margin:15px}.photonic-smug-stream .photonic-pad-photos{padding:0 15px;box-sizing:border-box}.photonic-smug-stream img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-panel .photonic-smug-image img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-panel{background:#111!important;border-top:1px solid #333;border-right:1px solid #333;border-bottom:1px solid #333;border-left:1px solid #333}.photonic-panel .photonic-flickr-image img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-flickr-panel .photonic-pad-photos{padding:10px 15px;box-sizing:border-box}.photonic-picasa-panel .photonic-pad-photos{padding:10px 15px;box-sizing:border-box}.photonic-smug-panel .photonic-pad-photos{padding:10px 15px;box-sizing:border-box}.photonic-flickr-coll-thumb img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-flickr-set .photonic-flickr-set-solo-thumb img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-flickr-stream .photonic-flickr-photo img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-flickr-set-thumb img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-flickr-set-pop-thumb img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-flickr-gallery-pop-thumb img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-smug-album-thumb img{border-top:none;border-right:none;border-bottom:none;border-left:none;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0}.photonic-random-layout .photonic-tiled-photo{padding:2px}</style>
  85. </head>
  86.  
  87. <body class="single single-post postid-30 single-format-standard custom-background basic">
  88.  
  89.     <div id="page" class="clearfix">
  90.         <header id="header">
  91.             <div class="container">
  92.                                 <div id="site-title"><a href="http://jeetworks.org" title="Jeet Sukumaran" rel="home">
  93.                     Jeet Sukumaran              </a></div>
  94.                 <div id="site-description"></div>
  95.             </div>
  96.  
  97.             <nav id="site-navigation" class="navbar navbar-inverse" role="navigation">
  98.                 <div class="container">
  99.                     <h3 class="sr-only">Main menu</h3>
  100.                     <a class="sr-only" href="#primary" title="Skip to content">Skip to content</a>
  101.  
  102.                     <div class="navbar-header">
  103.                         <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  104.                             <span class="icon-bar"></span>
  105.                             <span class="icon-bar"></span>
  106.                             <span class="icon-bar"></span>
  107.                         </button>
  108.                     </div>
  109.  
  110.                     <div class="collapse navbar-collapse">
  111.                         <ul id="menu-sections" class="nav navbar-nav"><li id="menu-item-50" class="menu-item menu-item-type-post_type menu-item-object-page current_page_parent menu-item-50"><a href="http://jeetworks.org/posts/">Posts</a></li>
  112. <li id="menu-item-76" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-76"><a href="http://jeetworks.org/photographs/">Photographs</a></li>
  113. <li id="menu-item-49" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-49"><a href="http://jeetworks.org/publications/">Publications</a></li>
  114. <li id="menu-item-48" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-48"><a href="http://jeetworks.org/software/">Software</a></li>
  115. <li id="menu-item-51" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-51"><a href="http://jeetworks.org/">About</a></li>
  116. </ul>                   </div>
  117.                 </div>
  118.             </nav><!-- #site-navigation -->
  119.         </header>
  120.  
  121.         <main>
  122.  
  123. <div class="container">
  124.     <div class="row">
  125.         <div id="primary" class="col-md-9">
  126.                
  127.                     <article id="post-30" class="post-30 post type-post status-publish format-standard hentry category-computing tag-vi tag-vim xfolkentry clearfix">
  128.        
  129.         <div class="row">
  130.             <div class="col-md-3 entry-meta">
  131.                 <p><i class="fa fa-bookmark"></i> Posted in <a href="http://jeetworks.org/category/computing/" rel="category tag">Computing and Programming</a></p>
  132.  
  133.                                 <p><i class="fa fa-comments"></i> <a href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/#comments">6 Comments</a></p>
  134.                             </div>
  135.             <div class="col-md-9">
  136.                 <h1 class="entry-title">Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong)</h1>
  137.                 <div class="entry-meta">
  138.                     by <span class="vcard author"><span class="fn"><a href="http://jeetworks.org/author/_jeet_sukumaran_/" title="Posts by Jeet Sukumaran" rel="author">Jeet Sukumaran</a></span></span> on <a href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/" class="time"><time class="date published updated" datetime="2013-12-08">December 8, 2013</time></a>              </div>
  139.  
  140.                 <div class="entry-content description clearfix">
  141.                     <h2>The Great Controversy</h2>
  142. <p>A standard dictum amongst experienced Vim users is not to use the arrow keys to move around your document.  This dictum is often repeated again and again, in tones that range from the taken-for-granted to hysterical-zeal. The most common reason given for this is that using the arrow keys takes your hands away from the home row of your keyboard, and thus is wasteful both in terms of time and energy, whereas the standard Vim movement keys &#8212;| <code>h</code>, <code>j</code>, <code>k</code>, and <code>l</code> &#8212;| keep your hands on the home row, and therefore is far more efficient. Here is what I have discovered: this anti-arrow key argument is <strong>wrong</strong>!</p>
  143. <h2>The Great Experiment</h2>
  144. <p>When I first started using Vim, I of course found the <code>h</code>, <code>j</code>, <code>k</code>, and <code>l</code> keys to be horribly unintuitive.<br/>
  145. But what was worse was that I could not use these keys to move in insert mode.It was this latter issue that kept me resolutely married to my arrow keys.The centi-seconds of time it took for me to move my fingers to hit an arrow key seemed far more efficient than exiting into normal mode, using the <code>h</code>, <code>j</code>, <code>k</code>, and <code>l</code> to move to where I wanted, and then <code>i</code> again to get back into insert mode. And so, for the longest time, not only did I continue to use the arrow keys, but I had absolutely no desire to cease doing so, just to gain what would probably accumulate to be about an hour&#8217;s worth of saved time over the course of a year.</p>
  146. <p>Recently, however, on a whim, just to see what the fuss was about and if I was correct in viewing the arrow-keys-<em>Noooooooooo!</em>-zealots as the computing equivalent of monodimensional cladist fundamentalists, I decided to indulge in what I initially viewed as a temporary experiment in masochism.</p>
  147. <p>Yes, that&#8217;s right.</p>
  148. <p>I disabled my arrow keys:</p>
  149. <pre>inoremap  &lt;Up>     &lt;NOP>
  150.   inoremap  &lt;Down>   &lt;NOP>
  151.   inoremap  &lt;Left>   &lt;NOP>
  152.   inoremap  &lt;Right>  &lt;NOP>
  153.   noremap   &lt;Up>     &lt;NOP>
  154.   noremap   &lt;Down>   &lt;NOP>
  155.   noremap   &lt;Left>   &lt;NOP>
  156.   noremap   &lt;Right>  &lt;NOP>
  157. </pre>
  158. <p>It did not take long (less than an hour) for me to get used to the spatial directions mapped to the <code>h</code>, <code>j</code>, <code>k</code>, and <code>l</code> keys, and so within a day I was comfortable using these keys to move around in normal mode.  <em>But</em> the inability to move around in insert mode was incredibly annoying.  It got so frustrating that I considered switching back to using arrow keys permanently, but decided to stick with the pain of trying to work in this tedious and painful environment for a little longer before giving up.</p>
  159. <h2>The Great Results</h2>
  160. <p>After a couple of days, I came to the realization that I had started working with Vim in a different way.  It happened gradually, and mostly unconsciously, so that I did not notice it as first.  But I <em>did</em> begin to notice that I was no longer tripping up or stumbling quite as much when needing to move around my document.  In fact, quite the opposite, I felt like I was zipping around to places much faster and much more efficiently than I ever did before when I was using the arrow keys.</p>
  161. <p>This feeling was <em>not</em> due to the gains from those accumulated centi-seconds shaved off my editing time by not having to move off the home row so frequently.&lt;/ on p></p>
  162. <p>It was, instead, due to the consequence of being forced to exit insert mode when I was not actually typing text. </p>
  163. <p>Being forced to return to normal mode right after I edited the text at a single point in the document (sometimes just a couple of characters, sometimes a word or two, sometimes short blocks or fragments), also resulted in me being forced to use the rich suite of powerful normal mode movement commands to get to <em>exactly</em> where I needed to be before resuming editing.  This was like suddenly beginning to use the fifth and other gears while driving on an open highway, whereas before I had been grinding along for mile after laborious mile on first.</p>
  164. <p>The most remarkable and unanticipated aspect of my new way of working with Vim was not so much my usage of the <code>h</code>, <code>j</code>, <code>k</code>, and <code>l</code> keys, and other relatively &#8220;dumb&#8221; movement keys (<code>0</code>, <code>$</code>, etc.).  It was my much greater usage of &#8220;smart&#8221; movement keys and commands.  Due to the shift in the dominant ecology (i.e., normal mode vs. insert mode dominant), my repertoire of idioms for movement within and across the buffer evolved, and simple up/down/left/right movements were replaced by far more efficient and powerful commands.  For example, I would use <code>f</code>/<code>F</code>/<code>t</code>/<code>T</code>/<code>;</code> etc. to jump to the exact character on a line that I wanted to get to, instead of pecking away at the left/right keys to get there.  I would use <code>:150</code> or <code>150G</code> to jump directly to line 150 instead of using the up/down arrow keys.  I would use <code>/def</code> or <code>?def</code> to jump directly to a function line instead of tapping away a directional key like a <a name="morsecodezombie">zombie trying to signal in pseudo-Morse</a>.  I would use marks (e.g., <code>mm</code>) to register an &#8220;anchor&#8221; into the document that I could jump back to directly (by using, for example, <code>'m</code>), before moving off to temporarily work on some other part of the document.</p>
  165. <p>It is true, of course, that none of these movements are in any way more efficient when, for example, to moving a couple of characters to the left or right or up or down of the current position while in insert mode.  In fact, this &#8220;local neighborhood&#8221; (i.e., one or two characters/lines on either side of my current position) is exactly where the arrow keys <em>do</em> come into their own by allowing you to get to these places without leaving insert mode.  It is only when we start dealing with positions more than a couple of offsets away from the current position that the normal mode movement keys and commands start to yield benefits.</p>
  166. <p>But the fact is, while I had arrow keys enabled I simply found it difficult to consciously make it a point to limit my use of them only within the &#8220;local neighborhood&#8221; .  When in insert mode, and I needed to get anywhere that I could see in the viewable buffer, without thinking about it I would start tapping away at the arrow keys, even if the destination was several to dozens of lines/characters away.  So while I had learned and started using all those &#8220;smart&#8221; movement commands that I am using now within the first couple of months of using Vim, I was just not using them <em>enough</em> or in all the places that I should been using them.</p>
  167. <p>Disabling the arrow keys, while making &#8220;local neighborhood&#8221; movement significantly more cumbersome than before, taught and continues to teach me to view the document as a landscape, across which I can visit any point that I want directly and precisely through Vim&#8217;s normal mode movement commands.  I still have not completely internalized this perspective, and often find myself reaching for the arrow keys unconsciously while editing in insert mode.  So, for the time being, until this regime has been exorcized from my muscle memory, I think I am going to keep my arrow keys disabled as motion keys.</p>
  168. <h2>Re-Educating the Arrow Keys to Work <em>With</em> You: Text Shifters Instead of Cursor Movers</h2>
  169. <p>However, that does mean that I have 4 decent keys on my keyboard not doing anything at all. <em>That</em>, to me, seems just as wasteful as any of the extra energy and time required to use them.  And thus I decided to put those arrow keys to work as &#8220;text movers&#8221; rather than their default role as &#8220;cursor movers&#8221;.</p>
  170. <p>Editing text is like doing surgery: when you start hacking away at a bit of code, you usually open up various gashes and slashes in the surrounding area.  At least with modern medical practices, it is both customary and polite to sew up these gashes and slashes, and naturally we do the same when editing code: indentation has to restored (here is a tip: see what <code>=</code> and <code>==</code> can do for you in Vim), empty lines need to be closed up, etc. etc.  We probably do this dozens of times during a particular edit session, and typically it involves a lot of moving around, deleting and inserting lines all over the place.  Even with the power of Vim&#8217;s normal mode commands, it still takes a lot of keystrokes, tedium and hassle to achieve this.</p>
  171. <p>And so I have remapped my arrow keys to do the following:</p>
  172. <ul>
  173. <li>The <code>Up</code> arrow key deletes a blank line above the current line (a non-empty line will not be deleted), while the <code>Down</code> arrow key inserts a blank line above the current line. The result is hitting <code>Up</code> or <code>Down</code> moves the current line up or down, in both normal as well as insert mode.</li>
  174. <li>Typing <code>Ctrl-Up</code> and <code>Ctrl-Down</code>, instead, deletes or inserts a blank line <em>below</em> the current line. The result is that the text below the current line moves up or down, respectively.</li>
  175. <li>Typing <code>Left</code> de-dents the current line, while <code>Right</code> indents it. The result is that text shifts left and right, respectively.</li>
  176. </ul>
  177. <p>The following code, included in your <code>~/.vimrc</code> or otherwise sourced into your session, implements this (the actual functions that do the work are copied from <a href="http://vim.wikia.com/wiki/Quickly_adding_and_deleting_empty_lines">here)</a>:</p>
  178. <pre>function! DelEmptyLineAbove()
  179.     if line(".") == 1
  180.         return
  181.     endif
  182.     let l:line = getline(line(".") - 1)
  183.     if l:line =~ '^s*$'
  184.         let l:colsave = col(".")
  185.         .-1d
  186.         silent normal! &lt;C-y>
  187.         call cursor(line("."), l:colsave)
  188.     endif
  189. endfunction
  190.  
  191. function! AddEmptyLineAbove()
  192.     let l:scrolloffsave = &scrolloff
  193.    " Avoid jerky scrolling with ^E at top of window
  194.    set scrolloff=0
  195.    call append(line(".") - 1, "")
  196.    if winline() != winheight(0)
  197.        silent normal! &lt;C-e>
  198.     endif
  199.     let &scrolloff = l:scrolloffsave
  200. endfunction
  201.  
  202. function! DelEmptyLineBelow()
  203.    if line(".") == line("$")
  204.        return
  205.    endif
  206.    let l:line = getline(line(".") + 1)
  207.    if l:line =~ '^s*$'
  208.        let l:colsave = col(".")
  209.        .+1d
  210.        ''
  211.        call cursor(line("."), l:colsave)
  212.    endif
  213. endfunction
  214.  
  215. function! AddEmptyLineBelow()
  216.    call append(line("."), "")
  217. endfunction
  218.  
  219. " Arrow key remapping: Up/Dn = move line up/dn; Left/Right = indent/unindent
  220. function! SetArrowKeysAsTextShifters()
  221.     " normal mode
  222.     nmap &lt;silent> &lt;Left> &lt;&lt;
  223.     nmap &lt;silent> &lt;Right> >>
  224.     nnoremap &lt;silent> &lt;Up> &lt;Esc>:call DelEmptyLineAbove()&lt;CR>
  225.     nnoremap &lt;silent> &lt;Down>  &lt;Esc>:call AddEmptyLineAbove()&lt;CR>
  226.     nnoremap &lt;silent> &lt;C-Up> &lt;Esc>:call DelEmptyLineBelow()&lt;CR>
  227.     nnoremap &lt;silent> &lt;C-Down> &lt;Esc>:call AddEmptyLineBelow()&lt;CR>
  228.  
  229.     " visual mode
  230.     vmap &lt;silent> &lt;Left> &lt;
  231.     vmap &lt;silent> &lt;Right> >
  232.     vnoremap &lt;silent> &lt;Up> &lt;Esc>:call DelEmptyLineAbove()&lt;CR>gv
  233.     vnoremap &lt;silent> &lt;Down>  &lt;Esc>:call AddEmptyLineAbove()&lt;CR>gv
  234.     vnoremap &lt;silent> &lt;C-Up> &lt;Esc>:call DelEmptyLineBelow()&lt;CR>gv
  235.     vnoremap &lt;silent> &lt;C-Down> &lt;Esc>:call AddEmptyLineBelow()&lt;CR>gv
  236.  
  237.     " insert mode
  238.     imap &lt;silent> &lt;Left> &lt;C-D>
  239.     imap &lt;silent> &lt;Right> &lt;C-T>
  240.     inoremap &lt;silent> &lt;Up> &lt;Esc>:call DelEmptyLineAbove()&lt;CR>a
  241.     inoremap &lt;silent> &lt;Down> &lt;Esc>:call AddEmptyLineAbove()&lt;CR>a
  242.     inoremap &lt;silent> &lt;C-Up> &lt;Esc>:call DelEmptyLineBelow()&lt;CR>a
  243.     inoremap &lt;silent> &lt;C-Down> &lt;Esc>:call AddEmptyLineBelow()&lt;CR>a
  244.  
  245.     " disable modified versions we are not using
  246.     nnoremap  &lt;S-Up>     &lt;NOP>
  247.     nnoremap  &lt;S-Down>   &lt;NOP>
  248.     nnoremap  &lt;S-Left>   &lt;NOP>
  249.     nnoremap  &lt;S-Right>  &lt;NOP>
  250.     vnoremap  &lt;S-Up>     &lt;NOP>
  251.     vnoremap  &lt;S-Down>   &lt;NOP>
  252.     vnoremap  &lt;S-Left>   &lt;NOP>
  253.     vnoremap  &lt;S-Right>  &lt;NOP>
  254.     inoremap  &lt;S-Up>     &lt;NOP>
  255.     inoremap  &lt;S-Down>   &lt;NOP>
  256.     inoremap  &lt;S-Left>   &lt;NOP>
  257.     inoremap  &lt;S-Right>  &lt;NOP>
  258. endfunction
  259.  
  260. call SetArrowKeysAsTextShifters()
  261. </pre>
  262. <p>Using the arrow keys for cursor movement cripples you in terms of time and efficiency, due to the far superior alternatives found in normal mode.  Using the arrow keys for shifting text, on the other hand, empowers you by wrapping up an often-used series of repetitive and stereotypical actions into a single keystroke.</p>
  263. <h2><a name="tldr">Revisiting the &#8220;Don&#8217;t Use the Arrow Keys!&#8221; Dictum</a></h2>
  264. <p>Modified slightly to say &#8220;Don&#8217;t Use the Arrow Keys for Movement&#8221;, this dictum basically holds.  But I think it utterly fails to capture the real issue at hand, and the customary justification offered for it (the whole &#8220;taking your hands off the home row is wasteful&#8221;) fails to make for a convincing argument.</p>
  265. <p>Instead, I think that Vim tutorials, guides, advocates and propaganda everywhere should emphasize:</p>
  266. <div style="margin: 10px; padding: 5px; border: solid black dotted; background: #ffcccc; font-size: 120%; font-weight: bold; text-align: center; ">
  267.   Don&#8217;t move around the document in insert mode!
  268. </div>
  269. <p>This is because normal mode offers so much more power and flexibility to get to any part of your document precisely and quickly.  The &#8220;Don&#8217;t Use the Arrow Keys for Movement&#8221; should be offered as a <em>corollary</em> to this, rather than a primary statement in its own right, because using arrow keys for movements leads you &#8212;| for psychological reasons &#8212;| to remain trapped in insert mode when you should be cruising and jetting about in normal mode.</p>
  270.                 </div><!-- .entry-content -->
  271.  
  272.                     <footer class="clearfix">
  273.         <p class="tags"><span><i class="fa fa-tags"></i> Tags:</span><a href="http://jeetworks.org/tag/vi/" rel="tag">vi</a> <a href="http://jeetworks.org/tag/vim/" rel="tag">Vim</a></p>  </footer><!-- .entry -->
  274.                 </div>
  275.         </div>
  276.  
  277.     </article> <!-- #post-30 -->   
  278.                 <div id="posts-pagination" class="clearfix">
  279.                     <h3 class="sr-only">Post navigation</h3>
  280.                     <div class="previous pull-left"><a href="http://jeetworks.org/sorcerer/" rel="prev"><span class="meta-nav">&larr;</span> &#8216;Sorcerer&#8217; Vim Color Scheme</a></div>
  281.                     <div class="next pull-right"><a href="http://jeetworks.org/from-eye-to-vision-photography-as-an-interpretive-re-presentation-of-reality/" rel="next">From Eye to Vision: Photography as an Interpretive (Re)-Presentation of Reality <span class="meta-nav">&rarr;</span></a></div>
  282.                 </div><!-- #posts-pagination -->
  283.    
  284.                
  285. <div id="comments" class="comments-area">
  286.    
  287.             <h2 id="comments-title">
  288.             6 comments for &ldquo;<span>Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong)</span>&rdquo;     </h2>
  289.  
  290.         <ol class="commentlist">
  291.                     <li class="comment even thread-even depth-1">
  292.             <div id="comment-96233" class="comment-body">
  293.                 <div class="comment-avatar">
  294.                     <script data-pagespeed-no-defer>(function(){var g=this;function h(b,d){var a=b.split("."),c=g;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===d?c[e]?c=c[e]:c=c[e]={}:c[e]=d};function l(b){var d=b.length;if(0<d){for(var a=Array(d),c=0;c<d;c++)a[c]=b[c];return a}return[]};function m(b){var d=window;if(d.addEventListener)d.addEventListener("load",b,!1);else if(d.attachEvent)d.attachEvent("onload",b);else{var a=d.onload;d.onload=function(){b.call(this);a&&a.call(this)}}};var n;function p(b,d,a,c,e){this.h=b;this.j=d;this.l=a;this.f=e;this.g={height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};this.i=c;this.b={};this.a=[];this.c={}}function q(b,d){var a,c,e=d.getAttribute("data-pagespeed-url-hash");if(a=e&&!(e in b.c))if(0>=d.offsetWidth&&0>=d.offsetHeight)a=!1;else{c=d.getBoundingClientRect();var f=document.body;a=c.top+("pageYOffset"in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);c=c.left+("pageXOffset"in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+","+c;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a<=b.g.height&&c<=b.g.width)}a&&(b.a.push(e),b.c[e]=!0)}p.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&&q(this,b)};h("pagespeed.CriticalImages.checkImageForCriticality",function(b){n.checkImageForCriticality(b)});h("pagespeed.CriticalImages.checkCriticalImages",function(){r(n)});function r(b){b.b={};for(var d=["IMG","INPUT"],a=[],c=0;c<d.length;++c)a=a.concat(l(document.getElementsByTagName(d[c])));if(0!=a.length&&a[0].getBoundingClientRect){for(c=0;d=a[c];++c)q(b,d);a="oh="+b.l;b.f&&(a+="&n="+b.f);if(d=0!=b.a.length)for(a+="&ci="+encodeURIComponent(b.a[0]),c=1;c<b.a.length;++c){var e=","+encodeURIComponent(b.a[c]);131072>=a.length+e.length&&(a+=e)}b.i&&(e="&rd="+encodeURIComponent(JSON.stringify(t())),131072>=a.length+e.length&&(a+=e),d=!0);u=a;if(d){c=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(k){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(v){}}f&&(f.open("POST",c+(-1==c.indexOf("?")?"?":"&")+"url="+encodeURIComponent(b)),f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.send(a))}}}function t(){var b={},d=document.getElementsByTagName("IMG");if(0==d.length)return{};var a=d[0];if(!("naturalWidth"in a&&"naturalHeight"in a))return{};for(var c=0;a=d[c];++c){var e=a.getAttribute("data-pagespeed-url-hash");e&&(!(e in b)&&0<a.width&&0<a.height&&0<a.naturalWidth&&0<a.naturalHeight||e in b&&a.width>=b[e].o&&a.height>=b[e].m)&&(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var u="";h("pagespeed.CriticalImages.getBeaconData",function(){return u});h("pagespeed.CriticalImages.Run",function(b,d,a,c,e,f){var k=new p(b,d,a,e,f);n=k;c&&m(function(){window.setTimeout(function(){r(k)},0)})});})();pagespeed.CriticalImages.Run('/ngx_pagespeed_beacon','http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/','1QIkWQqi6O',true,false,'2q-05HVbHTI');</script><img alt='' src='http://0.gravatar.com/avatar/9c55e9ff2d29d5907d28de683f49ff5a?s=55&#038;d=mm&#038;r=g' srcset='http://0.gravatar.com/avatar/9c55e9ff2d29d5907d28de683f49ff5a?s=110&amp;d=mm&amp;r=g 2x' class='avatar avatar-55 photo' height='55' width='55' data-pagespeed-url-hash="552374567" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/>             </div>
  295.                 <div class="comment-content">
  296.                     <div class="comment-author">
  297.                         Alpheus                     </div>
  298.                     <div class="comment-meta">
  299.                         November 8, 2014 at 10:11 pm                    </div>
  300.                     <div class="comment-text">
  301.                                                 <p>I am coming back to Vim, after having used Kate (under KDE) for a while, and after working with Emacs after that, with a couple of stints in NetBeans and Eclipse.  I was never what I would consider a Vim power user, but between the interesting things I&#8217;ve seen with Vim from a couple of presentations, and the fact that Vim hasn&#8217;t had a period of development stagnation like Emacs seems to have (I could be wrong about that, though), I&#8217;ve found myself drawn back to Vim.</p>
  302. <p>All that is to provide background for myself.  As a Dvorak keyboard layout user, the claim that HJKL is on home-row doesn&#8217;t resonate at all&#8211;indeed, H is the only key of those on home row!  This post, however, has helped me understand that I need to come to terms with other ways to move.</p>
  303. <p>Perhaps the best part of this journey, so far, is discovering that, with a couple of plugins, Vim can do what NetBeans can do,  only better!  And installing plugins isn&#8217;t so bad, either, when I consider that when I was somewhat required to use NetBeans at work, I had to install a handful of plugins for that, too, to get it up to speed.  I&#8217;ve been in the process of creating a &#8220;dotfiles&#8221; repository; as I work on this, I can see that I&#8217;ll be able to do with Vim, what I was unable to do with NetBeans:  set up an environment I like, then have it cloned an installed on another machine almost instantly&#8230;</p>
  304.                     </div>
  305.                                         <div class="reply">
  306.                         <a rel='nofollow' class='comment-reply-link' href='http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/?replytocom=96233#respond' onclick='return addComment.moveForm( "comment-96233", "96233", "respond", "30" )' aria-label='Reply to Alpheus'>Reply</a>                 </div>
  307.                                     </div>
  308.             </div>
  309.             </li><!-- #comment-## -->
  310.         <li id="comment-244682" class="pingback">
  311.             <div class="comment-body">
  312.                 <i class="fa fa-paperclip"></i>
  313.                 Pingback: <a href='http://blog.petrzemek.net/2016/04/06/things-about-vim-i-wish-i-knew-earlier/' rel='external nofollow' class='url'>Things About Vim I Wish I Knew Earlier | Petr Zemek</a>            </div>
  314.             </li><!-- #comment-## -->
  315.         <li class="comment odd alt thread-odd thread-alt depth-1">
  316.             <div id="comment-245878" class="comment-body">
  317.                 <div class="comment-avatar">
  318.                     <img alt='' src='http://0.gravatar.com/avatar/05917fed26d7519fae8318f78d14592a?s=55&#038;d=mm&#038;r=g' srcset='http://0.gravatar.com/avatar/05917fed26d7519fae8318f78d14592a?s=110&amp;d=mm&amp;r=g 2x' class='avatar avatar-55 photo' height='55' width='55' data-pagespeed-url-hash="362192522" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/>              </div>
  319.                 <div class="comment-content">
  320.                     <div class="comment-author">
  321.                         <a href='https://graingert.co.uk' rel='external nofollow' class='url'>Thomas</a>                    </div>
  322.                     <div class="comment-meta">
  323.                         May 19, 2016 at 9:25 am                 </div>
  324.                     <div class="comment-text">
  325.                                                 <p>can&#8217;t copy/paste your code snippet because you&#8217;ve got user-select disabled!</p>
  326.                     </div>
  327.                                         <div class="reply">
  328.                         <a rel='nofollow' class='comment-reply-link' href='http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/?replytocom=245878#respond' onclick='return addComment.moveForm( "comment-245878", "245878", "respond", "30" )' aria-label='Reply to Thomas'>Reply</a>                   </div>
  329.                                     </div>
  330.             </div>
  331.             <ul class="children">
  332.         <li class="comment even depth-2">
  333.             <div id="comment-245892" class="comment-body">
  334.                 <div class="comment-avatar">
  335.                     <img alt='' src='http://2.gravatar.com/avatar/20cd8e15601dcad3c1d21667291d05ef?s=55&#038;d=mm&#038;r=g' srcset='http://2.gravatar.com/avatar/20cd8e15601dcad3c1d21667291d05ef?s=110&amp;d=mm&amp;r=g 2x' class='avatar avatar-55 photo' height='55' width='55' data-pagespeed-url-hash="821641604" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/>              </div>
  336.                 <div class="comment-content">
  337.                     <div class="comment-author">
  338.                         fryfrog                     </div>
  339.                     <div class="comment-meta">
  340.                         May 19, 2016 at 5:39 pm                 </div>
  341.                     <div class="comment-text">
  342.                                                 <p>Dug into the source and copy/pasted from there, find it at <a href="https://ptpb.pw/9_AS" rel="nofollow">https://ptpb.pw/9_AS</a></p>
  343.                     </div>
  344.                                         <div class="reply">
  345.                         <a rel='nofollow' class='comment-reply-link' href='http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/?replytocom=245892#respond' onclick='return addComment.moveForm( "comment-245892", "245892", "respond", "30" )' aria-label='Reply to fryfrog'>Reply</a>                  </div>
  346.                                     </div>
  347.             </div>
  348.             </li><!-- #comment-## -->
  349.         <li class="comment byuser comment-author-_jeet_sukumaran_ bypostauthor odd alt depth-2">
  350.             <div id="comment-245893" class="comment-body">
  351.                 <div class="comment-avatar">
  352.                     <img alt='' src='http://0.gravatar.com/avatar/f83bd77d036b0a5d1a595c697a26ef6c?s=55&#038;d=mm&#038;r=g' srcset='http://0.gravatar.com/avatar/f83bd77d036b0a5d1a595c697a26ef6c?s=110&amp;d=mm&amp;r=g 2x' class='avatar avatar-55 photo' height='55' width='55' data-pagespeed-url-hash="433968019" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/>              </div>
  353.                 <div class="comment-content">
  354.                     <div class="comment-author">
  355.                         Jeet Sukumaran                  </div>
  356.                     <div class="comment-meta">
  357.                         May 19, 2016 at 5:42 pm                 </div>
  358.                     <div class="comment-text">
  359.                                                 <p>Ah yes, sorry about that. This is one of the side-effects of a suite of security plugins. I will extract the code to the Gist and link it. I will say, though, that this was written a long time ago, and there a number of better approaches out there currently (e.g., Pope&#8217;s Unimpaired and Drew&#8217;s Text Bubbling).</p>
  360.                     </div>
  361.                                         <div class="reply">
  362.                         <a rel='nofollow' class='comment-reply-link' href='http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/?replytocom=245893#respond' onclick='return addComment.moveForm( "comment-245893", "245893", "respond", "30" )' aria-label='Reply to Jeet Sukumaran'>Reply</a>                   </div>
  363.                                     </div>
  364.             </div>
  365.             </li><!-- #comment-## -->
  366. </ul><!-- .children -->
  367. </li><!-- #comment-## -->
  368.         <li class="comment even thread-even depth-1">
  369.             <div id="comment-245884" class="comment-body">
  370.                 <div class="comment-avatar">
  371.                     <img alt='' src='http://0.gravatar.com/avatar/05917fed26d7519fae8318f78d14592a?s=55&#038;d=mm&#038;r=g' srcset='http://0.gravatar.com/avatar/05917fed26d7519fae8318f78d14592a?s=110&amp;d=mm&amp;r=g 2x' class='avatar avatar-55 photo' height='55' width='55' data-pagespeed-url-hash="362192522" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/>              </div>
  372.                 <div class="comment-content">
  373.                     <div class="comment-author">
  374.                         <a href='https://graingert.co.uk' rel='external nofollow' class='url'>Thomas</a>                    </div>
  375.                     <div class="comment-meta">
  376.                         May 19, 2016 at 12:08 pm                    </div>
  377.                     <div class="comment-text">
  378.                                                 <p>FYI, if you use `.-1d _` then it will remove the blank lines into the black hole register and not clobber your actual register</p>
  379.                     </div>
  380.                                         <div class="reply">
  381.                         <a rel='nofollow' class='comment-reply-link' href='http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/?replytocom=245884#respond' onclick='return addComment.moveForm( "comment-245884", "245884", "respond", "30" )' aria-label='Reply to Thomas'>Reply</a>                   </div>
  382.                                     </div>
  383.             </div>
  384.             </li><!-- #comment-## -->
  385.         </ol><!-- .commentlist -->
  386.  
  387.        
  388.        
  389.    
  390.                     <div id="respond" class="comment-respond">
  391.             <h3 id="reply-title" class="comment-reply-title">Leave a Reply <small><a rel="nofollow" id="cancel-comment-reply-link" href="/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/#respond" style="display:none;">Cancel reply</a></small></h3>              <form action="http://jeetworks.org/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate>
  392.                     <p class="comment-notes"><span id="email-notes">Your email address will not be published.</span> Required fields are marked <span class="required">*</span></p><p class="comment-form-comment"><label for="comment">Comment</label> <textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" aria-required="true" required="required"></textarea></p><p class="comment-form-author"><label for="author">Name <span class="required">*</span></label> <input id="author" name="author" type="text" value="" size="30" maxlength="245" aria-required='true' required='required'/></p>
  393. <p class="comment-form-email"><label for="email">Email <span class="required">*</span></label> <input id="email" name="email" type="email" value="" size="30" maxlength="100" aria-describedby="email-notes" aria-required='true' required='required'/></p>
  394. <p class="comment-form-url"><label for="url">Website</label> <input id="url" name="url" type="url" value="" size="30" maxlength="200"/></p>
  395. <p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment"/> <input type='hidden' name='comment_post_ID' value='30' id='comment_post_ID'/>
  396. <input type='hidden' name='comment_parent' id='comment_parent' value='0'/>
  397. </p><p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="c4d41fb9e4"/></p><p style="display: none;"><input type="hidden" id="ak_js" name="ak_js" value="78"/></p>              </form>
  398.                     </div><!-- #respond -->
  399.         </div><!-- #comments .comments-area -->
  400.                     </div>
  401.    
  402.             <div id="secondary" class="col-md-3" role="complementary">
  403.         <aside id="search-2" class="widget widget_search"><form role="search" method="get" class="search-form" action="http://jeetworks.org">
  404.     <label>
  405.         <span class="sr-only">Search for:</span>
  406.         <input type="search" class="search-field" placeholder="Search &hellip;" value="" name="s">
  407.     </label>
  408. </form></aside>     <aside id="recent-posts-2" class="widget widget_recent_entries">        <h3 class="widget-title">Recent Posts</h3>      <ul>
  409.                     <li>
  410.                 <a href="http://jeetworks.org/solving-the-could-not-find-all-biber-source-files-error/">Solving the &#8220;Could not find all biber source files&#8221; Error</a>
  411.                         </li>
  412.                     <li>
  413.                 <a href="http://jeetworks.org/invisible-photographer-meets-vanishing-fox/">Invisible Photographer Meets Vanishing Fox</a>
  414.                         </li>
  415.                     <li>
  416.                 <a href="http://jeetworks.org/morning-repose-in-viridescent-tranquility/">&#8220;Morning Repose in Viridescent Tranquility&#8221;</a>
  417.                         </li>
  418.                     <li>
  419.                 <a href="http://jeetworks.org/is-that-an-archosaur-in-your-pantanal-or-are-you-just-happy-to-see-me/">Is that an archosaur in your Pantanal, or are you just happy to see me?</a>
  420.                         </li>
  421.                     <li>
  422.                 <a href="http://jeetworks.org/more-sandhill-cranes/">More Sandhill Cranes!</a>
  423.                         </li>
  424.                 </ul>
  425.         </aside>        <aside id="text-4" class="widget widget_text"><h3 class="widget-title">Recent Photographs</h3>          <div class="textwidget"><!-- Flickr Justified Gallery -->
  426. <!-- + Shortcodes in Sidebar -->
  427. <!-- Flickr Justified Gallery Wordpress Plugin by Miro Mannino -->
  428. <div id="flickrGal0" class="justified-gallery"><a href="https://www.flickr.com/photos/jeetsukumaran/20409957579/in/photostream/lightbox" target="_blank" title="JS-20150812-231303"><img alt="JS-20150812-231303" src="https://farm1.static.flickr.com/641/20409957579_424ff50660_t.jpg" data-safe-src="https://farm1.static.flickr.com/641/20409957579_424ff50660_t.jpg" data-pagespeed-url-hash="4122474218" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20587644032/in/photostream/lightbox" target="_blank" title="JS-20150812-231222"><img alt="JS-20150812-231222" src="https://farm1.static.flickr.com/778/20587644032_bdd68c0c7c_t.jpg" data-safe-src="https://farm1.static.flickr.com/778/20587644032_bdd68c0c7c_t.jpg" data-pagespeed-url-hash="3099364348" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20409942819/in/photostream/lightbox" target="_blank" title="JS-20150812-231101"><img alt="JS-20150812-231101" src="https://farm6.static.flickr.com/5697/20409942819_a62995c21a_t.jpg" data-safe-src="https://farm6.static.flickr.com/5697/20409942819_a62995c21a_t.jpg" data-pagespeed-url-hash="1494129460" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20195650482/in/photostream/lightbox" target="_blank" title="JS-20150706-102222-4-Edit"><img alt="JS-20150706-102222-4-Edit" src="https://farm1.static.flickr.com/282/20195650482_6f7730bdb4_t.jpg" data-safe-src="https://farm1.static.flickr.com/282/20195650482_6f7730bdb4_t.jpg" data-pagespeed-url-hash="1209736514" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20017232939/in/photostream/lightbox" target="_blank" title="JS-20150706-101315-Edit"><img alt="JS-20150706-101315-Edit" src="https://farm1.static.flickr.com/377/20017232939_8504eded36_t.jpg" data-safe-src="https://farm1.static.flickr.com/377/20017232939_8504eded36_t.jpg" data-pagespeed-url-hash="3392016714" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20203823765/in/photostream/lightbox" target="_blank" title="JS-20150706-090617-2-Edit"><img alt="JS-20150706-090617-2-Edit" src="https://farm1.static.flickr.com/283/20203823765_1f8bf8d6f6_t.jpg" data-safe-src="https://farm1.static.flickr.com/283/20203823765_1f8bf8d6f6_t.jpg" data-pagespeed-url-hash="1262310211" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20209520361/in/photostream/lightbox" target="_blank" title="JS-20150706-084041-2-Edit-Edit"><img alt="JS-20150706-084041-2-Edit-Edit" src="https://farm1.static.flickr.com/473/20209520361_9f8ea88e68_t.jpg" data-safe-src="https://farm1.static.flickr.com/473/20209520361_9f8ea88e68_t.jpg" data-pagespeed-url-hash="4019228701" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/19581158044/in/photostream/lightbox" target="_blank" title="JS-20150706-083527-4-Edit"><img alt="JS-20150706-083527-4-Edit" src="https://farm1.static.flickr.com/497/19581158044_0bbb418a2d_t.jpg" data-safe-src="https://farm1.static.flickr.com/497/19581158044_0bbb418a2d_t.jpg" data-pagespeed-url-hash="976697807" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20015781370/in/photostream/lightbox" target="_blank" title="JS-20150706-083525"><img alt="JS-20150706-083525" src="https://farm1.static.flickr.com/468/20015781370_96a8188e9c_t.jpg" data-safe-src="https://farm1.static.flickr.com/468/20015781370_96a8188e9c_t.jpg" data-pagespeed-url-hash="1007186671" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/19581147504/in/photostream/lightbox" target="_blank" title="JS-20150706-081943"><img alt="JS-20150706-081943" src="https://farm1.static.flickr.com/507/19581147504_2f14af4ec8_t.jpg" data-safe-src="https://farm1.static.flickr.com/507/19581147504_2f14af4ec8_t.jpg" data-pagespeed-url-hash="3934554564" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20195619122/in/photostream/lightbox" target="_blank" title="JS-20150706-080446-6-Edit"><img alt="JS-20150706-080446-6-Edit" src="https://farm1.static.flickr.com/483/20195619122_74cd63dc36_t.jpg" data-safe-src="https://farm1.static.flickr.com/483/20195619122_74cd63dc36_t.jpg" data-pagespeed-url-hash="3056852057" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20177541836/in/photostream/lightbox" target="_blank" title="JS-20150703-152505"><img alt="JS-20150703-152505" src="https://farm1.static.flickr.com/472/20177541836_00455fc02d_t.jpg" data-safe-src="https://farm1.static.flickr.com/472/20177541836_00455fc02d_t.jpg" data-pagespeed-url-hash="2039096587" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20017146129/in/photostream/lightbox" target="_blank" title="JS-20150705-144438-2"><img alt="JS-20150705-144438-2" src="https://farm1.static.flickr.com/349/20017146129_7feedb30bc_t.jpg" data-safe-src="https://farm1.static.flickr.com/349/20017146129_7feedb30bc_t.jpg" data-pagespeed-url-hash="334331747" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20015696398/in/photostream/lightbox" target="_blank" title="JS-20150705-093338-2"><img alt="JS-20150705-093338-2" src="https://farm4.static.flickr.com/3721/20015696398_eca2c333a4_t.jpg" data-safe-src="https://farm4.static.flickr.com/3721/20015696398_eca2c333a4_t.jpg" data-pagespeed-url-hash="1032972808" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/19582754483/in/photostream/lightbox" target="_blank" title="JS-20150705-093227-2"><img alt="JS-20150705-093227-2" src="https://farm1.static.flickr.com/437/19582754483_c4e07f2719_t.jpg" data-safe-src="https://farm1.static.flickr.com/437/19582754483_c4e07f2719_t.jpg" data-pagespeed-url-hash="1712656401" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20017129189/in/photostream/lightbox" target="_blank" title="JS-20150705-093046-Edit"><img alt="JS-20150705-093046-Edit" src="https://farm1.static.flickr.com/358/20017129189_e3a8ab2ddd_t.jpg" data-safe-src="https://farm1.static.flickr.com/358/20017129189_e3a8ab2ddd_t.jpg" data-pagespeed-url-hash="1752336209" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20015679728/in/photostream/lightbox" target="_blank" title="JS-20150705-092450-Edit-Edit"><img alt="JS-20150705-092450-Edit-Edit" src="https://farm1.static.flickr.com/362/20015679728_99048f77fd_t.jpg" data-safe-src="https://farm1.static.flickr.com/362/20015679728_99048f77fd_t.jpg" data-pagespeed-url-hash="970043675" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20195533442/in/photostream/lightbox" target="_blank" title="JS-20150702-105721-3"><img alt="JS-20150702-105721-3" src="https://farm1.static.flickr.com/376/20195533442_a8095a4f1f_t.jpg" data-safe-src="https://farm1.static.flickr.com/376/20195533442_a8095a4f1f_t.jpg" data-pagespeed-url-hash="3513074678" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20177456516/in/photostream/lightbox" target="_blank" title="JS-20150702-092141"><img alt="JS-20150702-092141" src="https://farm4.static.flickr.com/3787/20177456516_b26afe738f_t.jpg" data-safe-src="https://farm4.static.flickr.com/3787/20177456516_b26afe738f_t.jpg" data-pagespeed-url-hash="1697030075" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a><a href="https://www.flickr.com/photos/jeetsukumaran/20209405381/in/photostream/lightbox" target="_blank" title="JS-20150702-083758"><img alt="JS-20150702-083758" src="https://farm1.static.flickr.com/532/20209405381_4f6557fce5_t.jpg" data-safe-src="https://farm1.static.flickr.com/532/20209405381_4f6557fce5_t.jpg" data-pagespeed-url-hash="3707694209" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/></a></div><script type="text/javascript">function fjgwppInit_flickrGal0(){jQuery("#flickrGal0").justifiedGallery({'lastRow':'justify','rowHeight':60,'fixedHeight':false,'captions':false,'randomize':true,'margins':1,'sizeRangeSuffixes':{'lt100':'_t','lt240':'_m','lt320':'_n','lt500':'','lt640':'_z','lt1024':'_b'}});fjgwppDisableContextMenu(jQuery("#flickrGal0").find("> a"));}if(typeof fjgwpp_galleriesInit_functions==="undefined")fjgwpp_galleriesInit_functions=[];fjgwpp_galleriesInit_functions.push(fjgwppInit_flickrGal0);</script>
  429. (<a href="https://www.flickr.com/photos/jeetsukumaran/sets/" target="_blank">view all by categories</a> | <a href="https://www.flickr.com/photos/jeetsukumaran/" target="_blank">view all by date/time</a>)</div>
  430.         </aside><aside id="recent-comments-2" class="widget widget_recent_comments"><h3 class="widget-title">Recent Comments</h3><ul id="recentcomments"><li class="recentcomments"><span class="comment-author-link">Jeet Sukumaran</span> on <a href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/#comment-245893">Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong)</a></li><li class="recentcomments"><span class="comment-author-link">fryfrog</span> on <a href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/#comment-245892">Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong)</a></li><li class="recentcomments"><span class="comment-author-link"><a href='https://graingert.co.uk' rel='external nofollow' class='url'>Thomas</a></span> on <a href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/#comment-245884">Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong)</a></li><li class="recentcomments"><span class="comment-author-link"><a href='https://graingert.co.uk' rel='external nofollow' class='url'>Thomas</a></span> on <a href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/#comment-245878">Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong)</a></li><li class="recentcomments"><span class="comment-author-link"><a href='http://blog.petrzemek.net/2016/04/06/things-about-vim-i-wish-i-knew-earlier/' rel='external nofollow' class='url'>Things About Vim I Wish I Knew Earlier | Petr Zemek</a></span> on <a href="http://jeetworks.org/vim-making-those-arrow-keys-work-for-you-or-why-the-anti-arrow-key-propoganda-is-wrong/#comment-244682">Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong)</a></li></ul></aside><aside id="categories-2" class="widget widget_categories"><h3 class="widget-title">Post Categories</h3>        <ul>
  431.     <li class="cat-item cat-item-3"><a href="http://jeetworks.org/category/computing/">Computing and Programming</a>
  432. </li>
  433.     <li class="cat-item cat-item-39"><a href="http://jeetworks.org/category/evolutionary-biology/">Evolutionary Biology</a>
  434. </li>
  435.     <li class="cat-item cat-item-2"><a href="http://jeetworks.org/category/photography/">Photography</a>
  436. </li>
  437.     <li class="cat-item cat-item-1"><a href="http://jeetworks.org/category/uncategorized/">Uncategorized</a>
  438. </li>
  439.         </ul>
  440. </aside><aside id="meta-2" class="widget widget_meta"><h3 class="widget-title">Meta</h3>            <ul>
  441.                         <li><a href="http://jeetworks.org/wp-login.php">Log in</a></li>
  442.             <li><a href="http://jeetworks.org/feed/">Entries <abbr title="Really Simple Syndication">RSS</abbr></a></li>
  443.             <li><a href="http://jeetworks.org/comments/feed/">Comments <abbr title="Really Simple Syndication">RSS</abbr></a></li>
  444.             <li><a href="https://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress.org</a></li>           </ul>
  445.             </aside>    </div><!-- #secondary.widget-area -->
  446.     </div>
  447. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement