Snake(SNAAAAAAAAAKKKE)是Vim的Python模块,让您最大程度地使用Python来增强Vim。 这是一个使用Snake用Python编写的帮助函数的示例,当您按下c时,可以在光标下面的单词在蛇形和驼峰形之间切换: import snake @ snake . key_map ( "c" ) def toggle_snake_case_camel_case (): """ take the word under the cursor and toggle it between snake-case and camel-case """ word = snake . get_word () # is it snake case? if "_" in word : chunks =