LoginSignup
0
0

More than 5 years have passed since last update.

Sublimetext の Emacsプラグインで、インクリメンタルサーチ後の微妙な挙動の違いを修正する

Posted at

Sublimetext3 + sublemacspro をたまに使っていますが、CTRL-sのインクリメンタルサーチ後に、CTRL-g,n,p,f,b などのキー操作を行うと、カーソルが移動しなかったり、CTRL-gにいたっては、カーソルが最初の検索位置に戻ってしまうっていう微妙に使いにくい挙動があったので、少しググってみたら、こんなんでましたという備忘録です。

キーバインディングのファイルに以下のような定義を追加すると幸せになりそうです。CTRL-gが抜けているので、CTRL-fの行をコピペで、Gにすると使えそうな感じです。

{"keys": ["ctrl+f"], "command": "sbp_inc_search_escape", "args": {"next_cmd": "move", "next_args": {"by": "characters", "forward": true}},
    "context": [ {"key": "i_search_active"}, {"key": "panel_has_focus"} ]
},
{"keys": ["ctrl+b"], "command": "sbp_inc_search_escape", "args": {"next_cmd": "move", "next_args": {"by": "characters", "forward": false}},
    "context": [ {"key": "i_search_active"}, {"key": "panel_has_focus"} ]
},
{"keys": ["ctrl+n"], "command": "sbp_inc_search_escape", "args": {"next_cmd": "move", "next_args": {"by": "lines", "forward": true}},
    "context": [ {"key": "i_search_active"}, {"key": "panel_has_focus"} ]
},
{"keys": ["ctrl+p"], "command": "sbp_inc_search_escape", "args": {"next_cmd": "move", "next_args": {"by": "lines", "forward": false}},
    "context": [ {"key": "i_search_active"}, {"key": "panel_has_focus"} ]
},
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0