2016-06-14 8 views
1

Ich mag es nicht, die Shift-Taste beim Bewegen des Cursors gedrückt zu halten. Ich suche nach etwas ähnlich wie Emacs, wo Sie Strg + Leertaste drücken, den Cursor an die gewünschte Stelle bewegen (während der Text hervorgehoben ist), und drücken Sie erneut Strg + Leertaste, um die Auswahl zu beenden.Gibt es eine Möglichkeit, die Auswahl in Sublime Text umzuschalten?

Ich schaute auf die Keymap-Datei, aber das einzige, was ich finden konnte, ist das Setzen der Marke. Dadurch wird der Text beim Bewegen des Cursors nicht hervorgehoben, und es werden auch zwei verschiedene Tastaturbelegungen zum Starten und Beenden der Auswahl verwendet.

Kann dies in erhabenen Text getan werden? Ob es 2 oder 3 ist, spielt keine Rolle.

Antwort

2

Sie könnten einen Kontext verwenden und eine Einstellung auf ctrl+space wechseln, würde dies in diesem Keybinding führen:

{ "keys": ["left"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["right"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["up"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["down"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["pageup"], "command": "move", "args": {"by": "pages", "forward": false, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["pagedown"], "command": "move", "args": {"by": "pages", "forward": true, "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["ctrl+home"], "command": "move_to", "args": {"to": "bof", "extend": true}, "context": [{"key": "setting.do_extend"}] }, 
{ "keys": ["ctrl+end"], "command": "move_to", "args": {"to": "eof", "extend": true}, "context": [{"key": "setting.do_extend"}] }, 

{ "keys": ["ctrl+space"], "command": "toggle_setting", "args": {"setting": "do_extend"} }, 
Verwandte Themen