Editing large files with many string

When editing large files with many constants (large strings), the editor crashes or makes editing mistakes. Also, it gets very slow.

I am using 3.5 sonnet in agent mode.

Hey what’s the average number of lines in the files you work with? Based on experience, Cursor handles smaller files better. It’s advisable to select specific code sections instead of adding the entire file to the context. This makes the coding process more accurate, as the model might start to hallucinate if the context window overflows.

Hello, thanks for the answer. It depends, but I select with @ and the file can be large and yes context used to be a bigger problem in the past.

Is it then best to break up files into modules? I.e. assuming i have a large file of 1000 lines of code, can I break it up into 3 files of 333 lines and then select all three files with @ the same time. Or would that yield the same result as having one file of 1000 lines and selecting with @.

Thanks

I think breaking files into modules is a good idea. It will read them separately and interact with them individually.