What do you mean by “output”? You can do:
:echo line(".") + 1
To display the current line number plus 1. You can bind a keystroke with map
, eg:
:noremap <F1> :echo line(".") + 1<cr>
To actually insert the data into the buffer:
:noremap <F1> :execute "normal! i" . ( line(".") + 1 )<cr>