Not sure if this is helpful but when you type :syn it has all the formatting that is used in your file type. Maybe you can refer to that somehow. You could say something like:
map n betterN
function betterN{
n keystroke
while currentLine matches comment class
do another n keystroke
}