Eclipse reopen file at last viewed position

十年热恋 提交于 2020-01-25 06:55:10

问题


Eclipse always opens a file from the top. However, I want to open it at the last viewed position because it is likely that I have to continue editing near this position (see also Locality of reference). Furthermore, it makes sense to continue navigation at this place because it is where I left and so I have this relatively fresh in my mind. Thus, it gives me orientation. Finding the last viewed position can be time consuming.

Some other editors, e.g., Visual Studio Code show the last viewed position when opening a file. This little change helps me a lot to navigate and edit code in re-opened files.

Is it possible to get the same behavior in Eclipse, i.e., re-open files at the last viewed position?


回答1:


I added this feature to my plugin RecentEditors.

The current scroll position and caret position of editors is persisted and can be restored when an editor is re-opened. This enables to continue editing at the last viewed position.

Furthermore, the plugin adds a new dialog to see and re-open recently closed files.

You find the plugin on the Eclipse Marketplace, and GitHub.



来源:https://stackoverflow.com/questions/57017899/eclipse-reopen-file-at-last-viewed-position

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!