all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sam Halliday <sam.halliday@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: subword-mode
Date: Sat, 25 Oct 2014 04:47:46 -0700 (PDT)	[thread overview]
Message-ID: <efa52ee3-a173-417d-8bfd-6d9320253a52@googlegroups.com> (raw)

Hello all,

I'm trying to get subword-mode enabled so that it is the default for forward/backward word backward-kill-word. I am unfortunately experiencing two problems and I hope this list can assist me:

1. There doesn't appear to be a setting to globally replace the basic forward/backward, so I am falling back to rebinding my keys manually... is this the only way to do it?

2. My primary use of emacs is to edit Scala source code and the subword-mode doesn't always do the right thing. For example, in the following code:

 def canBuildFromFormat[F, E, T]()(
    implicit
    cbf: CanBuildFrom[F, E, T],
    ef: SexpFormat[E]
  ): SexpFormat[T] = ???

if the point is after ???, I would expect a subword-backward to bring me to the start of the ??? (or at least to the =)... but instead it brings me all the way back to the [T. This is particularly annoying when using subword-backward-kill.

Is there a way to define some (possibly language-specific) word boundaries for special characters and make it more source code friendly?


Best regards,
Sam

PS: I opened a related ticket on scala-mode2 https://github.com/hvesalai/sbt-mode/issues/22 incase it makes sense to add such customisations to the scala-mode2 itself.


             reply	other threads:[~2014-10-25 11:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-25 11:47 Sam Halliday [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-11-25  4:26 subword-mode Stefan Monnier
2009-11-25  5:22 ` subword-mode Miles Bader
2009-11-25  7:58   ` subword-mode Tassilo Horn
2009-11-25  9:31     ` subword-mode Miles Bader
2009-11-25 14:19   ` subword-mode Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efa52ee3-a173-417d-8bfd-6d9320253a52@googlegroups.com \
    --to=sam.halliday@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.