aboutsummaryrefslogtreecommitdiff
path: root/posts/get_better_at_yanking_and_putting_in_vim.md
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2019-07-30 09:43:35 +0100
committerNerdyPepper <[email protected]>2019-07-30 09:43:35 +0100
commit4e9883d799fcf08f68a30fba78e734d1978c5f09 (patch)
treec15f1db4f0d368d7565b670b170dd048eeb6b15a /posts/get_better_at_yanking_and_putting_in_vim.md
parent23463494c2eeeb20ac162909b520b6828ae7acc8 (diff)
begin writing
Diffstat (limited to 'posts/get_better_at_yanking_and_putting_in_vim.md')
-rw-r--r--posts/get_better_at_yanking_and_putting_in_vim.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/posts/get_better_at_yanking_and_putting_in_vim.md b/posts/get_better_at_yanking_and_putting_in_vim.md
new file mode 100644
index 0000000..44f54f4
--- /dev/null
+++ b/posts/get_better_at_yanking_and_putting_in_vim.md
@@ -0,0 +1,27 @@
1a couple of nifty tricks to help you copy-paste better:
2
31. reselecting previously selected text (i use this to fix botched selections):
4
5 ```
6 gv " :h gv for more
7 " you can use `o` in visual mode to go to the `Other` end of the selection
8 " use a motion to fix the selection
9 ```
10
112. reselecting previously yanked text:
12
13 ```
14 `[v`]
15 `[ " marks the beginning of the previously yanked text :h `[
16 `] " marks the end :h `]
17 v " visual select everything in between
18
19 nnoremap gb `[v`] " "a quick map to perform the above
20 ```
21
223. pasting and indenting text (in one go):
23
24 ```
25 ]p " put (p) and adjust indent to current line
26 ]P " put the text before the cursor (P) and adjust indent to current line
27 ```