From 3099630a11ff64797deb4864193c37b3e4074e05 Mon Sep 17 00:00:00 2001 From: Robert Verst Date: Thu, 24 Jun 2021 04:23:43 +0200 Subject: [Keymap] Feature/extend keymap (#12778) * Add F13-F24 * Add nvim macros * Add debug switch * Switch mode every time, add debug print --- users/rverst/rules.mk | 2 ++ users/rverst/rverst.c | 33 ++++++++++++++++++++++++++++++--- users/rverst/rverst.h | 6 +++++- 3 files changed, 37 insertions(+), 4 deletions(-) (limited to 'users/rverst') diff --git a/users/rverst/rules.mk b/users/rverst/rules.mk index 91b096aede..2b8fe92959 100644 --- a/users/rverst/rules.mk +++ b/users/rverst/rules.mk @@ -5,3 +5,5 @@ MOUSEKEY_ENABLE = no LTO_ENABLE = yes CONSOLE_ENABLE = yes UNICODEMAP_ENABLE = yes +COMMAND_ENABLE = no + diff --git a/users/rverst/rverst.c b/users/rverst/rverst.c index 23391caa6a..2cbffbc478 100644 --- a/users/rverst/rverst.c +++ b/users/rverst/rverst.c @@ -39,9 +39,7 @@ uint8_t get_mode(void) { } void set_mode(uint8_t mode, bool save) { - if (mode == get_mode()) { - return; - } + dprintf("set_mode - mode: %d, save: %s\n", mode, save ? "true" : "false"); switch_mode(mode); if (mode > 7) { @@ -392,6 +390,35 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { send_unicode_string("³"); } return false; + // vim equal split + case RV_SEQU: + tap_code16(C(KC_W)); + tap_code(KC_EQL); + return false; + // vim vertical split increase + case RV_VINC: + tap_code16(C(KC_W)); + tap_code(KC_4); + tap_code16(S(KC_DOT)); + return false; + // vim vertical split decrease + case RV_VDEC: + tap_code16(C(KC_W)); + tap_code(KC_4); + tap_code16(S(KC_COMM)); + return false; + // vim split increase + case RV_SINC: + tap_code16(C(KC_W)); + tap_code(KC_4); + tap_code16(S(KC_EQL)); + return false; + // vim split decrease + case RV_SDEC: + tap_code16(C(KC_W)); + tap_code(KC_4); + tap_code(KC_MINS); + return false; } return true; diff --git a/users/rverst/rverst.h b/users/rverst/rverst.h index b7aea556c2..2e46d41d06 100644 --- a/users/rverst/rverst.h +++ b/users/rverst/rverst.h @@ -55,7 +55,11 @@ enum userspace_keycodes { RV_SUP1, // ¹ RV_SUP2, // ² RV_SUP3, // ³ - + RV_VINC, // vim increase vertical split size ( 4>) + RV_VDEC, // vim decrease vertical split size ( 4<) + RV_SINC, // vim increase vertical split size ( 4+) + RV_SDEC, // vim decrease vertical split size ( 4-) + RV_SEQU, // vim equal split size ( =) }; typedef union { -- cgit v1.2.3