unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: emacs-devel@gnu.org
Subject: CamelHump word movement in Emacs
Date: Thu, 19 Nov 2009 09:46:54 +0100	[thread overview]
Message-ID: <873a4akikh.fsf@thinkpad.tsdh.de> (raw)

Hi all,

in many editors for "modern" programming languages like Java or C#, the
normal word movement commands also stop on CamelHumps.  This is very
convenient, because nowadays the convention for identifiers names more
and more turns to using camelCaseNaming.

Here's an example:

  int foo_bar_baz() {}

With the usual forward/backward-word commands, point always stops at the
_ (when moving forward) or the first char of the component word (when
moving backward).  I really like that behavior.

Unfortunately, it doesn't work if the function uses camelCase naming.

  int fooBarBaz() {}

Here, forward/backward-word jump over the complete identifier.  What I
would really like to have, was that those commands move point to the
capital letters (the 2 Bs), too.

IMO, that would be the right thing to do, because camelCase is nearly
never used for something else than separating words.

What do you think?

Bye,
Tassilo




             reply	other threads:[~2009-11-19  8:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19  8:46 Tassilo Horn [this message]
2009-11-19  8:57 ` CamelHump word movement in Emacs Giuseppe Scrivano
2009-11-19 11:05   ` Tassilo Horn
2009-11-19 15:22     ` Stefan Monnier
2009-11-19 19:24       ` Tassilo Horn
2009-11-19 21:31         ` Stefan Monnier
2009-11-20  7:25           ` Tassilo Horn
2009-11-20 13:43             ` Eli Zaretskii
2009-11-20 14:05               ` Tassilo Horn
2009-11-20 14:13                 ` Eli Zaretskii
2009-11-20 14:31                   ` Tassilo Horn
2009-11-20 14:22             ` Stefan Monnier
2009-11-20 14:37               ` Tassilo Horn
2009-11-20 16:07                 ` Stefan Monnier
2009-11-20 17:19                   ` Tassilo Horn
2009-11-20 15:09         ` Chong Yidong
2009-11-20 15:34           ` Tassilo Horn
2009-11-20 21:36             ` Chong Yidong
2009-11-20 16:10         ` Dan Nicolaescu
2009-11-21  0:44           ` Miles Bader

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=873a4akikh.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).