Is there a way to exclude packages in Packages directory from being visible in Package Control menu? I'm afraid of accidentally delete them.
I'm assuming you're referring to the PackageControl: RemovePackage command here, in which case unfortunately the answer is No (or Yes, with hackery as outlined below).
When displaying the list of packages to remove, PackageControl gathers the list of all packages and excludes from it the User and Default packages as well as any package that ships with Sublime (most notably it doesn't remove itself from the list of packages that it will remove).
As such, outside of that all packages will be offered for removal.
In theory you can add an empty sublime-package file to the Packages folder alongside the binary, which is where the packages that ship with Sublime are stored. Since PackageControl removes those packages from the list of packages to remove, that would stop it from offering it for removal.
If the package is question is a sublime-package file natively, then the version in Installed Packages will override it completely as if it was not there (except that it's listed as a shipped package in tools like OverrideAudit and PackageControl). If it is installed as a folder in Packages, then technically the contents of that folder are treated as overrides for the shipped package, but since that package is empty this should have no effect.
Having said that, although simple testing shows that this works, it may or may not have other consequences.
Related
How can one add more delegates to ImageMagick? I'm on gentoo (so, emerge), and while I see a plethora of links to different issues, I've not found any general how-to's:
This points to the source of the delegate libraries here
This points to the need to install underlying image libraries (e.g. libpng), and seems to generally be a repository for everyone's ImageMagick "no decode delegate" questions.
This sort of points back to a second person's issue in the first bullet, though it makes use of a ./configure command that I don't see in my ImageMagick directory
And finally, this might be the answer I need, though the syntax is garbled such that I cannot tell what the intended command is.
In particular, none of these explain what exactly one must do with the delegate libraries here, if they do indeed need to be installed manually. Anyway, my delegates are currently listed (via convert -list configure|grep -i delegate) as bzlib, mpeg, and zlib. I've installed media-libs/libpng, media-libs/tiff, and media-libs/libjpeg-turbo. I didn't grab media-libs/jasper, as it's not clear whether it is necessary. Removing and then installing ImageMagick anew after this (sudo emerge -cav media-gfx/imagemagick then sudo emerge -v media-gfx/imagemagick) didn't change any of my delegates.
Short Answer
A number of these can be handled by setting the USE flags on the imagemagick package. Some use flags can be found by looking at the package's entry on packages.gentoo.org. For a definitive list, check the ebuild on your machine or use tools such as equery.
Details
Portage, gentoo's package manager, is actually just a list of steps needed to build a package from source. USE flags allow you to customize that process. In this case, it changes which packages are built as dependencies.
Steps
One way to set the USE flags is to create a file in /etc/portage/package.use and write the package name on it's own line followed by all the use flag you would like to set. (eg. =media-gfx/imagemagick-7.0.8.8 png would set the png flag for version 7.0.8.8.
Once the USE flags are set, re-emerge the package to build with the new settings (eg. emerge --ask --verbose =media-gfx/imagemagick-7.0.8.8)
For more details on USE flags, read https://wiki.gentoo.org/wiki/USE_flag
I installed ColorPicker and it overwrote my key-binding (ctrl+shift+c). I'd like to change the ColorPicker binding to something else, however I'm unable to locate the definition.
If looked in Preferences > Package Settings > ColorPicker, but it only has Settings-Default and Settings-User neither of which contain the key-binding. I've also checked the Default & User key-bindings, to no avail.
How can I change the key-binding for ColorPicker?
Edit: Adding image of files for #OdatNurd
The definition for key bindings in a Sublime package come from the file Default (Platform).sublime-keymap, where Platform is one of Windows, Linux or OSX. Not all packages provide a menu entry for editing key bindings, though.
You can use PackageResourceViewer to open the file and see what the key binding is set to. You can modify the key directly in that file or copy it to your custom key bindings in your User package.
The latter is generally the better way to go because overriding a package file can cause problems when the package updates in the future; if it modifies a file that you have overridden, your override masks the package file which can potentially cause problems.
Sublime takes care to ensure that the User package is loaded last, so this is good place to put settings that you want to make sure don't get hoisted out from under you by packages.
Sometimes I install a new sublime package and a new directory gets added to the /Users/max/Library/Application Support/Sublime Text 3/Packages directory, which I like because I can use a bookmark with FuzzyFileNav and quickly browse the default .sublime-settings and .sublime-key files to get my bearings about what is going on with this package. However sometimes there is no entry added, as shown below (ironically with FuzzyFileNav)
So then the way I would find the .sublime-settings and .sublime-keymap files is to use the dropdown menu in sublime also shown below:
What I'm wondering is:
Why do some packages add entries to my Packages directory and other don't?
If there is no entry in Packages then where do the package specific .sublime-settings and .sublime-keymap files live?
My main goal is to be able to quickly navigate between my User and Default settings but it makes it hard when I'm feeling like Hansel and wondering where'd all the files go...you know :)
One workaround that might work is to copy all the Default .sublime-settings and .sublime-keymap files that don't live in the Packages directory and put them in the User directory and rename them to PackageName.sublime-settings and PackageName.sublime-keymap and then I'll be able to browse them anyways because I also have a bookmark to User. I think that would work because it would overwrite all the Default settings (that live somewhere) with all the exact same settings. Or maybe I could do that same thing except put the files in the Default directory; however, from what I've been reading it's bad form to modify the Default directory. Obviously the most ideal thing would be to just figure out where the heck these files are.
Sublime Text uses different folder locations for different kinds of packages. For instance, all packaged files install to Installed Packages and are self-contained in a standard Zip file using the file extension .sublime-package. When a package includes a file .no-sublime-package, the package will be extracted. All extracted packages are stored in the Packages folder.
Settings and keymaps are stored within both packed and unpacked packages. Those can be overruled/extended by saving them to Packages/User.
Detailed information on package locations and hierarchy can be found in the Package Control documentation.
idleberg's answer contains a good explanation of why you were unable to find .sublime-package files & unpackaged files in the same location.
The following information details an alternative method you can use to navigate all package files, whether packed or unpacked.
All of SublimeTexst's installed package files can be navigated and edited via PackageResourceViewer's PackageResourceViewer: Open Resource command.
Any files that are edited from a .sublime-package file will have a new instance created at Packages/PackageName. The new file will now override the original file ( which still exists in the .sublime-package file ). The original file can be reactivated by deleting the edited file.
Files edited from an unpacked package will be affected directly.
If both packaged & unpackaged instances of a file exist, PackageResourceViewer will open the unpackaged instance.
I work on this plugin
Syntax highlight does not work with Sublime Text 3 when plugin is installed using package control.
Error loading syntax file "Sublime Text 3/Installed Packages/robot.tmLanguage": Unable to open Sublime Text 3/Installed Packages/robot.tmLanguage
The plugin is under Installed Packcages/Robot Framework Assistant.sublime-package, the file 'robot.tmLanguage' in inside Robot Framework Assistant.sublime-package archive.
Here is how I set paths
https://github.com/andriyko/sublime-robot-framework-assistant/blob/master/rfassistant/init.py
My question is similar to this thread, but in my case the plugin is installed as archive(.sublime-package) not folder with with files.
I am not sure that my path settings mentioned above are correct in python3.
How can I refer to tmLanguage file that is inside .sublime-package file?
Where should I put that file? It is totally confusing why does it work on Sublime Text 2 and Sublime Text 3(when installed into dir from github) but does not work when installed via Package Control.
So, how do I set path to tmLanguage file and where should I store it. Just want to clarify, that it works fine when plugin is installed from github zip file(because I put it's content into RobotFrameworkAssistant folder under Packages directory). It does not work when plugin is installed via Package Control.
Quick summary of my manual solution of adding custom .tmLanguage files based on others' suggestions:
Put the myLang.tmLanguage file into a folder with your desired syntax
name.
Zip the folder so that it's named myLang.zip
Rename the zip archive to myLang.sublime-package
Put the myLang.sublime-package into the Sublime 3 packages folder. It will now appear in the sublime syntax highlighting menu.
Based on ST3 docs, I can't seem to find an alternative to this manual method right now, but it will work.
Package control will likely do everything you need behind the scene
Do you need the content of the tmLanguage file? If so, you shouldn't be accessing it directly. Instead, you should be using sublime.load_resource(name), where name is something like Packages/Robot Framework Assistant/robot.tmLanguage. If you are just trying to set the file syntax, you should be using view.set_syntax_file(syntax_file), where syntax_file is like name for the resource. I did not look at your plugin in detail, so please clarify what you are trying to do if both of those answers are incorrect.
As a side note, based on that error, you would probably see issues in ST2 also. You are only looking at the root packages folder, not in your package.
In ST3, jps decided to make plugins runnable from .sublime-package files, rather than needing to be extracted. These files are simply renamed .zip files. Updates do need to be made if you are accessing resources within your plugin, but the API has been extended to support it.
This isn't a great list, but it covers some of the changes in ST3 from ST2.
http://www.sublimetext.com/docs/3/porting_guide.html
The issue seems to be solved. Please refer to this fix.
Why I had problems with syntax settings(.tmLanguage) in ST3?
Because it is totally confusing and not clear from ST3 docs where that file should be located.
(Even if it says that files lookup is continued in Packages directory if file was not found in Installed Packages).
There are two 'main' folders under Sublime Text 3 directory: Installed Packages and Packages.
When the plugin is installed using Package Control it goes into Installed Packages directory packed into archive file called like Robot Framework Assistant.sublime-package (which is actually ZIP file).
The robot.tmLanguage file (syntax file) is inside Robot Framework Assistant.sublime-package.
So, in few words, my question was: how to refer to that file (what path should be provided to view.set_syntax_file method)?
Unintuitive, but I should refer to non-existent path Packages/Robot Framework Assistant/robot.tmLanguage. Actually, in my case the Packages directory contains only Users folder. The only thing, that I can guess is that folder name should be the same as package name(Robot Framework Assistant in my case).
After few weeks of struggle i am able to create a medium native package debian package which works well in installation and removing of the package.
As http://www.quietsche-entchen.de/cgi-bin/wiki.cgi/-wiki/CreatingDebianPackages
Debian wiki
http://wiki.debian.org/HowToPackageForDebian http://www.debian.org/doc/manuals/maint-guide/ these are the quite good material for beginners,
I have basic problem, in updating the package all the files data.tar.gz are updated by default.
I want only few files to get updated in the data.tar.gz based on a key variable stored in all the files.
After the unpacking that is executing preinst script, all the files in data.tar.gz are already updated..
my idea was to take back up of the files intially before upgrading the package, and check key variable in files.. if the key variable is greater than the current variable replace it..
which means i am writing a simple backup script.. and executing in the postinst file..
i donot think this is good idea.. and more over limitations in dash script make it a very tough job..
What are you trying to accomplish here? During the reinstallation (or upgrading) of a Debian package, replacement of all of the non-conffiles with the latest version is exactly what's supposed to happen. If the file hasn't changed since the last installed version of the package then there's no harm in updating it anyway, and if is has changed, it's supposed to be updated.
If you have specific files which might be modified by the user and should be preserved across upgrades, make then conf files. The package system will prompt the user and ask them if they want to keep the package maintainer's version or the locally modified version.
(But if you're going to make every file a conf file, then you're probably doing something wrong.)
To make a file a conffile, list it in debian/conffiles. But if the file is going to be installed under /etc then you don't need to do this because dh_installdeb will do it for you.
EDIT following additional information in comment:
Suppose you have files test1.sh and test2.sh (among others) in your package. In the Debian world, they are either conffiles are intended to be modified by the end user, or they're not.
conffiles should be relatively few in number and as short as possible, to minimize the burden of having to reconcile changes made by the package maintainer with conflicting changes made by the end user.
If there are things mixed into the code that the end user is likely to want to tune, try to factor them out into a configuration file. If you put that file in /etc, you don't even have to manually designate it as a conffile.
If the end user needs to make a change to a non-conffile, they should use the dpkg-divert protocol to (1) move the original file aside, and (2) edit a copy. Diverted files are respected by package upgrades. The end user who uses dpkg-divert should be aware that things might break after upgrades as a result, because the package maintainer hasn't foreseen that these files would be modified by end users and the locally modified version might be incompatible with a newly upgraded version of a different file. dpkg-divert should be used carefully and sparingly.