From 3b0142cedcde39e4c2097ecd916a870a3ced5ec6 Mon Sep 17 00:00:00 2001 From: Vito Graffagnino Date: Tue, 8 Sep 2020 18:10:49 +0100 Subject: Added the relevent parts of the .config directory. Alss add ssh config --- vimwiki/Quickly Quote/.unquote words.md.swp | Bin 0 -> 12288 bytes vimwiki/Quickly Quote/unquote words.md | 37 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 vimwiki/Quickly Quote/.unquote words.md.swp create mode 100644 vimwiki/Quickly Quote/unquote words.md (limited to 'vimwiki/Quickly Quote') diff --git a/vimwiki/Quickly Quote/.unquote words.md.swp b/vimwiki/Quickly Quote/.unquote words.md.swp new file mode 100644 index 0000000..f14e420 Binary files /dev/null and b/vimwiki/Quickly Quote/.unquote words.md.swp differ diff --git a/vimwiki/Quickly Quote/unquote words.md b/vimwiki/Quickly Quote/unquote words.md new file mode 100644 index 0000000..6e7a75a --- /dev/null +++ b/vimwiki/Quickly Quote/unquote words.md @@ -0,0 +1,37 @@ + + +###Easy Method### + +Use surround.vim plugin + +###Native Vim methods### + + __Quote a word using single quotes__ + + `ciw'Ctrl+r"'` + + * `ciw` - Delete the word the cursor is on, and end up in insert mode + * `'` - Add the first quote + * `Ctrl+r"` - Insert the contents of the `"` register, aka the last yank/delete. + * `'` - Add the closing quote + + + _Unquote a word that's enclosed in single quotes_ + + `di'hPl2x` + + * `di'` - Delete the word enclosed by single quotes. + * `hP` - Move the cursor left one place (on top of the opening quote) and put the just deleted text before the quote. + * `l` - Move the cursor right one place (on top of the opening quote). + * `2x` - Delete the two quotes. + + _Change single quotes to double quotes_ + + `va':s/\%V'\%V/"/g` + + * `va'` - Visually select the quoted word and the quotes. + * ``:s/`` - Start a replacement. + * ``\%V'\%V` - Only match single quotes that are within the visually selected region. + * ``/"/g` - Replace them all with double quotes. + +See [Stack Overflow Ref:](https://stackoverflow.com/questions/2147875/what-vim-commands-can-be-used-to-quote-unquote-words) -- cgit v1.2.3