la seguente è pezzo di script di Vim da un plugin vim:come capire questo script vim?
Devo dire che la sintassi di vim è un po 'strano:
!exists("*s:SetVals")
, perché il loro è uno Starmark primas:
?- funzione !, perché c'è un! carattere?
- & iskeyword, è una variabile, se sì, dove è definita?
- cosa sono
s:
eg:
, qual è la differenza tra loro? - perché dovrebbe essere usato? come
let &dictionary = g:pydiction_location
, posso cambiarlo in&dictionary = g:pydiction_location
?
se esiste! ("* S: SetVals")
function! s:SetVals() " Save and change any config values we need. " Temporarily change isk to treat periods and opening " parenthesis as part of a keyword -- so we can complete " python modules and functions: let s:pydiction_save_isk = &iskeyword setlocal iskeyword +=.,( " Save any current dictionaries the user has set: let s:pydiction_save_dictions = &dictionary " Temporarily use only pydiction's dictionary: let &dictionary = g:pydiction_location " Save the ins-completion options the user has set: let s:pydiction_save_cot = &completeopt " Have the completion menu show up for one or more matches: let &completeopt = "menu,menuone" " Set the popup menu height: let s:pydiction_save_pumheight = &pumheight if !exists('g:pydiction_menu_height') let g:pydiction_menu_height = 15 endif let &pumheight = g:pydiction_menu_height return '' endfunction
endif
perché il tag 'python'? –
@AshwiniChaudhary poiché python viene richiamato da questo script :) – hugemeow
Potrebbe essere Ruby o Perl o Lua e non ha nulla a che fare con la tua domanda. – romainl