Vim: ":m <any number>" produces "E492: Not an editor command"

Created on 24 Jul 2018  路  12Comments  路  Source: VSCodeVim/Vim

Describe the bug
:m command is not working as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any line
  2. Try moving a line using :m

Expected behavior
Line will be moved.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 0.15.6
  • VSCode version: 12.5.1
  • OS: Windows 10
kinquestion statuneeds-more-info

Most helpful comment

@fengbo123 Solved for me! Thanks a lot! This was the only command I needed to be perfect!

For those still trying, enable Neovim as fengbo discribed. After that, restart VSCode, then the correct command is:
:<starting_line>,<final_line>m <destination_line>[ENTER]

All 12 comments

Was this working previously?

With enableNeovim: true I can run :m3

@xconverge I tried adding adding vim.enableNeovim: true in my User Settings but is still getting the error.

Also, I'm not sure if this was working previously. It's my first time to try the :m command with vscodevim.

image

image

did you restart after enabling neovim support?

Yup, I restarted vscode but is still not working.

@keeed
maybe you should set neovimPath

"vim.enableNeovim":true,
"vim.neovimPath": "c:/opt/Neovim/bin/nvim.exe",

I too suspect its an error with your neovim settings or installation. Try adjusting vim.debug.loggingLevel to see if there are pertient logs.

In an effort to keep our issue count sane, I am closing this issue.

I was having the same issue and I added neovim to the path too, it was not working. Turns out the path was not working because the sample path for windows given in the comment above the vim:neovimPath setting provides wrong info.

// Path to run neovim executable. For example, /usr/bin/nvim, or C:\Program Files\Neovim\bin\nvim.exe "vim.neovimPath": "nvim"

The correct way should be C:\\Program Files\\Neovim\\bin\\nvim.exe using escape character, please update comment else it is going to confuse a lot of people.

Feel free to submit a PR

I was having the same issue and I added neovim to the path too, it was not working. Turns out the path was not working because the sample path for windows given in the comment above the vim:neovimPath setting provides wrong info.

// Path to run neovim executable. For example, /usr/bin/nvim, or C:\Program Files\Neovim\bin\nvim.exe "vim.neovimPath": "nvim"

The correct way should be C:\\Program Files\\Neovim\\bin\\nvim.exe using escape character, please update comment else it is going to confuse a lot of people.

This is actually a bit weird

https://github.com/VSCodeVim/Vim/blob/3dd6b4846dc66872461e871a65815e226e562002/package.json#L607

That is how I have it written in package.json already for the reason you mentioned

It gets presented in VS Code as:

image

@fengbo123 Solved for me! Thanks a lot! This was the only command I needed to be perfect!

For those still trying, enable Neovim as fengbo discribed. After that, restart VSCode, then the correct command is:
:<starting_line>,<final_line>m <destination_line>[ENTER]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

typeoneerror picture typeoneerror  路  3Comments

jaredly picture jaredly  路  3Comments

orn688 picture orn688  路  3Comments

st-schneider picture st-schneider  路  3Comments

rajinder-yadav picture rajinder-yadav  路  3Comments