Double Space to Find and Replace

2 Points

Zach Queal Zach Queal

6 years ago

double space on word to find and replace.

nmap <Space><Space> :%s/\<<C-r>=expand("<cword>")<CR>\>/

Martínez Ortiz Saúl Axel

Martínez Ortiz Saúl Axel 5 years ago

What about doing: nmap :%s/\<=expand("")>/g for fompleteness and to position the cursor in the place you need.