I've used vim-tiny (default Vim 9.1 version bundled on Debian and Ubuntu) on a couple of occasions and I was surprised that <leader> mappings don't work at all.
I cannot set mapleader using legacy Vimscript (e.g., let mapleader = "," or let g:mapleader = ",") because the +eval feature is missing, so the let statement is not available. Changing the leader with Vim9script syntax (g:mapleader = ",") doesn't throw an error, but it doesn't seem to have any effect either. This is documented, so no surprises here.
I can create leader mappings (e.g., nnoremap <leader>b <cmd>buffers<CR>), and I can see that they are configured correctly (:nmap <leader>b prints the correct mapping), but I cannot trigger them, neither with the custom leader (e.g., ,), nor with the default \, which is documented to be used as a fallback in case g:mapleader is empty or not set.
Since there's no way to change g:mapleader without +eval, leaving it empty, I would have expected Vim to fallback on the default \ leader, and for the leader mappings to work.
My questions:
vim-tiny?+eval feature, at least with the default \ leader?mapleader without the +eval feature?Thanks!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I am afraid this is not supported for a minimum Vim feature set.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I understand, thank you for confirming!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
You can still map say nnoremap ,a :edit #<CR> similar to a common mapleader of , comma.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()