Closed chocopie closed 4 months ago
vim's default
[[
and]]
(jump to start/end of file)
[[
and ]]
don't jump to start/end of the file, instead they jump the cursor to the previous/next "section". (See :help [[
)
As noted in https://github.com/junegunn/vim-plug?tab=readme-ov-file#usage, vim-plug runs filetype plugin indent on
and it effectively loads the definition of a "section" for each file type, and [[
and ]]
starts working as expected (section-aware).
Having vim-plug running seems to coincide with vim's default
[[
and]]
(jump to start/end of file) commands not working, thoughgg
andG
still work fine.I wasn't able to find any reference to this in the Issues or FAQ, but I feel I can't be the only one running into this problem.
How I tested this to make sure it wasn't another plugin like goyo.vim and limelight.vim:
vim -u NONE
to check that the default commands actually do work. They do.-u NONE
. Running with the vim-plug calls in my .vimrc breaks[1] the default commands.-u NONE
. Same results as #2.-u NONE
. Default commands work in both.Does vim-plug regard
[
and]
as reserved characters? Does pressing it once trigger some special listening process that makes it not recognise the next keypress? Sorry, I'm not super technical, and am not sure how to go about diagnosing and fixing this from here, but I hope this info is useful to someone smarter? 🙏In case it matters, I tested with Terminal Vim 9.0.1023 on OSX Monterey and Terminal Vim 9.0.1182 on Linux (Manjaro).
[1] Sometimes it works but you have to mash the parentheses key a few times, or press the key once and count to three before pressing again. Other times the keys don't register at all.