File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really
7
7
warrant a full blog post. These are mostly things I learn by pairing with
8
8
smart people at [ Hashrocket] ( http://hashrocket.com/ ) .
9
9
10
- _ 347 TILs and counting..._
10
+ _ 348 TILs and counting..._
11
11
12
12
---
13
13
@@ -345,6 +345,7 @@ _347 TILs and counting..._
345
345
- [ Case-Insensitive Substitution] ( vim/case-insensitive-substitution.md )
346
346
- [ Center The Cursor] ( vim/center-the-cursor.md )
347
347
- [ Check Your Current Color Scheme] ( vim/check-your-current-color-scheme.md )
348
+ - [ Close All Other Windows] ( vim/close-all-other-windows.md )
348
349
- [ Close the Current Buffer] ( vim/close-the-current-buffer.md )
349
350
- [ Coerce The Current Filetype] ( vim/coerce-the-current-filetype.md )
350
351
- [ Coercing Casing With vim-abolish] ( vim/coercing-casing-with-vim-abolish.md )
Original file line number Diff line number Diff line change
1
+ # Close All Other Windows
2
+
3
+ Opening split windows can be useful in a number of circumstances. Eventually
4
+ though, you are going to want to go back to just one window. Generally when
5
+ this happens to me, I navigate to each of the other split windows that I
6
+ don't want and execute ` :q ` . What I want to do is essentially close all the
7
+ other split windows except for my current one. Vim provides a single command
8
+ for doing this. By hitting
9
+
10
+ ```
11
+ <CTRL>w <CTRL>o
12
+ ```
13
+
14
+ all other windows are closed leaving the current window as the only one on
15
+ the screen.
16
+
17
+ If you want this command to be able to work with windows containing modified
18
+ buffers, you are going to want to have the ` hidden ` option turned on.
19
+
20
+ See ` :h CTRL-W_CTRL-O ` for more details.
You can’t perform that action at this time.
0 commit comments