Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim error when opening a .nim file on Windows #57

Open
fredrikhr opened this issue Jun 14, 2016 · 2 comments
Open

Vim error when opening a .nim file on Windows #57

fredrikhr opened this issue Jun 14, 2016 · 2 comments

Comments

@fredrikhr
Copy link

fredrikhr commented Jun 14, 2016

When opening a nim file in vim on Windows the nim plugin issues an error:

"C:\Nim\nimsuggest\nimsuggest.nim" 414L, 12172C
Error detected while processing C:\Users\Username.vim\bundle\nim.vim\autoload\nim.vim:
line 12:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Username.vim\bundle\nim.vim\autoload/nim_vim.py", line 78, in
NimLog = open("/tmp/nim-log.txt", "w")

This is because the path /tmp does not exist on Windows, or at least that's generally not where you'd want to store temporary files on Windows...

@luntik2012
Copy link

luntik2012 commented Jul 21, 2016

Nim from git, vim 7.4, Ubuntu
`"test.nim" [New File]

Error detected while processing /home/nick/.vim/bundle/nim.vim/autoload/nim.vim:

line 12:

E319: Sorry, the command is not available in this version: pyfile /home/nick/.vim/bundle/nim.vim/autoload/nim_vim.py^[[2;2R

Press ENTER or type command to continue
`

@blark
Copy link

blark commented Feb 6, 2018

I also have errors from the Python stuff. I'm using nvim in Powershell with Python2 and Python3 providers in Windows.

I have confirmed that Python providers are working, I tried to manually load the nim_vim.py file and I didn't seem to get any errors. I'm not sure what's up... here's the error I get:

Error detected while processing function provider#python#Call:
line   18:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
PS C:\> r: name 'nimTerminateAll' is not defined

EDIT

turns out when I delete the reference to python3 and just force it to use python2 it seems to work fine, i made the following changes:

 12 "if has("python3")
 13 "  exe 'py3file ' . fnameescape(s:plugin_path) . '/nim_vim.py'
 14 "elseif has("python")
 15 exe 'pyfile ' . fnameescape(s:plugin_path) . '/nim_vim.py'
 16 "endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants