1% The macros here provide some tin-like keybindings for GROUP mode. 2 3% The following macros depend on the util.sl macros being loaded. 4% In your .slrnrc file, add the following lines: 5% interpret "util.sl" 6% interpret "tin-group.sl" 7% interpret "tin-art.sl" 8 9 10!if (is_defined ("group_bob")) () = evalfile ("util.sl"); 11 12 13% The easy bindings 14definekey ("toggle_list_all", "y", "group"); % yank in/out 15definekey ("toggle_hidden", "r", "group"); % toggle all/unread 16definekey ("post", "w", "group"); 17definekey ("quit","Q","group"); 18definekey ("group_search_forward","/","group"); 19definekey ("help","h","group"); 20 21 22% TAB key in group mode. Apparantly this moves from one unread group to 23% another and then cycles back to the top. 24define tin_group_next_unread () 25{ 26 USER_BLOCK0 27 { 28 if (group_unread ()) 29 { 30 if (-1 != select_group ()) 31 return; 32 } 33 } 34 35 X_USER_BLOCK0 (); % enter the current group if it has unread articles 36 while (group_down_n (1)) X_USER_BLOCK0 (); 37 38 group_bob (); 39 do X_USER_BLOCK0 (); while (group_down_n (1)); 40 41 error ("No more unread groups."); 42} 43definekey ("tin_group_next_unread", "\t", "group"); 44 45 46% Using UP/DOWN arrow keys in group mode causes a wrap at 47% ends of the buffer. 48define tin_group_up () 49{ 50 !if (group_up_n (1)) 51 group_eob (); 52} 53definekey ("tin_group_up", "k", "group"); 54 55define tin_group_down () 56{ 57 !if (group_down_n (1)) 58 group_bob (); 59} 60definekey ("tin_group_down", "j", "group"); 61 62#ifdef UNIX VMS 63definekey ("tin_group_up", "\e[A", "group"); 64definekey ("tin_group_up", "\eOA", "group"); 65definekey ("tin_group_up", "^(ku)", "group"); 66definekey ("tin_group_down", "\e[B", "group"); 67definekey ("tin_group_down", "\eOB", "group"); 68definekey ("tin_group_down", "^(kd)", "group"); 69 70% Left/right arrow keys 71definekey ("quit", "\e[D", "group"); 72definekey ("quit", "\eOD", "group"); 73definekey ("quit", "^(kl)", "group"); 74definekey ("select_group", "\e[C", "group"); 75definekey ("select_group", "\eOC", "group"); 76definekey ("select_group", "^(kr)", "group"); 77 78#else 79% OS/2 80definekey ("tin_group_up", "\xE0H", "group"); 81definekey ("tin_group_down", "\xE0P", "group"); 82definekey ("quit", "\xE0K", "group"); 83definekey ("select_group", "\xE0M", "group"); 84#endif 85 86 87% using the space to pagedown at the end of the list should wrap to the top 88define tin_group_pagedown () 89{ 90 call ("pagedown"); 91} 92definekey ("tin_group_pagedown"," ","group"); 93 94 95% using the b to pageup at the top of the list should wrap to the bottom 96define tin_group_pageup () 97{ 98 call ("pageup"); 99} 100definekey ("tin_group_pageup","b","group"); 101 102% vim:set noexpandtab tw=0 ts=8 softtabstop=3: 103