Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cjauvin/goto-pattern

An easy way to navigate to a predefined pattern in a file
https://github.com/cjauvin/goto-pattern

Last synced: 4 days ago
JSON representation

An easy way to navigate to a predefined pattern in a file

Awesome Lists containing this project

README

        

;; goto-pattern.el --- An easy way to navigate to a predefined pattern
;; in a file
;;
;; Author: Christian Jauvin
;; Created: 2008-12-09
;; Last updated: 2011-01-26
;;
;; The primary goal of this extension was to create a very simple
;; navigation system for the function/class definitions of different
;; types of source file (matched with regexps that can vary depending
;; on your style). Of course it can be used with other types of
;; pattern as well. A given pattern must be mapped to a file
;; extension, and it's a one-to-one relationship: to one type of file
;; can only be associated one pattern (the trick is of course to use
;; regexp alternation if you have a need for it).
;;
;; By default, goto-pattern knows about a couple of "source file
;; extension -> function/class definition pattern" mappings (for
;; Python, PHP, JS, *Lisp and SQL). You can add a new one easily by
;; using the interactive function:
;;
;; M-x g2p-add-pattern
;;
;; If a pattern for the file extension you specified already exists,
;; it will get replaced.
;;
;; This extension can be installed by adding it first to your
;; load-path (in your .emacs):
;;
;; (add-to-list 'load-path "/path/to/")
;;
;; then requiring it:
;;
;; (require 'goto-pattern)
;;
;; and finally maybe mapping its entry point function to a handy
;; keyboard shortcut, for instance:
;;
;; (global-set-key "\C-cgp" 'goto-pattern) ; CTRL-c, + g + p
;;