Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cjauvin/goto-pattern
- Owner: cjauvin
- Created: 2010-11-24T23:27:35.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-01-27T01:25:25.000Z (almost 14 years ago)
- Last Synced: 2024-06-11T16:39:43.007Z (5 months ago)
- Language: Emacs Lisp
- Homepage:
- Size: 179 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
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
;;