summaryrefslogtreecommitdiffstats
path: root/users/rverst
diff options
context:
space:
mode:
authorRobert Verst <github@verst.eu>2021-06-24 04:23:43 +0200
committerGitHub <noreply@github.com>2021-06-24 12:23:43 +1000
commit3099630a11ff64797deb4864193c37b3e4074e05 (patch)
tree48bca6cc2b5d7defc801070bea434ee00e08070e /users/rverst
parentdee50c9cc8673c6a12d80f3deb2f79c351b2ccd3 (diff)
[Keymap] Feature/extend keymap (#12778)
* Add F13-F24 * Add nvim macros * Add debug switch * Switch mode every time, add debug print
Diffstat (limited to 'users/rverst')
-rw-r--r--users/rverst/rules.mk2
-rw-r--r--users/rverst/rverst.c33
-rw-r--r--users/rverst/rverst.h6
3 files changed, 37 insertions, 4 deletions
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 (<c-w> 4>)
+ RV_VDEC, // vim decrease vertical split size (<c-w> 4<)
+ RV_SINC, // vim increase vertical split size (<c-w> 4+)
+ RV_SDEC, // vim decrease vertical split size (<c-w> 4-)
+ RV_SEQU, // vim equal split size (<c-w> =)
};
typedef union {