Comments (5)
press }
from lispy.
Thanks, @bixuanzju.
@JohnGurin, it's a little weird, but if you're familiar with vi
, you know how
important it is to quickly enter normal mode (ESC
in vi
).
Here [
, ]
and C-3
perform the function of entering normal mode.
The cost is just a small inconvenience for entering []
. But since
you already enter {}
with a shift key plus [
, it's not to
different to enter the other pair shifted as well.
If you want to customize some bindings, look at lispy-setup-new-bindings
.
It contains modifications to the default bindings that I don't like any more.
Most importantly the swap of a
and h
. It's possible that these corrections
will become defaults in a future release.
from lispy.
I'm just getting used to structural editing. So the question about brackets seems silly. Bindings is a matter of taste, and default bindings of current version are fine with me.
In my configuration I added "wrap sexp" binding to resemble paredit's wrap
(defun custom-lispy-wrap ()
(interactive)
(call-interactively 'lispy-mark-list)
(call-interactively 'lispy-parens)
)
(add-hook 'lispy-mode-hook
(lambda ()
(local-set-key (kbd "M-(") 'custom-lispy-wrap)))
from lispy.
Actually lispy-pair
will wrap sexp when called with a digit argument,
e.g. 2 (
or C-u (
.
Also, lispy-mark-list
only works in special currently, so it makes sense
to bind the command that uses it in the appropriate way:
(defun custom-lispy-wrap ()
(interactive)
(lispy-mark-list)
(lispy-parens 1))
(lispy-define-key lispy-mode-map "Y" 'custom-lispy-wrap)
Or add a backup plan in case the point isn't special:
(defun custom-lispy-wrap ()
(interactive)
(unless (or (looking-at lispy-left)
(looking-back lispy-right)
(region-active-p))
(lispy-backward 1))
(lispy-mark-list)
(lispy-parens 1))
(local-set-key (kbd "M-(") 'custom-lispy-wrap)
from lispy.
Sometimes users get confused about how to insert single [
. I have answered this here: https://www.youtube.com/watch?v=kPWUYT6kYLQ
tldr; C-q
, which is bound to quoted-insert
from lispy.
Related Issues (20)
- `make test` fails
- Repeat self-insert-command does not. HOT 4
- Package specifier is interpreted as start of new symbol in Common lisp. HOT 6
- EOL comment makes ";" comment one more s-exp
- `(#:a->b)` is formatted as `(#:(ly-raw symbol "a->b"))` HOT 2
- lispy unexpectedly expands shorthands in elisp HOT 1
- lispy-toggle-thread-last fails with comments HOT 1
- Consider importing gnureadline instead of readline when necessary
- Consider making native completion optional or consistent with "python-shell-completion-native-enable"
- Feature request: possibility to enable just some of the keybindings.
- `lispy-tab` doesn't respect `indent-tabs-mode`
- Add support for treesit mode
- Add support for Fennel and/or Lua HOT 1
- conflicting key mapping in evilcp theme?
- Error with Clojure evaluation HOT 7
- Port to R?
- Numbered anonymous function arguments are being incorrectly auto-formatted
- Fix warning on Emacs 30 related to deprecated (defadvice) macro
- jedi should not be imported into the active (lispy--python-proc) HOT 2
- org-elements "cannot be used in non-org buffer"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lispy.