Differences between revisions 1 and 2
Revision 1 as of 2020-04-28 16:32:47
Size: 623
Comment:
Revision 2 as of 2020-07-02 13:47:32
Size: 626
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
== Quoting Words == Quoting Words ==

Vim Tricks


Quoting Words

Affixes can be applied programmatically using word deletion and registers. For example, to quote the currently selected word, use ciw'Ctrl+r"'.

  • ciw - delete selected word and enter insert mode

  • ' - insert the leading quote mark

  • Ctrl+r" - insert the contents of the " register, a.k.a. the deleted word

  • ' - insert the trailing quote mark

This method can be used to apply any affixes. To surround an SPSS string variable name with the trimming functions, use ciwrtrim(ltrim(Ctrl+r")).


CategoryRicottone

Vim (last edited 2024-02-22 13:11:59 by DominicRicottone)