Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to use Ctrl+w s 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+w s. 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?

share|improve this question

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

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

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
add comment

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.

share|improve this answer
add comment

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)

share|improve this answer
    
The asker's problem is almost certainly something different, because he is actually having a problem when pressing the key combo. –  Kazark Nov 9 '12 at 2:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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