aboutsummaryrefslogtreecommitdiff
path: root/docs/posts/get_better_at_yanking_and_putting_in_vim/index.html
blob: 6590d4c5dd2d443ce0ef753eecc4ea5ba7e8e475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
  <head>
    <link rel="stylesheet" href="/style.css">
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1">
    <meta content="#ffffff" name="theme-color">
    <meta name="HandheldFriendly" content="true">
    <meta property="og:title" content="nerdypepper">
    <meta property="og:type" content="website">
    <meta property="og:description" content="a static site {for, by, about} me ">
    <meta property="og:url" content="https://peppe.rs">
    <link rel="icon" type="image/x-icon" href="/favicon.png">
    <title>Get Better At Yanking And Putting In Vim · peppe.rs</title>
    <body>
      <div class="posts">
        <div class="post">
          <a href="/" class="post-end-link">⟵ Back</a>
          <a class="stats post-end-link" href="https://raw.githubusercontent.com/nerdypepper/site/master/posts/get_better_at_yanking_and_putting_in_vim.md
">View Raw</a>
          <div class="date">
            29/07 — 2019
            <div class="stats">
              <span class="stats-number">
                10.78
              </span>
              <span class="stats-unit">cm</span>
              &nbsp
              <span class="stats-number">
                0.9
              </span>
              <span class="stats-unit">min</span>
            </div>
          </div>
          <span class="post-title">
            Get Better At Yanking And Putting In Vim
          </span>
          <div class="post-text">
            <ol start="1">
<li><p>reselecting previously selected text (i use this to fix botched selections):</p>

<pre><code>gv  &#34; :h gv for more
    &#34; you can use `o` in visual mode to go to the `Other` end of the selection
    &#34; use a motion to fix the selection
</code></pre></li>
<li><p>reselecting previously yanked text:</p>

<pre><code>`[v`]
`[         &#34; marks the beginning of the previously yanked text   :h `[
`]         &#34; marks the end                                       :h `]
 v         &#34; visual select everything in between

nnoremap gb `[v`]    &#34; &#34;a quick map to perform the above
</code></pre></li>
<li><p>pasting and indenting text (in one go):</p>

<pre><code>]p   &#34; put (p) and adjust indent to current line
]P   &#34; put the text before the cursor (P) and adjust indent to current line
</code></pre></li>
</ol>

          </div>
          
    <div class=intro>
        Hi. <a href=https://peppe.rs/index.xml class=feed-button>Subscribe</a>
        <p>I'm Akshay, I go by nerd or nerdypepper on the internet.</p>
        <p>
        I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer.
        I write open-source stuff to pass time. I also design fonts: scientifica, curie.
        Things I find cool usually end up here.
        </p>
        <p>Get in touch at [email protected] or [email protected].</p>
    </div>
    
          <a href="/" class="post-end-link">⟵ Back</a>
          <a class="stats post-end-link" href="https://raw.githubusercontent.com/nerdypepper/site/master/posts/get_better_at_yanking_and_putting_in_vim.md
">View Raw</a>
        </div>
      </div>
    </body>
</html>