Closed Chillee closed 5 years ago
@FelikZ With the fully neovim backed version, yes!
The only motions that won't really be supported (I think) are the overwin motions, I believe.
With the fully neovim backed version, yes!
New to this, can you point to where the fully neovim backed version
lives ?
@davidovich Nowhere yet. It's still in development.
You can track the repo here https://github.com/Chillee/VSCodeNeovim
@paxy97 Thanks, this is what I meant by where
. I understand that it is still in development, but having a where can help trying things out :-)
I'm experimenting the g
command and m
command, but doesn't work at all, I can get what I want in vim, so I think I typed command right, anyone idea?
p.s. I installed the latest neovim and did both the configuration, and didn't have warning pop up, so I think neovim is recognized by vscode
I also tried cgn
and not work!. why?
This used to work, but I haven't been able to get any commands to work recently, on Windows or OSX. When I try anything more complicated than a 'move' command, I get E492: Not an editor command. <attempted command>
. Interestingly, this is the same error message I get when trying a bad command inside of neovim, but these are for perfectly acceptable commands. Was nvim integrations inadvertently disabled recently?
@mattaschmann Sorry, there was a refactoring that introduced this bug. It was fixed in https://github.com/VSCodeVim/Vim/pull/2347.
I'll push out a release tonight.
I'm all for integration between VSCodeVim and an actual vim. the number of times I'm switched between vim, atom's vim integration and VSCodeVim and had things work subtly (or even completely) differently is insane. Things like block selections especially seem to work completely differently in all three and I'm left wondering what I'm doing wrong every time.
I have been trying to setup Neovim for Visual Studio Code:
"vim.enableNeovim": true,
"vim.neovimPath": "C:\Program Files\Neovim\bin\nvim.exe"
I have copied the neovimPath from the explorer to make sure it is correct and checked that Neovim can start. However, the path is underlined in the Workspace Settings to indicate an error and there is a message when I restart VSCode,: "Unable to etup neovim instance. Check your path".
OS: Windows 7 32 bit VSCode version: 1.22.2 Neovim version: 0.2.2
Any ideas about what could be wrong?
hi all!
have same issue as @Orionsg! I have tried to integrate neovim into vscode (under macos) couple of times and failed to do that. would be nice to have/come up with latest howto on that.
ready to put some efforts into that
@ZuBB @Orionsg I believe you should escape the \
in path like this: D:\\Program Files\\Neovim\\bin\\nvim.exe
.
hey @DrakeXiang, thanks for reply.
I am on mac os x 10.13. unix uses next kind of slash/
. I thought I do not need to escape it. also a hint (provided by vscode) says same /usr/....
@DrakeXiang, thanks using extra backslashes escaping the backslash got rid of the error!
Replace command (current line and next lines) dosen't work?
ex) :.,+1s/foo/bar
VSCodeVim : 0.13.1 VSCode : 1.24.1 NeoVim : v0.30
Vertical blocks have many issues. When marking a vertical block with ctrl-v:
Yanking the block and pasting it (p) somewhere else inserts the block of text as if it is a normal block with new line characters rather than pasting the block at the column position where the cursor is (for each line in the vertical block).
Deleting the vertical block (d) does not copy the contents to the buffer so it can afterwards be pasted (p).
One cannot move the marked vertical block to the left or right with "<" or ">", respectively.
VSCode: 1.24.1 VSCodeVim: 0.14.1 NeoVim: 0.2.2
Using ":norm @@" command, the NeoVim macros are used, instead VSCode macros.
VSCode: 1.25 VSCodeVim: 0.14.2 NeoVim: 0.2.2
@dgaleazzo yeah, I have the same problem. Being able to record a macro and apply it to multiple lines is a killer-feature of vim's :normal
command, but with the current neovim integration it doesn't work.
This generally seems excellent - the main thing I've noticed is that :help
replaces file contents :(
I just started getting a weird bug where I can't escape from insert or visual mode. Esc doesn't do anything and Ctrl + [
just unindents the line. Turning neovim off fixes the problem.
Using Neovim crashes my VS Code. If I use any Ex-commands it freezes my editor window. I documented this a while ago: https://github.com/VSCodeVim/Vim/issues/3013
VSCode: 1.25 VSCodeVim: 0.16.9 NeoVim: 0.3.1
It’s reliable for me on Mac, but have similar freezing issues on Windows
Most likely Nvim is waiting for input. Does vscodevim check nvim_get_mode to see if it's in this state ("blocking" flag)? (This is a question for @Chillee or anyone who can inspect VSCode source code.)
Most likely Nvim is waiting for input. Does vscodevim check nvim_get_mode to see if it's in this state ("blocking" flag)?
How do I check this? Here is my log output under Output > Log (Extension Host)
: https://gist.github.com/jplew/35155adb2e1ff993f2fde9dca7efdbb8
No mention of nvim there.
UPDATE: I fixed it, i had a corrupted main.shada
file: https://github.com/VSCodeVim/Vim/issues/3013
Word boundary pattern \<
in visual range selection is not working.
command:
:'<,'>s/\<bar\>/baz/g
What I received:
E486: Pattern not found: \/baz
VSCode: 1.29.1 VSCodeVim: 0.16.12 NeoVim: 0.3.1
I have the same problem as @jplew described here.
Removing the main.shada
file and ~/.vimrc
didn't solve the issue, though. NeoVim doesn't show any error on startup. I've looked through the logs in VSCode but didn't see anything suspicious. Any idea what it could be?
VSCode: 1.30.1 vscodevim: v1.0.0 (2019-01-05) NVIM: v0.3.3 MacOS: 10.14.1
@andersennl sounds similar to https://github.com/VSCodeVim/Vim/issues/3323. Fixed was merged by @xconverge with a new release including said fix coming soon in v1.0.1
@jpoon v.1.0.1 fixed the issue. Thanks!
hi!!, i've been testing the integration and I have couple of questions:
1) where I can find the output when running commands? example :!ls -ltr
. When executing things, the prompt just returns to "normal mode" and i'm unable to see the output anywhere.
2) in insert mode, although ctrl-x ctrl-l does work for me, ctrl-x ctrl-f for file/directory completion does not, is this feature supported?
thank you!
I copy my settings.json between machines. Is there a way to define declare neovimPath differently for linux and windows?
I hope the neovim integration can use the style as what oni do, when input ":" "/". https://www.onivim.io/
What about the echo command? and the source command? I feel like it could exploit at least half of the potential of neovim, but it doesn't currently.
@eyalk5 Nvim 0.4.0 (unstable/development version) introduced the ext_messages
UI API for that purpose. In case any VSCodeVim contributor wants to add support for that.
:help ui-options
OK, I am not sure I fully understand(after installing this version) what does it mean. But I am glad it will be implemented. In any case, the lack of response for some commands that either fail or succeed is a major problem currently. And of course, supporting the defined keyboard mapping inside nvim is essential. This way my beloved customizations (in vimrc) could be applied. I might try to help to implement this.
I can't set up neovim integration successfully. I received message:
Configuration: Invalid neovimPath. spawn /usr/bin/nvim ENOENT.
I have already added "vim.enableNeovim": true
and "vim.neovimPath": "/usr/bin/nvim"
to my settings.json
, and checked that nvim
indeed is located in /usr/bin/
VSCode version: 1.36.1 OS: Linux Mint 19.1 VSCodeVim: 1.9.0 NeoVim: 0.3.8
I can't set up neovim integration successfully. I received message:
Configuration: Invalid neovimPath. spawn /usr/bin/nvim ENOENT.
I have already added
"vim.enableNeovim": true
and"vim.neovimPath": "/usr/bin/nvim"
to mysettings.json
, and checked thatnvim
indeed is located in/usr/bin/
VSCode version: 1.36.1 OS: Linux Mint 19.1 VSCodeVim: 1.9.0 NeoVim: 0.3.8
I figured out this error is caused by flatpak's sandbox feature, tried to give additional options to flatpak to run VSCode but got no luck. I switch to VSCodium, which is a branch of VSCode, and also distributed without flatpak option. And It's all work now.
EDIT: Add Microsoft VSCode ppa from these instructions, then install from package manager, the VSCode is also non-flatpak, dont't know how I get a flatpak version VSCode :P
I can't set up neovim integration successfully. I received message:
Configuration: Invalid neovimPath. spawn /usr/bin/nvim ENOENT.
I have already added
"vim.enableNeovim": true
and"vim.neovimPath": "/usr/bin/nvim"
to mysettings.json
, and checked thatnvim
indeed is located in/usr/bin/
VSCode version: 1.36.1 OS: Linux Mint 19.1 VSCodeVim: 1.9.0 NeoVim: 0.3.8
Same problem with vscode remote ssh. I installed nvim on my remote linux server, but this error keeps me from using neovim intergration.
@CavalloneChen Is your vscode flatpak version?
@CavalloneChen Is your vscode flatpak version?
Honestly I don't know. I'm using the build downloaded from Vscode's official website.
@CavalloneChen Is your vscode flatpak version?
Honestly I don't know. I'm using the build downloaded from Vscode's official website.
Execute flatpak list
in terminal, and check if there is a line like this com.visualstudio.code
================================
I guess you download a .deb file from the visual studio code website, that's how I get a flatpak version vscode. I uninstalled the flatpak version vscode first, and manually add package repository then install vscode from package manager. ( referenced from here: https://code.visualstudio.com/docs/setup/linux )
I copied the installation commands for you:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code
P.S. Commands uninstall the flatpak version vscode:
flatpak uninstall <the vscode name shown in 'flatpak list', e.g. com.visualstudio.code.oss>
@CavalloneChen Is your vscode flatpak version?
Honestly I don't know. I'm using the build downloaded from Vscode's official website.
Execute
flatpak list
in terminal, and check if there is a line like thiscom.visualstudio.code
================================
I guess you download a .deb file from the visual studio code website, that's how I get a flatpak version vscode. I uninstalled the flatpak version vscode first, and manually add package repository then install vscode from package manager. ( referenced from here: code.visualstudio.com/docs/setup/linux )
I copied the installation commands for you:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/ sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' sudo apt-get install apt-transport-https sudo apt-get update sudo apt-get install code
P.S. Commands uninstall the flatpak version vscode:
flatpak uninstall <the vscode name shown in 'flatpak list', e.g. com.visualstudio.code.oss>
Thanks for your explanations, I really appreciate your effort. I found that I made a fundamental mistake. I pointed the neovim path to the neovim installed on my remote machine, but the local neovim path should be pointed instead. My problem was solved after I changed to the local path.
I am perfectly happy with current vscodevim as far as my current knowledge of vim goes, great job. Yet to be honest I'm a bit surprised you're trying to implement vim and neovim emulation into vscode natively, wouldn't it be easier (but also better for long-term maintenance) to connect to full neovim through server mode and basically have neovim do all the work for you, so that you're not really emulating [neo]vim, you're actually using it, just with vscode as frontend? Or have I misinterpreted what's currently possible through neovim APIs?
By the way, for those that oppose this "because minimalism", I would note that baking neovim's functionalities into vscodevim doesn't make it any lighter than bundling neovim with it (the code's getting in either way), nor any simpler for the user (as long as it's installed automatically with it). It only makes it harder for the devs that maintain the plugin.
@Mirag-e There is a project to do just this (https://github.com/Chillee/VSCodeNeovim) but it's been dead for a while. You might find https://github.com/onivim/oni2 interesting also.
thanks for the pointers, oni2 seems super interesting, though i'm a bit sad it's not fully open source. I guess that's the price to pay when you don't have microsoft paying your main developers.
I wish VSCodeNeovim was active. I'd work on it myself if I have the time, but, alas...
Ex commands may be useful, but I've never actually used them. The VSCodeVim plugin seems to work well a lot of the time, but I find it to be a bit finicky sometimes, which is why I personally would love to see neovim power it.
Oni2 looks super interesting, since they intend to support vscode extensions and configuration... and for $20, I don't mind speculating that the project will work out. Time will tell.
Oni2 looks super interesting, since they intend to support vscode extensions and configuration... and for $20, I don't mind speculating that the project will work out. Time will tell.
I'm not trying to discourage you to support this cool project. Just FYI after using Oni (1) I dropped it fairly quickly. (it was finicky about what neovim versions I had installed and it was buggy)
Oni2 looks super interesting, since they intend to support vscode extensions and configuration... and for $20, I don't mind speculating that the project will work out. Time will tell.
I'm not trying to discourage you to support this cool project. Just FYI after using Oni (1) I dropped it fairly quickly. (it was finicky about what neovim versions I had installed and it was buggy)
Thanks for the heads up. It seems they've taken a different approach with Oni2 though, using libvim instead of neovim. I read somewhere that the choice was because of integration issues with neovim.
You may already know this, but it seems like if you have supported Oni1, you will have access to Oni2 https://onivim.github.io/docs/other/faq#i-already-backed-onivim-1-do-i-need-to-pay-again so hopefully your support for Oni1 will be worth it if Oni2 is successful.
I installed Neovim and set it active in order to be able to use regular expressions in the substitute command. However, it does not seem to work for the substitute or global command.
If I use:
":%s/^/<p>/g" (to insert a p tag in the beginning of all lines)
or
":g/^\s*$/d" (to remove all blank lines)
I get the error: "TaskQueue: Error running task. Failed to handle key= . nvim_buf_set_lines: Wrong type for argument 1, expecting Buffer."
Any ideas about how to make this work?
I installed Neovim and set it active in order to be able to use regular expressions in the substitute command. However, it does not seem to work for the substitute or global command.
If I use:
":%s/^/<p>/g" (to insert a p tag in the beginning of all lines) or ":g/^\s*$/d" (to remove all blank lines)
I get the error: "TaskQueue: Error running task. Failed to handle key= . nvim_buf_set_lines: Wrong type for argument 1, expecting Buffer."
Any ideas about how to make this work?
+1 @Orionsg This feature had been working for me for quite some time but it has been broken recently :/ Similar error message about nvim_buf_set_lines
tried upgrading neovim to no avail. I'm thinking it's a bug.
One thing I miss is netrw being able to open a url with gx
is really nice.
We have now added Neovim integration for Ex-commands. Enable it with
vim.enableNeovim
. Note that you must have neovim installed for this to work.What are opinions on neovim being an optional dependency / maybe becoming a mandatory dependency down the line? We might be able to bundle it together with the extension down the line.
People clearly want neovim support. What are the main reasons for that? In other words, what features from neovim integration would you guys like to see implemented first?
Also, please come to http://vscodevim.slack.com! We'd love to hear discussion in there (discussion/feedback tends to be a bit quicker in there).