a semantic key map for nvim designed for the workman keyboard layout
- nvim version > 0.5
- (optional) a comment plugin that supports
gcc
andgcip
- Install with your favorite package manager
- Add the following lua code to your vim config
-- Use this setup config if you want to follow the keymap above
local unruly_worker = require('unruly-worker')
unruly_worker.setup({
-- default true
enable_lsp_map = true,
enable_select_map = true,
enable_quote_command = true,
enable_easy_window_navigate = true,
-- default false
enable_comment_map = true, -- requires a comment plugin (see DEPENDENCIES above)
enable_wrap_navigate = true,
enable_visual_navigate = true,
})
Type :help unruly-worker
for documentation that includes mnemonics for each
remap, as well as descriptions about the optional configurations.
Type help uw_(some key)
for documentation about the default for a specific key.
For example uw_S
will go to documentation for the S
keymap.
For example uw_c-a
will go to documentation for the <C-a>
keymap.
- Map
j
to Find by filename with fzf or telescope - Map
J
to Find text in file with fzf or telescope - Visual Map
s
to<Plug>SurroundAddVisual
with surround.nvim- a game changer when coupled with
enable_select_map = true
, hits
to select thens
again to surround
- a game changer when coupled with
- When possible, commands are positioned according to the workman layout heatmap. So frequent use will not strain your hands.
- When possible, commands are arranged onto a semantic key. This makes it possible for the keymap to be remembered with mnemonic phrases.
- When possible, keys behavior, or behavior substitute, should stay in the same position as the original-keymap, so that there is no need for experienced vim users to unlearn there years of muscle memory.
- visual up and down
- wrap left and right
- easy split window navigation
- easy shifting line(s) up and down
- a visual keymap cheat sheet (above)
- 1 key word and paragraph select
- 1 key toggle comment line and toggle comment paragraph
- easy to shift the current line to the top, middle, or bottom of the view
- the ability to customize features using lua
- nvim LSP key bindings
- prev/next diagnostic
- go to definition
- code-action
- format
- rename
- hover
Being dyslexic has taught me its often easier for me to build a system for myself than it is to learn a system that works well for everyone else. This usually isn't my first approach when trying to learn something new, but when the struggle is real, I inevitably decide its time to reinvent the wheel. I think the creation of this keymap is a good example of how my learning style tends to unfold in my life.
After using vim as my only editor for more than 7 years I continued to have trouble remembering commands. I was proficient enough for my needs, but my skills plateaued far short of where I wanted them to be. I tried to improve using numerous different tips I found online, but I never quite felt happy with my progress.
Unrelated to vim, I decided to learn the workman layout.
This decision forced me to consider how to remap a few keys, but one thing lead
to another and eventually I had created an entirely new layout, the
unruly-worker layout. The process of creating this keymap lead to me spending about
a year reading :help
and scouring the internet for vim config gems. Which
probably seems ridiculous for many people, but for me its just how I've had to
do most things in life. The time feels well used, because I spent the last decade
writing code and I don't plan to stop for many decades to come. Now I've been using
this layout for more than A year at the time of writing this plugin. Unlike
my first 7 years with vim, I can now remember the keymap well enough to experience the
sensation of manipulating the text without noticing that my hands, or
keyboard keys, or even that vim itself has anything to do with it. For me vim
was always the right tool for the job, unruly-worker is just a
jig that makes the tool fit perfectly into my workflow.
Dyslexia may or may not have been what made it so hard for me to learn vim, but it has normalized the process of reinventing wheels to learn for me. The unruly-worker layout, is a classic example of the type of outcomes that my somewhat accidental process produces. A tool that may not be useful for anyone else, but makes a tool that is useful to many other people accessible to me.
Suggestions, Critique, and Spellcheck are always appreciated :)
See the Contributing Guite
If you like this project star the GitHub repository :)
- create a
:UnrulySchool
command that has an interactive tutorial