Oct
13
2010
Posted by ebal at
11:27:54
in planet_ellak, planet_Sysadmin
I am using vi for almost everything, and i always comment before my changes. I prefer to comment like this:
# ebal, Wed Oct 13 14:20:46 EEST 2010
so i usually type:
i
# ebal,
esc
: r! date
I was loosing too much time with that, so i’ve searched in google for a custom shortcut in vim to do exactly the above by hitting a special key.
After a while i found the solution!
In the end of /etc/vimrc i put the below map vi command:
:map <f1> :r! export -p LC_ALL=C; echo "# `whoami`, `date`"<return>