Search in: normal vim misbehaves command

This popped up when writing a script for vim.

Using a well-documented command: normal command:

:normal /abc  

does not look for the string abc. Instead, the previous search string is still active (e.g. highlighted, jumped to n, etc.).
Even a stranger: abc appears as the newest template in history / for example, hit, and then up arrow.

Why is abc not perceived as a true search pattern?

+3
source share
1 answer

The help file for a really well-documented command :normalsays the following:

{commands} , , <Esc> <C-C>.

:

:normal /abc

. , , "/abc" , "Enter" (.. <CR>). , , , <Esc>.

:.

:exec "/abc"
+5

Source: https://habr.com/ru/post/1717054/


All Articles