leetcode.vim icon indicating copy to clipboard operation
leetcode.vim copied to clipboard

Issue when issuing LeetCodeSignIn

Open shankyty opened this issue 5 years ago • 4 comments

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

shankyty avatar Jul 02 '20 06:07 shankyty

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.

ianding1 avatar Jul 02 '20 06:07 ianding1

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

shankyty avatar Jul 02 '20 07:07 shankyty

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.

ianding1 avatar Jul 02 '20 18:07 ianding1

Got it solved Multiple problems

  • Three vim installed
    • Default Mac
    • vim(brew)
    • maccvim(brew)
  • Three python installed
    • python2(default Mac)
    • python3(default brew)
    • [email protected] (kegOnly for vim dependency)

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 [email protected]. After making right link:

followed instruction to install plugin.

things worked Screenshot 2020-07-03 at 12 27 17 PM

shankyty avatar Jul 03 '20 06:07 shankyty