@register(u'forward-word')
def forward_word(event):
 buff = event.current_buffer
 pos = buff.document.find_next_word_ending(count=event.arg)
 if pos:
  buff.cursor_position += pos

@ register ( u'forward-word' ) def forward_word ( event ) : buff = event . current_buffer pos = buff . document . find_next_word_ending ( count = event . arg ) if pos : buff . cursor_position += pos
move forward to the end of the next word .