aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.html70
-rwxr-xr-xgenerate.sh2
2 files changed, 36 insertions, 36 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 &#8216;modern modal editor&#8217;, combining fancy 78 <p><a href="https://v2.onivim.io">Onivim</a> is a &#8216;modern modal editor&#8217;, combining fancy
79interface and language features with vim-style modal editing. What&#8217;s wrong you 79interface and language features with vim-style modal editing. What&#8217;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&#8217;t let your editor get in your way. Here&#8217;s a couple of neat 114 <p>Bash is tricky, don&#8217;t let your editor get in your way. Here&#8217;s a couple of neat
115additions you could make to your <code>vimrc</code> for a better shell programming 115additions 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 &#8220;big&#8221; changes to a file (a
182macro 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
187about the view of the current window. This includes the cursor line number,
188cursor coloumn, the top most line in the window and a couple of other values,
189none of which concern us.</p>
190
191<p>Before running our command (one that jumps around the buffer, a lot), we save
192our view, and restore it once its done, with <code>winrestview</code>.</p>
193
194<pre><code>let view = winsaveview()
195s/\s\+$//gc &quot; find and (confirm) replace trailing blanks
196winrestview(view) &quot; restore our original view!
197</code></pre>
198
199<p>It might seem a little overkill in the above example, just use &#8220; (double
200backticks) instead, but it comes in handy when you run your file through
201heavier 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 &quot; :h gv for more 184<pre><code>gv &quot; :h gv for more
@@ -235,6 +205,36 @@ nnoremap gb `[v`] &quot; &quot;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 &#8220;big&#8221; changes to a file (a
213macro 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
218about the view of the current window. This includes the cursor line number,
219cursor coloumn, the top most line in the window and a couple of other values,
220none of which concern us.</p>
221
222<p>Before running our command (one that jumps around the buffer, a lot), we save
223our view, and restore it once its done, with <code>winrestview</code>.</p>
224
225<pre><code>let view = winsaveview()
226s/\s\+$//gc &quot; find and (confirm) replace trailing blanks
227winrestview(view) &quot; restore our original view!
228</code></pre>
229
230<p>It might seem a little overkill in the above example, just use &#8220; (double
231backticks) instead, but it comes in handy when you run your file through
232heavier 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>
diff --git a/generate.sh b/generate.sh
index 765accf..2d92b78 100755
--- a/generate.sh
+++ b/generate.sh
@@ -14,7 +14,7 @@ post_wrapper() {
14 echo -ne " 14 echo -ne "
15 <div class=\"post\"> 15 <div class=\"post\">
16 <div class=\"date\">$3</div> 16 <div class=\"date\">$3</div>
17 <a id=\"post-$1\" href=\"#$1\" class=\"post-link\" onClick=\"showPost('$1')\" >$title</a> 17 <a id=\"post-$1\" class=\"post-link\" onClick=\"showPost('$1')\" >$title</a>
18 <div id=\"$1\" class=\"post-text\" style=\"display: none\"> 18 <div id=\"$1\" class=\"post-text\" style=\"display: none\">
19 $2 19 $2
20 <a href=\"#$1\" class=\"post-end-link\" onClick=\"showPost('$1')\">↑ Collapse</a> 20 <a href=\"#$1\" class=\"post-end-link\" onClick=\"showPost('$1')\">↑ Collapse</a>