help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to find and jump to tags and elements


From: Robert Thorpe
Subject: Re: Best way to find and jump to tags and elements
Date: Tue, 20 Jan 2015 00:25:13 +0000

Sayth Renshaw <flebber.crue@gmail.com> writes:
> Using emacs 24.4.
>
> What is the best way to search and jump to tags and elements especially in 
> html and css.
>
> so if I had a div id in my html #chocolate and I want to edit the css 
> associated with this in its separate styles/styles.css file what would be the 
> best way.
>
> Is there a CTRL-P fuzzy match type search option to jump around?

Oleksandr Gavenko already mentioned 'M-s .' there's also 'M-s _' which
prompts you for a symbol in the minibuffer.

The 'etags' program understands HTML.  You can use it to create a tags
file which can locate elements across many files. See the manual on
Tags, 'C-x C-e' the following to get there: (info "(emacs) Tags") .  The
'M-.' command can then be used to navigate between files.

If you're using HTML mode here's another tip.  'C-c TAB' will do a
cheesy "render" of the HTML.  It makes all the HTML tags invisible and
just shows the text; making bits of it bold and italic as
necessary. 'C-c TAB' again undoes this.  In code that has a lot of tags
but little content this can be useful for navigation.  It's not
bulletproof and often shows javascript as though it were content.  It's
useful though, I often move somewhere by doing C-c TAB and using M-{ and
M-} to jump through paragraphs, then I do C-c TAB again.

BR,
Robert Thorpe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]