Skip to content

Commit

Permalink
Add support to run by language from a suggestion list
Browse files Browse the repository at this point in the history
  • Loading branch information
formulahendry committed Oct 7, 2016
1 parent 41c6856 commit 850afa7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Run code snippet or code file for multiple languages: **JavaScript, PHP, Python,

![Usage](images/usage.gif)

* To select language to run, use shortcut `Ctrl+Alt+J`, or press `F1` and then select/type `Run By Language`, then type the language: e.g `php, javascript, bat, shellscript...`
* To select language to run, use shortcut `Ctrl+Alt+J`, or press `F1` and then select/type `Run By Language`, then type or select the language to run: e.g `php, javascript, bat, shellscript...`

![Usage](images/usageRunByLanguage.gif)

Expand Down Expand Up @@ -99,6 +99,9 @@ By default, telemetry data collection is turned on to understand user behavior t
```

## Change Log
### 0.3.3
* Add support to run by language from a suggestion list

### 0.3.2
* Add support for Swift, Julia, Crystal

Expand Down
Binary file modified images/usageRunByLanguage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "code-runner",
"displayName": "Code Runner",
"description": "Run code snippet/file for JS, PHP, Python, Perl, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F#, C#, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal",
"version": "0.3.2",
"version": "0.3.3",
"publisher": "formulahendry",
"icon": "images/logo.png",
"engines": {
Expand Down
4 changes: 3 additions & 1 deletion src/codeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export class CodeManager {

public runByLanguage(): void {
this._appInsightsClient.sendEvent('runByLanguage');
vscode.window.showInputBox({ prompt: "Enter language: e.g. php, javascript, bat, shellscript..." }).then((languageId) => {
let config = vscode.workspace.getConfiguration('code-runner');
var executorMap = config.get<any>('executorMap');
vscode.window.showQuickPick(Object.keys(executorMap), { placeHolder: "Type or select language to run" }).then((languageId) => {
if (languageId !== undefined) {
this.run(languageId);
}
Expand Down

0 comments on commit 850afa7

Please sign in to comment.