Vim is good at Search and Replace
:
:%s/(\(\d\+\)\/\(\d\+\))/rat(\1,\2)/g
Too much backslashs! Yet another command:
:%s@\v\((\d+)/(\d+)\)@rat(\1,\2)@g
- We can use
@
to separate patterns instead of/
. - The very magic
\v
makes life easier.
I suggest you type :help :s
to learn more.