none
none

Reputation: 12117

Is it possible to format the result of Ctrl-g in vim?

Is it possible to change what goes into <c-g>’s output? Specifically, I want to add the current filetype to to the output.

Upvotes: 3

Views: 644

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172658

You can do this by overloading the command with a mapping. Since :file is the same as <C-g>, let's use that; it saves us the :normal:

:nnoremap <silent> <C-g> :file<Bar>echon ' ' &filetype<CR>

Upvotes: 4

Related Questions