最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

macos - I am not able to enter Visual mode using :v - Stack Overflow

programmeradmin0浏览0评论

When try to enter in visual mode using :v it throws me an error and I feel like I changed some default settings by mistake please help me to fix it.

run command

error

error message

E148: Regular expression missing from :global

And one more thing: if execute command ctrl + v I can enter visual block mode. and I am using macos Sequoia if there is any reset vim setting then please reply me.

I tried this :
:g/pattern/command it will may help me but I tried it but it will not work I tried this like :g/v/command and here I have to replace actual command which can get in visual mode instead of command.

I want to enter in visual mode when enter command :v in normal mode. And it will not affect any other process which is running on my system.

When try to enter in visual mode using :v it throws me an error and I feel like I changed some default settings by mistake please help me to fix it.

run command

error

error message

E148: Regular expression missing from :global

And one more thing: if execute command ctrl + v I can enter visual block mode. and I am using macos Sequoia if there is any reset vim setting then please reply me.

I tried this :
:g/pattern/command it will may help me but I tried it but it will not work I tried this like :g/v/command and here I have to replace actual command which can get in visual mode instead of command.

I want to enter in visual mode when enter command :v in normal mode. And it will not affect any other process which is running on my system.

Share Improve this question edited Mar 31 at 10:44 Friedrich 4,91813 gold badges56 silver badges51 bronze badges asked Mar 30 at 11:35 Dhruv PolaraDhruv Polara 273 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 4

You're using the wrong command, you need to drop the leading colon, i.e. v instead of :v.

The correct commands to enter Visual mode are:

  • v (small v without leading colon) to enter characterwise Visual mode.
  • V (capital V without leading colon) to enter linewise Visual mode.
  • <C-V> or Ctrl-V (case-insensitive control v without leading colon) to enter blockwise Visual mode.

They can be found in :help visual-start.

The :v command you're using is something completely different. It's an alias for the :global! or :g! command. It expects a pattern (a regular expression) and is executed on each line where this pattern does not match. This explains the error message you see.
See :help :v.

It's just the wrong command and unrelated to a configuration issue. There's no need to "reset" Vim as suggested in the question.

发布评论

评论列表(0)

  1. 暂无评论