Reputation: 8959
I am trying to figure out how to search/replace from current line to end of block and don't understand why my command
:.,}s/a/b/g
Not working
Upvotes: 0
Views: 101
Reputation: 45107
Good news, you have options!
'}
mark in your command. e.g. :,'}s/foo/bar/
. See :h '}
}
character then you can do as @Dyno Hongjun Fu suggested and use visual mode + a motion. e.g. v]}:s/foo/bar
. See :h ]}
:,/baz/s/foo/bar
. See :h range
Upvotes: 2