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.
1 Answer
Reset to default 4You'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.