开发者

Dired Mode : View file

开发者 https://www.devze.com 2023-03-24 21:12 出处:网络
I am running following sequence. Opendired mode with C-x d and开发者_StackOverflow中文版select a directory.

I am running following sequence.

  1. Open dired mode with C-x d and 开发者_StackOverflow中文版select a directory.
  2. View a file in that directory with 'v'.
  3. Kill that file with C-x k RET.

I see that Current buffer is one of the previously opened (P) something else rather than the one in dired mode. Even if I kill this buffer P with C-x k RET I still do not see the dired-mode buffer.

I like to go back to the dired-mode buffer. I can still get it via C-x C-b, but I would prefer that this should be automatic choice once I view the file and kill it.


You should just use q for View-quit (or Q for View-quit-all). That's important, because those to actually try to restore the windows configuration.

If you can't restrain your muscle memory you can bind C-x k to View-quit

(add-hook 'view-mode-hook (lamdba () (local-set-key (kbd "C-x k") 'View-quit))
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号