diff options
author | Akshay <[email protected]> | 2019-10-07 03:35:16 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2019-10-07 03:35:16 +0100 |
commit | e549283cdeecb79b67005d3905caddc322fc254f (patch) | |
tree | 06f8bda4c9ae354ab7322737d545bd5386a86cd1 /docs | |
parent | 464792b711c55800d62067b9ebaf2f1b0b0929fb (diff) |
fix scrolling
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.html | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/docs/index.html b/docs/index.html index c57b1f7..f8bc349 100644 --- a/docs/index.html +++ b/docs/index.html | |||
@@ -39,7 +39,7 @@ function showPost(id) { | |||
39 | 39 | ||
40 | <div class="post"> | 40 | <div class="post"> |
41 | <div class="date">07/08 2019</div> | 41 | <div class="date">07/08 2019</div> |
42 | <a id="post-bye_bye_BDFs.md" href="#bye_bye_BDFs.md" class="post-link" onClick="showPost('bye_bye_BDFs.md')" >Bye Bye BDFs</a> | 42 | <a id="post-bye_bye_BDFs.md" class="post-link" onClick="showPost('bye_bye_BDFs.md')" >Bye Bye BDFs</a> |
43 | <div id="bye_bye_BDFs.md" class="post-text" style="display: none"> | 43 | <div id="bye_bye_BDFs.md" class="post-text" style="display: none"> |
44 | <p>Glyph Bitmap Distribution Format is no more, as the creators of | 44 | <p>Glyph Bitmap Distribution Format is no more, as the creators of |
45 | <a href="https://pango.org">Pango</a>, one of the most widely used text rendering | 45 | <a href="https://pango.org">Pango</a>, one of the most widely used text rendering |
@@ -73,7 +73,7 @@ OpenType font formats.</p> | |||
73 | 73 | ||
74 | <div class="post"> | 74 | <div class="post"> |
75 | <div class="date">02/08 2019</div> | 75 | <div class="date">02/08 2019</div> |
76 | <a id="post-onivim_sucks.md" href="#onivim_sucks.md" class="post-link" onClick="showPost('onivim_sucks.md')" >Onivim Sucks</a> | 76 | <a id="post-onivim_sucks.md" class="post-link" onClick="showPost('onivim_sucks.md')" >Onivim Sucks</a> |
77 | <div id="onivim_sucks.md" class="post-text" style="display: none"> | 77 | <div id="onivim_sucks.md" class="post-text" style="display: none"> |
78 | <p><a href="https://v2.onivim.io">Onivim</a> is a ‘modern modal editor’, combining fancy | 78 | <p><a href="https://v2.onivim.io">Onivim</a> is a ‘modern modal editor’, combining fancy |
79 | interface and language features with vim-style modal editing. What’s wrong you | 79 | interface and language features with vim-style modal editing. What’s wrong you |
@@ -109,7 +109,7 @@ final price! If you are on the lookout for an editor, I would suggest using | |||
109 | 109 | ||
110 | <div class="post"> | 110 | <div class="post"> |
111 | <div class="date">31/07 2019</div> | 111 | <div class="date">31/07 2019</div> |
112 | <a id="post-bash_harder_with_vim.md" href="#bash_harder_with_vim.md" class="post-link" onClick="showPost('bash_harder_with_vim.md')" >Bash Harder With Vim</a> | 112 | <a id="post-bash_harder_with_vim.md" class="post-link" onClick="showPost('bash_harder_with_vim.md')" >Bash Harder With Vim</a> |
113 | <div id="bash_harder_with_vim.md" class="post-text" style="display: none"> | 113 | <div id="bash_harder_with_vim.md" class="post-text" style="display: none"> |
114 | <p>Bash is tricky, don’t let your editor get in your way. Here’s a couple of neat | 114 | <p>Bash is tricky, don’t let your editor get in your way. Here’s a couple of neat |
115 | additions you could make to your <code>vimrc</code> for a better shell programming | 115 | additions you could make to your <code>vimrc</code> for a better shell programming |
@@ -176,39 +176,9 @@ Press ENTER or type command to continue | |||
176 | 176 | ||
177 | <div class="post"> | 177 | <div class="post"> |
178 | <div class="date">30/07 2019</div> | 178 | <div class="date">30/07 2019</div> |
179 | <a id="post-hold_position!.md" href="#hold_position!.md" class="post-link" onClick="showPost('hold_position!.md')" >Hold Position!</a> | 179 | <a id="post-get_better_at_yanking_and_putting_in_vim.md" class="post-link" onClick="showPost('get_better_at_yanking_and_putting_in_vim.md')" >Get Better At Yanking And Putting In Vim</a> |
180 | <div id="hold_position!.md" class="post-text" style="display: none"> | ||
181 | <p>Often times, when I run a vim command that makes “big” changes to a file (a | ||
182 | macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p> | ||
183 | |||
184 | <p><em>Save position with <code>winsaveview()</code>!</em></p> | ||
185 | |||
186 | <p>The <code>winsaveview()</code> command returns a <code>Dictionary</code> that contains information | ||
187 | about the view of the current window. This includes the cursor line number, | ||
188 | cursor coloumn, the top most line in the window and a couple of other values, | ||
189 | none of which concern us.</p> | ||
190 | |||
191 | <p>Before running our command (one that jumps around the buffer, a lot), we save | ||
192 | our view, and restore it once its done, with <code>winrestview</code>.</p> | ||
193 | |||
194 | <pre><code>let view = winsaveview() | ||
195 | s/\s\+$//gc " find and (confirm) replace trailing blanks | ||
196 | winrestview(view) " restore our original view! | ||
197 | </code></pre> | ||
198 | |||
199 | <p>It might seem a little overkill in the above example, just use “ (double | ||
200 | backticks) instead, but it comes in handy when you run your file through | ||
201 | heavier filtering.</p> | ||
202 | <a href="#hold_position!.md" class="post-end-link" onClick="showPost('hold_position!.md')">↑ Collapse</a> | ||
203 | <div class=separator></div> | ||
204 | </div> | ||
205 | </div> | ||
206 | |||
207 | <div class="post"> | ||
208 | <div class="date">30/07 2019</div> | ||
209 | <a id="post-get_better_at_yanking_and_putting_in_vim.md" href="#get_better_at_yanking_and_putting_in_vim.md" class="post-link" onClick="showPost('get_better_at_yanking_and_putting_in_vim.md')" >Get Better At Yanking And Putting In Vim</a> | ||
210 | <div id="get_better_at_yanking_and_putting_in_vim.md" class="post-text" style="display: none"> | 180 | <div id="get_better_at_yanking_and_putting_in_vim.md" class="post-text" style="display: none"> |
211 | <ol> | 181 | <ol start="1"> |
212 | <li><p>reselecting previously selected text (i use this to fix botched selections):</p> | 182 | <li><p>reselecting previously selected text (i use this to fix botched selections):</p> |
213 | 183 | ||
214 | <pre><code>gv " :h gv for more | 184 | <pre><code>gv " :h gv for more |
@@ -235,6 +205,36 @@ nnoremap gb `[v`] " "a quick map to perform the above | |||
235 | </div> | 205 | </div> |
236 | </div> | 206 | </div> |
237 | 207 | ||
208 | <div class="post"> | ||
209 | <div class="date">30/07 2019</div> | ||
210 | <a id="post-hold_position!.md" class="post-link" onClick="showPost('hold_position!.md')" >Hold Position!</a> | ||
211 | <div id="hold_position!.md" class="post-text" style="display: none"> | ||
212 | <p>Often times, when I run a vim command that makes “big” changes to a file (a | ||
213 | macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p> | ||
214 | |||
215 | <p><em>Save position with <code>winsaveview()</code>!</em></p> | ||
216 | |||
217 | <p>The <code>winsaveview()</code> command returns a <code>Dictionary</code> that contains information | ||
218 | about the view of the current window. This includes the cursor line number, | ||
219 | cursor coloumn, the top most line in the window and a couple of other values, | ||
220 | none of which concern us.</p> | ||
221 | |||
222 | <p>Before running our command (one that jumps around the buffer, a lot), we save | ||
223 | our view, and restore it once its done, with <code>winrestview</code>.</p> | ||
224 | |||
225 | <pre><code>let view = winsaveview() | ||
226 | s/\s\+$//gc " find and (confirm) replace trailing blanks | ||
227 | winrestview(view) " restore our original view! | ||
228 | </code></pre> | ||
229 | |||
230 | <p>It might seem a little overkill in the above example, just use “ (double | ||
231 | backticks) instead, but it comes in handy when you run your file through | ||
232 | heavier filtering.</p> | ||
233 | <a href="#hold_position!.md" class="post-end-link" onClick="showPost('hold_position!.md')">↑ Collapse</a> | ||
234 | <div class=separator></div> | ||
235 | </div> | ||
236 | </div> | ||
237 | |||
238 | </div> | 238 | </div> |
239 | </body> | 239 | </body> |
240 | </html> | 240 | </html> |