Currently, there isn't a way to skip searches-and-replaces only on a single line.
One practice used by many tools is to end a line with a comment that indicates that a particular linter or formatter rule should be skipped. One possibility would be to implement something like this for pre-commit search and replace. In particular, searches-and-replaces could be skipped if the line contains a phrase like no-search-replace. An example usage would be:
x = this_line_matches_a_pattern() # no-search-replace
This capability would fit well with programming languages that allow in-line comments, though it wouldn't handle certain markup languages like reStructuredText.
Also, thank you for creating a great tool! I use it frequently!
Currently, there isn't a way to skip searches-and-replaces only on a single line.
One practice used by many tools is to end a line with a comment that indicates that a particular linter or formatter rule should be skipped. One possibility would be to implement something like this for pre-commit search and replace. In particular, searches-and-replaces could be skipped if the line contains a phrase like
no-search-replace
. An example usage would be:This capability would fit well with programming languages that allow in-line comments, though it wouldn't handle certain markup languages like reStructuredText.
Also, thank you for creating a great tool! I use it frequently!