Closed yochem closed 2 years ago
The support for prolog was added four years ago by @ahovgaard: https://github.com/jalvesaq/vimcmdline/commit/600021875206b883ee9417570d5f5bb1a591a60c
I know, but thank you for your answer. My question was if the current file can be loaded into the program, which makes it possible to run functions from the current file. With python:
test.py:
def hi(name):
print(f'hi, {name}!')
Opening REPL with current version:
>>> hi('jalvesaq')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'hi' is not defined
What my idea would be:
>>> hi('jalvesaq')
hi, jalvesaq!
With python, this can be done with python3 -i test.py
.
It would be an easy way to very quickly test the current file. I hope I've explained it well enough. Please tell me if you don't understand :)
The problem is that the support for programming languages that I don't use depend on people who know both the other language and Vim Language to contribute code to vimcmdline. Even for languages that I eventually use, such as Python, I can only maintain code that reflects my own usage. For example, I can't fix issues with the integration of vimcmdline with either IPython or Jupyte because I don't use them. I'm sorry, but I have never used and I have no plans to use prolog.
Hi!
It would be nice to automatically consult the current file in the prolog REPL for testing the written code. You have to type
consult('file.pl').
now everytime you want to open the repl for testing.This option would be nice for every language, by the way.