How to remove some specific autocomplete in Sublime Text 2?
Asked Answered
T

4

15

I have Sublime Text 2 installed with the Emmet package (Windows 7 64bits).

When I type "wid", I want the auto-complete first suggestion to be "width". Problem is, right now it suggests "widows" which is very rarely used.

How can I modify the order of suggestions, or maybe even better, remove the "widows" auto-complete suggestion altogether?

Tesstessa answered 10/1, 2014 at 15:28 Comment(0)
W
12

Referencing: https://github.com/emmetio/emmet/blob/master/lib/snippets.json

ST3: Emmet: Settings - User

{
    "disable_completions": false,

    // This solution works to override annoying autocompletions from emmet.
    // I could do without seeing "widows" ever again, but just in case I added it back so that "widows" won't autocorrect to "width"

    "snippets": {
        "css": {
            "filters": "css",
            "profile": "css",
            "snippets": {
                "wid": "width:|;",
                "widows": "widows:|;"
            }
        }
    }
}

EDIT: The solution of deleting files did not work for me. Hitting tab after typing in "width" still autocompleted to "widows: ;" on my machine.

Wayland answered 25/6, 2015 at 15:14 Comment(0)
G
3
  • sublime will slowly 'learn' what you want most

http://www.sublimetext.com/docs/2/auto_complete.html

"By default, the selected item in the completion popup will be committed when enter is pressed. This can create ambiguity between committing the completion, and inserting a newline. By setting the auto_complete_commit_on_tab setting to true, enter will insert a newline, and tab will commit the current completion. There are other benefits, too: because Sublime Text knows there is no ambiguity, it will show a more curated list of completions, with the one you want more likely to be in first place.

Enabling Commit on Tab is recommended, but it will take a short time to get used to."

  • if you want to delete a specific snippet:

go to 'preferneces->browse packages'
there should be a 'emmet css snippets' folder there.
inside that folders are all of the snippets available, as invividual files named:
'shortcut'.sublime-snippet (wid.sublime-snippet stands for 'width')

Guido answered 10/1, 2014 at 15:43 Comment(0)
A
3

An alternative is just type "w" and TAB. This is the abreviattion for "width: ;" according to Emmet Cheat Sheet

Andie answered 15/1, 2016 at 16:45 Comment(0)
D
1

I've had the same problem,

try to open Preferences > Browse For Package

on window open CSS folder and edit css_completions.py file, drag file to sublime and find widows, remove code on the line, I already try and it's work on mu sublime.

Diphenyl answered 11/12, 2014 at 14:39 Comment(1)
these _completions.py file seem to govern much of this behavior.Phillie

© 2022 - 2024 — McMap. All rights reserved.