Shell history expansion
Shells like Bash and Zsh support all kinds of expansions. One I use on a daily basis is the history expansion which expands to the last word of previous command in history. The next example would open my editor with ‘new.txt’ file.
% cp old.txt new.txt
% vim !$