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

firenvim has weird problem on firefox #1538

Open
gaofengnan opened this issue May 18, 2023 · 2 comments
Open

firenvim has weird problem on firefox #1538

gaofengnan opened this issue May 18, 2023 · 2 comments

Comments

@gaofengnan
Copy link

gaofengnan commented May 18, 2023

  • OS Version: MacOS Ventura 13.3.1(a)
  • Browser Version: Firefox 113.0.1
  • Browser Addon Version: 0.2.14 firefox add-on store version of Nov 5, 2022
  • Neovim Plugin Version: newest (how do I check the version number?)

What I tried to do

I tried to use it in Firefox.

What happened

I spent the past two hours trying to figure out why Firenvim does not work in Firefox, while knowing that it works well in my Edge. What I discovered was that if I comment out the following lines in my init.vim, it works in Firefox.

  let g:firenvim_config = {
      \ 'globalSettings': {
          \ 'alt': 'all',
      \  },
      \ 'localSettings': {
          \ '.*': {
              \ 'cmdline': 'neovim',
              \ 'priority': 0,
              \ 'selector': 'textarea',
              \ 'takeover': 'never',
          \ },
      \ }
  \ }

Please note that it works in Edge regardless whether these above lines are commented out. But why? It makes no sense. Especially since the same above setting works well on Firefox in my Windows machine. I don't have /tmp/stdin or /tmp/stdout on my problematic Mac machine, in case you would ask me for them.

What is even more peculiar is that even when it works (when the above config is commented out), it does not work well. For instance, when I click in a text box, firenvim jumps out (which is not what I desire but the config file to disable such behaviour is commented out), but when I :x to close the nvim instance, I cannot call it by the add-on shortcut. Only if I go to another tab and come back, a new nvim instance pops up.

None of the weird things happened on my Windows machine, and I don't know what is wrong.

@glacambre
Copy link
Owner

I think the problem might that you have windows-style line endings in your init.vim while you need them to be unix-style on mac/linux. Could you open your init.vim in neovim, run :set ff=unix, :write the file, close it and then restart your browser and attempt to use firenvim again?

@gaofengnan
Copy link
Author

I think the problem might that you have windows-style line endings in your init.vim while you need them to be unix-style on mac/linux. Could you open your init.vim in neovim, run :set ff=unix, :write the file, close it and then restart your browser and attempt to use firenvim again?

No, I just tried. I have attached both my vimrc and init.vim files.
vimrc.txt
init.vim.txt

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

No branches or pull requests

2 participants