sublimetext3

Sublime Text 3 Emmet triggering conflict?

↘锁芯ラ 提交于 2019-12-23 03:01:52
问题 I just started using Sublime Text 3 beta. Love it so much. And I love using Emmet while coding. But there's one thing annoys me that whenever I am editing CSS for example, code suggest interrupts so my trigger key(which is Tab key) won't work. (I have to hit Enter key instead). Does anyone know how to fix this problem? 回答1: I found a solution Changing a line in key binding file from: { "keys": ["enter"], "command": "commit_completion", "context": to: { "keys": ["tab"], "command": "commit

Boundary sensitive Cmd+D in Sublime Text

柔情痞子 提交于 2019-12-22 20:01:33
问题 I'm using Sublime Text 3 on OSX. Using cmd + D , I want to select the next instance of es but not if it's part of another word Given this code I select the first instance of es and see this Perfect! However, when I tap cmd + D a couple times, it will end up selecting this Super annoying! How can I make cmd + D only select the highlighted sections that appear in image 2? 回答1: If you select whole word and press Cmd + d it is going to select like in 3rd image. If you put your cursor (caret) on

How to restore focus to quick panel after focusing some other group to open a file?

不想你离开。 提交于 2019-12-22 12:32:32
问题 Situation is like this: I am writing a plugin that needs to: Open quick panel On hover of first item, focus other group Open in that group Restore focus to quick panel input so I can move to next item in list and so on... I did solve 1-3 but the 4th one gives me troubles. Is there a way to do so? 回答1: You need to get the view associated with the quick panel . The method show_quick_panel doesn't returns the view , but you can get it with using the method on_activated with a EventListener

CMD opens window store when I type python

喜你入骨 提交于 2019-12-22 10:29:05
问题 Today when I tryed to run a simple code on Sublime Text 3, the following message appeard: Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640 And when I type Python in CMD, it opens the Windows Store for me to download Python 3.7. This problem started today for no good reason, I didn't change or downloaded anything about Python and already tryied reinstalling Python, and the Path is correct. 回答1: Two solutions: As ChipJust said it

set auto complete on sublime text 3 for custom html elements

耗尽温柔 提交于 2019-12-22 06:30:20
问题 Good day, how can I set auto complete on sublime text 3 for custom html elements, like for example if I type: dog then press tab it will become <dog></dog> .. thanks for your answer. 回答1: You can create a custom .sublime-completions file for this. Create a new file with JSON syntax in Sublime, using the following contents (of course customized to your needs): { "scope": "text.html - source, punctuation.definition.tag.begin", "completions": [ { "trigger": "foo", "contents": "<foo>$0</foo>" },

Non-capturing group reg-ex in Sublime Text not working

十年热恋 提交于 2019-12-22 05:50:08
问题 I'm trying to remove all lingering spaces between tags. So I try to select them with a regex. <span> </span> ^^^^^^^^ My regex is (?:>) +(?:<) . I'm trying to exclude the > and < from the selection with a non-capturing group, but it doesn't seem to be working. At the moment, these two regexes seem to do the exact same thing: With non-capturing groups: (?:>) +(?:<) Without non-capturing groups: > +< I think my understanding of regex is not good enough, but I'm not sure. What's wrong here? 回答1:

How to copy text together with the line numbers using Sublime Text

半腔热情 提交于 2019-12-22 04:35:09
问题 I would like to copy text but with the line numbers in front. How to do it? I would like to paste that text after that, with the line numbers in front. 回答1: Install Copy With Line Numbers Reloaded Select the text you want to copy Run Edit: Copy With Line Numbers from the Command Palette Paste @ your target document & your code will now have line numbers 来源: https://stackoverflow.com/questions/36992564/how-to-copy-text-together-with-the-line-numbers-using-sublime-text

Get all scope names on Sublime Text 3

强颜欢笑 提交于 2019-12-22 03:59:15
问题 I am creating a plugin for ST3 and need the list of all defined scopes. I know that hitting ctrl+alt+shift+p shows the current scope in the status bar but I can't do it for every file extension. Edit: In addition to simple .tmLanguage files I am extracting the .sublime-package files and reading .tmLanguage files from inside. This added some entries like source.php to the list. But source.python is still missing ! Actually, the python code is: ( this is for Python 3.3 ) import sublime, sublime

How to make Sublime Text 3 default templates

大兔子大兔子 提交于 2019-12-21 21:55:06
问题 In Sublime Text 3, when I create a new file (HTML, JavaScript, PHP, etc), is there a way to edit the default tags and their indentations? Currently, when I create a new file, say HTML, I get: <html> <head> <title></title> </head> <body> </body> </html> I would like to change it so that a new HTML file creates: <html> <head> <title></title> </head> <body> </body> </html> Is this possible without plugins or will I have to search for/make one? 回答1: You can change the default snippet with the

Converting Emacs/vim highlighting to TextMate (for SublimeText)

北城以北 提交于 2019-12-21 21:44:12
问题 I have syntax highlighting files for Pyret in vim (.vim) and emacs (.el) and would like to use them in Sublime Text (3). According to this answer and other research, Sublime Text style themes are written in TextMate format. There exists a tool to help convert from TextMate to Emacs, but I contacted the author and he isn't aware of any tools to help facilitate the opposite conversion. A similar question was asked (re: vim) but not answered a year ago: .vim syntax highlighting to textmate or