gpt4 book ai didi

python - Vim 和 python - 跳转到定义键绑定(bind)

转载 作者:太空宇宙 更新时间:2023-11-03 14:04:53 25 4
gpt4 key购买 nike

following youtube video表明可以使用 vim for python 跳转到定义。

但是,当我尝试使用相同的快捷方式 (Ctrl-G) 时,它不起作用...怎么可能执行相同的“跳转到定义”?

我安装了插件 Ctrl-P 但没有安装 rope。

最佳答案

这并没有直接回答您的问题,而是提供了一个更好的选择。我用 JEDI使用 VIM,作为静态代码分析器,它提供了比 ctags 更好的选项。我在 vim 中使用 spacemacs 键绑定(bind),所以 localleader 设置为 ','

" jedi
let g:jedi#use_tabs_not_buffers = 0 " use buffers instead of tabs
let g:jedi#show_call_signatures = "1"
let g:jedi#goto_command = "<localleader>gt"
let g:jedi#goto_assignments_command = "<localleader>ga"
let g:jedi#goto_definitions_command = "<localleader>gg"
let g:jedi#documentation_command = "K"
let g:jedi#usages_command = "<localleader>u"
let g:jedi#completions_command = "<C-Space>"
let g:jedi#rename_command = "<leader>r"

关于python - Vim 和 python - 跳转到定义键绑定(bind),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44742310/

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