]> git.donarmstrong.com Git - qmk_firmware.git/blob - users/yet-another-developer/leader.c
[keyboard] yanfali fruity60 prototype (#7021)
[qmk_firmware.git] / users / yet-another-developer / leader.c
1 #include "leader.h"
2
3 LEADER_EXTERNS();
4
5 // Runs constantly in the background, in a loop.
6 void matrix_scan_user(void){
7
8 #ifdef TAP_DANCE_ENABLE  // Run Diablo 3 macro checking code.
9 //  run_diablo_macro_check();
10 #endif // TAP_DANCE_ENABLE
11
12 #ifdef RGBLIGHT_ENABLE
13   matrix_scan_rgb();
14 #endif // RGBLIGHT_ENABLE
15
16   LEADER_DICTIONARY() {
17     leading = false;
18     leader_end();
19
20     SEQ_TWO_KEYS(KC_V, KC_Z){
21       // vim: Zoom pane
22       tap_code16(LCTL(KC_W));
23       tap_code16(LSFT(KC_BSLS));
24     }
25
26     SEQ_TWO_KEYS(KC_V, KC_R) {
27       // vim: Substitute and place cursor
28       SEND_STRING(":%s///g" SS_TAP(X_LEFT));
29       tap_code(KC_LEFT);
30       tap_code(KC_LEFT);
31     }
32
33     SEQ_TWO_KEYS(KC_V, KC_T) {
34      // vim: move current pane to new tab
35      tap_code16(LCTL(KC_W));
36      tap_code16(LSFT(KC_T));
37     }
38
39     SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){
40         // Reset the keyboard
41         reset_keyboard();
42     }
43   }
44
45   matrix_scan_keymap();
46 }