Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 384 Bytes

33_insert_current_word_at_command_prompt.md

File metadata and controls

15 lines (12 loc) · 384 Bytes

Insert current word at the command prompt

Rename the variable 'tally' to 'counter':

var tally;
for (tally=1; tally <= 10; tally++) {
  // Do something with tally
};

Start on line 6 at the 't' character * - selects all the words 'tally' cwcounter<Esc> - replaces the word with counter :%s//<C-r><C-w>/g - gets the current word for the substitute command