xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit f2a5ff4b85055a465a967be357b6a9ac68dd81bc

Add o and O keys for Visual mode.
These commands switch selection bound.
Author: xaizek
Author date (UTC): 2011-06-18 21:20
Committer name: xaizek
Committer date (UTC): 2011-06-18 21:20
Parent(s): 8bb0c9c33d505f9db0084f826e6d0248d2b53afc
Signing key:
Tree: 369b9d0b3b5e92cda01de0bac8eeff37b9623c8e
File Lines added Lines deleted
ChangeLog 2 0
src/vifm-help.txt 3 2
src/vifm.1 1 1
src/visual.c 17 1
File ChangeLog changed (mode: 100644) (index 098fe1e29..027e2498f)
33 33
34 34 Fixed '< and '> marks handling. Fixed '< and '> marks handling.
35 35
36 Added o and O keys for Visual mode (switch selection bound).
37
36 38 0.6 to 0.6.1 0.6 to 0.6.1
37 39
38 40 Added :set command. Added :set command.
File src/vifm-help.txt changed (mode: 100644) (index 81268025a..4c75d81d3)
... ... The basic vi key bindings are used to move through the files and popup
24 24 C clone file. C clone file.
25 25 m [a-z][A-Z][0-9] to set bookmark m [a-z][A-Z][0-9] to set bookmark
26 26 ' letter to goto bookmark ' letter to goto bookmark
27 v start or stop visualy selecting files. This works with the j and k keys
27 v or V start or stop visualy selecting files. This works with the j and k keys
28 28 for movement. This is different then in vi in that v in visual mode will for movement. This is different then in vi in that v in visual mode will
29 29 leave the selected files highlighted. If you want to clear the selected leave the selected files highlighted. If you want to clear the selected
30 files Ctrl-c or Esc will unselect the files.
30 files Ctrl-c or Esc will unselect the files. You can use o or O keys to
31 switch active selection bound.
31 32 dd - the default setting is to move the selected files to the trash dd - the default setting is to move the selected files to the trash
32 33 directory. directory.
33 34 DD - delete file omitting trash directory. DD - delete file omitting trash directory.
File src/vifm.1 changed (mode: 100644) (index 8cda2b310..d816627bd)
... ... moves the last yanked files.
190 190 .BI t .BI t
191 191 tag the current file. tag the current file.
192 192 .TP .TP
193 .BI v
193 .BI "v or V"
194 194 start visual mode. start visual mode.
195 195 .TP .TP
196 196 .BI ZQ .BI ZQ
File src/visual.c changed (mode: 100644) (index 07395028b..6aa1da31e)
... ... static void cmd_G(struct key_info, struct keys_info *);
49 49 static void cmd_H(struct key_info, struct keys_info *); static void cmd_H(struct key_info, struct keys_info *);
50 50 static void cmd_L(struct key_info, struct keys_info *); static void cmd_L(struct key_info, struct keys_info *);
51 51 static void cmd_M(struct key_info, struct keys_info *); static void cmd_M(struct key_info, struct keys_info *);
52 static void cmd_O(struct key_info, struct keys_info *);
52 53 static void cmd_d(struct key_info, struct keys_info *); static void cmd_d(struct key_info, struct keys_info *);
53 54 static void delete(struct key_info key_info, int use_trash); static void delete(struct key_info key_info, int use_trash);
54 55 static void cmd_cp(struct key_info, struct keys_info *); static void cmd_cp(struct key_info, struct keys_info *);
 
... ... init_visual_mode(int *key_mode)
100 101 curr = add_cmd(L"M", VISUAL_MODE); curr = add_cmd(L"M", VISUAL_MODE);
101 102 curr->data.handler = cmd_M; curr->data.handler = cmd_M;
102 103
104 curr = add_cmd(L"O", VISUAL_MODE);
105 curr->data.handler = cmd_O;
106
103 107 curr = add_cmd(L"V", VISUAL_MODE); curr = add_cmd(L"V", VISUAL_MODE);
104 108 curr->data.handler = cmd_ctrl_c; curr->data.handler = cmd_ctrl_c;
105 109
 
... ... init_visual_mode(int *key_mode)
118 122 curr = add_cmd(L"k", VISUAL_MODE); curr = add_cmd(L"k", VISUAL_MODE);
119 123 curr->data.handler = cmd_k; curr->data.handler = cmd_k;
120 124
125 curr = add_cmd(L"o", VISUAL_MODE);
126 curr->data.handler = cmd_O;
127
121 128 curr = add_cmd(L"v", VISUAL_MODE); curr = add_cmd(L"v", VISUAL_MODE);
122 129 curr->data.handler = cmd_ctrl_c; curr->data.handler = cmd_ctrl_c;
123 130
 
... ... cmd_M(struct key_info key_info, struct keys_info *keys_info)
300 307 { {
301 308 while(view->list_pos > view->top_line + view->window_rows/2) while(view->list_pos > view->top_line + view->window_rows/2)
302 309 { {
303 select_up_one(view,start_pos);
310 select_up_one(view, start_pos);
304 311 } }
305 312 } }
306 313 } }
307 314 update(); update();
308 315 } }
309 316
317 static void
318 cmd_O(struct key_info key_info, struct keys_info *keys_info)
319 {
320 int t = start_pos;
321 start_pos = view->list_pos;
322 view->list_pos = t;
323 update();
324 }
325
310 326 static void static void
311 327 cmd_colon(struct key_info key_info, struct keys_info *keys_info) cmd_colon(struct key_info key_info, struct keys_info *keys_info)
312 328 { {
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master