简体   繁体   中英

Changing autocomplete in Sublime Text to use single quotes instead of double quotes (HTML)

By default sublime text autocomplete uses double quotes, for example if I start typing

<img

and hit tab, it will suggest:

<img src="">

Is it possible to change the autocomplete behaviour so that it suggests:

<img src=''>

and similarly for other elements, for example:

<a href=''></a>

ie I'm looking for a global solution, not to change the behaviour one autocomplete at a time.

Thanks for any help.

This is not possible globally. Different packages use different methods for generating completions : .sublime-completion files , snippets , and Python-based plugins . Some of them do use single quotes, for example the Python if __name__ == '__main__' snippet , but others, like html_completions.py , use double quotes.

If you use one or a few languages primarily, it might be possible to edit the completions files to your liking using a tool like PackageResourceViewer , but there isn't a way to do it globally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM