-
-
Notifications
You must be signed in to change notification settings - Fork 220
Vi fixes #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vi fixes #1559
Conversation
|
(define-key lem-paredit-mode:*paredit-mode-keymap* "{" nil)
(define-key lem-paredit-mode:*paredit-mode-keymap* "}" nil)
(define-key lem-vi-mode:*insert-keymap* "{" 'lem-paredit-mode:paredit-insert-brace)
(define-key lem-vi-mode:*insert-keymap* "}" 'lem-paredit-mode:paredit-close-brace) I feel like there should be a better way to make vi-mode and paredit-mode be nice to each other. |
(loop :until (or (syntax-open-paren-char-p (character-at point)) | ||
(syntax-closed-paren-char-p (character-at point)) | ||
(= (point-charpos point) (length (line-string point)))) | ||
:do (incf (point-charpos point))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I realized after merging that changing point-charpos breaks encapsulation.
I think it would be better to use line-end-p and character-offset instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll do it within 24h. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it still a problem with temporary point? Like (with-point ((point (copy-point point))) ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but copy-point is not necessary because it is used automatically with-point.
(with-point ((point point)) ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(apropos "line-end-p")
doesn't find anything. There's a struct line-end-item-p
but I don't think it's what I need here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it was end-line-p.
Fixing some discrepancies with vim as I stumble upon them.
Fixed:
C-u
/C-d
should scroll half a page by default and preserve cursor location relative to window.%
when not on a paren should find the following paren on the same line and then do its jump.Found, not fixed:
()
and{}
motions are not implemented.