Skip to content

Command line option to open multiple files into specific window tag #671

Description

@SamHasler

What problem would this solve?

I'd like to have several MarkPad windows open with files related by task in each window. If there are new files created for a task, or edits to files that aren't open yet, I'd like to open the files into the correct window from the command line.

What would you like?

MarkPad --tag "Task 1" C:\path\to\task-1\file1.md "C:\path\to\task-1\folder with spaces\file2.md"

MarkPad --tag "Task 2" "C:\path\to\task 2\file1.md" "C:\path\to\task 2\\file2.md"

If a window with the tag does not exist it would:

  • open a new window and set it to use that tag.
  • open the two files.
  • have the first file in the list as the active tab/editor.

If a window with the tag does exist it would:

  • Open the two files in the window, if they are not open already.
  • Reload the files if they are already open.
  • Switch the active editor in that window to the first file in the list.

Some kind of "flash" to show the tabs for the files might help the user find the files. (or the "<"/">" button(s) if not all the tabs are in view.)


You might also want to allow setting which view to start with:

MarkPad --tag "Task 1" --edit         C:\path\to\file1.md
MarkPad --tag "Task 1" --preview      C:\path\to\file1.md
MarkPad --tag "Task 1" --side-by-side C:\path\to\file1.md
MarkPad --tag "Task 1" --zen          C:\path\to\file1.md

and also allow setting/changing the tag color:

MarkPad --tag "Task 1" --color blue

Either open new window with no files and that tag/color, or change the color of the window with that tag.

What have you tried instead?

currently just running the command multiple times for each file and moving files between windows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions