mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 23:28:02 +00:00
Add Close All Other Windows as a vim til
This commit is contained in:
@@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really
|
|||||||
warrant a full blog post. These are mostly things I learn by pairing with
|
warrant a full blog post. These are mostly things I learn by pairing with
|
||||||
smart people at [Hashrocket](http://hashrocket.com/).
|
smart people at [Hashrocket](http://hashrocket.com/).
|
||||||
|
|
||||||
_347 TILs and counting..._
|
_348 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -345,6 +345,7 @@ _347 TILs and counting..._
|
|||||||
- [Case-Insensitive Substitution](vim/case-insensitive-substitution.md)
|
- [Case-Insensitive Substitution](vim/case-insensitive-substitution.md)
|
||||||
- [Center The Cursor](vim/center-the-cursor.md)
|
- [Center The Cursor](vim/center-the-cursor.md)
|
||||||
- [Check Your Current Color Scheme](vim/check-your-current-color-scheme.md)
|
- [Check Your Current Color Scheme](vim/check-your-current-color-scheme.md)
|
||||||
|
- [Close All Other Windows](vim/close-all-other-windows.md)
|
||||||
- [Close the Current Buffer](vim/close-the-current-buffer.md)
|
- [Close the Current Buffer](vim/close-the-current-buffer.md)
|
||||||
- [Coerce The Current Filetype](vim/coerce-the-current-filetype.md)
|
- [Coerce The Current Filetype](vim/coerce-the-current-filetype.md)
|
||||||
- [Coercing Casing With vim-abolish](vim/coercing-casing-with-vim-abolish.md)
|
- [Coercing Casing With vim-abolish](vim/coercing-casing-with-vim-abolish.md)
|
||||||
|
|||||||
20
vim/close-all-other-windows.md
Normal file
20
vim/close-all-other-windows.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Close All Other Windows
|
||||||
|
|
||||||
|
Opening split windows can be useful in a number of circumstances. Eventually
|
||||||
|
though, you are going to want to go back to just one window. Generally when
|
||||||
|
this happens to me, I navigate to each of the other split windows that I
|
||||||
|
don't want and execute `:q`. What I want to do is essentially close all the
|
||||||
|
other split windows except for my current one. Vim provides a single command
|
||||||
|
for doing this. By hitting
|
||||||
|
|
||||||
|
```
|
||||||
|
<CTRL>w <CTRL>o
|
||||||
|
```
|
||||||
|
|
||||||
|
all other windows are closed leaving the current window as the only one on
|
||||||
|
the screen.
|
||||||
|
|
||||||
|
If you want this command to be able to work with windows containing modified
|
||||||
|
buffers, you are going to want to have the `hidden` option turned on.
|
||||||
|
|
||||||
|
See `:h CTRL-W_CTRL-O` for more details.
|
||||||
Reference in New Issue
Block a user