Code Monkey home page Code Monkey logo

occur-follow's Introduction

Occur Follow

A simple addition to occur key map to add instant highlighting of occurences in context

This isn't really intended to be a package (although you can go ahead and install it, if you like! (I don't recommend it, see Caveat Emptor below.))

It's a demonstration to show what's possible in Emacs without a lot of extensions, and just a couple of additional key-bound functions.

The source code is fully annotated, so it should be dead easy to follow what it's doing.

Anyway, a little demo is worth a thousand words...

The demo breakdown

C-s C-w (start searching on the word at point, 'occur')

M-s o (start Occur from iSearch)

With the functions in this package loaded, up and down arrow move to the next occurence and highlight/navigate to it in the file being searched.

That's all folks.

(Emacs default bindings)

Caveat Emptor

Buyer beware - I should point out that buried in the Occur mode there is already a feature very similar to occur-follow, it will also work in modes like rgrep, Ag.el, Ack etc.

C-c C-f

When in Occur (and these other modes) will turn on Next-Error-Follow mode... doing C-c C-f again will toggle it off.

So before you install this little package ... Don't.

Just use Next-Error-Follow.

Also, take note, Emacs is so deep, you may want a feature that doesn't seem to exist. But it might exist tucked away somewhere, with a not so intuitive name.

So...

Moral of the story

No matter how long you've been using Emacs, ask the people at http://reddit.com/r/emacs and other Emacs hangouts first!

occur-follow's People

Contributors

jasonm23 avatar

Stargazers

Tasshin Fogleman avatar Subramanyam Chitti avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.