-
I tried to follow https://github.com/ggandor/lightspeed.nvim#notes to configure the plugin to use native ft during macro staff. It's just copy and paste. But both native ft and lightspeed ft don't work. Have I missed anything? " test.vim
if has('vim_starting')
set encoding=utf-8
endif
scriptencoding utf-8
if &compatible
set nocompatible
endif
let s:plug_dir = expand('/tmp/plugged/vim-plug')
if !filereadable(s:plug_dir .. '/plug.vim')
execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir)
end
execute 'set runtimepath+=' . s:plug_dir
call plug#begin(s:plug_dir)
Plug 'ggandor/lightspeed.nvim'
call plug#end()
PlugInstall | quit
nmap <expr> f reg_recording() . reg_executing() == "" ? "<Plug>Lightspeed_f" : "f"
nmap <expr> F reg_recording() . reg_executing() == "" ? "<Plug>Lightspeed_F" : "F"
nmap <expr> t reg_recording() . reg_executing() == "" ? "<Plug>Lightspeed_t" : "t"
nmap <expr> T reg_recording() . reg_executing() == "" ? "<Plug>Lightspeed_T" : "T"
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The problem might be that you |
Beta Was this translation helpful? Give feedback.
-
I tried it, and you're right, actually! This workaround screws up same-key repeat, I haven't thought about that, and for some reason no one has complained yet :) So for the moment, it only works if you set custom repeat keys in
Thanks for reporting this! I hope we'll come up with a permanent solution to the macro issue soon. |
Beta Was this translation helpful? Give feedback.
I tried it, and you're right, actually! This workaround screws up same-key repeat, I haven't thought about that, and for some reason no one has complained yet :) So for the moment, it only works if you set custom repeat keys in
opts
, but it could only be one key per direction, obviously - i.e.,f
/F
will repeat all 1-char searches, includingt
/T
. (Or you can use;
/,
of course.)require'lightspeed'.setup({instant_repeat_fwd_key = 'f', instant_repeat_bwd_key = 'F'})
Thanks for reporting this! I hope we'll come up with a permanent solution to the macro issue soon.