ianding1 / leetcode.vim

Solve LeetCode problems in Vim!
MIT License
308 stars 43 forks source link

Issue when issuing LeetCodeSignIn #53

Open shankyty opened 4 years ago

shankyty commented 4 years ago

E319: Sorry, the command is not available in this version: python3 <<EOF line 9: E492: Not an editor command: import os line 10: E492: Not an editor command: import vim line 12: E492: Not an editor command: plugin_dir = vim.eval('s:current_dir') line 13: E492: Not an editor command: thirdparty_dir = os.path.join(plugin_dir, 'thirdparty') line 15: E121: Undefined variable: plugin_dir line 1325: E171: Missing :endif line 8: E319: Sorry, the command is not available in this version: python3 <<EOF line 9: E492: Not an editor command: import os line 10: E492: Not an editor command: import vim line 12: E492: Not an editor command: plugin_dir = vim.eval('s:current_dir') line 13: E492: Not an editor command: thirdparty_dir = os.path.join(plugin_dir, 'thirdparty') line 15: E121: Undefined variable: plugin_dir line 1325: E171: Missing :endif E117: Unknown function: leetcode#SignIn

ianding1 commented 4 years ago

Hi shankyty,

It looks like your vim doesn't have python3 support. To check if your vim supports python3, please run vim --version and see if there is +python3 in the output.

shankyty commented 4 years ago

vim --version | grep python

+cmdline_hist      -langmap           +python/dyn        +visual
+cmdline_info      +libcall           -python3           +visualextra

My vim version is

VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 17 2020 17:49:10)
macOS version

For some reason I am not able to install vim python3. MacVim works with python3 but does not detect browser-cookies3

ianding1 commented 4 years ago

Yeah, so the reason was that your vim doesn't support python3. However, if your MacVim supports python3 but couldn't find browser-cookies, I'd check if the package had been installed and vim was using the same python where the package was installed.

shankyty commented 4 years ago

Got it solved Multiple problems

vim command was mapped to default vim which was with python not with python3. This was due to juggling between vim and maccvim requires unlink which made which made stock vim default. vim installed from brew was with keg-only python@3.8. After making right link:

followed instruction to install plugin.

things worked

Screenshot 2020-07-03 at 12 27 17 PM