corresponded to python3
This commit is contained in:
parent
1415361e3a
commit
2b841ff6f2
2 changed files with 12 additions and 2 deletions
|
|
@ -9,7 +9,11 @@ if !executable('nim')
|
||||||
echoerr "the Nim compiler must be in your system's PATH"
|
echoerr "the Nim compiler must be in your system's PATH"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
exe 'pyfile ' . fnameescape(s:plugin_path) . '/nim_vim.py'
|
if has("python3")
|
||||||
|
exe 'py3file ' . fnameescape(s:plugin_path) . '/nim_vim.py'
|
||||||
|
else
|
||||||
|
exe 'pyfile ' . fnameescape(s:plugin_path) . '/nim_vim.py'
|
||||||
|
endif
|
||||||
|
|
||||||
fun! nim#init()
|
fun! nim#init()
|
||||||
let cmd = printf("nim --dump.format:json --verbosity:0 dump %s", s:CurrentNimFile())
|
let cmd = printf("nim --dump.format:json --verbosity:0 dump %s", s:CurrentNimFile())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
import threading, Queue, subprocess, signal, os, platform, getpass
|
from sys import version_info
|
||||||
|
import threading, subprocess, signal, os, platform, getpass
|
||||||
|
|
||||||
|
if version_info[0] == 3:
|
||||||
|
import queue as Queue
|
||||||
|
else:
|
||||||
|
import Queue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import vim
|
import vim
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue