Skip to main content
deleted 1 character in body
Source Link
Maxim Kim
  • 13.9k
  • 2
  • 20
  • 48

I pressumepresume you run (g)Vim with a shortcut.

  1. there is current working directory in vim :lcd to see it and :lcd dir to change it. (if you run (g)vim.exe or shortcut it would be path to (g)vim executable)
  2. depending on how your python script is implemented, it might read this json file from current working directory (it is inherited by :!) not from your script location directory.

so either change current working direcory :lcd path/to/your/python/script/ or change your python script to read file relative to script location.

I pressume you run (g)Vim with a shortcut.

  1. there is current working directory in vim :lcd to see it and :lcd dir to change it. (if you run (g)vim.exe or shortcut it would be path to (g)vim executable)
  2. depending on how your python script is implemented, it might read this json file from current working directory (it is inherited by :!) not from your script location directory.

so either change current working direcory :lcd path/to/your/python/script/ or change your python script to read file relative to script location.

I presume you run (g)Vim with a shortcut.

  1. there is current working directory in vim :lcd to see it and :lcd dir to change it. (if you run (g)vim.exe or shortcut it would be path to (g)vim executable)
  2. depending on how your python script is implemented, it might read this json file from current working directory (it is inherited by :!) not from your script location directory.

so either change current working direcory :lcd path/to/your/python/script/ or change your python script to read file relative to script location.

deleted 2 characters in body
Source Link
Maxim Kim
  • 13.9k
  • 2
  • 20
  • 48

I pressume you run (g)Vim with a shortcut.

  1. there is current working directory in vim :lcd to see it and :lcd dir to change it. (if you run (g)vim.exe or shortcut it would be path to (g)vim executable)
  2. depending on how your python script is implemented, it might read this json file from current working directory (it is inherited by :!) not from your script location directory.

so either change current working direcory :lcd path/to/your/python/script.py/ or change your python script to read file relative to script location.

  1. there is current working directory in vim :lcd to see it and :lcd dir to change it
  2. depending on how your python script is implemented, it might read this json file from current working directory (it is inherited by :!) not from your script location directory.

so either change :lcd path/to/your/python/script.py or change your python script to read file relative to script location.

I pressume you run (g)Vim with a shortcut.

  1. there is current working directory in vim :lcd to see it and :lcd dir to change it. (if you run (g)vim.exe or shortcut it would be path to (g)vim executable)
  2. depending on how your python script is implemented, it might read this json file from current working directory (it is inherited by :!) not from your script location directory.

so either change current working direcory :lcd path/to/your/python/script/ or change your python script to read file relative to script location.

Source Link
Maxim Kim
  • 13.9k
  • 2
  • 20
  • 48

  1. there is current working directory in vim :lcd to see it and :lcd dir to change it
  2. depending on how your python script is implemented, it might read this json file from current working directory (it is inherited by :!) not from your script location directory.

so either change :lcd path/to/your/python/script.py or change your python script to read file relative to script location.