简体   繁体   中英

VSCode Navigate Back local to current file only?

Is there an option in VSCode to limit "navigate back" such that it only takes you back to where you cursor was last in your current file?

This is the current behavior:

  1. (On file A) open method foo
  2. (On file A) open method bar
  3. (On file B) open method baz
  4. (On file A) open method bor

If I navigate back when I am on bor, my cursor will land on baz in file B.

Will it be possible to change this such that I land on bar in file A in stead?

This functionality doesn't exist, see open issue: Have a history per editor for in-editor navigation .

However, in some cases like your simple example, Cursor Undo , Ctrl + U , will work as you want. But it is pretty limited. Upvote the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM