by sverona · 3y ago · 0 comments
Sure, few seconds isn't a lot, to someone who opens terminal once a year.
Additionally, if you're using a nicer colorizing pager, like bat, it'll automatically send the output to your pager for you when it detects that the output wouldn't fit on screen.
For both of those reasons, I almost never use `less` directly on a file.
:set t_te=
Useful because vi makes it more convenient to select the chunk of file I want to view after exiting. More convenient than cat/head/tail at least. Competitive with more. :)Obviously you don't have to use vim, any other editor or whatever can be used.
In zsh, there are equivalent expansions:
!!:1 previous command line, arg 1 (zero-indexed)
!!:$ previous command line, LAST arg
!!:1-$ previous command line, args 1-end (zero-indexed)
So, e.g.: cat /etc/passwd /etc/shadow /etc/group
vi !!:1-$
(becomes) vi /etc/passwd /etc/shadow /etc/group