Reputation: 531
I am looking to modify Ctrl-G <C-g>
in the following way:
Current Behavior:
<C-g>
"test.txt" 89 lines --1%--
What I want is to modify so it's output looks like 1 Ctrl-G 1<C-g>
"~/Documents/test.txt" 89 lines --1%--
if I make the following mapping:
map <C-g> echo expand('%:p')
I get:
/home/me/Documents/test.txt
I would like to push <C-g>
and get:
"~/Documents/test.txt" 89 lines --1%--
Can you help me fix my mapping to get desired output?
I am piggy-backing heavily off this question: Display name of the current file in vim? by muthuh
Upvotes: 4
Views: 605