Skip to content
Text-object support for your editor as nREPL middleware.
Branch: develop
Clone or download
Latest commit f45793c Mar 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Fix cast colors and show in README Mar 20, 2019
src/select_nrepl Update docs Mar 15, 2019
test Selects to the end of successively bigger forms Mar 7, 2019
.gitignore Initial commit Jan 30, 2019
CHANGELOG.adoc Use AsciiDoc Jan 30, 2019
LICENSE Initial commit Jan 30, 2019
README.adoc Add link Mar 20, 2019
project.clj Version 0.1.1-SNAPSHOT Mar 20, 2019

README.adoc

select-nrepl

Text-object support for your editor as nREPL middleware.

Installing

Add the following to your profiles.clj (cider-nrepl isn’t strictly necessary, but if you want this, you probably want that, too):

profiles.clj
{:user {:plugins [[cider/cider-nrepl "0.21.0"]]
        :dependencies [[net.eraserhead/select-nrepl "0.1.0"]]
        :repl-options {:nrepl-middleware [select-nrepl.core/wrap-select]}}}

This will add the "select" op to nrepl. See the operation’s descriptor for more information. You will need some editor scripting to use this operation.

Demo

235120
Figure 1. Selecting elements
235116
Figure 2. Selecting forms
235118
Figure 3. Selecting toplevels

Kakoune

For intergrating with Kakoune, install rep and see this example.

Note on Cursor Positions

In order to support as many editors as possible, columns are zero-based caret offsets, meaning that they are not actually columns but specify the location of a caret in between columns. Zero is before the first character on a line, and one is just after the first character.

License

Copyright © 2019 Jason M. Felice

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

You can’t perform that action at this time.