Sublime snippet - sublimetext3

When I'm coding in HTML and use input tag, sublime autocompletion gives me <input></input>. I'd love sublime gives me <input />.
How can I change this? (my sublime is version 3)
I saw this:
How to change default code snippets in Sublime Text 3?
and this video (portuguese audio):
https://www.youtube.com/watch?v=9iTu3C9FzX4

Sublime's HTML autocompletions are done in a Python script.
Install PackageResourceViewer using Package Control (if it isn't already installed)
From the Command Palette, select PackageResourceViewer - Open Resource
Select HTML
Select html_completions.py
Find the line ('input\tTag', 'input type=\"$1\" name=\"$2\">'),
Change it to ('input\tTag', 'input type=\"$1\" name=\"$2\" />'),
Save the file

Related

Smalltalk syntax highlighting in Sublime?

I'm trying to get sublime to highlight smalltalk .st files but am running into some trouble.
A quick search found this package, but after adding the repository like it says in the README, I don't see the package that its supposed to add when doing Package Control: install package.
I also tried looking into this one but am completely lost when it says This syntax file can be converted to .tmLanguage using PackageDev 'Convert to PList'. Place the converted file in Packages/Smalltalk/Smalltalk.tmLanguage and reopen any .st file.
Can anybody help me out please? I'm running ST3 on MacOSX.
The installtion instructions using Package Control did not work for me either, but you can take the language file, Smalltalk.tmLanguage, from Smalltalk syntax for Sublime Text 3 and use the manual installation instructions you cited:
Place the file in Packages/Smalltalk/Smalltalk.tmLanguage
As you asked about macOS, on macOS this means:
/Users/<your user name>/Library/Application Support/Sublime Text 3/Packages/Smalltalk/Smalltalk.tmLanguage
The Library folder might be hidden by default. Use the Terminal or Finder's Go ▶︎ Go To Folder… to access it.
For Smalltalk/X you can download a highlighting package at - sublime highlighting for smalltalk/X called Smalltalk.sublime-package.
You can copy it to the path provided by #MartinW above.

how to run xmllint within sublime text?

I know how to use xmllint from the command line for validating an xml file against an XSD:
xmllint --schema exampleschema.xsd example.xml
Now I downloaded and installed sublimelinter and the xmllint plugin for my sublime text editor.
However, I can't figure out how to run xmllint from sublime text. What do I have to do to have an xml-file validated against a schema?
First, you need to ensure that you're using Package Control to install all your plugins. xmllint is only for Sublime Text 2, and should not be used.
Along with SublimeLinter, you need to install SublimeLinter-xmllint. Make sure you read the full documentation both for SublimeLinter and SublimeLinter-xmllint to ensure everything, including paths, are set up correctly. You can then configure your desired command-line arguments using linter settings.

GitBash integration in Sublime Text Editor

Is it possible?
I have insalled Terminal package for Sublime and insertred
"terminal": "C:\Program Files\Git\git-bash.exe"
in Terminal.sublime-settings configuration file.
Now I can open gitbash with Ctrl+Shift+T from inside Sublime Text Editor, but it's looks like no way to open current or project folder, like when using cmd.exe. I whant to find normal integrated terminal like in the webstorm or in VSCode and wondering why it's still nothing like that in Sublime. Glue and so on is no way.

Add Sublime Text 2 to the right click context menu in Ubuntu 12.04

Title pretty much sums my question. I want to open a folder in sublime text by right clicking the folder and clicking on "open folder in sublime text" context menu. I am using Ubuntu 12.04
Assuming you followed guide on:
http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/
You simply need to add a %f to your Exec line in sublime.desktop like:
Exec=sublime %f
This is what I have managed to get Right click context menu for Sublime Text 3:
Using Nautilus-Actions Configuration Tool, either installed through Ubuntu software center with this link or through ubuntuupdates.org
This will allow you to create right click context menus and actions to your liking.
I have created such an extension:
Nautilus-Actions_XML_Schema
OR
Nautilus-Actions_Schema
For further information check out: blog.ndroidians.com
Right click -> open with other application -> show all applications -> open with sublime text
This guide worked form me on Ubuntu and Mint. http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/
Make sure that you have copied the sublime .desktop file into the /usr/share/applications/ directory. That should work resolve this issue.
To open a folder in sublime from nemo by right clicking in the pane for that directory, go into the folder "usr/share/nemo/actions" as sudo and create the file "subl.nemo_action" and put the following contents into it:
[Nemo Action]
Name=Open folder in Sublime Text
Comment=Open current folder in Sublime Text
Icon-Name=subl
Selection=any
Extensions=any
EscapeSpaces=true
Exec=/bin/sh -c "cd %P && subl ."
Dependencies=subl;
I found this solution HERE, but had to change "subl3" to "subl" for my case, and had to find where to locate the file.

Package Control no module named package_control.add_repository_channel_command

I've updated to the most recent version of Package Control for Sublimetext 3 via Git, but none of the commands work. The menu items are still present, strangely enough. When I open the log with Ctrl+`, I see this error:
ImportError: No module named 'Package Control.package_control.add_repository_channel_command'
How can I get it to work again?
Apparently the Package Control .sublime-package file is outdated, and in this case, referencing a python module that has been moved to a different python package (from package_control to package_control.commands).
This can be easily fixed by deleting Installed Packages/Package Control.sublime-package.
I use sublime text 3
From this site, I Follow these steps:
Go to http://wbond.net/sublime_packages/package_control/installation
& copy the long command there.
Open the Sublime Text 2 console by
pressing Ctrl+.
Paste the command you copied into the Sublime Text
console.
Press Enter.
After Package Control installs, restart
Sublime Text.
Then I got the error like that.
I have tried :
check ignored_packages on set but I found nothing.
Download package manager and copy it to Installed Packages, but not works.
Then I update my sublime to the newest version, then the error is gone.
That is my tips, you should try one of the steps, like what I have tried.

Resources