Ask Your Question
4

How can you stop the cursor from moving while yanking to a mark in Vim?

asked 2023-03-30 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-12-28 23:00:00 +0000

scrum gravatar image

To stop the cursor from moving while yanking to a mark in Vim, use the following command:

:nohlsearch

This command will turn off search highlighting, which will prevent the cursor from moving to the next match. You can use this command before yanking to a mark, and then turn on search highlighting again by using:

:set hlsearch
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-03-30 11:00:00 +0000

Seen: 16 times

Last updated: Dec 28 '22