How can I install a sublimetext3 package manually, without the package control. I am trying to fix a bug in an existing package, therefore I need a way to test my changes.
what are the naming conventions to be followed when naming the zip file?
Where do I place it?
what other configurations I have to do?
Download the ZIP, and then place it in your Packages directory which can be found by doing Sublime Text -> Preferences -> Browse Packages...
what are the naming conventions to be followed when naming the zip file? Where do I place it? what other configurations I have to do?
This really depends on the specific package you are downloading. For some packages, you can name it whatever you want. For others, the name has to be exact. If you are downloading these packages manually from GitHub, I urge you to read the documentation in the README. They usually provide instructions for manual installation. For example, if you wanted to download the Spacegray theme manually, it tells you to download the ZIP, unzip the folder, and rename it to Theme - Spacegray.
Depending on your OS, your package directory might be one of these and for most of the packages, just extract the content to this folder (with it's root folder as the name)
Linux: ~/.config/sublime-text-3/Packages
OS X: ~/Library/Application Support/Subime Text 3/Packages
Windows: %APPDATA%\\Sublime Text 3
I am trying to fix a bug in an existing package, therefore I need a
way to test my changes.
I was in the same situation. The accepted answer didn't work for me because Package Control would automatically remove the folder. I found this to be helpful:
https://packagecontrol.io/docs/customizing_packages
Sublime Text 3 offers the most options for overriding a package. By
default, packages will be installed by placing a .sublime-package file
in the Install Packages/ folder. Then users may override individual
files in the package by creating a folder Packages/{Package Name}/ and
placing edited files in there.
Another approach is PackageResourceViewer, which allows you to extract and override individual files from packages, including the built-in packages.
The best answer I think, so far, is this one by #Andreas Haferburg.
The most-upvoted answer also has some really useful information, such as the link to the spacegray package which states:
Manual
You can also install the theme manually:
Download the .zip
Unzip and rename the folder to Theme - Spacegray
Copy the folder into Packages directory, which you can find using the menu item Sublime Text -> Preferences -> Browse Packages...
That is where I first learned about the existence of the Packages folder and how to find its path.
Using those answers together, plus putting in about 1 weekend worth of work into learning about how Sublime Text packages and syntax highlighting work, I wrote the following "Developer Notes & Package Development Tutorial", on GitHub, as well as these "manual installation" instructions.
In short, to "install a package" withOUT Package Control, all you need to do is put the package into your Sublime Text Packages folder, whose path can be found by going to Preferences --> Browse Packages.... The folder name can be anything. It only needs to match what is inside the Installed Packages dir (which is at the same level as the Packages dir) if you want to override an already-installed package which was previously installed by Package Control in "packed" (zip file) format.
The main link you should study, aside from my tutorial, is this: https://packagecontrol.io/docs/customizing_packages.
1. How to manually install a package
Here are some of the key quotes and instructions from my manual installation instructions and tutorial.
Again, note that I am only requiring that the name in the Packages folder be something specific like gcode in the instructions below because my instructions are intended to override a Package-Control-installed package the reader may already have installed. If you want to install for the first time, or make a new package, the folder name you use inside the Packages folder can be anything.
2. Manual installation
In Sublime Text, find the path to your Packages folder by clicking Preferences --> Browse Packages.... This will open up your GUI file manager to the path where Sublime Text packages are stored. For me on Linux Ubuntu 20.04, that's /home/gabriel/.config/sublime-text-3/Packages (even though I am running Sublime Text 4).
Now, extract this package to that folder.
Option 1: the GUI way: click the green "Code" button above --> "Download ZIP" --> save the zip file, extract it to your Packages path above, and rename it to gcode.
OR Option 2 [what I prefer]: the command-line way:
# --------------
# Option 2.A: clone the repo directly into your "Packages" dir
# --------------
# cd to the Packages dir (change this path according to your Packages path above)
cd "$HOME/.config/sublime-text-3/Packages"
# clone the repo
git clone https://github.com/ElectricRCAircraftGuy/sublime_gcode.git
# rename the repo dir to "gcode"
mv sublime_gcode gcode
# --------------
# OR Option 2.B [what I prefer]: clone the repo into wherever you want, and then
# symlink it into your "Packages" dir
# --------------
# clone repo into ~/dev
mkdir -p ~/dev
cd ~/dev
git clone https://github.com/ElectricRCAircraftGuy/sublime_gcode.git
# now symlink it into your Packages dir
ln -si ~/dev/sublime_gcode ~/.config/sublime-text-3/Packages/gcode
That's it! The gcode entry is now instantly available in your syntax highlighting menu.
Developer Notes & Package Development Tutorial
...
...
...
Sublime Text packages and syntax highlighting--how it all works
And here are some really important notes about Sublime Text packages and how Package Control works:
1. Sublime Text packages
Any folder inside of your Sublime Text Packages folder (found via Preferences --> Browse Packages...) is automatically instantly loaded by Sublime Text as a "package".
Packages installed by the Package Control package, however, come in two types:
Packed: most packages installed by Package Control are "packed" into a zip file named packageName.sublime-package and are located inside the Installed Packages dir which is at the same level as the Packages dir.
If you manually create a dir inside the Packages dir and name it packageName (to match the packed file above), then any files in it with the same name as those in the packed package will override those in the packed package. See the "Overrides" section here: https://packagecontrol.io/docs/customizing_packages.
Unpacked: any package which is installed in the Packages dir is unpacked.
Developers can tell Package Control to unpack a package installed by Package Control by placing a file named .no-sublime-package at the root of their repo. See here: https://packagecontrol.io/docs/submitting_a_package.
Unpacked packages are required if they contain binary executables which need to be run by the system, for instance, as they apparently can't run from inside the packed zip file.
2. Syntax highlighting
Hopefully I got all of this straight.
If you want to learn more about Syntax Highlighting in Sublime Text, and how it maps to scope entries in your Color Scheme, read my tutorial.
2. Test your changes
I am trying to fix a bug in an existing package, therefore I need a way to test my changes.
See also this section in my tutorial:
To modify and test changes to this package locally...
...in case you'd like to change it or contribute to it, follow the "manual installation" instructions above. If you have already installed it via Package Control, then what is in your /home/$USERNAME/.config/sublime-text-3/Packages/gcode folder will override what is in your /home/$USERNAME/.config/sublime-text-3/Installed Packages/gcode.sublime-package zip file which Package Control installed, so long as the folder and file names are the same.
Modify any files in the Packages/gcode dir as desired. Each time you save, the changes will instantly be reflected in all Sublime Text editors you have open. As a quick test:
Open a gcode file.
Click your cursor on some text in the file.
Use the Tools --> Developer --> Show Scope Name trick to see what the scope is for that text.
Open the corresponding *.sublime-syntax file.
Change or delete the regular expression in the match entry for that corresponding scope you just found, so that it no longer matches the text on which you placed your cursor.
Save the *.sublime-syntax file and you will instantly see the formatting of that text in the gcode file change.
Undo your change to the match entry and save again. The formatting will return to how it was.
Go to Preferences --> Customize Color Scheme, and add a custom rules entry for that scope, with new formatting for that scope. Save it and watch the formatting instantly change again. Delete that custom entry when done, if desired.
Related
I would like to add to a sublime package so that it can work right now (and then make a PR to the repo after).
I've installed Expand Selection To Quotes on Sublime Text 3. I go to Preferences\Browse Packages which takes me to ~/Library/Application Support/Sublime Text 3/Packages
I cannot find this package anywhere, so I look around the App's root and found it here: ~/Library/Application Support/Sublime Text 3/Packages/Installed Packages/Expand Selection to Quotes.sublime-package
This file is filled with hex values and is 2.2KB in size. I cannot modify this file and I'm not sure if it's the right file or if it's just a metadata file.
I ended up with a different solution than to modify the existing folder.
I forked the repo, made my code updates, then cloned it into the Packages folder. Sublime picks it up automatically plus any further code changes that you want to tweak.
I just got a new computer, installed Sublime Text 3 and I want to start installing new packages, when I go to cmd+shift+p and typed Package or Install it doesn't return anything similar as in Sublime Text 2, what should I do in order to just open Install Packages and start typing the name of the packages I want in order to install them in Sublime?
The User folder contains this
The title and body of your question refer to two completely different things. The folder you reference in the title is the Packages Folder, opened by selecting Preferences -> Browse Packages... (which is under the Sublime Text menu on OS X). Initially, Packages only contains the User folder, which is where, surprisingly, user files are stored, such as your user preferences.
The reason you can't install packages right away is because you need to install Package Control. Follow the directions carefully, restart Sublime when asked to, and you'll be ready to install plugins, themes, color schemes, and other packages.
I installed sublime text 3 editor and package control on my computer, but many of the packages only work on sublime text 2. However, I read articles on how branching to st3 could be a work around. But, I have no idea what that means, how can one branch to st3?
Please follow the instructions at: https://packagecontrol.io/installation
Do you mean in Package Control or for other packages? For Package Control, you need to manually clone the git repo. Then do git checkout python3. For installing packages, you need to add the branch URLs as an external repository. For example, one of my plugins that I have a ST3 branch on is AdvancedNewFile. To install the ST3 branch, I would have do the following.
In the command palette search for "Package Control: Add Repository"
In the input panel, insert https://github.com/skuroda/Sublime-AdvancedNewFile/tree/ST3
Install AdvancedNewFile normally through package control.
The URL can be found by clicking the Branch dropdown on github and selecting the appropriate branch.
If you want to use a Sublime 2 Package on Sublime 3, you can install the Package Manager as described here.
Then CTRL+ALT+P > Package Control: Add Repository > Paste the GitHub (or repository) URL > Install the package normally.
This doesn't guarantee the package will work, so you must check if there's a branch or something which is compatible with Sublime 3. I did that with freewizard/SublimeFormatSQL since one of the commits said 'Added Sublime Text 3 support', and it worked.
Sublime tries to write some config files to your .conf directory located in /home/{username}/.config/sublime-text-3/Installed Packages but it hasn't writing permission.
So try:
chmod -R 777 /home/{username}/.config/sublime-text-3/Installed Packages
Open the console and try to paste to code for sublime text 3.
Manual Installation
If for some reason the console installation instructions do not work for you (such as having a proxy on your network), perform the following steps to manually install Package Control:
Click the Preferences > Browse Packages… menu and close sublime text 3
Browse up a folder and then into the Installed Packages/ folder
Download Package Control.sublime-package and copy it into the Installed Packages/ directory
go to this address https://github.com/wbond/package_control/blob/master/Package%20Control.sublime-settings
copy the code
open the copied downloaded "Package Control.sublime-package" in Installed Package (double click the package)
edit the file Package Control.sublime-settings in downloaded Package Control.sublime-package and replace the code that you copied in github
save and close Package Control.sublime-package
start Sublime Text 3 and wait to install package and restart
Its better to use the packages which are fully supported in your Sublime Text 3 version.
You can browse packages easily from: https://packagecontrol.io as well as see their compatibility.
Another method can be simply go to to your Sublime Text 3 > Install packages & Install the package you need. Here; you only see the packages supported in your Sublime Text 3 version.
Hope it helps...
I'm trying to add a package to buildroot, but I'm not having much success. The package I'm trying to add is an autotools package called scew. I've followed the buildroot guidelines about adding packages, and although the package is listed when make menuconfig is run, when I run make the package is missing from the final rootfs.tar.
I've also copied over another simple .mk file that's used to install which, and changed the variable names and URL accordingly. Here is my copy of scew.mk:
SCEW_VERSION = 1.1.3
SCEW_SITE = http://savannah.nongnu.org/download/scew/
SCEW_LICENSE = GPLv3
SCEW_LICENSE_FILES = COPYING
$(eval $(autotools-package))
In the same directory I have Config.in, which looks like:
config BR2_PACKAGE_SCEW
bool "scew"
help
google scew
I've also added the following lines to package/Config.in:
menu "My Packages"
menu "Packages I Wrote"
source "package/MyPackages/packagesIWrote/hello/Config.in"
source "package/MyPackages/packagesIWrote/helloworld/Config.in"
endmenu
menu "External Packages"
source "package/MyPackages/external-packages/scew/Config.in"
endmenu
endmenu
This part seems to work, as the packages are listed and can be selected. The hello and helloworld packages are copies from a guide to adding packages, taken from this website (written in french):Adding Hello World.
The hello world packages also do not work. I'd be glad of any advice at all, as it seems I'm just going around in circles on this one, and I can't see what I'm doing wrong.
To construct the appropriate file:
diff your source package from the original into a file called. packagename-number-description.patch. where. packagename - has to be identical to the package name. ...
Place this file into the package at the same level as the [packagename]. mk file and the package/Config.in file.
I am trying to install the Dummy package to my laptop.
I have installed WAMP and i have placed the dummy package into the WWW directory.
However when i go to my Localhost from WAMP and click on the dummy page, instead of showing me the installation screen it shows my the directory index.
to create ENABLE_INSTALL_TOOL just use command line
win+r -> type cmd -> navigate to directory -> type: echo > ENABLE_INSTALL_TOOL
Dummy package has no sources inside, you can see, there's no even index.php file.
Use Source + Dummy which will give you an empty TYPO3 system or even better Introduction Package for learning purposes - working and containing lot of samples.
To create ENABLE_INSTALL_TOOL make sure that your system displays files' names with extension ie: open with the Windows Explorer folder where you unziped the package and make sure that it can see filenames as INSTALL.txt (not only INSTALL) if it doesn't you need to search in options of Windows Explorer...)
Then go to folder typo3conf and create just common, empty file ENABLE_INSTALL_TOOL.txt and finally chane it's name and remove .txt extension.
TYPOe install tool will be satisfied.