久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

跳轉emacs中的java方法

Jump through java methods in emacs(跳轉emacs中的java方法)
本文介紹了跳轉emacs中的java方法的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我想通過方法跳過我的 java 文件,例如當我找到我的任何地方時,執行一個鍵盤快捷鍵即可跳轉到方法的下一個結尾或方法的開頭.

I want to jump through my java files by method, e.g. when I've got my anywhere, do a single keyboard shortcut to jump to the next end of a method or beginning of a method.

Emacs 使用 C-M-a 和 C-M-e 的通過 defuns 移動"對 C 非常有用,并且完全符合我的要求.但顯然在 Java 中,一個 defun 是一個完整的類.

Emacs' "moving by defuns" with C-M-a and C-M-e is super-useful for C and does exactly what I want. But apparently in Java a defun is a whole class.

由 defuns 移動:http://www.gnu.org/software/emacs/manual/html_node/emacs/Moving-by-Defuns.html

Moving by defuns: http://www.gnu.org/software/emacs/manual/html_node/emacs/Moving-by-Defuns.html

我發現我可以強制 C-M-f 和 C-M-b 做我想做的事.它們在任何括號平衡的表達式上前后移動.問題是它們只有在從方法定義的左括號或右括號之外調用時才具有我正在尋找的功能,這是極其有限的.

I've found that I can coerce C-M-f and C-M-b to sort of do what I want. They move forward and backward over any parentheses-balanced expression. The problem is that they only have the funcitonality I'm looking for when invoked from right outside the opening or closing brackets of a method definition, which is extremely limiting.

帶平衡括號的表達式:http://www.delorie.com/gnu/docs/emacs/emacs_282.html

歡迎任何想法!

推薦答案

imenu 和 speedbar 與您要找的很接近.

imenu and speedbar are close to what you are looking for.

否則你可以自己定義.你可以這樣開始:

Otherwise you can define it by yourself. You can start with something like this:

(defvar java-function-regexp
  (concat
   "^[ 	]*"                                   ; leading white space
   "\(public\|private\|protected\|"        ; some of these 8 keywords
   "abstract\|final\|static\|"
   "synchronized\|native"
   "\|[ 	

]\)*"                          ; or whitespace
   "[a-zA-Z0-9_$]+"                            ; return type
   "[ 	

]*[[]?[]]?"                        ; (could be array)
   "[ 	

]+"                                ; whitespace
   "\([a-zA-Z0-9_$]+\)"                      ; the name we want!
   "[ 	

]*"                                ; optional whitespace
   "("                                         ; open the param list
   "\([ 	

]*"                             ; optional whitespace
   "\<[a-zA-Z0-9_$]+\>"                      ; typename
   "[ 	

]*[[]?[]]?"                        ; (could be array)
   "[ 	

]+"                                ; whitespace
   "\<[a-zA-Z0-9_$]+\>"                      ; variable name
   "[ 	

]*[[]?[]]?"                        ; (could be array)
   "[ 	

]*,?\)*"                          ; opt whitespace and comma
   "[ 	

]*"                                ; 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-methodmy:prev-java-method 綁定到你想去的任何鍵

Then bind my:next-java-method and my:prev-java-method to whatever key you want to go to the

這篇關于跳轉emacs中的java方法的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Upload progress listener not fired (Google drive API)(上傳進度偵聽器未觸發(Google 驅動器 API))
Save file in specific folder with Google Drive SDK(使用 Google Drive SDK 將文件保存在特定文件夾中)
Google Drive Android API - Invalid DriveId and Null ResourceId(Google Drive Android API - 無效的 DriveId 和 Null ResourceId)
Google drive api services account view uploaded files to google drive using java(谷歌驅動api服務賬戶查看上傳文件到谷歌驅動使用java)
Google Drive service account returns 403 usageLimits(Google Drive 服務帳號返回 403 usageLimits)
com.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example(com.google.api.client.json.jackson.JacksonFactory;Google Drive 示例中缺少)
主站蜘蛛池模板: 国产精品久久久久久久久久久新郎 | 精品国产一区探花在线观看 | 成人三级视频在线观看 | 精品视频久久久 | 国产精品污www在线观看 | 精品免费国产视频 | 成人精品在线观看 | 国产高清精品一区 | 国产成人精品午夜 | 成人久久18免费网站麻豆 | 欧美一区二区三区四区在线 | 美女久久 | 国产精品永久久久久久久www | 狠狠色狠狠色综合系列 | 国产在线成人 | 91精品国产欧美一区二区 | 中文字幕亚洲精品 | 日韩伦理一区二区 | 精品视频一区二区在线观看 | 黄色三级在线播放 | 中文字幕 在线观看 | 国产精品99久久久久久久久 | 国产一区二区久久 | 日日干日日色 | 伊人狼人影院 | 日韩欧美视频在线 | 午夜免费福利影院 | 艹逼网| 福利社午夜影院 | 成人免费大片黄在线播放 | 99精品欧美一区二区三区综合在线 | a级在线免费 | 免费成人毛片 | 亚洲国产激情 | 久久久久国产精品一区 | 欧美视频三区 | 免费黄色片在线观看 | 日韩中文字幕一区二区 | 成人国产精品久久 | 欧美在线激情 | 久久国产精品视频免费看 |