Sublime Forum

Vintage: context for checking if another key had been pressed

#1

I currently have this key-map setup to show SublimeLinter errors in line when moving up or down:

// Show line errors when moving up or down:
{
	"keys": ["j"],
	"command": "multicommand",
	"args": {
		"commands": [{
			"command": "move",
			"args": {
				"by": "lines",
				"forward": true
			}
		}, {
			"command": "sublime_linter_line_report"
		}]
	},
	"context": [{
		"key": "setting.command_mode"
	}, {
		"key": "setting.is_widget",
		"operand": false
	}]

}, {
	"keys": ["k"],
	"command": "multicommand",
	"args": {
		"commands": [{
			"command": "move",
			"args": {
				"by": "lines",
				"forward": false
			}
		}, {
			"command": "sublime_linter_line_report"
		}]
	},
	"context": [{
		"key": "setting.command_mode"
	}, {
		"key": "setting.is_widget",
		"operand": false
	}]
}

But it breaks many things such as multiple line selection (vj). Therefore, I hope a context can be added in Vintage which only triggers the customisation above when no keys have been pressed before j or k.

0 Likes