From 4e9883d799fcf08f68a30fba78e734d1978c5f09 Mon Sep 17 00:00:00 2001 From: NerdyPepper Date: Tue, 30 Jul 2019 14:13:35 +0530 Subject: begin writing --- posts/another_post_to_test_date.md | 1 + posts/get_better_at_yanking_and_putting_in_vim.md | 27 +++++++++++++++++++++++ posts/z_is_the_latest_post.md | 2 ++ 3 files changed, 30 insertions(+) create mode 100644 posts/another_post_to_test_date.md create mode 100644 posts/get_better_at_yanking_and_putting_in_vim.md create mode 100644 posts/z_is_the_latest_post.md (limited to 'posts') diff --git a/posts/another_post_to_test_date.md b/posts/another_post_to_test_date.md new file mode 100644 index 0000000..6349517 --- /dev/null +++ b/posts/another_post_to_test_date.md @@ -0,0 +1 @@ +this posts tests chronological arrangement of items 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 @@ +a couple of nifty tricks to help you copy-paste better: + +1. reselecting previously selected text (i use this to fix botched selections): + + ``` + gv " :h gv for more + " you can use `o` in visual mode to go to the `Other` end of the selection + " use a motion to fix the selection + ``` + +2. reselecting previously yanked text: + + ``` + `[v`] + `[ " marks the beginning of the previously yanked text :h `[ + `] " marks the end :h `] + v " visual select everything in between + + nnoremap gb `[v`] " "a quick map to perform the above + ``` + +3. pasting and indenting text (in one go): + + ``` + ]p " put (p) and adjust indent to current line + ]P " put the text before the cursor (P) and adjust indent to current line + ``` diff --git a/posts/z_is_the_latest_post.md b/posts/z_is_the_latest_post.md new file mode 100644 index 0000000..5feb57e --- /dev/null +++ b/posts/z_is_the_latest_post.md @@ -0,0 +1,2 @@ +this is the latest post, +hope it shows up at the top -- cgit v1.2.3