Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
juliekoubova committed Jun 30, 2024
1 parent 166888a commit 7172404
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 6 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Julie's QMK Userspace

Hey everyone, this is my QMK userspace.
Hey everyone, this is my [QMK userspace](https://docs.qmk.fm/newbs_external_userspace).

# Vim Mode

Perchance you're interested in my Vim mode. It is pretty comprehensive, if I dare
say so myself. I have built it for my 60% keyboard, and also to reduce the differences
switching between Windows, Linux, and macOS all day long.
say so myself. I have built it for my 60% keyboard, and also to reduce the
differences switching between Windows, Linux, and macOS all day long.

It uses a single `QK_VIM` keycode—I have this mapped on my `Caps Lock` key.

Expand Down
2 changes: 1 addition & 1 deletion keyboards/keychron/q4/ansi/keymaps/juliekoubova/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
static bool is_apple = false;

bool process_detected_host_os_user(os_variant_t os) {
dprintf("OS detected: %d\n", os);
dprintf("OS detected: %d\n", detected_os);
is_apple = os == OS_MACOS || os == OS_IOS;
vim_set_apple(is_apple);
return true;
Expand Down
42 changes: 42 additions & 0 deletions users/juliekoubova/vim/sequence.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* Copyright 2024 (c) Julie Koubova (julie@koubova.net)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "sequence.h"
#include <stddef.h>
#include <stdint.h>

#define VIM_SEQUENCE_MAX 512

typedef struct {
int8_t repeat;
size_t current;
size_t count;
uint16_t codes[VIM_SEQUENCE_MAX];
} vim_sequence_t;

static vim_sequence_t sequence = {};

void vim_queue_sequence(const uint16_t* codes, size_t count, int8_t repeat) {
if (count > VIM_SEQUENCE_MAX) {
count = 0;
}
sequence.repeat = repeat;
sequence.current = 0;
sequence.count = count;
if (count > 0) {
}
}

19 changes: 19 additions & 0 deletions users/juliekoubova/vim/sequence.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Copyright 2024 (c) Julie Koubova (julie@koubova.net)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once


0 comments on commit 7172404

Please sign in to comment.