gpt4 book ai didi

vim 将带有冒号的参数解释为文件名 :line:column

转载 作者:行者123 更新时间:2023-12-04 23:21:00 26 4
gpt4 key购买 nike

是否可以以这样的方式配置 VIM,如果我输入

vim filename:123:89

它打开文件 filename转到第 123 行和第 89 列?

如果不是通过 VIM 可能会对 shell 进行黑客攻击?

最佳答案

您可以安装 file-line插件打开文件到文件名后指定的行和列。 ( github mirror )

来自 github 上的自述文件

When you open a file:line, for instance when coping and pasting from an error from your compiler vim tries to open a file with a colon in its name.

Examples:

vim index.html:20 
vim app/models/user.rb:1337

With this little script in your plugins folder if the stuff after the colon is a number and a file exists with the name especified before the colon vim will open this file and take you to the line you wished in the first place.

关于vim 将带有冒号的参数解释为文件名 :line:column,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26733668/

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