Skip to content

Instantly share code, notes, and snippets.

View JackNicholas's full-sized avatar

Jack Nicholas JackNicholas

View GitHub Profile
@JackNicholas
JackNicholas / gist:5330695
Last active December 15, 2015 22:09
ST: Emmet: expanding abbreviations in .kit and other non-standard files
@JackNicholas
JackNicholas / gist:5330799
Last active December 15, 2015 22:09 — forked from lucasfais/gist:1207002
ST: 2 - Useful Shortcuts (Mac OS X)

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@JackNicholas
JackNicholas / gist:5330866
Created April 7, 2013 15:12
ST: 2: launch Sublime Text 2 from OS X terminal
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
This is the right way, pace the official documentation.
The process and background is beautifully written up here:
<https://gist.github.com/artero/1236170>
which gist includes a well-deserved put-down of the Sublime recommended process:
@JackNicholas
JackNicholas / editingMarkdownPluginCommands.md
Last active December 16, 2015 09:29
ST: markdown editing commands for brett terpstra sublime text plugin

from

http://brettterpstra.com/2012/05/17/markdown-editing-for-sublime-text-2-humble-beginnings/

http://ttscoff.github.io/MarkdownEditing/

  • Asterisks and underscores are autopaired and will wrap selected text
  • If you start an empty pair and hit backspace, both elements are deleted
  • If you start an empty pair and hit space, the right element is deleted, backticks are paired
  • Left bracket pairing is modified to eliminate the selection and leave the cursor at a point where you can insert a [] or () pair for a link
@JackNicholas
JackNicholas / git-log-stat-command
Created May 15, 2013 17:45
git log command to see which files changed in a commit
git log --stat
the --stat option prints below each commit entry a list of modified files, how many files were changed, and how many lines in those files were added and removed
@JackNicholas
JackNicholas / open file shortcut ST
Last active December 4, 2021 11:57
setting keyboard shortcut to open specific file in sublime text
create a keyboard shortcut in sublime text for a specific file
Open the command palette, search for "Preferences: Key bindings - User", open it and add this code to it:
{
{ "keys": ["ctrl+alt+0"], "command": "open_file", "args": {"file": "/path/to/your/file.txt"} }
}
@JackNicholas
JackNicholas / sublime text 2: finding commands
Created June 5, 2013 11:10
where to find menu item command names on OS X for sublime text 2
* Go to ST menu bar
* Application menu
* sub menu Preferences
* browse packages
* go to folder Default
* open file Main.sublime-menu.
* search for menu item
@JackNicholas
JackNicholas / template for .gitignore
Last active July 16, 2020 12:40
template .gitignore file including ignores for sublime text and bootstrap 3
# Images and Icons #
####################
*.png
*.jpg
*.gif
*.tiff
*.ico
# Fonts #
#########
@JackNicholas
JackNicholas / deploy to heroku
Last active December 22, 2015 18:09
command line steps for deploying to heroku
# set up git in local
$ cd into-your-app-root-folder
$ git init
$ git add .
$ git commit -m "initial commit" (or using my shortcut, git ci --all -m "initial commit")
# set up heroku remote
$ heroku create
Creating shrouded-reaches-5937... done, stack is cedar
@JackNicholas
JackNicholas / gist:8143973
Created December 27, 2013 08:07
Adding name of current git branch to command line prompt
You can test command line prompts with commands like
export PS1="\W \u \$ “
(then save to .bashrc or .bash_profile if want it permanently)
Make sure that path is up to date.
export PATH=/usr/local/bin:$PATH
The script and commands to add a coloured branch name to the prompt: Save this to .bashrc or .bash_profile