Skip to content

Instantly share code, notes, and snippets.

@kiko
Created December 23, 2009 09:04
Show Gist options
  • Save kiko/262418 to your computer and use it in GitHub Desktop.
Save kiko/262418 to your computer and use it in GitHub Desktop.
## View management
* Functions
C-w 1 => Show only current view
C-w 2 => Split current view horizontal
C-w 3 => Split current view vertical
C-w 0 => Close current view (buffer still remain)
* Example
1. I have A.rb opened.
+-------------------+
| |
| |
| |
| A.rb |
| |
| (1) |
| |
+-------------------+
2. C-w 3 to split vertical
+---------+---------+
| | |
| | |
| | |
| A.rb | A.rb |
| | |
| (1) | (2) |
| | |
+---------+---------+
3. Now at (2), C-w 2
+---------+---------+
| | |
| | A.rb |
| A.rb | (2) |
| |---------+ Split view (2) horizontally.
| (1) | |
| | A.rb |
| | (3) |
+---------+---------+
4. still at (2), :o B.rb
+---------+---------+
| | |
| | B.rb | B.rb opened in view (2)
| A.rb | (2) |
| |---------+
| (1) | |
| | A.rb |
| | (3) |
+---------+---------+
5. Jump to (3), then C-w 0
+---------+---------+
| | |
| | |
| | |
| A.rb | B.rb | View (3) is closed.
| | |
| (1) | (2) |
| | |
+---------+---------+
6. at (2), C-w 1
+-------------------+
| |
| |
| | View (2) maximized.
| B.rb | (Note: A.rb still remains in buffer)
| |
| (2) |
| |
+-------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment