-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide Vim command for create_element_from_path.py
#48
Comments
Prerequisites
Issue descriptionWe currently include a utility script with the KQCircuits source code called util/create_element_from_path.py. If an element is given as an argument, let's say kqcircuits/elements/smooth_capacitor.py, the script will open a KLayout UI window with an instance of the given element placed in the layout. The script is useful for element development workflow to quickly see the results of the code in KLayout. For this reason we want to integrate this script into as many IDEs as we can. We have currently outlined instructions on how to set up this script as an external tool in PyCharm and VSCode, instructions are in the comment section of util/create_element_from_path.py. The task is to write similar instructions to have the script invoked from the vim and neovim command line. How to get startedTry running the following from command line: The command should cause KLayout window with a smooth capacitor on it. You can also try other values for The task is to come up with simple instructions to configure the Vim editor to perform this call on a file currently being viewed on Vim editor. This is probably best set up by adding a Definition of done
|
I would like to work on this issue. Can you please assign it to me? |
Yes and thank you for your interest! You can start working on the solution and once the solution is ready, create a pull request. During review we might give some suggestions to refine the solution, but once it is ready, we will assign you to this issue and mark it closed. Don't hesitate to make a pull request earlier rather than later so that we could have some time before the deadline to reiterate your solution from our feedback if needed. |
Hey, |
Thank you for your contribution! Will try out the instructions now and come back to you on approval or improvement ideas! |
Just in case you havent seen it @AVDiv I added a review to your pull request, let me know if you cant see it |
Marking this as done and confirming that @AVDiv should receive the bounty for this. The merging of the pull request will happen at a later date, but the code changes were checked and verified that they work! Well done! |
Description
The
create_element_from_path.py
macro currently has info on setting it up with VSCode and PyCharm. I think adding an example command for vim/neovim makes sense due to their popularity. The example should work platform-independently and be easy to add to a.vimrc
config.Use case
A new
:command
is provided in Vim along with a macro for running it. This would generate the current file in KLayout GUI.The text was updated successfully, but these errors were encountered: