autocmd BufNewFile,BufReadPost *.txt noremap <buffer> <silent> k gk
autocmd BufNewFile,BufReadPost *.txt noremap <buffer> <silent> j gj
autocmd BufNewFile,BufReadPost *.txt noremap <buffer> <silent> 0 g0
autocmd BufNewFile,BufReadPost *.txt noremap <buffer> <silent> $ g$
If you want this for all filetypes, just remove everything before "noremap". noremap <buffer> <silent> k gk
noremap <buffer> <silent> j gj
noremap <buffer> <silent> 0 g0
noremap <buffer> <silent> $ g$ python 3.10: 60s
python 3.11: 46s
pypy 3.9.12: 6s
Looks like pypy performs comparatively better on x86_64
> The library also supports recognizing two-finger simultaneous swipe input through the SwipeEngine::recognize_multi method.
[0]: https://gitlab.futo.org/keyboard/swipe-library#inputs