Skip to content

Commit 32d1e28

Browse files
authored
Update README.md
1 parent 6a6d7ff commit 32d1e28

File tree

1 file changed

+125
-12
lines changed

1 file changed

+125
-12
lines changed

README.md

Lines changed: 125 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<p align="center">
77
<a href="LICENSE.md"><img alt="Software License" src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square"></a>
88
<a href="https://github.com/BooleanCube/keylab.nvim/actions"><img alt="Actions" src="https://img.shields.io/github/actions/workflow/status/BooleanCube/keylab.nvim/main.yml?style=flat-square&branch=master"></a>
9-
<a href="https://github.com/BooleanCube/keylab.nvim"><img alt="Visit counter" src="https://img.shields.io/github/search/BooleanCube/keylab.nvim/goto?style=flat-square"></a>
109
<a href="doc/keylab.txt"><img alt="Doc" src="https://img.shields.io/badge/doc-%3Ah%20keylab.txt-brightgreen.svg?style=flat-square"></a>
10+
<a href="https://github.com/BooleanCube/keylab.nvim"><img alt="Visit counter" src="https://img.shields.io/github/search/BooleanCube/keylab.nvim/goto?style=flat-square"></a>
1111
<a href="https://github.com/BooleanCube/keylab.nvim"><img alt="size" src="https://img.shields.io/github/repo-size/BooleanCube/keylab.nvim.svg?style=flat-square"></a>
1212
</p>
1313
</a>
@@ -16,32 +16,145 @@
1616
----
1717
<br>
1818

19+
> CPM means characters per minute (similar measurement to words per minute). I used CPM instead of WPM to produce more accurate results since the concept of "words" in programming languages isn't clear.
20+
21+
<br>
22+
23+
![image](https://github.com/BooleanCube/keylab.nvim/blob/f794722563d454a756147aaad94a9034dfd42272/doc/usage.gif)
24+
25+
<br>
26+
1927
<p>
2028
keylab.nvim aims to aid new neovim users to boost their productivity by practicing their keybinding configurations multiple times. When used enough times, improvements in typing ability are noticeable.
2129
</p>
2230
<p>
2331
keylab.nvim also serves as a plugin to measure the user's coding speed. Similar to <code>https://www.speedtyper.dev/ (by codicocodes)</code>, except this has custom scripts and your personal vim configuration as possible options. Measure your true coding speed on neovim and aim for even higher results. All languages supported by your neovim configuration, are also supported.
2432
</p>
2533

26-
### Example
27-
![image](https://github.com/BooleanCube/keylab.nvim/blob/f794722563d454a756147aaad94a9034dfd42272/doc/usage.gif)
34+
## Features
35+
- Customizable configuration and setup
36+
- Simple mechanics and free controls (easy-to-use)
37+
- Multilingual support
38+
- Clean documentation
39+
- Efficient & optimized plugin
2840

29-
### Suggestions
41+
## Tips
3042
<p>
31-
To use keylab.nvim effectively, I would suggest 3-5 coding sessions everyday before you get into work. Try to beat your past session in every session you play. In less than a week's time, you will realise how much you have improved over a short time period.
43+
To use keylab effectively, I would suggest 3-5 practice sessions everyday before you get into work. Try to beat your past session in every session you play and keep your average CPM high. In less than a week's time, you will realise how much you have improved over a short time period.
3244
</p>
3345
<p>
34-
My biggest improvements were: being able to locate and press weird keys (like ">(#{") without having to look at your keyboard. I also saw a decent increase in accuracy which means I don't mess up on weird keys that often anymore.
46+
My biggest improvements were: being able to locate and press weird keys (like ">(#{") without having to look at the keyboard. I also saw a decent increase in accuracy which means I don't mess up on weird keys that often anymore.
3547
</p>
3648

37-
### TODO
49+
## Setup
50+
### Prerequisites
51+
<p>
52+
<b>Make sure to check you have <code>nvim >= 0.9</code> (with <code>nvim -v</code>) for full lua support.</b><br>
53+
</p>
54+
<p>
55+
<b>Keylab also requires <a href="https://github.com/nvim-lua/plenary.nvim">plenary.nvim</a> dependencies to store performance data and development testing (in case you want to contribute).</b><br>
56+
If you are using <a href="https://github.com/nvim-telescope/telescope.nvim">telescope.nvim</a>, you have probably already installed plenary dependencies before which means you won't have to install it again.
57+
</p>
58+
59+
### Installation
60+
<p>
61+
Use your plugin manager of choice to install keylab after checking the prerequisites:
62+
</p>
63+
<p>
64+
65+
<details>
66+
<summary>Packer</summary>
67+
68+
1. Paste the following template in your `vimrc` file:
69+
```lua
70+
return require('packer').startup(function(use)
71+
use { 'BooleanCube/keylab.nvim', requires = 'nvim-lua/plenary.nvim' }
72+
73+
-- without plenary.nvim
74+
use 'BooleanCube/keylab.nvim'
75+
end)
76+
```
77+
2. Run `:PackerInstall` in neovim to install the plugin.
78+
</details>
79+
80+
81+
<details>
82+
<summary>Vim-Plug</summary>
83+
84+
1. Paste the following template in your `vimrc` file:
85+
```vim
86+
call plug#begin()
87+
Plug 'BooleanCube/keylab.nvim'
88+
89+
" ignore if you don't need plenary.nvim
90+
Plug 'nvim-lua/plenary.nvim'
91+
call plug#end()
92+
```
93+
2. Run `:PlugInstall` in neovim to install the plugin
94+
</details>
95+
96+
97+
<details>
98+
<summary>Vundle</summary>
99+
100+
1. Paste the following template into your `vimrc` file:
101+
```vim
102+
call vundle#begin()
103+
Plugin 'BooleanCube/keylab.vim'
104+
105+
" ignore if you don't need plenary.nvim
106+
Plugin 'nvim-lua/plenary.nvim'
107+
call vundle#end()
108+
```
109+
2. Run `:PluginInstall` in neovim to install the plugin
110+
</details>
111+
112+
</p>
113+
114+
### Plugin Configuration
115+
- Plugin configuration with Lua:
116+
```lua
117+
local keylab = require("keylab")
118+
keylab.setup({
119+
LINES = 15, -- 10 by default
120+
force_accuracy = false, -- true by default
121+
correct_fg = "#FFFFFF", -- #B8BB26 by default
122+
wrong_bg = "#000000" -- #FB4934 by default
123+
})
124+
```
125+
126+
- Plugin configuration with Vimscript:
127+
```vim
128+
" idk vimscript lmfao
129+
lua << EOF
130+
local keylab = require("keylab")
131+
keylab.setup({
132+
LINES = 10,
133+
force_accuracy = true,
134+
correct_fg = "#B8BB26",
135+
wrong_bg = "#FB4934"
136+
})
137+
EOF
138+
```
139+
140+
### Keybinding
141+
- Keybinding the start function in Lua:
142+
```lua
143+
vim.keymap.set('n', '<leader>kl', require('keylab').start, { desc = "Start a keylab session" })
144+
```
38145

39-
### INTRODUCTION
146+
- Keybinding the start function in Vimscript:
147+
```vim
148+
nnoremap <leader>kl <cmd>KeylabStart<cr>
149+
```
40150

41-
### QUICK START / INSTALLATION
42151

43-
### FEATURES
152+
### TODO
153+
- [ ] Fix custom highlighting options
154+
- [ ] add more configuration options ()
155+
156+
----
44157

45-
### DOCUMENTATION
158+
> "The only way to learn a new programming language is by writing programs in it."<br>- Dennis Ritchie
46159
47-
###
160+
*Created by BooleanCube ;]*

0 commit comments

Comments
 (0)