A possibly useful command for your vimrc:

----------------------------------------
" Map <F10> to insert the current date
map <F10> :r !date<CR>kJ
----------------------------------------

:r !date
executes "date" and reads the output into a new line
inserted below the current one. The cursor is placed
on this new line.

k
moves the cursor up to the original line where the
cursor was when <F10> was pressed.

J
joins the current line with the new line containing
the output of "date".

Does anyone know an easier way?

--krishna

Reply via email to