Wolfgang Schmidt schrieb:
Hi,
I don't know about the filename part, but you could insert a date with
the following mapping:
inoremap @date <C-R>=strftime("%d.%m.%Y")<CR>
Cheers,
Wolfgang
Eric Leenman wrote:
Hi,
Is it possible to make an inoremap that inserts the date as text and
the filename as text?
For example:
inoremap @date {insert_date_as_text()}
inoremap @filename {insert_filename_as_text()}
Rgds,
Eric
" including path
:inoremap @filename <C-R>=expand("%:p")<CR>
" without path:
:inoremap @filename <C-R>=expand("%:t")<CR>
:h i_CTRL-R
:h filename-modifiers
:h expand()
If there is still no filename, nothing is inserted.
Andy
--
EOM
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de