From e535424aad448a555d39b8e5f0aedea9b11c3568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efraim=20Augusto=20Gon=C3=A7alves?= Date: Mon, 12 Aug 2019 16:13:13 -0400 Subject: [PATCH 01/11] Update ClojureHelpers.py --- ClojureHelpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ClojureHelpers.py b/ClojureHelpers.py index 114ff3d..975ad9f 100644 --- a/ClojureHelpers.py +++ b/ClojureHelpers.py @@ -1,5 +1,6 @@ -import re, sublime, sublime_plugin, sublimerepl, text_transfer -from sublimerepl import manager +import re, sublime, sublime_plugin, SublimeREPL +from SublimeREPL.sublimerepl import manager +from SublimeREPL import text_transfer REFRESH_NAMESPACES_CMD = "(let [r 'user/reset] (if (find-var r) ((resolve r)) (clojure.tools.namespace.repl/refresh :after r)))" @@ -166,4 +167,3 @@ def run(self, edit): form = "(load-file \"" + f.name +"\")" external_id = repl_external_id(self) super( LoadSelectionInReplCommand, self ).run(edit, external_id, form) - From 9bb605be5799cba95cfe093e82f95adff3c018b5 Mon Sep 17 00:00:00 2001 From: efraimmgon Date: Sun, 2 Feb 2020 09:21:34 -0400 Subject: [PATCH 02/11] LoadFileInReplCommand also switches to the file's ns; update readme --- ClojureHelpers.py | 12 +++++++++--- README.md | 8 ++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ClojureHelpers.py b/ClojureHelpers.py index 975ad9f..b347b37 100644 --- a/ClojureHelpers.py +++ b/ClojureHelpers.py @@ -149,14 +149,20 @@ def run(self, edit): external_id = repl_external_id(self) super( ListVarsWithDocsInSelectedNsCommand, self ).run(edit, external_id, text) -# Loads the current file in the REPL by telling the REPL to load it using the complete path -# This is much faster than the built in sublime repl command which copies the entire file into the -# REPL. +# Loads and switches to the ns of the current file in the REPL by telling the +# REPL to load it using the complete path. +# This is much faster than the built in sublime repl command which copies the +# entire file into the REPL. class LoadFileInReplCommand(text_transfer.ReplTransferCurrent): def run(self, edit): form = "(load-file \"" + self.view.file_name() +"\")" self.view.window().run_command("run_command_in_repl", {"command": form}) + ## Switch to the namespace of the current file + ns = re.sub("ns\s*", "", self.view.substr(self.view.find("ns\s*\S+",0))) + form2 = "(in-ns '" + ns + ")" + self.view.window().run_command("run_command_in_repl", {"command": form2}) + # Writes the selected text to a temporary file then tells the REPL to load that file. # This is much faster than copying every character to the REPL individually which echos everything. class LoadSelectionInReplCommand(text_transfer.ReplSend): diff --git a/README.md b/README.md index 068a307..b82521d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -*I no longer actively use or maintain this configuration. This still works but I encourage you to try my [Atom editor](https://atom.io) package [Proto REPL](https://github.com/jasongilman/proto-repl).* +*NOTE: this is a fork of the original project, which has been updated to work with SUBLIME TEXT 3* SublimeClojureSetup @@ -10,7 +10,7 @@ Initially based on instructions here: https://gist.github.com/jamesmacaulay/5457 ## Prerequisites - * Sublime Text 2 (Not yet tested with Sublime Text 3) + * Sublime Text 3 * Java * [Leiningen 2](http://leiningen.org/) @@ -18,9 +18,9 @@ Initially based on instructions here: https://gist.github.com/jamesmacaulay/5457 Install it then create `~/.lein/profiles.clj`. See [`profiles.clj`](profiles.clj) in this repo for contents. -## Sublime Text 2 With Clojure +## Sublime Text 3 With Clojure -This documents how to setup Sublime Text 2 with Clojure. It uses the sublime text [package manager](https://sublime.wbond.net/installation#st2). Follow the installation instructions to install the package manager into Sublime Text 2. +This documents how to setup Sublime Text 3 with Clojure. It uses the sublime text [package manager](https://sublime.wbond.net/installation#st2). Follow the installation instructions to install the package manager into Sublime Text 3. If you already have the package manager installed make sure all packages are up to date. * Bring up the command pallet - __cmd + shift + P__ From 2117049e73ba2cd74f6e9d24293f5a47baa2b571 Mon Sep 17 00:00:00 2001 From: efraimmgon Date: Sun, 2 Feb 2020 09:59:11 -0400 Subject: [PATCH 03/11] update readme with install explanation for clj deps. --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b82521d..60a260e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ *NOTE: this is a fork of the original project, which has been updated to work with SUBLIME TEXT 3* - SublimeClojureSetup =================== @@ -8,6 +7,10 @@ A description of how I setup Sublime Text for Clojure development. It's a bit ha Initially based on instructions here: https://gist.github.com/jamesmacaulay/5457344 +## Why Sublime Text? + +I have tested many others editors but always find myself returning to Sublime Text with SublimeREPL. And why is that? Even though its setup is hacky and is far from perfect, no other editor can match its raw speed and convenience of keybindings. As with many things, picking and setting up your code editor is more art than science and what works best for you is up to your specific tastes and requirements. + ## Prerequisites * Sublime Text 3 @@ -41,6 +44,8 @@ The Sublime REPL is used to open a REPL within Sublime Text. It can be opened by __Very Important__: Most of the time you'll want a REPL open for the current project. Sublime REPL only knows to connect the REPL to the current project if you start the REPL with a Clojure file open in the project and your cursor is in it. +Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). + #### Keybindings From 7a4abfe1dcf5e3a51b8daddaff18435760f62f7f Mon Sep 17 00:00:00 2001 From: efraimmgon Date: Sun, 2 Feb 2020 10:00:58 -0400 Subject: [PATCH 04/11] update readme with instructions for running the repl with clj deps --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 60a260e..4dbbceb 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,10 @@ The Sublime REPL is used to open a REPL within Sublime Text. It can be opened by __Very Important__: Most of the time you'll want a REPL open for the current project. Sublime REPL only knows to connect the REPL to the current project if you start the REPL with a Clojure file open in the project and your cursor is in it. -Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). +Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, + * Invoke the command pallet - __cmd + shift + P__ + * Type `repl` and select __SublimeREPL: Clj__ #### Keybindings From 3b476e726bc2d5510f97cf63ca938620be8a464a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efraim=20Augusto=20Gon=C3=A7alves?= Date: Sun, 2 Feb 2020 10:04:20 -0400 Subject: [PATCH 05/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dbbceb..b809bf2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -*NOTE: this is a fork of the original project, which has been updated to work with SUBLIME TEXT 3* +*NOTE: this is a fork of the original project, which has been updated to work with SUBLIME TEXT 3 and clj deps.* SublimeClojureSetup =================== From 56644c2eacbe112a7db83910af746eea42c7183d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efraim=20Augusto=20Gon=C3=A7alves?= Date: Sun, 2 Feb 2020 10:06:11 -0400 Subject: [PATCH 06/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b809bf2..d4671e8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -*NOTE: this is a fork of the original project, which has been updated to work with SUBLIME TEXT 3 and clj deps.* +*NOTE: this is a fork of the original project, that is no longer being maintened, and has been updated to work with SUBLIME TEXT 3 and clj deps. Many thanks to jasongilman for his great work!* SublimeClojureSetup =================== From 3dd8a9ec78fefe520db5646f8c4c7aa7c8627ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efraim=20Augusto=20Gon=C3=A7alves?= Date: Sun, 2 Feb 2020 10:10:08 -0400 Subject: [PATCH 07/11] Update README.md --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d4671e8..17bd135 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The Sublime REPL is used to open a REPL within Sublime Text. It can be opened by __Very Important__: Most of the time you'll want a REPL open for the current project. Sublime REPL only knows to connect the REPL to the current project if you start the REPL with a Clojure file open in the project and your cursor is in it. -Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, +Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package (`~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeREPL`) and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, * Invoke the command pallet - __cmd + shift + P__ * Type `repl` and select __SublimeREPL: Clj__ @@ -96,7 +96,7 @@ Install these packages using the package manager. Add this code to your user preferences - * Add the following lines to `~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Preferences.sublime-settings` + * Add the following lines to `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Preferences.sublime-settings` ``` // This needs to be disabled since we're using Bracket Highlighter for highlighting brackets @@ -107,7 +107,7 @@ Add this code to your user preferences Sublime Text doesn't correctly identify Clojure symbols. - * Create `~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Clojure.sublime-settings` with the following contents. + * Create `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Clojure.sublime-settings` with the following contents. ``` { @@ -124,7 +124,7 @@ Sublime Text doesn't correctly identify Clojure symbols. Clojure uses single quote characters by themselves like `(def my-literal-list '(1 2 3))`. Sublime Text will automatically close single quotes. This becomes annoying when writing Clojure code in sublime text. Turn it off by following these steps: - * Open `~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Default/Default (OSX).sublime-keymap` + * Open `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Default/Default (OSX).sublime-keymap` * Search for "Auto-pair single quotes" which should be on line 274 or so. * Comment out the block of about 30 lines directly following that comment to disable pairing of single quotes only. @@ -132,7 +132,7 @@ Clojure uses single quote characters by themselves like `(def my-literal-list '( This file updates SublimeREPL settings so leiningen in on the path. Update this file to include the directory where you installed leiningen. - * Edit `~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/SublimeREPL.sublime-settings` with the following changes + * Edit `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/SublimeREPL.sublime-settings` with the following changes ``` { @@ -147,11 +147,11 @@ This file updates SublimeREPL settings so leiningen in on the path. Update this The lispindent.sublime-settings defines which forms use function style indentation. I've added additional ones that are typically used in Clojure Applications - * `cp lispindent.sublime-settings ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/` + * `cp lispindent.sublime-settings ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/` #### Speed up text transfer in SublimeREPL -Change `~/Library/Application\ Support/Sublime\ Text\ 2/Packages/SublimeREPL/config/Clojure/Main.sublime-menu` line 22 from +Change `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeREPL/config/Clojure/Main.sublime-menu` line 22 from ``` "osx": ["lein", "repl"] ``` @@ -166,17 +166,17 @@ This greatly improves the speed at which text is sent from a Clojure window to t We'll setup some keybindings in Sublime Text to make it easier to send code to the repl, run tests, etc. - * Append the [`clojure_keybindings.sublime-keymap`](clojure_keybindings.sublime-keymap) in this repo to `~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Default (OSX).sublime-keymap` + * Append the [`clojure_keybindings.sublime-keymap`](clojure_keybindings.sublime-keymap) in this repo to `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Default (OSX).sublime-keymap` * Keymap files contain JSON so make sure they're valid when saving or Sublime Text will fail with errors. ##### Clojure Helpers The [`ClojureHelpers.py`](ClojureHelpers.py) file provides some helper functions that make working with Sublime REPL and Clojure a little better. These are associated with key bindings. You can also add your own helpers to this file. - * Copy `ClojureHelpers.py` to `~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/` - * `cp ClojureHelpers.py ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/` + * Copy `ClojureHelpers.py` to `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/` + * `cp ClojureHelpers.py ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/` ##### Clojure Snippets -Copy the file `clojure_snippets.sublime-snippet` to `~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/clojure_snippets.sublime-snippet`. It contains some useful completions. +Copy the file `clojure_snippets.sublime-snippet` to `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/clojure_snippets.sublime-snippet`. It contains some useful completions. From 2f4abec2591b23f22e54f1aa70540dce9b210723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efraim=20Augusto=20Gon=C3=A7alves?= Date: Sun, 2 Feb 2020 10:14:19 -0400 Subject: [PATCH 08/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17bd135..0b85a19 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Initially based on instructions here: https://gist.github.com/jamesmacaulay/5457 ## Why Sublime Text? -I have tested many others editors but always find myself returning to Sublime Text with SublimeREPL. And why is that? Even though its setup is hacky and is far from perfect, no other editor can match its raw speed and convenience of keybindings. As with many things, picking and setting up your code editor is more art than science and what works best for you is up to your specific tastes and requirements. +I have tested many other code editors but always find myself returning to Sublime Text with SublimeREPL. And why is that? Even though its setup is hacky and is far from perfect, no other editor can match its raw speed and convenience of keybindings shortcuts. As with many things, picking and setting up your code editor is more art than science and what works best for you is up to your specific tastes and requirements. ## Prerequisites From 34d10961dbe17b6b8090330c58f90b9e70a55927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efraim=20Augusto=20Gon=C3=A7alves?= Date: Sun, 14 Jun 2020 09:47:21 -0400 Subject: [PATCH 09/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b85a19..070627d 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The Sublime REPL is used to open a REPL within Sublime Text. It can be opened by __Very Important__: Most of the time you'll want a REPL open for the current project. Sublime REPL only knows to connect the REPL to the current project if you start the REPL with a Clojure file open in the project and your cursor is in it. -Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package (`~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeREPL`) and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, +Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package (`~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeREPL` in OSX, `~/config/sublime-text-3/Packages/SublimeREPL` in Ubuntu) and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, * Invoke the command pallet - __cmd + shift + P__ * Type `repl` and select __SublimeREPL: Clj__ From 29fdb1d4e1e977d05119c0f53175756ed084f781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efraim=20Augusto=20Gon=C3=A7alves?= Date: Fri, 26 Jun 2020 11:25:46 -0400 Subject: [PATCH 10/11] Mistake on file path for linux --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 070627d..dc0bd3f 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The Sublime REPL is used to open a REPL within Sublime Text. It can be opened by __Very Important__: Most of the time you'll want a REPL open for the current project. Sublime REPL only knows to connect the REPL to the current project if you start the REPL with a Clojure file open in the project and your cursor is in it. -Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package (`~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeREPL` in OSX, `~/config/sublime-text-3/Packages/SublimeREPL` in Ubuntu) and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, +Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package (`~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeREPL` in OSX, `~/.config/sublime-text-3/Packages/SublimeREPL` in Ubuntu) and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, * Invoke the command pallet - __cmd + shift + P__ * Type `repl` and select __SublimeREPL: Clj__ From 8b01b61f3f3d651fcce3f60c29cc041e110fa9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efraim=20Augusto=20Gon=C3=A7alves?= Date: Fri, 26 Jun 2020 15:23:04 -0400 Subject: [PATCH 11/11] Paths for OSX and Linux --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index dc0bd3f..e5afa6b 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ Install it then create `~/.lein/profiles.clj`. See [`profiles.clj`](profiles.clj ## Sublime Text 3 With Clojure +### Paths assumed for each OS + +- OSX: `~/Library/Application\ Support/Sublime\ Text\ 3` +- Linux: `~/.config/sublime-text-3` + This documents how to setup Sublime Text 3 with Clojure. It uses the sublime text [package manager](https://sublime.wbond.net/installation#st2). Follow the installation instructions to install the package manager into Sublime Text 3. If you already have the package manager installed make sure all packages are up to date. @@ -44,7 +49,7 @@ The Sublime REPL is used to open a REPL within Sublime Text. It can be opened by __Very Important__: Most of the time you'll want a REPL open for the current project. Sublime REPL only knows to connect the REPL to the current project if you start the REPL with a Clojure file open in the project and your cursor is in it. -Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package (`~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeREPL` in OSX, `~/.config/sublime-text-3/Packages/SublimeREPL` in Ubuntu) and update the contents of `config/Clojure/Default.sublime-commands` and `config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, +Alternatively, if you wish to run the REPL with clj deps, you'll need to to open the SublimeREPL package and update the contents of `/Packages/SublimeREPL/config/Clojure/Default.sublime-commands` and `/Packages/SublimeREPL/config/Clojure/Main.sublime-menu` according to this [pull request](https://github.com/wuub/SublimeREPL/pull/537/commits/47bad8803f7eb6a3050ece1e88ea8b37f8e0947e#diff-c699bfc1a6f163eadf899a507a7fcfe4). Then, * Invoke the command pallet - __cmd + shift + P__ * Type `repl` and select __SublimeREPL: Clj__ @@ -96,7 +101,7 @@ Install these packages using the package manager. Add this code to your user preferences - * Add the following lines to `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Preferences.sublime-settings` + * Add the following lines to `/Packages/User/Preferences.sublime-settings` ``` // This needs to be disabled since we're using Bracket Highlighter for highlighting brackets @@ -107,7 +112,7 @@ Add this code to your user preferences Sublime Text doesn't correctly identify Clojure symbols. - * Create `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Clojure.sublime-settings` with the following contents. + * Create `/Packages/User/Clojure.sublime-settings` with the following contents. ``` { @@ -124,7 +129,7 @@ Sublime Text doesn't correctly identify Clojure symbols. Clojure uses single quote characters by themselves like `(def my-literal-list '(1 2 3))`. Sublime Text will automatically close single quotes. This becomes annoying when writing Clojure code in sublime text. Turn it off by following these steps: - * Open `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Default/Default (OSX).sublime-keymap` + * Open `/Packages/Default/Default (OSX).sublime-keymap` * Search for "Auto-pair single quotes" which should be on line 274 or so. * Comment out the block of about 30 lines directly following that comment to disable pairing of single quotes only. @@ -132,7 +137,7 @@ Clojure uses single quote characters by themselves like `(def my-literal-list '( This file updates SublimeREPL settings so leiningen in on the path. Update this file to include the directory where you installed leiningen. - * Edit `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/SublimeREPL.sublime-settings` with the following changes + * Edit `/Packages/User/SublimeREPL.sublime-settings` with the following changes ``` { @@ -147,11 +152,11 @@ This file updates SublimeREPL settings so leiningen in on the path. Update this The lispindent.sublime-settings defines which forms use function style indentation. I've added additional ones that are typically used in Clojure Applications - * `cp lispindent.sublime-settings ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/` + * `/Packages/User/` #### Speed up text transfer in SublimeREPL -Change `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeREPL/config/Clojure/Main.sublime-menu` line 22 from +Change `/config/Clojure/Main.sublime-menu` line 22 from ``` "osx": ["lein", "repl"] ``` @@ -166,17 +171,16 @@ This greatly improves the speed at which text is sent from a Clojure window to t We'll setup some keybindings in Sublime Text to make it easier to send code to the repl, run tests, etc. - * Append the [`clojure_keybindings.sublime-keymap`](clojure_keybindings.sublime-keymap) in this repo to `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Default (OSX).sublime-keymap` + * Append the [`clojure_keybindings.sublime-keymap`](clojure_keybindings.sublime-keymap) in this repo to `/Packages/User/Default (OSX).sublime-keymap` * Keymap files contain JSON so make sure they're valid when saving or Sublime Text will fail with errors. ##### Clojure Helpers The [`ClojureHelpers.py`](ClojureHelpers.py) file provides some helper functions that make working with Sublime REPL and Clojure a little better. These are associated with key bindings. You can also add your own helpers to this file. - * Copy `ClojureHelpers.py` to `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/` - * `cp ClojureHelpers.py ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/` + * Copy `ClojureHelpers.py` to `/Packages/User/` ##### Clojure Snippets -Copy the file `clojure_snippets.sublime-snippet` to `~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/clojure_snippets.sublime-snippet`. It contains some useful completions. +Copy the file `clojure_snippets.sublime-snippet` to `/Packages/User/clojure_snippets.sublime-snippet`. It contains some useful completions.