stefanluptak

stefanluptak

Using VSCode on multiple monitors

Hello everybody,

usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code + file with test + integrated terminal. This all in one VSCode window.

Because of the Covid-19 situation, I am working from home with a 13" MacBook Pro + 14" portable USB-C display next to each other and I am not able to use the second display with VSCode.

Do you have some ideas, how to detach the integrated terminal from VSCode or how to use external terminal for mix test --color --trace ${file} task triggered by a keyboard shortcut for example?

I did a bit of research, and apparently, this is a known and very popoular issue. I’ve been just wondering if somebody has some workaround.

Thanks a lot. :slight_smile:

Most Liked

LostKobrakai

LostKobrakai

You can move the integrated terminal to the side, but afaik not out of the main window. You can create tasks for vscode by creating .vscode/tasks.json, but assigning hotkeys to them is super unintuitive because you need to assign the hotkey the label of the task to trigger. The command for it is “workbench.action.tasks.runTask”.

{
	// See https://go.microsoft.com/fwlink/?LinkId=733558
	// for the documentation about the tasks.json format
	"version": "2.0.0",
  "tasks": [
    {
      "label": "Run build",
      "type": "shell",
      "command": "mix compile",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "presentation": {
        "reveal": "always",
        "panel": "dedicated",
        "focus": true
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning"
      ]
    },
    {
      "label": "Run tests",
      "type": "shell",
      "command": "mix test",
      "group": {
        "kind": "test",
        "isDefault": true
      },
      "presentation": {
        "reveal": "always",
        "panel": "shared",
        "focus": true
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning",
        "$mixTestFailure"
      ]
    },
    {
      "label": "Run stale tests",
      "type": "shell",
      "command": "mix test --stale",
      "group": "test",
      "presentation": {
        "reveal": "always",
        "panel": "shared",
        "focus": true
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning",
        "$mixTestFailure"
      ]
    },
    {
      "label": "Run tests (current file)",
      "type": "shell",
      "command": "mix test ${relativeFile}",
      "group": "test",
      "presentation": {
        "reveal": "always",
        "panel": "shared",
        "focus": true
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning",
        "$mixTestFailure"
      ]
    },
    {
      "label": "Run tests (current test)",
      "type": "shell",
      "command": "mix test ${relativeFile}:${lineNumber}",
      "group": "test",
      "presentation": {
        "reveal": "always",
        "panel": "shared",
        "focus": true
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning",
        "$mixTestFailure"
      ]
    },
    {
      "label": "Run coverage",
      "type": "shell",
      "command": "mix coveralls.html",
      "group": "test",
      "presentation": {
        "reveal": "always",
        "panel": "shared",
        "focus": true
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning",
        "$mixTestFailure"
      ]
    },
    {
      "label": "Run coverage (current file)",
      "type": "shell",
      "command": "mix coveralls.html ${relativeFile}",
      "group": "test",
      "presentation": {
        "reveal": "always",
        "panel": "shared",
        "focus": true
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning",
        "$mixTestFailure"
      ]
    },
    {
      "label": "Generate documentation",
      "type": "shell",
      "command": "mix docs",
      "group": "none",
      "presentation": {
        "reveal": "always",
        "panel": "dedicated",
        "focus": true
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning"
      ]
    },
    {
      "label": "Format project",
      "type": "shell",
      "command": "mix format",
      "group": "none",
      "presentation": {
        "reveal": "never",
        "panel": "dedicated"
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning"
      ]
    },
    {
      "label": "Format file",
      "type": "shell",
      "command": "mix format ${relativeFile}",
      "group": "none",
      "presentation": {
        "reveal": "never",
        "panel": "dedicated"
      },
      "problemMatcher": [
        "$mixCompileError",
        "$mixCompileWarning"
      ]
    }
  ]
}
lucaong

lucaong

I got a car pooling ride and drove to my office to take my 32’’ screen home (making sure to maintain social distancing in the process, let’s all do our part :slight_smile: ). I had never realized how huge this screen is until I placed it on my small desk at home :open_mouth:

NobbZ

NobbZ

Because of similar issues (not as painful as yours though) my boss agreed to send me one of my offices screens, he refused though that I take it with me in the train :smiley: .

Should be here tomorrow.

Perhaps you can ask your boss for similar as well, or if they try to rent a bigger screen short-term, perhaps even split cost?

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <%= ...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

We're in Beta

About us Mission Statement