diff options
| author | Vito Graffagnino <vito@graffagnino.xyz> | 2020-09-08 18:10:49 +0100 |
|---|---|---|
| committer | Vito Graffagnino <vito@graffagnino.xyz> | 2020-09-08 18:10:49 +0100 |
| commit | 3b0142cedcde39e4c2097ecd916a870a3ced5ec6 (patch) | |
| tree | 2116c49a845dfc0945778f2aa3e2118d72be428b /vimwiki/Quickly Quote | |
| parent | 8cc927e930d5b6aafe3e9862a61e81705479a1b4 (diff) | |
Added the relevent parts of the .config directory. Alss add ssh config
Diffstat (limited to 'vimwiki/Quickly Quote')
| -rw-r--r-- | vimwiki/Quickly Quote/.unquote words.md.swp | bin | 0 -> 12288 bytes | |||
| -rw-r--r-- | vimwiki/Quickly Quote/unquote words.md | 37 |
2 files changed, 37 insertions, 0 deletions
diff --git a/vimwiki/Quickly Quote/.unquote words.md.swp b/vimwiki/Quickly Quote/.unquote words.md.swp Binary files differnew file mode 100644 index 0000000..f14e420 --- /dev/null +++ b/vimwiki/Quickly Quote/.unquote words.md.swp 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) |
