From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Halliday Newsgroups: gmane.emacs.help Subject: subword-mode Date: Sat, 25 Oct 2014 04:47:46 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1414237827 27550 80.91.229.3 (25 Oct 2014 11:50:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Oct 2014 11:50:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 25 13:50:21 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XhzrR-0001Nk-9x for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Oct 2014 13:50:21 +0200 Original-Received: from localhost ([::1]:53064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhzrQ-00075a-N4 for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Oct 2014 07:50:20 -0400 X-Received: by 10.70.119.71 with SMTP id ks7mr11841393pdb.9.1414237666821; Sat, 25 Oct 2014 04:47:46 -0700 (PDT) X-Received: by 10.140.94.81 with SMTP id f75mr6477qge.5.1414237666545; Sat, 25 Oct 2014 04:47:46 -0700 (PDT) Original-Path: usenet.stanford.edu!uq10no17319049igb.0!news-out.google.com!u5ni12qab.1!nntp.google.com!u7no37041qaz.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=109.153.118.254; posting-account=kRukCAoAAAANs-vsVh9dFwo5kp5pwnPz Original-NNTP-Posting-Host: 109.153.118.254 User-Agent: G2/1.0 Injection-Date: Sat, 25 Oct 2014 11:47:46 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:208331 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100606 Archived-At: 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.