po to kawałek skryptu vim z plugin vim:jak zrozumieć ten skrypt vima?
powinienem powiedzieć, że Vim składnia jest nieco dziwne:
!exists("*s:SetVals")
, dlaczego ich jest Starmark przeds:
?- funkcja !, dlaczego istnieje! postać?
- & iskeyword, czy jest to zmienna, jeśli tak, gdzie jest zdefiniowana?
- co to jest
s:
ig:
, jaka jest różnica między nimi? - dlaczego powinno się używać? na przykład
let &dictionary = g:pydiction_location
, czy mogę go zmienić na&dictionary = g:pydiction_location
?
jeśli istnieje! ("* 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
dlaczego tag 'python'? –
@AshwiniChaudhary, ponieważ python jest wywoływany przez ten skrypt :) – hugemeow
Może to być Ruby lub Perl lub Lua i nie ma to nic wspólnego z twoim pytaniem. – romainl