I develop Sublime 3 packages like this:
import sublime, sublime_plugin
class RelativeCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.insert(edit, 0, "Hello World")
I need to reload sublime after every editing in it to see result of changing in work.
How to get working changes in plugin without exiting the sublime and reopening it?
I believe that it is possible, because for example sublime get changes on the fly without reloading when you edit key mappings.
Update1 :
When I press save after changing file, I got message in console:
Writing file /Users/maks/Library/Application Support/Sublime Text 3/Packages/relative/relative.py with encoding UTF-8 (atomic)
reloading plugin relative.relative
Update2 :
I am using symlinks to store Packages and Installed Packages in Dropbox folder.
Update3:
My os is OS X version 10.8.5
Dont know why, but after removing symlinks to Dropbox of Packages folder, it started to work as expected: after saving got message in console:
reloading plugin relative.relative
And can see new behaviour without reopen sublime3.
Related
I installed all Atom packages mentioned on this link.
atom-beautify
atom-ternjs
autoclose-html
emmet
csslint
pigments
language-ejs
atom-html-preview
Sublime-Style-Column-Selection
linter-eslint
I made an file index.html. But whenever I type something it doesn't show any suggestions. Also when I type html and hit tab or enter it doesn't show boilerplate code.
I tried disabling and then enabling, restarting Atom as well as Laptop but it didn't worked. I am working on Ubuntu 18.04.5 LTS.
How to resolve this ?
Try to create that new file with extension .html U must have not used the .html extension
I have the windows application installed, Live Reload extension for chrome and i'm using Sublime Text with Live Refresh and Live Reload plugins. For some reason any HTML doc i edit on sublime text is not auto updating on chrome. The extension is stuck on "Live Reload is connecting" when i enable it. What exactly am i missing, do i need to setup a local web server or something like that?
I think your issue may be that you did not add the folder that contains your HTML document to the LiveReload windows application so that it can monitor for changes to the file.
If you open up the LiveReload app, it should have a list of site folders. Try adding your test project's folder to the list.
If you load from local file it does work you must runt the local file through a web server e.g python -m http.server in the folder your .html exists otherwise the option match to local file never appears and then you can have the save and reload functionality.
I mention it because I hadn't found the problem through reading the post
I am using Sublime Text 2 for Mac. I have installed the Package Control for Sublime Text 2, following the instructions from https://sublime.wbond.net/installation#st2 without any trouble. However, when I open up Ctrl+Shif+P to search for available packages, it does not show any.
See the image screenshot here
Do you have any solutions for it? I try restart Sublime but it doesn't solve the problem.
Take a look in your user Preferences.sublime-settings and remove the Package Control from the "ignored_packages" list if it is there.
If you use a Linux based system, you may have to check permissions of /home/user/.config/sublime-text-3. Check if the directory is owned by your user. If not, change the owner user for that directory.
Click the Preferences > Browse Packages and check whether Package control file is there or not.
You can manually put package control file there by downloading it from here and get rid of issues.
I had the same problem. I had to restart my computer to properly reset Sublime Text 2. It seems from your comment that you also got the Package Control list to show up after restarting your computer.
Your screenshot image is currently broken, but make sure you have the zipfile "Package Control.sublime-package" in the Installed Packages directory.
Open the console and run this command:
curl http://sublime.wbond.net/Package%20Control.sublime-package -o ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages/Package\ Control.sublime-package
Then restart sublime.
See this issue: https://github.com/wbond/sublime_package_control/issues/652
I keep getting an "Executable '['git']' was not found in PATH. Current PATH" error message when trying GIT STATUS in Sublime Text 3. I have the SublimeGit plugin installed.
I have the following in my Package Settings > Settings - User
"git_executables": {
"git": ["/usr/local/bin/git"],
"git_flow": ["/usr/local/bin/git", "flow"],
"legit": ["legit"]
}
I have read https://docs.sublimegit.net/quickstart.html, but it does not go through windows paths.
Any help would be appreciated.
That error message can happen because of operations on a missing or moved file:
See issue 212 (for ST2, but possibly relevant for ST3).
Ok, I think why this bug happened.
There was a file that was moved to another location form outside ST2, and Git plugin failed to do something to the file because it no longer existed, but that situation was interpreted as missing git command.
Another workaround mentions:
Installing python via homebrew and restarting ST2 fixed this problem for me:
brew install python
Also, by David Gee -- davidagee :
On OS X Mountain Lion, the only way I was able to fix this, after trying everything in this thread, and additional mucking around with path settings, was to open "/Users/[me]/Library/Application Support/Sublime Text 2/Packages/Git/Git.sublime-settings" and to change git_command to "/usr/local/git/bin/git".
Adding a git_command setting to user prefs doesn't work.
The plugin seems to ignore the value when set in Preferences.sublime-settings.
In Sublime Text 2, what steps do I need to take to get Syntax Highlighting for the Laravel Blade Template Engine to work?
As described in http://daylerees.com/2012/04/06/notable-blade-syntax-support-by-medalink/, I took https://github.com/Medalink/Laravel-Blade, unzipped it and copied the folder into Sublime's packages folder.
However, it doesn't seem to work (see screenshot), even if I set it manually using Tools\Command Palette...\Set Syntax: Blade
Is this only meant to work with particular Color Schemes (if so, which ones), or what am I missing? (I just started using Sublime Text today)
The easiest way to install plugins for Sublime Text 2 is through Package Control.
To install Package Control:
Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console:
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
This command creates the Installed Packages folder for you (if necessary), and then downloads the Package Control.sublime-package into it.
When you have Package Control installed all you need to do to install the Blade syntax highlighter is to:
Open the command palette and type "install package"
Press enter
Wait for a new palette to show up after it has fetched the package list
Type "blade syntax"
Press enter
Enjoy
For Sublime text 3 as well as sublime text 2
install Sublime Package Control (more help on: http://wbond.net/sublime_packages/package_control/installation)
then restart sublime text (2/3)
and press ----> control (or command in mac) + shift + p
there search for package control: install package
wait for another interaction screen
search for Laravel Blade (and other packages if you want)
{
For video tutorials on this and other , subscrive this channel : https://www.youtube.com/channel/UChEv_j3fE4k2r7KcEApFDyQ
}
Also, once you have Package Control installed, you should also install the package 'DetectSyntax'. It will automatically detect the blade syntax so you don't have to manually set it for each file.
In case you installed the Laravel Blade Syntax Highlighter using Package control, that plugin, for some reason keeps throwing out errors.
Package Control: The package specified, laravel-blade, is not available
What I did is just Preference > Browse packages and then rename the folder into laravel-blade. Seems working with no pesky errors now. What I did is just gut feel. I did not even read anything in the files in the folder.
--
Edited: Go to Preference > Browse packages > Package Control.sublime-settings and remove the offending entry.
mine was stored in users folder, just do a folder search for "laravel-blade" and remove the entry from json config
Find: laravel-blade
Where: /Users/:username/Library/Application Support/Sublime Text 2/Packages