diff options
Diffstat (limited to 'docs/posts/get_better_at_yanking_and_putting_in_vim.html')
-rw-r--r-- | docs/posts/get_better_at_yanking_and_putting_in_vim.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/posts/get_better_at_yanking_and_putting_in_vim.html b/docs/posts/get_better_at_yanking_and_putting_in_vim.html new file mode 100644 index 0000000..82b283f --- /dev/null +++ b/docs/posts/get_better_at_yanking_and_putting_in_vim.html | |||
@@ -0,0 +1,48 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html lang="en"> | ||
3 | <head> | ||
4 | <link rel="stylesheet" href="/style.css"> | ||
5 | <meta charset="UTF-8"> | ||
6 | <meta name="viewport" content="initial-scale=1"> | ||
7 | <meta content="#ffffff" name="theme-color"> | ||
8 | <meta name="HandheldFriendly" content="true"> | ||
9 | <meta property="og:title" content="nerdypepper"> | ||
10 | <meta property="og:type" content="website"> | ||
11 | <meta property="og:description" content="a static site {for, by, about} me "> | ||
12 | <meta property="og:url" content="https://nerdypepper.tech"> | ||
13 | <body> | ||
14 | <div class="post posts"> | ||
15 | <div class="date">29/07 2019</div> | ||
16 | <span style="font-size: 2rem; font-weight: 600"> | ||
17 | Get Better At Yanking And Putting In Vim | ||
18 | </span> | ||
19 | <div class="post-text"> | ||
20 | <ol start="1"> | ||
21 | <li><p>reselecting previously selected text (i use this to fix botched selections):</p> | ||
22 | |||
23 | <pre><code>gv " :h gv for more | ||
24 | " you can use `o` in visual mode to go to the `Other` end of the selection | ||
25 | " use a motion to fix the selection | ||
26 | </code></pre></li> | ||
27 | <li><p>reselecting previously yanked text:</p> | ||
28 | |||
29 | <pre><code>`[v`] | ||
30 | `[ " marks the beginning of the previously yanked text :h `[ | ||
31 | `] " marks the end :h `] | ||
32 | v " visual select everything in between | ||
33 | |||
34 | nnoremap gb `[v`] " "a quick map to perform the above | ||
35 | </code></pre></li> | ||
36 | <li><p>pasting and indenting text (in one go):</p> | ||
37 | |||
38 | <pre><code>]p " put (p) and adjust indent to current line | ||
39 | ]P " put the text before the cursor (P) and adjust indent to current line | ||
40 | </code></pre></li> | ||
41 | </ol> | ||
42 | |||
43 | </div> | ||
44 | <a href="/index.html" class="post-end-link">‹ Back</a> | ||
45 | <div class="separator"></div> | ||
46 | </div> | ||
47 | </body> | ||
48 | </html> | ||