atom-community / atom-community/atom-script
Solved: autohide script console and non-utf8 (cp866) symbols on Windows (script 3.18.1)
- Dominant language
- JavaScript
- Stars
- 730
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
I wanted
1) Vtools for VSC behaviour for **script** console (fast close after click somewhere on editor pane without any escapes clicked)
2) To repair Russian output to **script** console. I used Haskell, but I think the approach will work for other languages.
****
1) File `script.js`.
Add this snippet somewhere in `activate(state)`, I added at the line 101:
```
atom.workspace.observeTextEditors((editor) => editor.onDidChangeCursorPosition(() => {
this.scriptView.removePanel()
}));
```
2) File `haskell.coffee` in `Grammars` folder, or maybe another depending on your language.
Change "File Based" snippet to
```
'File Based':
#command: "'cmd /c chcp 65001>nul && stack'"
command: 'D:/Haskell/cmdH.bat' // your path
args: ({filepath}) ->
parts = filepath.split('\\')
projectName = parts[2]
return ['build', '--exec', projectName]
```
Be careful with indentation, the whole thing has to be just like `"Selection Based"` above.
The contents of cmdH.bat:
`cmd /c chcp 65001>nul && stack %1 %2 %3`
Contributor guide
Assessment
This issue has not been assessed yet.