2019-10-23 00:00:37 +02:00
|
|
|
*vim-combo.txt* Tracks keypresses in vim to build up combos
|
2021-01-30 22:48:08 +01:00
|
|
|
_______________________________________________________________
|
|
|
|
________________________________________________________________
|
|
|
|
__________________/\\\___________________________________________
|
|
|
|
_____/\\\____/\\\_\///_____/\\\\\__/\\\\\_________________________
|
|
|
|
_____\//\\\__/\\\___/\\\__/\\\///\\\\\///\\\_______________________
|
|
|
|
_______\//\\\/\\\___\/\\\_\/\\\_\//\\\__\/\\\_______________________
|
|
|
|
_________\//\\\\\____\/\\\_\/\\\__\/\\\__\/\\\_______________________
|
|
|
|
___________\//\\\_____\/\\\_\/\\\__\/\\\__\/\\\_______________________
|
|
|
|
_____________\///______\///__\///___\///___\///________________________
|
|
|
|
______________________________________________/\\\______________________
|
|
|
|
______________________________________________\/\\\______________________
|
|
|
|
_______________________________________________\/\\\______________________
|
|
|
|
____/\\\\\\\\_____/\\\\\_______/\\\\\__/\\\\\___\/\\\____________/\\\\\____
|
|
|
|
___/\\\//////____/\\\///\\\___/\\\///\\\\\///\\\_\/\\\\\\\\\____/\\\///\\\__
|
|
|
|
___/\\\__________/\\\__\//\\\_\/\\\_\//\\\__\/\\\_\/\\\////\\\__/\\\__\//\\\_
|
|
|
|
___\//\\\________\//\\\__/\\\__\/\\\__\/\\\__\/\\\_\/\\\__\/\\\_\//\\\__/\\\__
|
|
|
|
_____\///\\\\\\\\__\///\\\\\/___\/\\\__\/\\\__\/\\\_\/\\\\\\\\\___\///\\\\\/___
|
|
|
|
________\////////_____\/////_____\///___\///___\///__\/////////______\/////_____
|
|
|
|
=================================================================================
|
|
|
|
|
2019-10-26 16:33:36 +02:00
|
|
|
Each keystroke in insert mode increases your combo,
|
2021-01-30 22:48:08 +01:00
|
|
|
but not typing for 1 second (configurable) resets it.
|
2019-11-02 00:39:34 +01:00
|
|
|
The script is triggered whenever a text edit is detected in insert mode.
|
2019-10-22 14:58:32 +02:00
|
|
|
|
2019-11-02 02:33:20 +01:00
|
|
|
Progress is tracked per filetype (and stored in ~/.vim/.combo/).
|
2021-01-30 22:48:08 +01:00
|
|
|
By defa
|
2019-11-02 05:08:03 +01:00
|
|
|
displayed, where
|
|
|
|
x is the current score
|
|
|
|
y is the best score for this filetype
|
|
|
|
z is the best score across all filetypes
|
|
|
|
When a new high score is achieved, it is automatically saved.
|
|
|
|
Each 10 points increases a combo bar next to the scores
|
2019-10-22 14:58:32 +02:00
|
|
|
|
2021-01-30 22:48:08 +01:00
|
|
|
A string with your current score and your best score is kept in g:combo.
|
|
|
|
You can at any time show your score by running
|
|
|
|
:echo g:combo
|
|
|
|
If you have a custom statusline, you can show current combo score there by
|
|
|
|
displaying g:combo. You can access best combo in g:combo_best and current
|
|
|
|
score in g:combo_counter, display them how you prefer.
|
|
|
|
|
|
|
|
If you just want to show your combo you can add
|
|
|
|
set statusline=%{g:combo}
|
|
|
|
to your .vimrc, but a plain statusline won't look very nice by itself.
|
|
|
|
|
|
|
|
You can change g:timeout to increase or decrease combo timeout.
|
|
|
|
|
|
|
|
If you get errors at launch, check wether you have a .vim folder in your home
|
|
|
|
folder and wether a .combo folder exists inside.
|
2019-10-26 16:33:36 +02:00
|
|
|
|
|
|
|
If you think you can help this little script, absolutely do contact me!
|
2021-01-30 22:48:08 +01:00
|
|
|
There is a github (https://github.com/alemigliardi/vim-combo).
|
2019-10-23 00:00:37 +02:00
|
|
|
|
|
|
|
vim:tw=78:ts=8:ft=help:norl:
|