Building Cursor’s Tab Model
pragmaticengineer.com“Upon opening a project or folder, you’re likely to jump into editing files. This means Cursor needs to generate autocomplete suggestions, which the Cursor team calls tab suggestions. A low-latency sync engine powers the ‘tab model’. This generates suggestions that are greyed out and can be accepted by hitting the ‘Tab’ key. The suggestions need to be generated quickly in ideally less than a second. This ‘tab model’ must be as fast as possible, and data transfer as low as possible. There’s always a tradeoff between how much context to send, and the quality of the suggestions: the more relevant context Cursor can send, the better the suggestions. However, sending lots of context can slow down the display of suggestions, so getting this right is one challenge for Cursor’s engineers.”