Vim Tricks
Contents
== 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")).