Comments (3)
I believe there's ActiveTextEditor.document
to get the currently opened text document
from vscode.py.
Currently, the Python script you write has the default file path set to the home directory. In #25 I mentioned I have created a fox for this, and I plan on opening a PR for it. Maybe @CodeWithSwastik can comment on this. My approach to implementing this is to grab the vscode workspace directory in JavaScript and pass it in as an input argument to the Python script. From there, the Python script sets the working directory to the vscode workspace directory.
from vscode.py.
active_text_editor = await ctx.window.active_text_editor
file_name = active_text_editor.document.fileName
from vscode.py.
Related Issues (20)
- Add support for creating Color Themes
- Args should be taken as lists instead of strings HOT 2
- Add vscode.Progress
- Improve the docs
- Cogs HOT 1
- Add a way to make us freely edit package.json HOT 2
- Python was not found HOT 5
- Extension is not compatible with Code 1.56. Extension requires ^1.59. Wrong code.exe used. HOT 2
- Rewrite the entire library to be async
- How to get working directory in quick pick? HOT 3
- Error: spawn python ENOENT, on Windows HOT 2
- Buggy Example HOT 1
- `main` repo is incomplete HOT 5
- Add support for tree views HOT 1
- Show a message when the user doesn't have python installed to make them install Python
- Lower extension activation time
- Error in setting up the virtual environment... HOT 1
- Raise Not Implemented Error
- Add support for Hover
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode.py.