0

カーソルでテキストを選択しました。

テキストの反対側にジャンプしたいのですが、どうすればよいでしょうか? マウスで選択し、選択を一度移動した場合⇧</kbd>+ ←</kbd>/→</kbd>, I don't find a way to change the cursor position to the other side of the selected text.

それを実現する方法はありますか。PHP/Shell/Applescript のスクリプトでしょうか。

OS X Mavericks を使用しています。

4

1 に答える 1

0

時間はかかりましたが、方法を見つけました。OS X の KeyBindings を使用して、選択範囲を強制終了し、一度にヤンクすることで、選択範囲のカーソルがある側をリセットします。

~/Library/KeyBindings/DefaultKeyBinding.dictファイルに次の行を追加する必要があります。

"$ " = (deleteToMark:, yankAndSelect:);

そのようなファイルがない場合は、次のコマンドで行を作成して追加できます。

echo $'{\n\t"$ " = (deleteToMark:, yankAndSelect:);\n}' > ~/Library/KeyBindings/DefaultKeyBinding.dict

これでキーボードショートカット⇧</kbd> + Space can be used to reset the side on which the text insertion cursor is, when you have text selected.

例:

  1. テキストを選択
  2. 所有⇧</kbd> and expand the selection on one side with the arrow keys (like ⇧</kbd> + ←</kbd> expands the selection on the left side)
  3. 打つ⇧</kbd> + Space
  4. 片側のみを拡大/縮小するのではなく、どちら側を拡大するかを再度決定できるようになりました (⇧</kbd> + →</kbd> expands the selection on the right side)
于 2016-02-19T13:11:04.537 に答える