sublimetext3

set auto complete on sublime text 3 for custom html elements

偶尔善良 提交于 2019-12-05 10:48:26
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. 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>" }, { "trigger": "bar", "contents": "<bar class=\"$1\">$0</bar>" }, { "trigger": "baz", "contents": "<baz class=

Sublime Text 3 Deleting Code when I hit Tab Key

别来无恙 提交于 2019-12-05 08:22:38
问题 When I highlight a block of code in Sublime Text 3 and press the Tab key, it doesn't indent the whole block like it used to. Instead, it deletes the highlighted code. Anybody know how to fix this? 回答1: This is a simple alt-tab issue I have found that this happens when I've missed the "purchase this software" dialogue and have not dismissed it. Alt-tab (or Cmd-tab on Mac) to check if there is a dialog waiting for a response and dismiss it. This will fix the problem. 回答2: For anyone else who

Increment values/numbers in Sublime 3

孤街浪徒 提交于 2019-12-05 07:24:12
问题 I have multiple lines like this <VValue type="int" value="0" /> in files running in Sublime; each where the value increments 0, 1, 2, 3 etc... I need to change these values, +60 . So, 0 would become 60 , 1 would be 61 etc. How do I select the multiple lines and append them with regex in Sublime? I'm not sure of the command to select the number itself... something like \d+ was mentioned in another thread - Sublime Text 2 increment numbers Note, I skip one number to separate some content in the

In Sublime Text 3, can I send a selection of a do file to Stata?

风流意气都作罢 提交于 2019-12-05 05:55:17
This SO question led me to try Sublime Text 3 as a replacement for Stata's do file editor on Linux (full instructions here ). Syntax highlighting works and a Ctrl+B shortcut sends the whole do file to Stata. Is there a way to send only a selection of lines to Stata? Yes you can. First you need to find the name of the python function that does it. For the SublimeStata Enhanced package , it corresponds to the function text_2_stataCommand in the file text_2_stata.py. Second, you need to add a shortcut for this function in the Key Binding user file, where you put the function name in the command

Get all scope names on Sublime Text 3

浪尽此生 提交于 2019-12-05 03:42:37
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_plugin, os, subprocess, glob, tempfile, plistlib from zipfile import ZipFile def scopes_inside(d):

Sublime Text - plugin_host exited unexpectedly after installing sublime_tern

只谈情不闲聊 提交于 2019-12-05 02:37:06
I have installed sublime_tern package to help me with my MeteorJS development. After installing this package, any time I start Sublime I get: plugin_host exited unexpectedly. What can I do to troubleshoot this? Problem I just had this problem but it turned out that it resulted from copying sublime between my two laptops. Somewhere along the line I lost the correct permissions. Solution The solution for me was to give execution permissions on plugin_host and it was fine (I also had to do that for the sublime_text binary, I just realised that faster). Copy pasters, navigate to your sublime

Is there a way to change the font in the status bar Sublime Text 3?

痴心易碎 提交于 2019-12-04 23:59:21
问题 I am searching for a method to change the font of status bar of Sublime Text 3.. Is there a way to do it? I tried changing system fonts (I am on Ubuntu 12.04), searching through Google gave me no hints.. Thanks 回答1: It's only possible to do in the .sublime-theme file: // Status bar label { "class": "label_control", "parents": [{"class": "status_bar"}], "color": [140,140,140], "font.size": 11, "font.face": "Droid Sans Mono" }, 回答2: If you can't find any .sublime-theme , mentioned in accepted

Sublime Text 2 / Sublime Text 3 bring back unsaved files on osx

筅森魡賤 提交于 2019-12-04 23:52:08
In sublime I know even if you don't save the changes in a file later one you can start from where you left off. I opened a new tab in sublime and closed the application before I save my file. Does sublime save a temp file somewhere in the computer (I am using MAC OSx) mcw0933 Sublime Text 2 stores the files in ~/Library/Application Support/Sublime Text 2/Settings , in the .sublime_session files that are located there. The contents of those files are a large JSON blob that contains the individual tab contents. Search in the file for the file name / tab name / a key word in the document and you

Sublime Text autocomplete window closes when scrolling off the list

丶灬走出姿态 提交于 2019-12-04 21:28:45
问题 When scrolling the autocomplete list with up or down , if you go too far in either direction (e.g. there are no more suggestions), the list will close. The behavior I want is to have the list wrap when reaching the end instead of close. This is easy to fix with downward scrolling by assigning this hotkey: { "keys": ["down"], "command": "auto_complete", "context": [ { "key": "auto_complete_visible" } ] }, That's because the auto_complete command has built-in functionality to scroll downward

How can I toggle XML line comment in Sublime Text 3

十年热恋 提交于 2019-12-04 19:46:46
I am using Sublime Text 3. I have encountered a problem. I don't know how to toggle XML line comment. I know there is a Toggle Comment function in Sublime Text 3 and I tried. However, the result is not the same as what I envisioned. For example, I want to toggle comment the following XML code: <profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties