Chris's Wiki :: blog/unix/ViEntanglement Commentshttps://utcc.utoronto.ca/~cks/space/blog/unix/ViEntanglement?atomcommentsDWiki2014-01-04T01:13:17ZRecent comments in Chris's Wiki :: blog/unix/ViEntanglement.By Steve on /blog/unix/ViEntanglementtag:CSpace:blog/unix/ViEntanglement:309b517a93df9e88e32fa7721d096bd346e42e3aStevehttp://www.vimgeeks.org/<div class="wikitext"><p>I spent years as a <code>vi</code> user, trying to ignore Vim features other than syntax highlighting. I now realize that was a horrible mistake. Vim features like text objects, visual modes (especially block visual mode), enhanced regex support, buffers, windows, etc., etc. make plain old <code>vi</code> feel positively primitive by comparison.</p>
<p>You might want to spend some time watching some of Drew Neil's <a href="http://vimcasts.org/">Vimcasts</a>, or maybe even pick up his book <a href="http://pragprog.com/book/dnvim/practical-vim">Practical Vim</a>, to get an idea what you're missing by not embracing Vim fully.</p>
</div>2014-01-04T01:13:17ZBy dozzie on /blog/unix/ViEntanglementtag:CSpace:blog/unix/ViEntanglement:358b770c29eb9abd5338343c7eff6a77f7527de0dozzie<div class="wikitext"><blockquote><p>My obvious weak areas [...]: working fluidly with multiple files and also with split screens for editing two files simultaneously.</p>
</blockquote>
<p>Here's a small cheat sheet:</p>
<ul><li><code>:new</code>, <code>:vnew</code> -- new, empty file (split window horizontally or vertically)</li>
<li><code>:split</code>, <code>:split filename.txt</code>, <code>:vsplit</code> -- open file (current or
specified) as a new window</li>
<li><code>^W f</code> -- open file pointed by the cursor</li>
<li><code>^W c</code>, <code>:close</code>, <code>^W q</code>, <code>:quit</code> -- close current window (first
two never close the last window)</li>
<li><code>^W #</code>, where <code>#</code> is one of <code>hjkl</code> -- move cursor to different
window, according to movement key</li>
<li><code>^W #</code>, where <code>#</code> is one of <code>+-<></code> -- resize window vertically or
horizontally</li>
<li><code>^W # _</code>, <code>^W # |</code>, where <code>#</code> is a number -- make current window
<code>#</code> lines high/columns wide</li>
<li><code>^W =</code> -- equalize width/height of windows</li>
</ul>
<p>Generally you could want to read <code>:help windows</code>.</p>
</div>2013-12-30T11:02:17Z