Skip to content

Instantly share code, notes, and snippets.

@re5et
Created April 20, 2010 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save re5et/372964 to your computer and use it in GitHub Desktop.
Save re5et/372964 to your computer and use it in GitHub Desktop.
(defun next-instance-of()
"Find next instance of current word."
(interactive)
(let (myStr)
(setq myStr (thing-at-point 'word))
(search-forward myStr)
(backward-word)
))
(defun previous-instance-of()
"Find previous instance of current word."
(interactive)
(let (myStr)
(setq myStr (thing-at-point 'word))
(search-backward myStr)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment