code: def kill_word(event):
      
      buff = event.current_buffer
      pos = buff.document.find_next_word_ending(count=event.arg)
  
      if pos:
          deleted = buff.delete(count=pos)
          event.cli.clipboard.set_text(deleted)
docs: Kill from point to the end of the current word, or if between words, to the
      end of the next word. Word boundaries are the same as forward-word.