Is there a way to change the word boundaries to make it more specific to your programming language or naming convention? And then, define a new macro while keeping the basic movements like w,W,b,B etc.?
For example:
Class.method_name would would not recognize the underscore as a word break.
See How can I configure vim so that movement commands will include underscores and CamelCase, but completion will ignore them?