TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Vim-vertical: Get around 2-dimensionally in vim

102 pointsby rbongersabout 9 years ago

11 comments

savanalyabout 9 years ago
I learned vim about two years ago and have been using it ever since, and at the time I learned it I learned all the neat combos for moving your cursor (&quot;w&quot;, &quot;5w&quot;, &quot;b&quot;, &quot;^&quot;, &quot;$&quot;, and many other actually complicated ones besides).<p>As clever as these motions are though, easymotion simply blows them out of the water and there&#x27;s no reason to use them. With easy motion it only takes as long as it takes your eye to move to where you want to move and you&#x27;re there...you really can&#x27;t beat that.<p>In some cases of course easymotion isn&#x27;t enough because the place to which you need to move isn&#x27;t on screen. So far all files I edit are short enough that I can scan the whole thing relatively easily by just holding down &quot;J&quot; or &quot;K&quot; (which I have mapped to &quot;10j&quot; and &quot;10k&quot;)
评论 #11701653 未加载
评论 #11702300 未加载
评论 #11701666 未加载
gbrown_about 9 years ago
I find vim-sneak works well for me, as it tries to extend &quot;vim&#x27;s natural language&quot; so to speak.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;justinmk&#x2F;vim-sneak" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;justinmk&#x2F;vim-sneak</a><p>Otherwise relative numbers and gj&#x2F; gk work well enough for me when it comes to moving vertically to a position I can see on the screen.
maxafabout 9 years ago
Has the author heard of gj and gk?
评论 #11701470 未加载
评论 #11701362 未加载
mellingabout 9 years ago
Many editors have an Easy Motion plugin:<p><a href="https:&#x2F;&#x2F;code.tutsplus.com&#x2F;tutorials&#x2F;vim-essential-plugin-easymotion--net-19223" rel="nofollow">https:&#x2F;&#x2F;code.tutsplus.com&#x2F;tutorials&#x2F;vim-essential-plugin-eas...</a><p>I believe Sublime, Emacs, and Atom all have one.
评论 #11701664 未加载
dominotwabout 9 years ago
tldr;<p>&gt; Many times, I have been at the end of a line after editing it and needed to go to a nearby long line.
lervagabout 9 years ago
I find this better solved by vim-columnmove:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;machakann&#x2F;vim-columnmove" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;machakann&#x2F;vim-columnmove</a>
alfanickabout 9 years ago
i&#x27;m happy with :relativenumber and classic motions + marks (eg ma + &#x27;a)
z3t4about 9 years ago
How long does it take to learn the Vim way of navigating so that you do not have to think when doing it, like the fingers move by themselves ?<p>And how much time do you save, compared to placing the cursor using the mouse?
评论 #11702688 未加载
评论 #11702630 未加载
评论 #11702695 未加载
评论 #11703647 未加载
mpdehaan2about 9 years ago
I&#x27;m pretty happy with just<p>:set nu<p>:20 # go to line 20
评论 #11701699 未加载
评论 #11702411 未加载
rbongersabout 9 years ago
Thanks for the other suggestions for vertical movement. I think &#x2F;? and vim-vertical is all I need.
a-babout 9 years ago
First of all, I want to say thanks to both authors Vim-vertical and vim-sneak for trying to do something useful for Vim community.<p>Therefore, I think that it&#x27;s quite a bad idea to use any of this plugins. The reason is that the most powerful Vim&#x27;s concept is text-object and such shortcuts ruining muscle memory and mixing core technology understanding.<p>IMHO easy-motion gives excellent text-object visualization which helps me to understand text structure better.