Comments (6)
lispy-pair
is not aware of evil at all, but I don't think that should be a problem. I normally only use it in insert state, but it works for me in normal state as well. Make sure that you are binding lispy-parens
and not lispy-pair
directly:
(evil-define-key 'normal lispyville-mode-map
"(" #'lispy-parens)
If that's not the problem, let me know what happens when you try this.
If you want this specifically for wrapping, I could maybe provide a command that wraps one sexp by default (or acts like lispy-parens-auto-wrap
) and doesn't insert the space before the opening delimiter.
from lispyville.
(evil-define-key 'normal lispyville-mode-map
"(" #'lispy-parens)
That works, but if evil's evil-move-cursor-back
option is at its default value of t, it isn't possible to jump past a parenthesized sexp at the end of a line (since the "move back" effectively puts point inside the sexp moved past), and this can result in a premature end to the traversal. Now that I know about evil-move-cursor-back
, I'm considering setting it to nil
, as I suspect the non-default setting would be less likely to cause breaking interactions with non-evil packages.
I haven't used Lispy/Lispyville long enough to have solidified my usage patterns yet, but I suspect that wrapping a non-parenthesized sexp is something I might want to do in normal mode. Of course, it's not hard to enter insert mode or mark the sexp, so it's just a nice-to-have...
Thanks for all your help. I'm sure I'll have more questions as I continue to use Lispy and Lispyville.
from lispyville.
I'm not sure I understand what you mean. The point is only moved back when exiting insert state, so it shouldn't affect any of the provided commands. If you jump to a closing paren at the end of then line, and then exit insert state, you'll still be on the paren. Personally I see this behavior as a non-intuitive workaround for a vim limitation and set evil-move-cursor-back
to nil.
Adding wrap commands was planned from the start. It's probably one of the more useful additions, so I'll work on it next when I have the time.
On a side note, you mentioned that you like lispy-back
but wished C-i
behavior was also present. I could add an option to have all the points lispy saves added to the evil jump list as well. Would you find that useful? Of course, the jump list doesn't store regions/selections, but I could potentially add that functionality as another option.
from lispyville.
I'm not sure I understand what you mean. The point is only moved back when exiting insert state, so it shouldn't affect any of the provided commands. If you jump to a closing paren at the end of then line, and then exit insert state, you'll still be on the paren.
Odd. I was commenting on a problem with C-M-f
and Lispyville's L
and H
commands in normal state: specifically, they don't work as expected when evil-move-cursor-back
is at its default value of t, since it's impossible for point to move past a closing paren at the end of the line in evil-normal-state. Not sure why I added it to that comment. I'd been talking about C-M-f
on another issue, and perhaps I noticed it while looking into the wrap stuff. Sorry for the confusion...
The C-i
behavior would definitely be nice to have (especially if it remembered the regions). Personally, I'm more likely to use a back button with reckless abandon if I know I have a forward button too... ;-) More wrapping functionality would be nice as well, though the current state of affairs isn't too bad, now that I know I can mark with v or V, then hit (
. Were you thinking of adding the ability to wrap the current sexp (or multiple sexp's with a count) without marking first? I just noticed that v and V don't accept counts. That actually could be a useful feature: i.e., if I wanted to mark 3 sexps after point, I can always use Lispy's mark to mark the first one in the range, then slurp in the rest, but that's a fair number of keystrokes. Lispyville's v
and V
are so handy in evil-normal-state, it would be nice to be able simply to do (e.g.) 3 v
. I notice lispy's M-m
doesn't appear to support a count either. Ah well. Just thinking out loud...
from lispyville.
Ah yes, I thought myabe there was some problem with the wrapping. I think that should only be an issue for forward-sexp
. I can mention it in the readme.
Were you thinking of adding the ability to wrap the current sexp (or multiple sexp's with a count) without marking first?
Yes, the wrap commands will wrap the current sexp by default.
For lispy-mark-symbol
/M-m
it could make sense to support a count that would slurp count -1 times. It would make the most sense to add this functionality directly to lispy. Maybe make an issue suggesting it there.
from lispyville.
Sounds good. Would be nice if the wrap commands supported a count as well, just like the existing lispy wrap commands.
And yes, I agree that lispy-mark-symbol
is the most natural place for the mark count to be implemented.
from lispyville.
Related Issues (20)
- lispyville-toggle-mark-type appears to lose final character of selection on transition to visual state HOT 2
- Atom-movement key theme would be more useful if it were inhibited inside comments HOT 3
- Set text objects only in lispyville-mode HOT 2
- Don't delete quote characters when keeping open paren
- feature request: lispyville-beginning-of-previous-defun
- Possible solution for inner and outer local objects HOT 1
- [enhancement] issues using lispyville in non-lispy modes HOT 4
- Using lispyville operators as drop-in replacements HOT 5
- Installation documentation? HOT 3
- Prettify escapes atoms in Clojure that starts with "." HOT 4
- How to transpose in normal mode? HOT 2
- What is the recommended way to delete an sexp? HOT 1
- lispyville-change word is too greedy HOT 6
- Issues with lispyville-delete-char-or-splice.
- [Guix] 5 tests fail HOT 8
- Are `lispy-splice`, `lispy-kill` and `lispy-splice` supposed to work in insert mode? HOT 2
- Evil navigation
- lispy-raise-some not working due to lispy-right-p HOT 2
- evil-replace counterpart? HOT 2
- [ binding conflicts with ability to type it in some languages like Racket HOT 1
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 lispyville.