File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.{
22 .name = .ze ,
3- .version = "0.7.5 " ,
3+ .version = "0.7.6 " ,
44 .fingerprint = 0xa9d116540b6957d2 ,
55 .paths = .{"" },
66}
Original file line number Diff line number Diff line change @@ -381,6 +381,18 @@ pub fn selectPageDown(e: *Editor) !void {
381381 pageScroll (e , .down );
382382}
383383
384+ /// M-F (Alt+Shift+f): 選択しながら次の単語へ移動
385+ pub fn selectForwardWord (e : * Editor ) ! void {
386+ ensureMark (e );
387+ try forwardWord (e );
388+ }
389+
390+ /// M-B (Alt+Shift+b): 選択しながら前の単語へ移動
391+ pub fn selectBackwardWord (e : * Editor ) ! void {
392+ ensureMark (e );
393+ try backwardWord (e );
394+ }
395+
384396// ========================================
385397// ヘルパー関数
386398// ========================================
Original file line number Diff line number Diff line change @@ -2207,6 +2207,10 @@ pub const Editor = struct {
22072207 }
22082208 },
22092209 .alt = > | c | {
2210+ // 小文字のM-f, M-bは選択解除(大文字のM-F, M-Bは選択維持)
2211+ if (c == 'f' or c == 'b' ) {
2212+ self .getCurrentWindow ().mark_pos = null ;
2213+ }
22102214 // keymapから検索
22112215 if (self .keymap .findAlt (c )) | handler | {
22122216 try handler (self );
Original file line number Diff line number Diff line change @@ -177,6 +177,10 @@ pub const Keymap = struct {
177177 try self .bindAlt ('b' , movement .backwardWord );
178178 try self .bindAlt ('d' , edit .deleteWord );
179179
180+ // 選択しながら単語移動 (Alt+Shift+f/b = M-F/B)
181+ try self .bindAlt ('F' , movement .selectForwardWord );
182+ try self .bindAlt ('B' , movement .selectBackwardWord );
183+
180184 // コピー
181185 try self .bindAlt ('w' , edit .copyRegion );
182186
You can’t perform that action at this time.
0 commit comments