|
1 | 1 | = Managing Connections
|
2 | 2 | :experimental:
|
3 | 3 |
|
4 |
| -NOTE: Because nREPL connections map one-to-one to REPL buffers, for the purpose of this |
5 |
| -section we use "REPL" and "connection" interchangeably. |
| 4 | +NOTE: Because nREPL connections map one-to-one to REPL buffers in |
| 5 | +CIDER, for the purpose of this section we use "REPL" and "connection" |
| 6 | +interchangeably. |
6 | 7 |
|
7 |
| -Life's easy when you're working only on a single project with a single Clojure connection. If you're lucky |
| 8 | +Life's easy when you're always working only on a single project with a single Clojure connection. If you're lucky |
8 | 9 | enough to be one of those people then you can safely skip reading this section. Its target audience are
|
9 |
| -people who have to work simultaneously on multiple projects or have multiple connections opened for the same project. |
| 10 | +people who have to work simultaneously on multiple projects or have multiple connections opened for the same project (e.g. a Clojure and a ClojureScript one). |
10 | 11 |
|
11 | 12 | It turns out that it's really hard to map reliably operations originating in source buffers (e.g. code evaluation) to the right
|
12 | 13 | connection buffer, as there are many things you have to take into account:
|
@@ -44,32 +45,32 @@ ever need this).
|
44 | 45 |
|
45 | 46 | Start new sessions with
|
46 | 47 |
|
47 |
| -* kbd:[C-c C-x j j] `cider-jack-in-clj` |
48 |
| -* kbd:[C-c C-x j s] `cider-jack-in-cljs` |
49 |
| -* kbd:[C-c C-x j m] `cider-jack-in-clj&cljs` |
50 |
| -* kbd:[C-c C-x c j] `cider-connect-clj` |
51 |
| -* kbd:[C-c C-x c s] `cider-connect-cljs` |
52 |
| -* kbd:[C-c C-x c m] `cider-connect-clj&cljs` |
| 48 | +* kbd:[C-c C-x j j] (`cider-jack-in-clj`) |
| 49 | +* kbd:[C-c C-x j s] (`cider-jack-in-cljs`) |
| 50 | +* kbd:[C-c C-x j m] (`cider-jack-in-clj&cljs`) |
| 51 | +* kbd:[C-c C-x c j] (`cider-connect-clj`) |
| 52 | +* kbd:[C-c C-x c s] (`cider-connect-cljs`) |
| 53 | +* kbd:[C-c C-x c m] (`cider-connect-clj&cljs`) |
53 | 54 |
|
54 | 55 | Add new REPLs to the current session with
|
55 | 56 |
|
56 |
| -* kbd:[C-c C-x s j] `cider-connect-sibling-clj` |
57 |
| -* kbd:[C-c C-x s s] `cider-connect-sibling-cljs` |
| 57 | +* kbd:[C-c C-x s j] (`cider-connect-sibling-clj`) |
| 58 | +* kbd:[C-c C-x s s] (`cider-connect-sibling-cljs`) |
58 | 59 |
|
59 |
| -Session life-cycle management commands live on the https://github.com/vspinu/sesman[Sesman] map (kbd:[C-c C-s]) |
| 60 | +Session life-cycle management commands live on the https://github.com/vspinu/sesman[Sesman] keymap (kbd:[C-c C-s]) |
60 | 61 |
|
61 |
| -* kbd:[C-c C-s s] `sesman-start` |
62 |
| -* kbd:[C-c C-s r] `sesman-restart` |
63 |
| -* kbd:[C-c C-s q] `sesman-quit` |
| 62 | +* kbd:[C-c C-s s] (`sesman-start`) |
| 63 | +* kbd:[C-c C-s r] (`sesman-restart`) |
| 64 | +* kbd:[C-c C-s q] (`sesman-quit`) |
64 | 65 |
|
65 | 66 | The command `sesman-start` wraps around all of the aforementioned `jack-in` and
|
66 | 67 | `connect` commands. You can also invoke same functionality with kbd:[M-x]
|
67 | 68 | `cider` or kbd:[C-c M-x].
|
68 | 69 |
|
69 |
| -To quit or restart individual connections use cider commands |
| 70 | +To quit or restart individual connections use CIDER commands |
70 | 71 |
|
71 |
| -* kbd:[C-c C-q] `cider-quit` |
72 |
| -* kbd:[C-c M-r] `cider-restart` |
| 72 | +* kbd:[C-c C-q] (`cider-quit`) |
| 73 | +* kbd:[C-c M-r] (`cider-restart`) |
73 | 74 |
|
74 | 75 | == Current Session
|
75 | 76 |
|
@@ -114,10 +115,10 @@ Clojure(Script) buffer.
|
114 | 115 |
|
115 | 116 | Sessions can be linked to contexts (projects, directories and buffers)
|
116 | 117 |
|
117 |
| -* kbd:[C-c C-s b] `sesman-link-with-buffer` |
118 |
| -* kbd:[C-c C-s d] `sesman-link-with-directory` |
119 |
| -* kbd:[C-c C-s p] `sesman-link-with-project` |
120 |
| -* kbd:[C-c C-s u] `sesman-unlink` |
| 118 | +* kbd:[C-c C-s b] (`sesman-link-with-buffer`) |
| 119 | +* kbd:[C-c C-s d] (`sesman-link-with-directory`) |
| 120 | +* kbd:[C-c C-s p] (`sesman-link-with-project`) |
| 121 | +* kbd:[C-c C-s u] (`sesman-unlink`) |
121 | 122 |
|
122 | 123 | NOTE: Typically you'll want to invoke those commands in file buffers and occasionally is some special buffers (e.g. a scratch buffer). You should never run
|
123 | 124 | them in a REPL buffer, as a REPL is an integral part of a session.
|
|
0 commit comments