domingo, 16 de mayo de 2021

Current file name on emacs's shell-command

When I came from vim to emacs, I wanted to get my ":!perl %" command in emacs. I found that by default, there was no symbol bound to current-file-name in the shell-command minibuffer.

One of my first emacs hacks was this snippet (git blame says I added it in 2013)



The other day, in some reddit thread, I found shell-command+, which does this and a bit more. Super cool that it also uses '%', inheriting the vi tradition. And I can retire now my old code.


Speaking of '%', did you know that typing '%' in your firefox address bar will narrow the completions to currently open tabs?  A-MA-ZING. More cool shortcuts here.

No hay comentarios: