Open last modified file in directory using vi

I want a quick way to open the last modified file in a directory, possibly in the form of an alias.

I am currently doing ls -ltr. Then copy and paste the file name

Suppose I use tcsh

+6
bash vi tcsh
source share
1 answer
vi `ls -tr | tail -1` 
+12
source share

All Articles