jedi-vim how to jump to the definition of a function in other file
Asked Answered
D

2

12

I am new to jedi-vim, and I do not know how to jump the definition of a function in other file.

The jedi-vim's doc is:

The following are parts of them:

NOTE: subject to change!

let g:jedi#goto_command = "<leader>d"

let g:jedi#goto_assignments_command = "<leader>g"

let g:jedi#goto_definitions_command = ""

let g:jedi#documentation_command = "K"

let g:jedi#usages_command = "<leader>n"

let g:jedi#completions_command = "<C-Space>"

let g:jedi#rename_command = "<leader>r"

And I wonder what are <leader> and <C-Space> mean and how to use these commands on VIM

Diligent answered 26/9, 2015 at 9:47 Comment(3)
Could you please change the title of your post, since this question is about invoking jedi-vim commands, and not about jumping to a definition in another file.Introjection
change the title or the content.Hod
@Jason, Could you tell me the reason why?Diligent
P
11

<leader> is a placeholder: when vim registers a mapping containing that string it replaces it with the current value of the mapleader variable.

If you didn't set that variable explicitly, <leader> is replaced with \ by default and those mapping are supposed to be read as \d, \g, etc. That is, press \ followed by d in rapid succession.

:help mapleader tells you how to set <leader> to something else if you don't like \.

<C-Space> means Ctrl+Space.

See :help key-notation, :help mapleader.

Pyrophyllite answered 26/9, 2015 at 10:43 Comment(4)
<C-Space> means also Ctrl + Space.Baalbek
@DaveHalter, no idea why I put a c, there, instead of Space.Pyrophyllite
does this answer the question, which is about jumping to a definition in another file?Introjection
No, that's not what the question is about.Pyrophyllite
F
0

The correct way to jump to the file of function definition is this command:

<leader>d

It is the first command listed in your list of mappings.

Forging answered 7/2, 2019 at 11:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.