use*_*032 8 visual-studio-code
有时在关闭 vscode 或其中的选项卡时,我会收到一个对话框,询问“是否要保存所做的更改filename?” 但是,未保存的编辑实际上来自上一个会话,该会话在没有此类查询的情况下关闭,可能是在关闭计算机时,所以我不记得它是否是有意义的编辑,或者可能只是一个意外的按键,例如快捷方式出错了; 并且undo重新访问上次编辑也不起作用。
我的问题:如何查看保存的文件版本与编辑器窗口中的版本之间的差异?我认为最好在对话中有一个“show diff”选项,但现在我对命令行 diff 命令也很满意。
我正在使用 ubuntu 20.04。
kkm*_*kkm 20
对于键盘手来说,有一些亮点:
\ncompa sav (it saves your keyboard wear and tear to shorten words to a prefix which is unambiguous enough), and the list will shrink dynamically to just a few commands. Yours is File: Compare Active File with Saved. When it's close to the top enough, navigate the list of commands with the down arrow and execute it with Enter. As a bonus, you may click on the little gear to the right of the command currently highlighted in the list and redefine its shortcut, if you use it very often and prefer a chord shortcut to the default arpeggio one. Sorry, there does not seem to be a shortcut in lieu of the gear click. If there is, please let me know!Happy \xe2\x99\xac k'boarding \xe2\x99\xac!
\ncra*_*ing 11
我在 MacOS 上使用 VSCode 1.52.1 版,我遇到了类似的问题,可能不是同一个问题,但我猜它也适用于您。
当您在 Explorer 视图中时,在 Explorer 的左上角有您的“打开编辑器”。如果左侧显示一个点表示缓冲区中有更改,您可以右键单击文件名并选择“与已保存的比较”。这将在旁边打开另一个缓冲区,该缓冲区将显示任何未保存的更改。
要摆脱那个窗口(我花了一点时间才弄明白,我很抱歉地说!),您可以单击“打开编辑器”中额外缓冲区左侧的“X”。
希望这对你有用!
ctrl+shift+P(或在 Mac 上为 command+shift+P)并模糊搜索“将更改与保存的文件进行比较”
| 归档时间: |
|
| 查看次数: |
1990 次 |
| 最近记录: |