aboutsummaryrefslogtreecommitdiff
path: root/docs/posts/hold_position!
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-04-16 16:10:45 +0100
committerAkshay <[email protected]>2020-04-16 16:10:45 +0100
commitada45c1bea838e5f38f24fe37e558c1b7959ae28 (patch)
treef163cfc35f2080cc7ff4decdaec0b574e314b3a8 /docs/posts/hold_position!
parent26af9ac49c3b05151f23ca1087bb06708e97a096 (diff)
redo pandoc commands to print fragments only
Diffstat (limited to 'docs/posts/hold_position!')
-rw-r--r--docs/posts/hold_position!/index.html31
1 files changed, 7 insertions, 24 deletions
diff --git a/docs/posts/hold_position!/index.html b/docs/posts/hold_position!/index.html
index b14d41a..61e4768 100644
--- a/docs/posts/hold_position!/index.html
+++ b/docs/posts/hold_position!/index.html
@@ -2,6 +2,7 @@
2<html lang="en"> 2<html lang="en">
3 <head> 3 <head>
4 <link rel="stylesheet" href="/style.css"> 4 <link rel="stylesheet" href="/style.css">
5 <link rel="stylesheet" href="/syntax.css">
5 <meta charset="UTF-8"> 6 <meta charset="UTF-8">
6 <meta name="viewport" content="initial-scale=1"> 7 <meta name="viewport" content="initial-scale=1">
7 <meta content="#ffffff" name="theme-color"> 8 <meta content="#ffffff" name="theme-color">
@@ -37,27 +38,7 @@
37 Hold Position! 38 Hold Position!
38 </h1> 39 </h1>
39 <div class="post-text"> 40 <div class="post-text">
40 <!DOCTYPE html> 41 <p>Often times, when I run a vim command that makes “big” changes to a file (a macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p>
41<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
42<head>
43 <meta charset="utf-8" />
44 <meta name="generator" content="pandoc" />
45 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
46 <title>hold_position!</title>
47 <style>
48 code{white-space: pre-wrap;}
49 span.smallcaps{font-variant: small-caps;}
50 span.underline{text-decoration: underline;}
51 div.column{display: inline-block; vertical-align: top; width: 50%;}
52 div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
53 ul.task-list{list-style: none;}
54 </style>
55 <!--[if lt IE 9]>
56 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
57 <![endif]-->
58</head>
59<body>
60<p>Often times, when I run a vim command that makes “big” changes to a file (a macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p>
61<p><em>Save position with <code>winsaveview()</code>!</em></p> 42<p><em>Save position with <code>winsaveview()</code>!</em></p>
62<p>The <code>winsaveview()</code> command returns a <code>Dictionary</code> that contains information about the view of the current window. This includes the cursor line number, cursor coloumn, the top most line in the window and a couple of other values, none of which concern us.</p> 43<p>The <code>winsaveview()</code> command returns a <code>Dictionary</code> that contains information about the view of the current window. This includes the cursor line number, cursor coloumn, the top most line in the window and a couple of other values, none of which concern us.</p>
63<p>Before running our command (one that jumps around the buffer, a lot), we save our view, and restore it once its done, with <code>winrestview</code>.</p> 44<p>Before running our command (one that jumps around the buffer, a lot), we save our view, and restore it once its done, with <code>winrestview</code>.</p>
@@ -65,13 +46,15 @@
65s/\s\+$//gc &quot; find and (confirm) replace trailing blanks 46s/\s\+$//gc &quot; find and (confirm) replace trailing blanks
66winrestview(view) &quot; restore our original view!</code></pre> 47winrestview(view) &quot; restore our original view!</code></pre>
67<p>It might seem a little overkill in the above example, just use `` (double backticks) instead, but it comes in handy when you run your file through heavier filtering.</p> 48<p>It might seem a little overkill in the above example, just use `` (double backticks) instead, but it comes in handy when you run your file through heavier filtering.</p>
68</body>
69</html>
70 49
71 </div> 50 </div>
72 51
73 <div class=intro> 52 <div class=intro>
74 Hi. <a href=https://peppe.rs/index.xml class=feed-button>Subscribe</a> 53 Hi.
54 <div class=hot-links>
55 <a href=https://peppe.rs/index.xml class=feed-button>Subscribe</a>
56 <a href=https://liberapay.com/nerdypepper/donate class=donate-button>Donate</a>
57 </div>
75 <p>I'm Akshay, I go by nerd or nerdypepper on the internet.</p> 58 <p>I'm Akshay, I go by nerd or nerdypepper on the internet.</p>
76 <p> 59 <p>
77 I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. 60 I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer.