nim.vim
nim.vim copied to clipboard
Vim error when opening a .nim file on Windows
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...
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 `
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