|
5 | 5 | <link href="https://learnbyexample.github.io/atom.xml" rel="self" type="application/atom+xml"/>
|
6 | 6 | <link href="https://learnbyexample.github.io"/>
|
7 | 7 | <generator uri="https://www.getzola.org/">Zola</generator>
|
8 |
| - <updated>2023-06-20T00:00:00+00:00</updated> |
| 8 | + <updated>2023-06-26T00:00:00+00:00</updated> |
9 | 9 | <id>https://learnbyexample.github.io/atom.xml</id>
|
| 10 | + <entry xml:lang="en"> |
| 11 | + <title>Vim tip 28: miscellaneous motion and reposition commands</title> |
| 12 | + <published>2023-06-26T00:00:00+00:00</published> |
| 13 | + <updated>2023-06-26T00:00:00+00:00</updated> |
| 14 | + <link rel="alternate" href="https://learnbyexample.github.io/tips/vim-tip-28/" type="text/html"/> |
| 15 | + <id>https://learnbyexample.github.io/tips/vim-tip-28/</id> |
| 16 | + <content type="html"><p>Moving within the visible window:</p> |
| 17 | +<ul> |
| 18 | +<li><kbd>H</kbd> move to the first non-blank character of the top (home) line of the visible window</li> |
| 19 | +<li><kbd>M</kbd> move to the first non-blank character of the middle line of the visible window</li> |
| 20 | +<li><kbd>L</kbd> move to the first non-blank character of the bottom (low) line of the visible window</li> |
| 21 | +</ul> |
| 22 | +<p>Reposition the current line:</p> |
| 23 | +<ul> |
| 24 | +<li><kbd>Ctrl</kbd>+<kbd>e</kbd> scroll up by a line</li> |
| 25 | +<li><kbd>Ctrl</kbd>+<kbd>y</kbd> scroll down by a line</li> |
| 26 | +<li><kbd>zz</kbd> reposition the current line to the middle of the visible window |
| 27 | +<ul> |
| 28 | +<li>useful to see context around lines that are nearer to the top/bottom of the visible window</li> |
| 29 | +</ul> |
| 30 | +</li> |
| 31 | +<li><kbd>zt</kbd> reposition the current line to the top of the visible window</li> |
| 32 | +<li><kbd>zb</kbd> reposition the current line to the bottom of the visible window</li> |
| 33 | +</ul> |
| 34 | +<p><img src="/images/info.svg" alt="info" /> See <a href="https://vimhelp.org/options.txt.html#%27scrolloff%27">:h 'scrolloff'</a> option if you want to always show context around the current line.</p> |
| 35 | +<p><strong>Video demo</strong>:</p> |
| 36 | +<p align="center"><iframe width="560" height="315" loading="lazy" src="https://www.youtube.com/embed/XRXO4Ns8rPE" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p> |
| 37 | +<br> |
| 38 | +<p><img src="/images/info.svg" alt="info" /> See also my <a href="https://github.com/learnbyexample/vim_reference">Vim Reference Guide</a> and <a href="https://learnbyexample.github.io/curated_resources/vim.html">curated list of resources for Vim</a>.</p> |
| 39 | +</content> |
| 40 | + </entry> |
10 | 41 | <entry xml:lang="en">
|
11 | 42 | <title>CLI tip 29: define fields using FPAT in GNU awk</title>
|
12 | 43 | <published>2023-06-20T00:00:00+00:00</published>
|
|
0 commit comments