Emacs mode question: backward-sexp & forward-sexp for begin..end

D

David Garamond

Hi all,

Is there a Ruby Emacs mode where I can do M-C-b (backward-sexp) and
M-C-f (forward-sexp) for "begin".."end" too [*], and not just for
"("..")", "{".."}", etc? I'd like to use "begin".."end" more to
delimit multiline blocks because it seems neater/creates less noise,
but many times I end up using "{".."}" for the above sole reason. I
find easy jumping like this more useful than folding (which Emacs
doesn't do particularly well, anyway).

[*] If it can additionally do "if".."elsif".."else".."end",
"def".."end", etc. too then it would be infinitely more wonderful.

Regards,
dave
 
G

George Ogata

David Garamond said:
Hi all,

Is there a Ruby Emacs mode where I can do M-C-b (backward-sexp) and
M-C-f (forward-sexp) for "begin".."end" too [*], and not just for
"("..")", "{".."}", etc? I'd like to use "begin".."end" more to
delimit multiline blocks because it seems neater/creates less noise,
but many times I end up using "{".."}" for the above sole reason. I
find easy jumping like this more useful than folding (which Emacs
doesn't do particularly well, anyway).

[*] If it can additionally do "if".."elsif".."else".."end",
"def".."end", etc. too then it would be infinitely more wonderful.

Regards,
dave

Hi David,

Does C-M-n / C-M-p do what you want?

Cheers,
George.
 
D

David Garamond

George said:
Is there a Ruby Emacs mode where I can do M-C-b (backward-sexp) and
M-C-f (forward-sexp) for "begin".."end" too [*], and not just for
"("..")", "{".."}", etc? I'd like to use "begin".."end" more to
delimit multiline blocks because it seems neater/creates less noise,
but many times I end up using "{".."}" for the above sole reason. I
find easy jumping like this more useful than folding (which Emacs
doesn't do particularly well, anyway).

[*] If it can additionally do "if".."elsif".."else".."end",
"def".."end", etc. too then it would be infinitely more wonderful.

Hi David,

Does C-M-n / C-M-p do what you want?

Why yes, thank you! I should've checked for ruby-* functions first, doh.

Regards,
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top