code: @Override
      public void actionPerformed(JTextComponent target, SyntaxDocument sDoc, int dot, ActionEvent e) {
          int pos = target.getCaretPosition();
          int start = sDoc.getParagraphElement(pos).getStartOffset();
          String line = ActionUtils.getLine(target);
          String lineToPos = line.substring(0, pos - start);
          String prefix = getIndent(line);
          Token t = sDoc.getTokenAt(pos);
          if (TokenType.isComment(t)) {
              if (line.trim().endsWith("*/")) {
                  prefix = prefix.substring(0, prefix.length() - 1);
              } else if (line.trim().startsWith("*")) {
                  prefix += "# ";
              } else if (line.trim().startsWith("##")) {
                  prefix += "#";
              }
          } else if (lineToPos.trim().endsWith(":")) {
              // check if current line is not comment
              prefix += getTab(target);
          } else {
  
              String noComment = sDoc.getUncommentedText(start, pos);
              // skip EOL comments
              if (noComment.trim().endsWith(":")) {
                  prefix += getTab(target);
              }
              if ((lineToPos.length() > 0) && (line.equals(prefix))) {
                  if (prefix.length() > 0) {
                      prefix = prefix.substring(1);
                  }
              }
              if ((lineToPos.length() == 0)) {
                  if (prefix.length() > 0) {
                      prefix = "";
                  }
              }
          }
          target.replaceSelection("\n" + prefix);
      }
docs: {@inheritDoc}
  
  @param e