Tabs in code files

Status Fixed / completed
Maintainer reply ✓ Yes — igorkofman
Activity 6 comments · opened Apr 13, 2025 · closed May 13, 2025
💡 Likely answer: A maintainer (igorkofman, collaborator) responded on this thread — see the highlighted reply below.

Claude has really hard time editing files with tab indentations. Just reporting, maybe this can be improved in MCP suite it uses to edit files.
<img width="993" alt="Image" src="https://github.com/user-attachments/assets/0f7e0b3f-8104-4264-9690-7e2aad7a9100" />

View original on GitHub ↗

6 Comments

igorkofman collaborator · 1 year ago

Thanks for the report. We've made improvements to this so just want to double check what version are you running

claude --version

If it's the most recent version (0.2.69), it would be helpful to have a sample session from running /bug

orsenkucher · 1 year ago

@igorkofman
Environment Info

  • Platform: macos
  • Terminal: vscode
  • Version: 0.2.69
  • Feedback ID: d703b960-785e-4fc7-b5a2-f2352d8ab9e5
bripkens · 1 year ago

Can confirm. It is a really bad experience right now. It needs a lot of iterations to get anywhere.

<img width="312" alt="Image" src="https://github.com/user-attachments/assets/d2aa8bcc-5ad6-4232-a6d4-a26e30ed2542" />

sharatvisweswara · 1 year ago

I'm seeing a tons of "Error: String to replace not found in file" with version 0.2.107, it eventually falls back to running sed commands to get the edits done e.g.

⏺ Update(internal/cli/cmd/imap.go)…
  ⎿  Error: String to replace not found in file.
     String: 			}
     		}
     	}
     	}

⏺ Read(internal/cli/cmd/imap.go)…
  ⎿  Read 20 lines (ctrl+r to expand)

⏺ Update(internal/cli/cmd/imap.go)…
  ⎿  Error: String to replace not found in file.
     String: 			}
     		}
     		}

⏺ Bash(sed -i.bak '/^\t\t}$/d' /.../internal/cli/cmd/imap.go)…
  ⎿  (No content)
igorkofman collaborator · 1 year ago

Should be a lot better with todays release. Please reopen if not.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.