imenu和speedbar与您要查找的内容很接近。
否则你可以自己定义。你可以从这样的事情开始:
(defvar java-function-regexp
(concat
"^[ \t]*" ; leading white space
"\\(public\\|private\\|protected\\|" ; some of these 8 keywords
"abstract\\|final\\|static\\|"
"synchronized\\|native"
"\\|[ \t\n\r]\\)*" ; or whitespace
"[a-zA-Z0-9_$]+" ; return type
"[ \t\n\r]*[[]?[]]?" ; (could be array)
"[ \t\n\r]+" ; whitespace
"\\([a-zA-Z0-9_$]+\\)" ; the name we want!
"[ \t\n\r]*" ; optional whitespace
"(" ; open the param list
"\\([ \t\n\r]*" ; optional whitespace
"\\<[a-zA-Z0-9_$]+\\>" ; typename
"[ \t\n\r]*[[]?[]]?" ; (could be array)
"[ \t\n\r]+" ; whitespace
"\\<[a-zA-Z0-9_$]+\\>" ; variable name
"[ \t\n\r]*[[]?[]]?" ; (could be array)
"[ \t\n\r]*,?\\)*" ; opt whitespace and comma
"[ \t\n\r]*" ; optional whitespace
")" ; end the param list
))
(defun my:next-java-method()
(interactive)
(re-search-forward java-function-regexp nil t)
)
(defun my:prev-java-method()
(interactive)
(re-search-backward java-function-regexp nil t)
)
然后绑定my:next-java-method
到my:prev-java-method
你想去的任何键