I am trying to use Ctrl+ws to split a window in vim. However it is not working in my case. I opened a file using vim filename. Then I pressed Ctrl+ws. But as soon as I press just Ctrl+w it clears the viewport and I could see my shell display before vim opened the file. I mean the view port is replaced by the content just before the file was opened. However, I am still editing the file with vim.

Suggestions?

link|improve this question
5  
What shell and what terminal are you using? – Anson Oct 1 '11 at 18:50
I am using gnome-terminal and bash shell. About the Ctrl+w thing triggering thing, I found out that I had a shortcut with Ctrl+w in my terminal's keyboard preferences. I have disabled it though. However, Ctrl+ws is still not splitting the window horizontally. – rajan sthapit Oct 2 '11 at 6:40
feedback

migrated from stackoverflow.com Oct 1 '11 at 19:06

This question came from our site for professional and enthusiast programmers.

2 Answers

Control-W must be being eaten by your terminal. Check settings and remove. If it still doesn't fix, then try this in Vim (in insert mode) or at your shell: hit Control-V and then Control-W. does it insert a ^W ?

If it doesn't work in your shell either, something about the terminal is still eating it. If it works in the shell but not Vim, then report back.

In the meanwhile, you can split by doing :split in Vim.

link|improve this answer
feedback

I kept trying to press them all at once, and it didn't work, after playing with it for half an hour I released the control-w and then pressed S, it worked that way (though, your problem might be something completely different)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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