Trim filename in editor