Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bkuhlmann/sublime_text_setup
Shell scripts for managing settings, key bindings, extensions, code snippets, etc.
https://github.com/bkuhlmann/sublime_text_setup
setup shell sublime-text
Last synced: 10 days ago
JSON representation
Shell scripts for managing settings, key bindings, extensions, code snippets, etc.
- Host: GitHub
- URL: https://github.com/bkuhlmann/sublime_text_setup
- Owner: bkuhlmann
- License: other
- Created: 2014-11-27T16:28:44.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T18:33:18.000Z (7 months ago)
- Last Synced: 2024-05-01T23:13:57.556Z (7 months ago)
- Topics: setup, shell, sublime-text
- Language: Shell
- Homepage: https://alchemists.io/projects/sublime_text_setup
- Size: 5.53 MB
- Stars: 12
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Funding: .github/FUNDING.yml
- License: LICENSE.adoc
- Citation: CITATION.cff
Awesome Lists containing this project
README
:toc: macro
:toclevels: 5
:figure-caption!:= Sublime Text Setup
Shell scripts for managing and sharing link:http://www.sublimetext.com[Sublime Text] settings, key
bindings, extensions, code snippets, and much more. If you are fan of Sublime Text and don't want to
always reconfigure it when reinstalling the operating system on an existing machine or setting up a
secondary machine, then having a project as single source of truth is a great way to reduce that
maintenance burden while also being able to share your settings with others.toc::[]
== Features
* Applies preferences not enabled by default (see the Preferences.sublime-settings file).
* Applies key bindings not enabled by default (see the Default (OSX).sublime-keymap file).
* Applies extension preferences not enabled by default (see the
link:https://alchemists.io/projects/mac_os-config[macOS Configuration] project for details.)
* Provides tab-completion code snippets for HTML, CSS, Elm, Ruby, Rails, RSpec, Rust, etc.== Requirements
. link:http://www.sublimetext.com[Sublime Text]
== Setup
To install, run:
[source,bash]
----
git clone https://github.com/bkuhlmann/sublime_text_setup.git
cd sublime_text_setup
git checkout 23.3.0
----== Usage
Start by installing link:https://packagecontrol.io[Package Control] if you haven't already. The
quick steps are:1. Open the command palette via `COMMAND + SHIFT + p`.
2. Type `Install Package Control` and press `ENTER` to install.Now you can switch to your terminal and type the following install:
[source,bash]
----
bin/run
----_The install assumes this GitHub project will be kept locally since the Sublime Text
`$HOME/Library/Application Support/Sublime Text/Packages/User` folder will be symbolically linked to
this project. Should this project be relocated, re-run the install to fix the symbolic link._
Alternatively, the install can be skipped and content can be pilfered from the files located in the
`preferences` folder of this project instead.=== Customization
Modify all files in the preferences/User folder as you see fit.
For additional setup/support, the following projects might be of interest as well:
* link:https://alchemists.io/projects/mac_os[macOS] - Shell scripts for automated macOS machine
setup (includes installation of Sublime Text Extensions).
* link:https://alchemists.io/projects/sublime_text_setup_kit[Sublime Text Kit] - Command line
utilities (Ruby Gem) for managing Sublime Text.=== Snippets
The following snippets are supported by this project. Each is sorted by description and followed by
the trigger to activate the snippet.* Bash Header - `bh`
* Bash Settings - `bs`
* Bundler Gem - `bg`
* Bundler Gem (path) - `bgp`
* Bundler Inline - `bi`
* CSS Border Radius - `br`
* CSS Comment - `comment`
* CSS Flexbox - `flex`
* CSS Grid - `grid`
* CSS Grid Area - `ga`
* CSS Grid Auto Flow - `gaf`
* CSS Grid Gap - `gg`
* CSS Grid Template - `gt`
* CSS Grid Template Areas - `gta`
* CSS Grid Template Columns - `gtc`
* CSS Grid Template Rows - `gtr`
* CSS Media (breakpoint) - `mbp`
* CSS Root - `root`
* CSS Style - `cs`
* CSS Variable - `var`
* CSS Variable (define) - `varc`
* Comment (duplicate) - `dup`
* Comment (fix) - `fix`
* Comment (todo) - `todo`
* ERB - `erb`
* ERB Comment - `erbc`
* ERB Output - `erbo`
* ERB each do..end - `erbe`
* ERB if..else..end - `erbie`
* ERB link_to - `erbl`
* Factory Bot Build - `fbb`
* Factory Bot Build Stubbed - `fbs`
* Factory Bot Create - `fbc`
* Factory Bot Trait (multi-line) - `fbtm`
* Factory Bot Trait (single line) - `fbt`
* HTML Comment - `comment`
* HTML JavaScript CDN - `jsc`
* HTML JavaScript ImportMap - `jsi`
* HTML Popover Action - `poa`
* HTML Popover Content - `poc`
* HTML Popover Target - `pot`
* Hanami Action - `ha`
* Hanami Database Relation - `hda`
* Hanami Database Repository - `hdr`
* Hanami Database Struct - `hds`
* Hanami Pragma (auto register) - `hpa`
* Hanami Route - `hr`
* Hanami View - `hv`
* Hanami View Context - `hvc`
* Hanami View Part - `hvp`
* Hanami View Scope - `hvs`
* IRB Command - `irbc`
* IRB Helper - `irbh`
* JavaScript Catch - `catch`
* JavaScript Console Count - `ccount`
* JavaScript Console Dir - `cdir`
* JavaScript Console Error - `cerror`
* JavaScript Console Info - `cinfo`
* JavaScript Console Log - `clog`
* JavaScript Console Time - `ctime`
* JavaScript Console Time End - `ctimee`
* JavaScript Console Trace - `ctrace`
* JavaScript Console Warn - `cwarn`
* JavaScript Event Listener - `eventl`
* JavaScript Function - `fn`
* JavaScript Function (anonymous) - `fna`
* JavaScript Function (async) - `afn`
* JavaScript Getter - `getter`
* JavaScript Port (Elm) - `port`
* JavaScript Setter - `setter`
* JavaScript Switch - `switch`
* JavaScript Then - `then`
* JavaScript Try - `try`
* RSpec After (multi-line) - `afterm`
* RSpec After (single line) - `after`
* RSpec Aggregate Failures - `ag`
* RSpec Allow - `al`
* RSpec Allow Block (multi-line) - `albm`
* RSpec Allow Block (single line) - `alb`
* RSpec Allow Error - `ale`
* RSpec Allow Original - `alo`
* RSpec Allow Original Wrap - `alow`
* RSpec Allow Return - `alr`
* RSpec Allow Throw - `alt`
* RSpec Allow With - `alw`
* RSpec Allow With Error - `alwe`
* RSpec Allow With Return - `alwr`
* RSpec Allow With Throw - `alwt`
* RSpec Allow With Yield - `alwy`
* RSpec Allow Yield - `aly`
* RSpec Around - `around`
* RSpec Before (multi-line) - `beforem`
* RSpec Before (single line) - `before`
* RSpec Class Double - `cdouble`
* RSpec Class Spy - `cspy`
* RSpec Context - `context`
* RSpec Describe - `des`
* RSpec Described Class - `dc`
* RSpec Expect - `x`
* RSpec Expect - Be - `xb`
* RSpec Expect - Change - `xc`
* RSpec Expect - Contain Exactly - `xx`
* RSpec Expect - Cover - `xv`
* RSpec Expect - Eq - `xq`
* RSpec Expect - Have Attributes - `xa`
* RSpec Expect - Have Received - `xr`
* RSpec Expect - Include - `xi`
* RSpec Expect - Match - `xm`
* RSpec Expect - Output - `xo`
* RSpec Expect - Raise Error - `xe`
* RSpec Expect - Throw - `xt`
* RSpec Expect - Within - `xw`
* RSpec Expect - Yield Control - `xyc`
* RSpec Expect - Yield Successive Args - `xys`
* RSpec Expect - Yield With Args - `xya`
* RSpec Helper - `rsh`
* RSpec Include Context - `inc`
* RSpec Include Examples - `ine`
* RSpec Instance Double - `idouble`
* RSpec Instance Spy - `ispy`
* RSpec It (block) - `itb`
* RSpec It (multi-line) - `itm`
* RSpec It (single line) - `it`
* RSpec It Behaves Like (multi-line) - `itlm`
* RSpec It Behaves Like (single line) - `itl`
* RSpec Let (multi-line) - `letm`
* RSpec Let (single line) - `let`
* RSpec Matcher - `matcher`
* RSpec Matcher (argument) - `matchera`
* RSpec Mock With Temporary Scope - `mope`
* RSpec Object Double - `odouble`
* RSpec Object Spy - `ospy`
* RSpec Pending (multi-line) - `pendm`
* RSpec Pending (single line) - `pend`
* RSpec Scenario - `scenario`
* RSpec Shared Context - `sharedc`
* RSpec Shared Examples - `sharede`
* RSpec Skip (multi-line) - `skipm`
* RSpec Skip (single line) - `skip`
* RSpec Subject (multi-line) - `subjectm`
* RSpec Subject (single line) - `subject`
* Rails Controller - `controller`
* Rails Enum - `enum`
* Rails Job - `job`
* Rails Migration - `rm`
* Rails Migration (ID) - `rmid`
* Rails Migration (Index) - `rmx`
* Rails Migration (JSON) - `rmj`
* Rails Migration (array) - `rma`
* Rails Migration (boolean) - `rmb`
* Rails Migration (datetime) - `rmdt`
* Rails Migration (decimal) - `rmd`
* Rails Migration (hash) - `rmh`
* Rails Migration (image) - `rmimg`
* Rails Migration (integer) - `rmi`
* Rails Migration (string) - `rms`
* Rails Migration (text) - `rmt`
* Rails Migration (timestamps) - `rmts`
* Rails Migration (virtual) - `rmv`
* Rails Scope - `scope`
* Reek Disable - `rd`
* Rubocop (disable) - `copd`
* Rubocop (enable) - `cope`
* Rubocop (todo) - `copt`
* Ruby Async - `ac`
* Ruby Async Task - `act`
* Ruby Attribute (accessor) - `ata`
* Ruby Attribute (reader) - `atr`
* Ruby Attribute (writer) - `atw`
* Ruby Benchmark IPS - `bmi`
* Ruby Benchmark Mem - `bmm`
* Ruby Benchmark Report (multi-line) - `reportm`
* Ruby Benchmark Report (single line) - `report`
* Ruby Breakpoint - `bp`
* Ruby Breakpoint Step - `bps`
* Ruby Breakpoint Tap - `bpt`
* Ruby Case (in) - `ci`
* Ruby Case (when) - `cw`
* Ruby Class - `class`
* Ruby Class (anonymous) - `ca`
* Ruby Class (command) - `cc`
* Ruby Class (single line) - `cs`
* Ruby Containable (define) - `cd`
* Ruby Containable Register - `cr`
* Ruby Containable Register (block) - `crb`
* Ruby Containable Register (multi-line) - `crm`
* Ruby Curry - `cy`
* Ruby DATA - `dt`
* Ruby DATA (notes) - `dtn`
* Ruby Data (initialize) - `di`
* Ruby Data (inline) - `ddi`
* Ruby Data (multi-line) - `ddm`
* Ruby Data (single line) - `dd`
* Ruby Delegate - `dele`
* Ruby Delegate (class) - `delc`
* Ruby Delegate (simple) - `dels`
* Ruby Dry Monads (include) - `dmi`
* Ruby Dry Schema (multi-line) - `dsm`
* Ruby Dry Schema (optional) - `dso`
* Ruby Dry Schema (required) - `dsr`
* Ruby Dry Schema (single line) - `ds`
* Ruby Dry Validation - Contract - `dvc`
* Ruby Dry Validation - Each (multi-line) - `dvem`
* Ruby Dry Validation - Each (single line) - `dve`
* Ruby Dry Validation - Failure - `dvf`
* Ruby Dry Validation - JSON - `dvj`
* Ruby Dry Validation - Macro - `dvm`
* Ruby Dry Validation - Params - `dvp`
* Ruby Dry Validation - Rule (multi-line) - `dvrm`
* Ruby Dry Validation - Rule (single line) - `dvr`
* Ruby Dry Validation - Schema - `dvs`
* Ruby Empty (array) - `ea`
* Ruby Empty (data) - `ed`
* Ruby Empty (hash) - `eh`
* Ruby Empty (set) - `eset`
* Ruby Empty (string) - `es`
* Ruby Encoding - `encode`
* Ruby Fail - `fail`
* Ruby Fail - Not Implemented - `failn`
* Ruby Fetch (multi-line) - `fetchm`
* Ruby Fetch (single line) - `fetch`
* Ruby Forwardable - `forward`
* Ruby Frozen String Literals - `fsl`
* Ruby Function (argument) - `fn`
* Ruby Function (multi-line) - `fnm`
* Ruby Function (symbol-to-proc) - `fns`
* Ruby Hash - Default Proc - `hashd`
* Ruby Heredoc - `doc`
* Ruby If (multi-line) - `ifm`
* Ruby Infusible (dependencies) - `id`
* Ruby Infusible (include) - `ii`
* Ruby Infusible (setup) - `is`
* Ruby Initialize - `init`
* Ruby Initialize (body) - `initb`
* Ruby Instance Assign - `ia`
* Ruby Keyword - `kw`
* Ruby Lambda (multi-line) - `ldm`
* Ruby Lambda (single line) - `ld`
* Ruby Log - `log`
* Ruby Memory Profiler - `mp`
* Ruby Method - `def`
* Ruby Method (call) - `cef`
* Ruby Method (call, endless) - `cee`
* Ruby Method (endless) - `dee`
* Ruby Method (self) - `sef`
* Ruby Method (self, endless) - `see`
* Ruby Middleware - `mid`
* Ruby Module - `mod`
* Ruby Module (builder) - `modb`
* Ruby Module (function) - `modf`
* Ruby Module (self) - `mods`
* Ruby Module (single line) - `ms`
* Ruby Namespace - `namespace`
* Ruby Proc (multi-line) - `procm`
* Ruby Proc (single line) - `proc`
* Ruby Reduce (multi-line) - `reducem`
* Ruby Reduce (single line) - `reduce`
* Ruby Reduce (with index) - `reducei`
* Ruby Refine (class) - `refs`
* Ruby Refine (instance) - `ref`
* Ruby Refinements (require) - `rr`
* Ruby Refinements (using) - `ru`
* Ruby Regex (multi-line) - `rxm`
* Ruby Require - `re`
* Ruby Require Relative - `rer`
* Ruby Script Header - `head`
* Ruby Shortcut (multi-line) - `scm`
* Ruby Shortcut (single line) - `sc`
* Ruby Sod - Action - `soda`
* Ruby Struct (assign) - `sa`
* Ruby Struct (initialize) - `si`
* Ruby Struct (inline) - `sdi`
* Ruby Struct (multi-line) - `sdm`
* Ruby Struct (single line) - `sd`
* Ruby Sum - `sum`
* Ruby Tap (multi-line) - `tpm`
* Ruby Tap (single line) - `tp`
* Ruby Tap (symbol-to-proc) - `tps`
* Ruby Then (arguments) - `tn`
* Ruby Then (multi-line) - `tnm`
* Ruby Then (symbol-to-proc) - `tns`
* Ruby Trap (multi-line) - `trapm`
* Ruby Trap (single line) - `trap`
* Ruby Warn (deprecation) - `warnd`
* Ruby Warn (experimental) - `warne`
* Ruby With Object (multi-line) - `withm`
* Ruby With Object (single line) - `with`
* Ruby With Object (with index) - `withi`
* Rust Function - `fn`
* Shell Array - `array`
* Shell Array (assign) - `arraya`
* Shell Array (delete) - `arrayd`
* Shell Array (index) - `arrayi`
* Shell Array (length) - `arrayl`
* Shell Array (offset) - `arrayo`
* Shell Case - `case`
* Shell For - `for`
* Shell Function - `fn`
* Shell If - `if`
* Shell Print - `print`
* Shell Script Header - `head`
* Shell Variable Default - `vard`
* Shell While - `while`
* ShellCheck Disable - `scd`
* SimpleCov Disable - `covd`=== Keyboard Shortcuts
All keyboard shortcut settings are defined here:
* Main Menu -> Sublime Text -> Preferences -> Key Bindings - Default
* Main Menu -> Sublime Text -> Preferences -> Key Bindings - UserThe following is a list of commonly used keyboard shortcuts (including default and custom
bindings/remappings):* *Navigation*
** `COMMAND+SHIFT+p` = Open command pallet.
** `COMMAND+p` = Goto file. Uses fuzzy file name matching logic. Suffix the file name as follows
to filter further:
*** `:` = Goto file line number.
*** `@` = Goto file symbol.
*** `#` = Goto file keyword.
** `COMMAND+k+b` = Show/Hide project sidebar.
* *Search*
** `COMMAND+f` = Full file search (search panel remains open).
** `COMMAND+i` = Incremental file search (search panel immediately closes).
** `COMMAND+SHIFT+g` = Find previous occurrence of current search.
** `COMMAND+g` = Find next occurrence of current search.
** `OPTION+ENTER` = Find all occurrences of current search.
** `COMMAND+r` = Find file symbol/function.
** `COMMAND+SHIFT+f` = Project-wide search. Within the search panel, the following is also
possible:
*** `COMMAND+OPTION+r` = Toggle regular expression search.
*** `COMMAND+OPTION+c` = Toggle case sensitive search.
*** `COMMAND+OPTION+w` = Toggle whole word search.
** `COMMAND+OPTION+r` = File find and replace.
** `COMMAND+OPTION+g` = Find all matching occurrences of what is under current cursor position.
* *Movement*
** `CONTROL+OPTION+` = Scroll up/down by one line.
** `CONTROL+l` = Scroll to selection.
** `CONTROL+` = Move one word left.
** `CONTROL+` = Move one word right.
** `COMMAND+` = Move to beginning of line.
** `COMMAND+` = Move to end of line.
* *Selection*
** `COMMAND+SHIFT+` = Move to beginning of line and select everything in between.
** `COMMAND+SHIFT+` = Move to end of line and select everything in between.
** `CONTROL+SHIFT+m` = Expand selection to brackets.
** `CONTROL+SHIFT+a` = Expand selection to tag.
** `COMMAND+SHIFT+j` = Expand selection to indentation.
** `COMMAND+l` = Expand selection to current line.
** `COMMAND+SHIFT+SPACE` = Expand selection to scope.
* *Multiple Cursor*
** `COMMAND+click` = Adds an additional cursor where clicked.
** `OPTION+click+drag` = Adds additional cursors from where clicked and dragged to.
** `CONTROL+SHIFT+` = Select previous line.
** `CONTROL+SHIFT+` = Select next line.
** `COMMAND+SHIFT+l` = Create multiple cursors for each line of selection.
* *Editing*
** `COMMAND+CONTROL+f` = Toggle full screen mode.
** `COMMAND+CONTROL+SHIFT+f` = Toggle distraction free writing.
** `COMMAND+u` = Soft undo.
** `COMMAND+SHIFT+u` = Soft redo.
** `COMMAND+z` = Hard undo.
** `COMMAND+SHIFT+z` = Hard redo.
** `COMMAND+OPTION+.` = Close tag.
** `COMMAND+ENTER` = Insert and indent new line below cursor.
** `COMMAND+SHIFT+ENTER` = Insert and indent new line above cursor.
** `COMMAND+DELETE` = Delete from cursor to beginning of line.
** `COMMAND+k, COMMAND+k` = Delete from cursor to end of line.
** `COMMAND+SHIFT+d` = Duplicate line.
** `CONTROL+SHIFT+k` = Delete line.
** `COMMAND+d` = Select word (continue to select next match).
** `COMMAND+k, COMMAND+d` = Skip selection of next matching word.
** `CONTROL+DELETE` = Delete word before cursor.
** `CONTROL+BACKSPACE` = Delete word after cursor.
** `COMMAND+OPTION+q` = Wrap paragraph at ruler.
** `COMMAND+j` = Join together whatever is selected.
** `COMMAND+[` = Indent selection left.
** `COMMAND+]` = Indent selection right.
** `COMMAND+\` = Reindent current selection.
** `COMMAND+OPTION+[` = Fold code for current scope.
** `COMMAND+OPTION+]` = Expand folded code for current scope.
** `COMMAND+k, COMMAND+1` = Fold all code.
** `COMMAND+k, COMMAND+j` = Unfold all code.
** `COMMAND+k, COMMAND+u` = Convert to uppercase text.
** `COMMAND+k, COMMAND+l` = Convert to lowercase text.
** `COMMAND+/` = Toggle comment line.
** `COMMAND+OPTION+/` = Toggle comment block.
** `FN+F5` = Alpha-sort (case sensitive) selection (or multiple selection).
* *Bookmarks*
** `COMMAND+FN+F2` = Toggle bookmark.
** `SHIFT+FN+F2` = Goto previous bookmark.
** `FN+F2` = Goto next bookmark.
** `COMMAND+SHIFT+FN+F2` = Clear bookmarks.
* *Clipboard*
** `COMMAND+SHIFT+c` = Copy current file path.
** `COMMAND+v` = Paste and indent.
** `COMMAND+SHIFT+v` = Paste.
* *Multiple Screens/Groups*
** `OPTION+COMMAND+` = Split into `` screens.
** `CONTROL+SHIFT+` = Move file to screen ``.
** `CONTROL+` = Move cursor to screen ``.
* *Tools*
** `FN+F6` = Spell check.
** `CONTROL+~` = Open command line.
** `COMMAND+CONTROL+x` = Runs auto-CSS prefixer.
* *Extensions*
** `COMMAND+CONTROL+r` = Reveal current file in sidebar.
** `CONTROL+SHIFT+'` = Toggle between single and double quotes.
** `CONTROL+↑` = Adjust CSS value up one whole number.
** `CONTROL+↓` = Adjust CSS value down one whole number.
** `OPTION+↑` = Adjust CSS value up one decimal number.
** `OPTION+↓` = Adjust CSS value down one decimal number.=== Debugging
To open and close the console:
. Type `CONTROL+` to open console.
. Type `CONTROL+` to exit console.To see what commands/key bindings are being fired:
. Enter `sublime.log_commands(True)` within the console to enable command logging.
. Right click, use menus, etc. to let a log of the actual commands being fired.
. Find the command you are looking for in the log and then use that command to build a key binding
for.
. Enter `sublime.log_commands(False)` within the condole to disable command logging.To see what files are being indexed:
. Ensure the `index_files` settings is set to `true`.
. Enter `sublime.log_indexing(True)` to enable.
. Watch the log for file activity.
. Enter `sublime.log_indexing(False)` to disable.== Development
To contribute, run:
[source,bash]
----
git clone https://github.com/bkuhlmann/sublime_text_setup.git
cd sublime_text_setup
----== link:https://alchemists.io/policies/license[License]
== link:https://alchemists.io/policies/security[Security]
== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
== link:https://alchemists.io/policies/contributions[Contributions]
== link:https://alchemists.io/policies/developer_certificate_of_origin[Developer Certificate of Origin]
== link:https://alchemists.io/projects/sublime_text_setup/versions[Versions]
== link:https://alchemists.io/community[Community]
== Credits
* Built with link:https://alchemists.io/projects/rubysmith[Rubysmith].
* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].