Overriding atom default behavior with init script

I’m not sure how to edit the init script to override some commands that come included with atom. I searched around for a while with no luck.

I have installed the package pain-split which adds commands to split and move a tab to a new pane. The default atom splitting feature copies the tab into the new pane, but doesn’t close the old tab.

I want to be able to right click a tab or use the context menu to “Split right” (a global override) and instead of executing pane:split-right atom would execute pane:split-right-moving-current-tab (from pain-split package)

I don’t use keybindings so I would like it to be a global override for the existing splitting options. Can anyone help?

I don’t use keybindings so I would like it to be a global override

What do you use to execute the comand?

I use the right click context menu

You can add a command to the context menu in your init script.

contextMenu demo

atom.contextMenu.add({
	"atom-workspace": [{
		label: "Move Tab Right",
		command: "pane:split-right-moving-current-tab",
	}],
});

Is there a way to replace/override the existing context menu split commands?

I don’t think there is a way to override a command.