random question: does anyone have a command to move point to end of code line, ignoring comments that may follow? or if in a comment, go back to last code character before the comment?
Conversation
Notices
-
Embed this notice
mousebot (mousebot@todon.nl)'s status on Thursday, 28-Nov-2024 18:03:07 JST mousebot
-
Embed this notice
screwlisp (screwtape@mastodon.sdf.org)'s status on Thursday, 28-Nov-2024 18:07:51 JST screwlisp
@mousebot I thought about it for a little bit and I wonder if comment-kill almost does this.
-
Embed this notice
screwlisp (screwtape@mastodon.sdf.org)'s status on Thursday, 28-Nov-2024 18:16:25 JST screwlisp
@mousebot I think I am right that comment-kill is the thing that contains the low level code that "does this".
-
Embed this notice
screwlisp (screwtape@mastodon.sdf.org)'s status on Thursday, 28-Nov-2024 18:41:11 JST screwlisp
@mousebot the fact that comment-kill implements this makes me think that there isn't a lower level implementation of doing this. So you would build something on top of comment-kill or use mekeor's thing.
-
Embed this notice
mousebot (mousebot@todon.nl)'s status on Thursday, 28-Nov-2024 18:41:12 JST mousebot
@screwtape i don't want to kill anything, just move point (to end of code/before begin of comment)
-
Embed this notice
screwlisp (screwtape@mastodon.sdf.org)'s status on Thursday, 28-Nov-2024 18:54:20 JST screwlisp
@mousebot well if you have killed the comment you could (end-of-line), but yeah, looking forward to hearing how you progress ;p
-
Embed this notice
mousebot (mousebot@todon.nl)'s status on Thursday, 28-Nov-2024 18:54:21 JST mousebot
@screwtape ah gotcha, thanks. i pulled out the relevant code and tried it out. it works if point in code, not if point in comment. might hack sth from it tho. i was hoping not to have to switch to a whole new movement system (even if its better!).
(actually i feel like there's a stack of exacs cmds that should ignore comments or smartly handle them...)
-
Embed this notice