DisposaBoy / GoSublime

A Golang plugin collection for SublimeText 3, providing code completion and other IDE-like features.
MIT License
3.42k stars 299 forks source link

Cursor move on tab #934

Closed tleb closed 5 years ago

tleb commented 5 years ago

I recently took the time to properly configure GoSublime and MarGo, it works great!

I just have one issue. Let's suppose we have the following file:

package main

import "fmt"

func main() {
    var foobar string
    fmt.Prin
}

If I press TAB to autocomplete Prin, the line will turn into fmt.Println() with the cursor between the parenthesis. Now, if I write foo and press TAB, the cursor will move at the end of the line and won't autocomplete foobar (which was shown in the autocomplete dialog).

  1. Write fmt.Prin and press TAB;
  2. The cursor is between the parenthesis;
  3. Write foo and press TAB;
  4. foo has not been autocompleted and the cursor is at the end of the line.

Is there any way to remove this cursor marker? Or at least to change its priority?

Thanks!

DisposaBoy commented 5 years ago

I think this is a Sublime Text issue. Maybe setting "auto_complete_commit_on_tab": true, will help.

tleb commented 5 years ago

Setting both auto_complete_commit_on_tab and auto_complete_with_fields to true solved it, thanks.