how to install slim tm bundle in sublime2 - slim-lang

I would like to install the slim textmate bundle to sublime2.
I went to this link
slim textmate bundle
I cloned it to the pristinepackage(as per the nettuts website) but nothing happened..
What am I missing?.

Try the following (it has worked for me):
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone https://github.com/slim-template/ruby-slim.tmbundle.git Ruby-Slim.tmbundle
And then in Sublime Text 2, you should be able to find 'Ruby Slim' in the bottom right language selection. At worst, you may need to quit and restart Sublime.

While it's tempting to install by copying directories, you should really use the Sublime Package Manager.
Install instructions are super easy - just copy and paste.
After installing you can:
browse other packages
install packages within Sublime
update packages easily
One small hurdle to get over and Sublime becomes way more powerful.

If you are using Mac OS with Sublime 3 you should use the Sublime 3 directory like this:
$ cd ~/Library/Application Support/Sublime Text 3/Packages/User
$ git clone git#github.com:slim-template/ruby-slim.tmbundle.git
PS: I tried to install syntax highlighting with the Sublime Package-Manager but it doesn´t work. Anyway, the two lines work for me. Maybe you should restart Sublime after cloning.

That worked for me also, however i had to add User/ like so
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/
git clone git://github.com/fredwu/ruby-slim-tmbundle.git Ruby-Slim.tmbundle

Related

How to install a specific version of swiftlint?

I am trying to fix this error:
Error: swiftlint does not have a version "0.11.1" in the Cellar.
by running this:
brew install swiftlint-0.11.1
however this doesn't work, then I tried "brew search swiftlint", but nothing showed up.
Can anyone point to me the correct way to install swiftlint with a specific version?
Go to /usr/local/Cellar/swiftlint you will see all installed switflint version.
Copy swiftlint version folder from other Mac then paste into /usr/local/Cellar/swiftlint
You could check all versions in your Mac by brew info swiftlint
Switch to version you need by brew switch swiftlint x.xx.x
I uploaded some version ==> here
Update: Now you could use pods for this.
My project is using swift2.2 with SwiftLint 0.12.0 installed via brew.
And I decided to change to Pod. There are many changes and errors in each versions. My project is too big, and it's take time to fix all the error and warning (it may effect to current features also...).
Finally I choose pod 'SwiftLint', '0.16.0' and. disable_rules then I don't need to fix any warning nor error.
type_name
shorthand_operator
unused_closure_parameter
This involves a lot of steps, but anyway:
Find the Brew Formula for Swiftlint. It's here.
Now you'll need an older commit of Swift Lint, so you would normally click on the History tab and get to an older commit. However, GitHub might tell you that you need to clone the repo (git#github.com:Homebrew/homebrew-core.git) and then use git log master -- Formula/swiftlint.rb to find your older commit. I'll spare you the details of that.
Now you need a raw URL for an older commit. So the raw URL for the latest commit is https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/swiftlint.rb, but you would use https://github.com/Homebrew/homebrew-core/blob/COMMIT/Formula/swiftlint.rb
Now you can do a brew install directly using this older Swift Lint. In my case, I needed 0.15, so I used:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/864095ea97b6d7dc88c772c7f9f36521cf81a77e/Formula/swiftlint.rb
Just go to Swiftlint release page and select the appropriate version.
Download it and extract it.
You should be able to see an executable and a licence txt file.
Now go to /usr/local/Cellar/swiftlint and create a folder with the version (for ex. 0.35.0).
Create a bin folder inside it and paste the swiftlint executable that you have downloaded.
Brew now shows the custom version that you have downloaded . You can check by typing brew info swiftlint in cmd
you can switch by brew switch swiftlint version_number
With mint, which I personally prefer, you can do:
mint install realm/SwiftLint#0.46.2
Go to the SwiftLint's releases section and find the version you're looking for.
Then download its installer (.pkg, .zip, etc), and run it.

Homebrew recompile from edited source code

Is there a way to to recompile from an edited source code via homebrew?
I did a change on the source user.hpp of Boost which I now want to recompile Boost with. I tried --build-from-source and --enable-bar but neither works, saying that it is already installed. The only way I can recompile is by reinstall but that simply overwrites the source code I changed.
Any idea?
First option
Download the archive, edit the files, and zip the archive as homebrew does (same name and format).
If you kept the original folder structure created by Homebrew, you can put the modified archive in ~/Library/Caches/Homebrew and then try brew install -f. (the -f is maybe not strictly necessary but it may be need for the SHA-1 mismatch.)
More info on this blog.
Second option
Pulled out from the Homebrew wiki, install the package without homebrew and then link it with brew.
./configure --prefix=/usr/local/Cellar/foo/1.2 && make && make install && brew link foo
Another approach is to add a patch to the homebrew formula (you can edit the formula using brew edit <formula-name>):
https://github.com/Homebrew/brew/blob/master/docs/Formula-Cookbook.md#patches

Cocoapods terminal setup 'edit' command not found?

I am attempting to setup an installation using Cocoapods for my iOS Xcode project.
cocoapods.org
When I get to the point where I need to edit my Podfile, it doesn't work. I attempt to execute the command edit Podfile in the correct directory, but I get:
-bash: edit: command not found
I'm not exactly sure what to do and performing that line is pretty vital to getting cocoapods working correctly.
I have tried restarting terminal and my computer as well with no luck.
Bit of a strange one from the Cocoapods documentation there, as there is no edit command built into OS X as far as I'm aware. They probably just intend that example to mean 'edit with your favourite text editor', or it could be that they're using TextWrangler's commandline tool (see below). Here are some alternatives you could try, however...
Open the Podfile with TextEdit
open -a TextEdit Podfile
This will open up your Podfile with TextEdit. Replace 'TextEdit' with the name of some other app if you prefer.
Set up SublimeText or TextWrangler to work from the command line
Both of the popular text editors SublimeText and TextWrangler have the option of installing command-line executables.
TextWrangler asks you on first launch whether you want to install them, and will then do it automatically. For Sublime Text you need to run the following command:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
(You may need to change the path to the application in there depending on whether you have ST 2 or 3 installed)
Depending on which editor you use, you'll have two possible commands you can use:
subl Podfile - open your Podfile with SublimeText
edit Podfile - open your Podfile with TextWrangler
Use a Terminal editor
Finally, for the more advanced user, you could use a terminal-based editor, such as Vim or Nano. Nano is easier to get started with, and is fine for small edits like this. Just run nano Podfile from the Terminal.

Running pub install. Please ensure Git is correctly installed. Mac OSX

When putting git: dependency in the pubspec. I get the following error:
'Running pub install' has encountered a problem.
...
...
...
Please ensure Git is correctly installed.
My git is installed at version 1.8.0 that I can access via the terminal on my Mac OS X 10.7.5.
Thank you in advance for any help.
I think the problem is that git's path is loaded to PATH only on terminal start up. Terminal does this by running a file ~/.profile or ~/.bash_profile that often exports the paths to commonly used programs. As a consequence, a GUI app such as the Dart Editor can't 'see' git as it doesn't run this start up file.
There is a way to make certain paths visible to all applications though.
See: https://serverfault.com/questions/16355/how-to-set-global-path-on-os-x/277034
Try creating a file:
/etc/paths.d/git
With the following contents:
/usr/local/git/bin/
If your Git installation is located somewhere else, then use the path accordingly.
I decided to just navigate to the dart project folder and run pub install on the terminal.

-bash: git: command not found in Xcode 4 in lion osx

Through Xcode 4.3 ->file -> source control -> repositories -> clone repository, I've cloned a repository from codesion.com. but when I go a git init or git add, the error -bash: git: command not found shows up. Now, Xcode 4.3 comes with the git installed, so what should I do to get this working?
Any help on this would be great.
Thanks in advance.
There is another option if you're not experienced with UNIX or you just don't want to mess with the system variables from the terminal. I had the same problem, and after some reading on SO and apple developer pages I've decided to install the Command Line Tools for Xcode. That solved the problem.
As the Xcode IDE from some 4.x version is an .app package and everything is stored inside that package, they have added the possibility to separately install the command line tools so that you have the command line tools inside the usr/bin/ path.
You can install the command line tools (as well as some other tools and documentation) from the Downloads tab of the Preferences window in Xcode (I have version 4.3), or from the apple developer website.
It's a path issue. See this question for the answer:
How to move GCC in osx from xcode to /usr/bin
(P.S. The question is different, but the answer the same.)

Resources