void (PsiElement forward) { if (forward instanceof LeafPsiElement && ((LeafPsiElement)forward).getElementType() == YAMLTokenTypes.EOL) { PsiElement nextSibling; while ((nextSibling = forward.getNextSibling()) instanceof LeafPsiElement && ((LeafPsiElement)nextSibling).getElementType() == YAMLTokenTypes.INDENT) { nextSibling.delete(); } forward.delete(); } }