gpt4 book ai didi

vim - 在 Vim 中修改 Ctrl-G

转载 作者:行者123 更新时间:2023-12-04 00:53:03 24 4
gpt4 key购买 nike

我正在寻找修改 Ctrl-G <C-g>通过以下方式:
当前行为:<C-g>"test.txt" 89 lines --1%--我想要的是修改它的输出看起来像 1 Ctrl-G 1<C-g>"~/Documents/test.txt" 89 lines --1%--如果我进行以下映射:map <C-g> echo expand('%:p')我得到:/home/me/Documents/test.txt我要推<C-g>并得到:"~/Documents/test.txt" 89 lines --1%--你能帮我修复我的映射以获得所需的输出吗?
我非常支持这个问题:Display name of the current file in vim?由 muthuh

最佳答案

尝试

:nnoremap <c-g> 1<c-g>

关于vim - 在 Vim 中修改 Ctrl-G,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64898750/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com