Skip to content

Commit

Permalink
Added display blurb.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjrae committed Apr 27, 2021
1 parent d4c7464 commit f668203
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [[#setup][Setup]]
- [[#adding-keybinds][Adding Keybinds]]
- [[#mac-support][Mac Support]]
- [[#displaying-modes][Displaying Modes]]

* About
This is project aims to emulate as much of vim as possible in QMK userspace. The idea is to use clever combinations of shift, home, end, and control + arrow keys to emulate vim's modal editing and motions.
Expand Down Expand Up @@ -231,3 +232,29 @@ Since Macs have different shortcuts, you need to set the =VIM_FOR_MAC= macro in
That being said I'm not a Mac user so it's all untested and I'd guess there are some issues.

If you are a Mac user and do encounter issues, feel free to put up a PR or an issue.

** Displaying Modes
To help remind you that you have vim mode enabled, there are two functions available.
The =vim_mode_enabled()= function which returns =true= is vim mode is active, and the =get_vim_mode()= function which returns the current vim mode.

In my keymap I use these to display the current mode on my OLED.
#+begin_src C
if (vim_mode_enabled()) {
switch (get_vim_mode()) {
case NORMAL_MODE:
oled_write_P(PSTR("-- NORMAL --\n"), false);
break;
case INSERT_MODE:
oled_write_P(PSTR("-- INSERT --\n"), false);
break;
case VISUAL_MODE:
oled_write_P(PSTR("-- VISUAL --\n"), false);
break;
case VISUAL_LINE_MODE:
oled_write_P(PSTR("-- VISUAL LINE --\n"), false);
break;
default:
oled_write_P(PSTR("?????\n"), false);
break;
}
#+end_src

0 comments on commit f668203

Please sign in to comment.