1

i tried to split a vim in 2 buffers with 2 different files

vim file1.txt 
:sp file2.txt

but ctrl + w is not working to switch between them.

giving below error

E486: Pattern not found: modification history

anyone knows how to help it.

1

The command to move to the next window is Ctrl-W Ctrl-W; cp. :help CTRL-W_CTRL-W. There are several more window commands all starting with Ctrl-W: :help CTRL-W.

The E486 error results from a search command, with the previously used search pattern. That should not have been triggered by Ctrl-W, but you may have a plugin or mapping that changed this. Check with

:verbose map <C-w>

and remap / disable if necessary.

You can also switch windows via :wincmd w (followed by Enter), but that's not a practical solution.

  • Hi Thanks for answer, if we want to map permanently, we need to change .vimrc, is it not possible to trigger using .profile file. please give me the example – vishwa nerella Apr 3 '15 at 12:40
  • Hi, please find my map command map ^W /modification history[-:]^[, how to change to enable Ctrl+w – vishwa nerella Apr 8 '15 at 10:08
  • Where does that one come from? It prevents your use of Ctrl-W commands. Either remap that to a different set of keys, disable it (if it comes from a plugin), or remove (if in your .vimrc). – Ingo Karkat Apr 8 '15 at 10:13
  • i commented that line after that when i tried to use Ctrl+w command it is not working..... do i need to use any remap command ?? – vishwa nerella Apr 8 '15 at 10:17
  • Check again with :verbose map <C-w>; you need to restart Vim for the changes to take effect. – Ingo Karkat Apr 8 '15 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.