From dca1f4d94d0b7cfcd184754291191a41f6e4ffd7 Mon Sep 17 00:00:00 2001 From: tomit4 Date: Fri, 8 Oct 2021 16:09:39 -0700 Subject: [PATCH] updated vim notes --- vim_notes.txt | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/vim_notes.txt b/vim_notes.txt index c1b1ad94..ee4bb334 100644 --- a/vim_notes.txt +++ b/vim_notes.txt @@ -52,11 +52,20 @@ yiw: copy the current word, excluding surrounding whitespace yaw: copy the current word, including surrounding whitespace ytx: copy from the current cursor position up to and before the character represented by x yfx: copy from the current cursor position up to and including the character represented by x +p: paste what you've copied -# Undo/Redo: +# Cut +# hit d at line you wish to current +d +# hit ESC +ESC +# navigate to line you wish to paste at, and hit p +p -u: undo -Ctrl-R: redo +# Undo +u +# Redo +Ctrl-R # Indent/Unindent: @@ -78,6 +87,10 @@ CTRL + F (Page Down) g/^\s*$/d +# Append to end of every line: + +:%s/$/,/ + # Running Bash Commands from within Vim: :! @@ -91,6 +104,10 @@ To open a new tab there are a few options, one is to use the command line: You can cycle through tabs using: gt or gT +To open up a new vertical window: + +:vert new filename.txt + You can cycle through windows using: Ctrl + w or Ctrl + Shift + w