How do you retrieve a register's contents in Vimscript? :echo getreg('a') Use getreg('a') to get the contents of register a as a string. category: registers tags: #registers #getreg #function