Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question]: purpose of "forcing normal mode" in filetype normal mode mapping #242

Open
CrispyDrone opened this issue Dec 4, 2023 · 2 comments
Labels

Comments

@CrispyDrone
Copy link

CrispyDrone commented Dec 4, 2023

I just have a simple questiona about what the purpose is of <C-\><C-n> in this normal mode mapping? We're already in normal mode, and by using <nowait> I assume it's also not possible to exit normal mode before the mapping would apply?

execute 'nnoremap '.s:nowait.'<buffer><silent> <C-n> <C-\><C-n>j:call feedkeys("p")<CR>'
execute 'nnoremap '.s:nowait.'<buffer><silent> <C-p> <C-\><C-n>k:call feedkeys("p")<CR>'

Thanks!

edit: Oh, I just realized that for versions of vim 703 or older s:nowait is empty, so maybe in those cases it could be possible to leave normal mode.

@justinmk
Copy link
Owner

justinmk commented Dec 4, 2023

That might be an oversight. Is it causing an issue?

@CrispyDrone
Copy link
Author

I've been using vim-dirvish for a couple of years and haven't experienced any issues. I was just curious :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants