Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

vim

jedi-vim

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

like image 943
GoingMyWay Avatar asked Sep 26 '15 09:09

GoingMyWay


1 Answers

<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.

like image 156
romainl Avatar answered Oct 14 '22 08:10

romainl