Reputation: 1664
I want to insert filename and line number into some places in the file. For example this line:
_debug('init');
I want to replace
:s/debug('/debug('(%current_filename_here%:%current_line_number_here%)\ /g
to get this
_debug('(filename.ext:88) init');
I try to use expand('%:t'
) to get filename and line("."
) to get line number, but I don't know how to use it in replace expression.
How can I do this?
Upvotes: 3
Views: 659