diff --git a/README.md b/README.md index 3818c76..0c46e7b 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Re-indenting Your Code](vim/reindenting-your-code.md) - [Rename Current File](vim/rename-current-file.md) - [Repeat The Previous Change](vim/repeat-the-previous-change.md) +- [Replace A Character](vim/replace-a-character.md) - [Scrolling Relative to the Window](vim/scrolling-relative-to-the-window.md) - [Set Your Color Scheme](vim/set-your-color-scheme.md) - [Split Different](vim/split-different.md) diff --git a/vim/replace-a-character.md b/vim/replace-a-character.md new file mode 100644 index 0000000..3633a19 --- /dev/null +++ b/vim/replace-a-character.md @@ -0,0 +1,13 @@ +# Replace A Character + +Throughout the day I'll often find myself deleting a single character and +putting a different one in its place. I usually navigate over the target +character and hit `s` which removes the character under the cursor and puts +me in insert mode. From there I type the new character and hit escape to +return to normal node. This isn't the best way to perform such an edit +though. Vim has a command specifically for replacing a character. The `r` +command. It does essentially the same thing as my current approach but +instead of putting me in insert mode, it simply replaces the character and +leaves me in normal node. + +See `:h r` for more details.