linux - 如何使用 vim 打开文件并锚定到专用行号

标签 linux shell vim

我的日志总是这样显示错误:

lib/rails/rack/logger.rb:38

我可以复制上面的行,然后用 vim 打开文件并移动到第 38 行吗?

最佳答案

看看 file:line - Allows you to open file:line and it does the right thing插入;它设置了 autocmd 来处理这些,所以你可以在命令行上将你的 path/to/file:lnum 直接传递给 Vim 和 :edit 这样的,也是!

关于linux - 如何使用 vim 打开文件并锚定到专用行号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27332876/

相关文章:

python - 如何使 python 命令行程序自动完成任意事物而不是解释器

linux - ksh 子进程不忽略 SIGTERM

C程序调用shell脚本

html - NERD_Commenter 的不理想评论,评论 javascript 嵌入 html 文件

vim - 在 Vim 中,为什么 'j' 用于向下, 'k' 用于向上?

linux - 在 Linux 中模拟坏扇区

linux - 套接字在午夜断开连接

macos - 如何ping文件中的每个IP?

c - 将 C#defines 导出为 shell 变量

c - #if 1 的 Vim 语法问题