String Shenanigans

Vim, 18 keystrokes

$bD:s/<C-R>"<Left><BS>/<Right>/i<CR>x$x

Assuming the cursor is on the first column of the first line, and the open file contains this:

"yolO" o u

The file will end up containing:

"yulu" 

JavaScript ES6, 28 bytes

(s,a,b)=>s.replace(a,b,'gi')

Firefox only as it uses a mozilla-specific feature.


Pyth, 10 bytes

XQr*2w4*2w

Try in online: Demonstration or Test Suite

Explanation:

 Q             read a line and evaluates (reads a string with quotes)
     w         reads a char: a (actually reads a line)
   *2          make it twice as long: aa (repeat the char)
  r   4        capitalize this string: Aa
       *2w     read another char and repeat it: bb
X              replace the letters Aa by bb in Q