Git clone from github - sublimetext2

If I want to install a package into Sublime Text 2, I can use the Package Control plugin. But say I want to install a package that is not available through that means.
I am told to 'git clone' from github and the command line is usefully included eg:
git clone https://github.com/mpmont/ci-snippets.git ci-snippets
But I cannot find an explanation of how to use it. I've tried pasting it into the console but just get 'Syntax Error'
I'm using Windows 7.
Help!

You have to install git first.
After you have installed (msys)git, open windows explorer, right click on your target folder and choose "Git Bash". In this shell you can use
git clone https://github.com/mpmont/ci-snippets.git ci-snippets
to clone the repository.

Realize you may just be cloning but you may also add the repository to package control, then install it through that.
To add a repository through package control, open the command palette and enter Package Control: Add Repository. Then input the URL. Note this URL should not contain the .git extension. Then, you can install the package via package control as you would with any other package. Of course, cloning also works, but just thought I would throw this out there if you didn't want to worry about doing all the git stuff.

Related

Testing yeoman generator locally

I'm creating a yeoman generator for my web projects.
But I wonder how I can try and test my changes before publishing it?
Since I have installed it once, it will not run my local development version, instead it runs my installed version.
Any suggestions on how can test-run my local development version?
I finally found some information on how to accomplish this:
if you wish to develop on the generators code base, and debug locally, a common way to do so is to rely on npm link
git clone the generators repo locally
cd into that repository and run npm link. It'll install required dependencies and install the package globally, using a symbolic link to your local version.
If you want to install sub generators, you need to do so in the context of a yeoman-generator package linked earlier. Cd into the sub generators package you have cloned locally and run npm link.
We now have everything linked and known on the system, we now need to link the sub-generator repo into the parent one, yeoman-generator cloned and linked in step 1 & 2.
https://github.com/yeoman/generator/wiki/Testing-generators
EDIT:
Updated link for info: https://yeoman.io/authoring/index.html
If by "running locally" you mean the ability to test your generator and its flow you can simply do this.
In your project directory folder run npm link. If this passes in flying colors, go to step 2.
Open a terminal and cd into the folder you wish to initiate a project.
Run yo generator-theNameOfYourGenerator. This will run your generator.

nuget package restore with MonoDevelop

I have a solution that is primarily developed in Visual Studio 2012. I would like to develop in MonoDevelop without major incompatibilities.
Thus far, I have installed mrward's nuget addin for MonoDevelop and things work if I manually add each package in packages.config through that interface. However, this is highly onerous. This addin doesn't have support for automated package restore as of this writing.
I downloaded nuget.exe from CodePlex ("NuGet command line utility", as it's labeled). I use a simple find/xargs combination to install all required packages:
find . -name packages.config | xargs -I '{}' mono nuget.exe install '{}'
This creates several dozen directories in the directory from which it is run instead of putting things under packages/ as expected, and it also doesn't touch the project files so MonoDevelop still thinks that it should be looking for package references in the directory from which MonoDevelop was started.
I therefore opened MonoDevelop from the working directory that contains all of these package folders, and I still get invalid references. I think this is probably because the project is looking for package_name/ reference, but the folders are name package_name.version/ in the working directory.
Any suggestions for a sane, simple way to interact with this solution? I'm next going to try modifying my shell command so that it automatically drops to project/packages and runs nuget from that directory.
Did you try using the -o command line parameter with NuGet.exe? You can use that to get the packages to install into a particular packages folder.
The NuGet addin for MonoDevelop supports package restore from version 0.6 or above. Right click your project and select Restore Packages. This will download all the packages defined in your packages.config for all projects in the solution. It uses NuGet.exe to do this.
Another way to get this working is to use the custom NuGet MSBuild target so the package restore happens at build time when using xbuild. It would require some manual editing of project files though. Under the covers the custom MSBuild target just uses NuGet.exe with a similar command line to what you have already just with the output directory option specified. So I would try the command line approach since that will be less work.
You would have to get the following files from the NuGet repository on codeplex:
NuGet.exe
NuGet.targets
NuGet.config
Put these in a directory somewhere. Typically these are put in a .nuget directory in the same directory as your solution file. Then you need to edit your project files to include the NuGet.targets file and also define the SolutionDir property. So something like this:
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
You will also need to enable package restore on your machine. You can do this using the NuGet addin for MonoDevelop in the Options dialog. Under Linux this is available from the Edit menu under Preferences. Then look in the NuGet - General options and there is a checkbox for enabling package restore.
There is an example project on GitHub created by Jonathan Channon which uses package restore and works when building with xbuild inside MonoDevelop. There is also an issue on GitHub about using NuGet restore on Linux which might be helpful.
Update: 2014-05-14: NuGet addin for MonoDevelop now supports package restore.

Installing packages in Sublime Text 2

When I go to browse packages in Sublime Text 2, the packages folder is full of all the plugins I wanted like Zen coding and SidebarEnhancements. My installed packages folder only has package control in it though. Should other installed packages be located in here?
SidebarEnhancements, for example, does not work, even though it is in the packages folder. If I right click the sidebar I just get the "close" option. I've been trying to figure this out for weeks, and I figured I would just ask here and see if anyone could tell me what I need to do after I have the package in the packages folder, if anything.
With Package Control in Sublime Text 2, you really need to become cozy with a couple of different things to make it all work:
Always look up a package in the wbond community. There you'll be able to see how many people have installed that package (the more popular, the better) as well as the documentation on the package (if any).
Menu Items under Prefs > Package Control. Here you can install, remove or see a list of all installed packages.
Prefs > Package Settings. Here you'll find the settings that can be tinkered with as well as shortcut keys that are available. Make sure to make any changes in the User Settings, rather than the Default Settings. Otherwise, your settings will be overwritten when that package is updated.
CTRL+SHIFT+P. This will bring up a menu where you can look up a lot of the functions your installed packages can do. Just start typing and it will start filtering.
Here is a link to a shorter and to the point description:
http://www.granneman.com/webdev/editors/sublime-text/packages/how-to-install-and-use-package-control/
The steps are:
Install package control.
Go to http://wbond.net/sublime_packages/package_control/installation and grab the install code.
In Sublime Text 2 open the console (Ctrl+`) and paste the code.
Restart Sublime Text 2.
Open command palette via Command+Shift+P (Mac OSX) or Ctrl+Shift+P (Windows).
Start typing Package Control and choose the package you are looking for.
Try using Sublime Package Control to install your packages.
Also take a look at these tips
The Installed Packages Directory You will find this directory in the
data directory. It contains a copy of every sublime-package installed.
Used to restore Packages
So, you shouldn't put any plugin to this folder.
For getting works of SidebarEnhancements plugin try to disable and reenable this plugin with using Package Control. If it doesn't work then try to remove folder "SidebarEnhancements" from "Packages" folder and install it again via Package Control.
You may try to install Package Control first by following simple instructions available at Installation Guide (which is like 1. Open the Console, 2. Paste the code).
Then please check Package Docs Control Usage for Basic Functionality:
Package Control is driven by the Command Pallete. To open the pallete,
press Ctrl+Shift+P (Win, Linux) or CMD+Shift+P (OS X). All Package
Control commands begin with Package Control:, so start by typing
Package.
The command pallete will now show a number of commands. Most users
will be interested in the following:
Install Package
Show a list of all available packages that are available for install.
This will include all of the packages from the default channel, plus
any from repositories you have added.
This recently worked for me. You just need to add to your packages, so that the package manager would be aware of the packages:
Add the Sublime Text 2 Repository to your Synaptic Package Manager:
sudo add-apt-repository ppa:webupd8team/sublime-text-2
Update
sudo apt-get update
Install Sublime Text:
sudo apt-get install sublime-text
Enabling a previously-installed Sublime Text package
If you have a subdirectory under Sublime Text 2\Packages for a package that isn't working, you may need to enable it.
Follow these steps to enable an installed package:
Preferences > Package Control > Enable Package
Select the package you want to enable from the list

Mercurial not configured correctly

I have recently updated to eclipse juno. I have also updated mercurial to its latest version, but it is still giving me problems. The mercurial plugin tells :"Unsupported hg version:1.9.3. Expected is at least2.0.0." but its already updated(see pic).
If I try to commit, it automatically opens preferences window, which gives message :"Mercurial is not configured correctly.Run 'hg debuginstall' to analyse.".
When I do that, it says:"no username supplied". Then I run "hg -y debuginstall", which says, no problems were detected.
Everything that I mentioned is depicted in the picture.
Uncheck the option labelled Use default (built-in) Mercurial executable; then in the text box labelled Mercurial executable below, you can enter the full path to the hg.exe under your TortoiseHg 2.5 installation.
I got the same error when I installed Mercurial Eclipse Plugin. I find the configuration file "Mercurial.ini" in the mercurial installation folder. In my case, the path of that folder is "E:\eclipse\plugins\com.intland.hgbinary.win32_2.3.2\os\win32". Edit the configuration file with notepad and add the line "username = your-user-name" where your-user-name is free to choose. I hope it would help.

Tortoise-Hg (mercurial) does not find hg-git

I have Tortoise Hg installed on my Windows box, and have been using mercurial via the Tortoise GUI and also from the windows commandline. I installed hg-git as recommended on http://hg-git.github.com/ : Using easy_install hg-git, which built the package with Microsoft Visual C++ 2008. There were no error messages and the build reported success.
I then added the extension to the configuration file. But TortoiseHg still doesn't accept git urls, and when I run hg from the commandline, I get:
*** failed to import extension hggit: No module named hggit
Now, python does know about hggit and will find it if I type import hggit at the interpreter (it fails when hggit tries to import mercurial). I understand that TortoiseHg provides it own python environment, so my question is: How do I install hggit so that it is visible to the tortoise-distributed mercurial? Or am I misdiagnosing the problem?
How did you reference the extension in the .hgrc file ?
If you just did
[extensions]
hggit=
Try adding the complete path to the extension :
[extensions]
hggit = [path-to]/hg-git/hggit
This should tell TortoiseHg exactly where to look and bypass any difference of configuration between the command line and the gui.