es la siguiente pieza de la escritura de un plugin vim vim:cómo entender este script vim?
debería decir esa sintaxis de vim es un poco extraño:
!exists("*s:SetVals")
, por eso su es una Starmark antess:
?- ¡función !, por qué hay! ¿personaje?
- & iskeyword, ¿es esta una variable, si es así, donde está definida?
- ¿Qué es
s:
yg:
, cuál es la diferencia entre ellos? - ¿por qué debería usarse? como
let &dictionary = g:pydiction_location
, ¿puedo cambiarlo para que sea&dictionary = g:pydiction_location
?
si existe! ("* 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
¿por qué la etiqueta 'python'? –
@AshwiniChaudhary desde que python es invocado por este script :) – hugemeow
Podría ser Ruby o Perl o Lua y no tiene nada que ver con su pregunta. – romainl