Vim to quote a word command

Tags: vim

Simple tips to change a word with quote or single quote. There is vim-surround plugin which is very good for this task but I just want to show you how to deal with it without using a plugin.

Steps are:

  • Start from placing a cursor on a word that we want to have quote
  • ciw to change inside word
  • Type " to insert an open quote
  • CTRL+r+" to insert a content from last change in registry (still in insert mode)
  • Type " to insert a close quote

vim quote