vim - Saved macro to do substitution without hitting return and remaining in current position -


i'm trying write macro save/configure in .vimrc let. without ^m, have hit return after typing @b. ^m, goes line of last replacement. i'd remain in current position macro executed.

what way use let i'm trying accomplish?

let @b=':%s/searchterm/blah/g^m' 

you'll need set macro mark current position can return there after substitutions have finished:

let @b='mc:%s/searchterm/blah/g^m`c' 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -