GithubHelp home page GithubHelp logo

egomobile / vscode-powertools Goto Github PK

View Code? Open in Web Editor NEW
66.0 2.0 10.0 20.74 MB

A swiss army knife with lots of tools, extensions and (scriptable) enhancements for Visual Studio Code.

Home Page: https://marketplace.visualstudio.com/items?itemName=egomobile.vscode-powertools

License: GNU Lesser General Public License v3.0

JavaScript 62.14% TypeScript 11.02% CSS 26.27% EJS 0.57%
vscode-extension javascript coffeescript nodejs scripting less sass bootstrap4 vue custom-app

vscode-powertools's Introduction

vscode-powertools

Share via Facebook Share via Twitter Share via Pinterest Share via Reddit Share via LinkedIn Share via Wordpress Share via Email

Latest Release Awesome

A swiss army knife with lots of tools, extensions and (scriptable) enhancements for Visual Studio Code.

⚠️⚠️⚠️ NOTICE: If you have the legacy version of that plugin installed, please backup and uninstall it first, before you install this one. You also need to upgrade to Visual Studio Code 1.57 or later. ⚠️⚠️⚠️

Table of contents

  1. Install
  2. How to use
  3. Documentation
  4. Contribute
  5. Related projects

Install []

Launch VS Code Quick Open (Ctrl + P), paste the following command, and press enter:

ext install egomobile.vscode-powertools

Or search for things like vscode-powertools in your editor.

How to use []

Apps []

Apps are Node.js based scripts, which are running with a web view and can also interact with a Visual Studio Code instance.

demo-apps1.gif

For more information, have a look at the wiki.

Buttons []

Buttons can be used to run tasks, like scripts or shell commands, by user's click.

demo-button.gif

For more information, have a look at the wiki.

Commands []

To enhance your editor, you can register custom commands, which can be used from anywhere in the editor, by using the API, e.g.

demo-commands.gif

For more information, have a look at the wiki.

Events []

The extension makes it possible to run tasks, like scripts, on specific events.

demo-events.gif

For more information, have a look at the wiki.

Jobs []

Jobs can be used to run tasks, like scripts or shell commands, periodically.

demo-jobs.gif

For more information, have a look at the wiki.

Scripts []

Scripts can be used to any kind of custom logic for a workspace.

demo-scripts.gif

For more information, have a look at the wiki.

Startups []

Startups are similar to Autostart in Windows.

For more information, have a look at the wiki.

Tools []

A set of useful sub commands.

demo-tools1.gif

For more information, have a look at the wiki.

Values []

Values (or placeholders) can be used to define dynamic settings, e.g.

demo-values.gif

For more information, have a look at the wiki.

Documentation []

The complete reference of classes, functions and interfaces, can be found here.

A repository with code samples, can be found at vscode-powertools-samples. If you would like to request for one or more examples, you can open an issue here.

Contribute []

If you like the extension, you are welcome to contribute, by opening an issue and/or fork this repository.

To work with the code:

  • install vscode-deploy-reloaded extension
  • clone this repository
  • create and change to a new branch, like git checkout -b my_new_feature
  • run npm install from your project folder
  • open that project folder in Visual Studio Code
  • select command Deploy Reloaded: Deploy ... (by pressing F1) and execute Package ... to copy all web view resources files from /src/res to /out/res ... also do this after you have reset your /out folder
  • now you can edit and debug there
  • commit your changes to your new branch and sync it with your forked GitHub repo
  • make a pull request

Contributors

Peter Jaszkowiak

Related projects []

vscode-helpers []

vscode-helpers is a NPM module, which you can use in your own VSCode extension and contains a lot of helpful classes and functions.

vscode-powertools's People

Contributors

ixlikro avatar mkloubert avatar pitaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-powertools's Issues

Where is Power Tools: Tools configuration saved?

I just created a new TCP proxy but I can't find where the configuration is saved.

I tried to find the config for the newly created proxy under .vscode/settings.json and ~/.config/Code/User/settings.json but no luck.

How to migrate settings from old installs?

I was using the earlier version (the "old" extension) and still have its settings in my configuration. But they don't affect the new version. Do I just copy & paste those settings or are there changes that I may need to take care of?

Compatibility with VS Codium

Hi,

Since I learned VS Code is using so called 'Telemetry' which possible could leak code to MS, I switched to VS Codium. The extension isn't available on the VS Codium extension servers however installing the VSIX manually works well.

The problem is the extension seems to dissapear after restarting VS Codium. Is there anything what could be done?

Thanks!
Rolf

Info: VS Codium Version: 1.76.1 on MacOS and Powertools 0.67.4

Task is running multiple times

Similar to #2 I get one button for every folder I have in my workspace, and when a scheduled task runs, it runs once in every folder. Is there a way to only run it once?

Recommendation on best way to enable/disable what extensions are loaded for a specific workspace/window?

Hey there,
For years now I have been looking for a way to swap between extension profiles (for lack of a better term, simply meaning controlling which extensions are currently active/loaded) based on configurable conditions, as I have tons of them for different languages and usually only need a handful of them active for a given workspace/window, and there are just too many for me to practically enable/disable manually on a day to day basis, sometimes hour by hour, so they all just get left enabled. I was excited when I came across this extension today, as it seemed like it might actually be able to help me to accomplish this.

My question is more of an ask for a recommended method, if you happen to be familiar, how best to try and tackle this? I see that powertools can trigger scripts upon loading of a workspace, but I think extensions would already be loaded by then, otherwise this extension would not be triggered to run the script in the first place. That said, is it possible for a script to flag what extensions I want to be loaded for a workspace and then auto-restart the actual VSCode window? I would imagine that interrupting it's own execution isn't ideal, but I am not sure if it would even be possible.

I am going to experiment with some things, but if you happen to have any ideas or suggestions, I would greatly appreciate it. 👍

Edit: I am using vscode-insiders on linux, in case that ends up coming into play

Thanks,
-MH

Checking for new apps...

My vscode status bar always showing "Checking for new apps..." button and when clicked on it nothing happens. It is kind of disturbing to see this spinner everytime my eyes goes to the status bar. If this is a bug and the extension is always looking for new apps, then it needs to be fixed. Otherwise, disable this progress notification.

[Question] about executing powershell

Hi thank you for this amazing tool!

i have some questions(WIN 10):

1.) Applying a setting like this (settings.json):

{
    "ego.power-tools": {
        "buttons": [
            {
                "text": "testtask2",
                "action": {
                    "type": "shell",
                    "command": "powershell.exe -noProfile -File C:\\_xxxx\\vscodefolder\\.vscode\\testpower2.ps1 ${activeFile}",
                    "cwd": "C:\\Windows\System32\\WindowsPowerShell\\V1.0"
                    "silent": false
                }
            }
        ]
    }
}

and running it, nothing is shown in the vscode terminal (the powershell is executed but i would like to start this powershell as task ).
As opposed to when making a task like this in a task.json and running it(output is shown in the Terminal like expected)

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "windows": {
        "options": {
            "shell": {
                "executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "args": [
                    "-NoProfile",
                    "-ExecutionPolicy",
                    "Bypass",
                    "-Command"
                ]
            }
        }
    },
    "tasks": [
        {
            "label": "testtask1",
            "type": "shell",
            "windows": {
                "options": {
                    "cwd": "${workspaceFolder}",
                },
                "command": "powershell -noProfile -File C:\\_xxxx\\vscodefolder\\.vscode\\testpower1.ps1 "
            },
            "presentation": {
                "echo": false,
                "reveal": "silent",
                "focus": true,
                "panel": "shared",
                "showReuseMessage": false,
                "clear": false,
             //   "close": true
            },
            "problemMatcher": []
		}
	]
}

2.) Can i start a powershell task via command ? (found nothing in the wiki about that), maybe somewhow via javascript or a workbench action ???

3.)Can i define more then 1 context menu entry per file ending (e.g. when ending is *.txt
"populate" 3 context menu entries to start different powershell tasks,
ending *.json "populate" 4 contextmenu entries to start different powershell tasks)
Now you have to click "execute PowerCommand" and then you choose from the available commands(one click more)

4.) I can execute a powershell script on startup, like on 1.) can i run this as powershell task at startup too ?

5.) for events like "file created" "file.changed" "file.saved" and "file.deleted" i would like to trigger a powershell task (according to the documentation it is not possible) ...? Or would is there a possibility to trigger that from javascript ???

6.) I want some buttons to be shown only on defined endings. e.g. *.xxx or *.yyy , i tried various strings like

"ifFile": "xxx$"
but that does not seem to work ???

Would you be so kind and provide examples for these questions?

Thank you!

Too many buttons

My system: Ubuntu 20, VSC 1.57.1
My settings.json:

    "ego.power-tools": {
        "buttons": [
            {
                "text": "Gist-Settings",
                "tooltip": "Upload Settings to Gist",
                "action": {
                    "type": "command",
                    "command": "extension.updateSettings"
                }
            },
            {
                "text": "Test1",
                "tooltip": "Upload Settings to Gist",
                "action": {
                    "type": "command",
                    "command": "extension.updateSettings"
                }
            }
        ]
    }

grafik

Otherwise, good tool!

My beloved action button stopped working...

I have an action thatI use frequently (I'd say almost daily). And now I noticed it no longer works. But then I've been sick for a few days - so it may have stopped working last week - but I can't relate that to any updates of egomobile. I also went back to 1.84.2 which I swear it once worked with - and it does not.

Admittedly this is crazy weird - it's confusing and I have no idea what to do :(

Well, except...the only idea I had was to open Termin>Output>ego and it showed the opening msg with the commandline and on [OK] suffix. Copying that commandline into a DOS console worked.

Is there anything else I could do to dig deeper into this?

BTW, in case it matters, the button def is:

        {
            "text": "$(file) DyaEdit",
            "ifFile": "(.dyalog|.mipage|.aplf|.aplc|.apln|.dyascript)$",
            "priority": 1030,
            "tooltip": "Opens the Dyalog Editor from 19.0 on current file",
            "action": {
                "type": "shell",
                "command": "\"C:/Program Files/Dyalog/Dyalog APL-64 19.0 Unicode/dyaedit.exe\" \"${activeFile}\"",
            },
            "onEditorChanged": " $v['button'].update() "

        },

it opens an alternative editor on the curent file.

[bug] - Can't run an npm script inside a Devcontainer

Not sure if this container supports the devcontainer spec, but I am running into this error when clicking on my simple button that triggers an NPM script.

ERROR: Could not execute button: [Error] 'Command failed: npm run prepare-commit fatal: empty ident name (for <>) not allowed '

Here is my configuration that exists in the devcontainer.json file required for devcontainer spec.

"settings": {
            "ego.power-tools": {
              "buttons": [
                  {
                      "text": "Prepare Commit MSG",
                      "tooltip": "Runs 'npm prepare-commit'",
                      "action": {
                          "type": "shell",
                          "command": "npm run prepare-commit"
                      }
                  }
              ]
            }
          }

Expected Behavior: Run the NPM script

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.