how to use autocomplete for twice command in codemirror

MyCode

I use code-mirror twice on my page, but my autocomplete command only runs once. What should I do to solve this problem?