From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steven Degutis Newsgroups: gmane.emacs.help Subject: Re: Is there an easier way to jump to the same word? Date: Thu, 11 Apr 2013 09:06:55 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b16018d955da104da164cb7 X-Trace: ger.gmane.org 1365689244 5868 80.91.229.3 (11 Apr 2013 14:07:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Apr 2013 14:07:24 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Le Wang Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 16:07:28 2013 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 1UQI9s-0006uw-3x for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 16:07:24 +0200 Original-Received: from localhost ([::1]:51765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQI9r-0004Qp-D4 for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 10:07:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQI9X-0004P9-Ig for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 10:07:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQI9Q-0007zS-K6 for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 10:07:03 -0400 Original-Received: from mail-pd0-f175.google.com ([209.85.192.175]:39129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQI9Q-0007zI-Du for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 10:06:56 -0400 Original-Received: by mail-pd0-f175.google.com with SMTP id g10so873645pdj.34 for ; Thu, 11 Apr 2013 07:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=IIgcUcmHkD9NQZseQzziYABHt50HIo5QYjY+gBDIWKM=; b=acB/JegdrIiOtqJ6OMXkwgUpgkdbVKvsIXjZEra67txoTXdeFyUr3sIRQvOAkwWCo1 rZDSZVFIIns7DznnBejJGkp9xbdzzyjwCg0r24t+hSMvhbxICNsZJMUqQVz57OJUf0iQ Z/hbo74I2WKLLeA8+Td4BYm92s2TeO4fzIafKz2cwWSrlh1qmPNSBR/1CNtgn7vedgsW WaprKxlv6tDog0fkcNWTPSvmIywoocwx3B6NR6KP7Nawmc4pY9KDUBy2/R1g1zt2gvBK cHwlgu8BhetvemubNt1cVBceFq3CuVYUh2CMHKwVziIdNIKQBuLDZly5YvnGOsaL64B4 i+ig== X-Received: by 10.67.4.227 with SMTP id ch3mr9875719pad.59.1365689215832; Thu, 11 Apr 2013 07:06:55 -0700 (PDT) Original-Received: by 10.70.24.197 with HTTP; Thu, 11 Apr 2013 07:06:55 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.192.175 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:90099 Archived-At: --047d7b16018d955da104da164cb7 Content-Type: text/plain; charset=ISO-8859-1 This is my favorite solution so far. The only problem with it is that it doesn't play nicely with hl-line-mode, so when my current line has a special background, highlight-symbol's background is overridden. This wasn't the case with isearch-mode. Do you think this would be hard to fix? -Steven On Thu, Apr 11, 2013 at 2:35 AM, Le Wang wrote: > I use highlight symbols to highlight same symbols, and jump between them. > It chooses rainbow colors automatically and makes it much easier to follow > some key variables through a block of code. > > My fork https://github.com/lewang/highlight-symbol.el allows you to use > arbitrary region as a "symbol". > > > On Thu, Apr 11, 2013 at 10:24 AM, Steven Degutis wrote: > >> Often times I find that I want to jump to another occurrence of the >> word-under-point, almost always variables or functions. I end up going to >> the beginning of the word with M-b, doing isearch-forward with C-s, adding >> all the words until the full word is the search term with C-w a bunch of >> times, and finally C-s to jump around to other instances of it. >> >> Is there a better way to do this? >> >> -Steven >> > > > > -- > Le > --047d7b16018d955da104da164cb7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
This is my favorite solution so far. The only problem with= it is that it doesn't play nicely with hl-line-mode, so when my curren= t line has a special background, highlight-symbol's background is overr= idden. This wasn't the case with isearch-mode. Do you think this would = be hard to fix?

-Steven


=
On Thu, Apr 11, 2013 at 2:35 AM, Le Wang <l26wa= ng@gmail.com> wrote:
I use highlight symbols to = highlight same symbols, and jump between them. =A0It chooses rainbow colors= automatically and makes it much easier to follow some key variables throug= h a block of code.

My fork=A0https://github.com/lewang/highlight-symbol.el allows yo= u to use arbitrary region as a "symbol".


On Thu, Apr 11, 2013 at 10:24 AM, Steven= Degutis <sbdegutis@gmail.com> wrote:
Often times I find that I want to jump to another occurren= ce of the word-under-point, almost always variables or functions. I end up = going to the beginning of the word with M-b, doing isearch-forward with C-s= , adding all the words until the full word is the search term with C-w a bu= nch of times, and finally C-s to jump around to other instances of it.

Is there a better way to do this?

-Steven



--
Le

--047d7b16018d955da104da164cb7--