get bash history to vi
Posted
by nameanyone
on Stack Overflow
See other posts from Stack Overflow
or by nameanyone
Published on 2010-03-25T00:04:04Z
Indexed on
2010/03/25
0:13 UTC
Read the original article
Hit count: 415
When I try to read bash history into vim, I get nothing.
:r !history
If I just execute the command, i.e.
:!history
instead of history I get a snapshot of my terminal as it looked before I started vim.
How can I read the output of "history" into vim? Reading the contents of .bash_history won't do as I save history with timestamps:
HISTTIMEFORMAT='%Y.%m.%d %R '
© Stack Overflow or respective owner