Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/orlp/vim-quick-replace

A quick find/replace plugin for Vim.
https://github.com/orlp/vim-quick-replace

Last synced: 3 days ago
JSON representation

A quick find/replace plugin for Vim.

Awesome Lists containing this project

README

        

# vim-quick-replace

A plugin to do some quick find/replace actions smooth as butter.

![Gif](https://i.imgur.com/wEX6O1w.gif)

Requires tpope's vim-repeat plugin. But at the time of writing it
has a bug, so I offer the following patched version: https://github.com/orlp/vim-repeat

This Vim plugin offers the following commands you can map:

(QuickReplaceWord)

Start a quick replace using the word underneath the cursor.
Type your replacement and then use `.` and `n` to repeat the
replacement on other matches.

(QuickReplaceSelection)

Start a quick replace using the current visual mode selection.
Type your replacement and then use `.` and `n` to repeat the
replacement on other matches.

(StartWordSearch)

Starts a search (but doesn't immediately move to the next match)
for the word underneath the cursor.

(StartSelectionSearch)

Starts a search (but doesn't immediately move to the next match)
for the current visual selection.

(QuickReplaceWordBackward)
(QuickReplaceSelectionBackward)
(StartWordSearchBackward)
(StartSelectionSearchBackward)

These all do the same as their above counterparts but search
backwards (like `#` and `?` do compared to `*` and `/`).

My personal mappings to use this plugins are:

nmap r (QuickReplaceWord)
nmap R (QuickReplaceWordBackward)
xmap r (QuickReplaceSelection)
xmap R (QuickReplaceSelectionBackward)
xmap * (StartSelectionSearch):call feedkeys('n')
xmap # (StartSelectionSearchBackward):call feedkeys('n')