Skip to content

Commit 7dac649

Browse files
committed
Add Interact With The Alternate File as a vim til
1 parent 4827581 commit 7dac649

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ _348 TILs and counting..._
372372
- [Horizontal to Vertical and Back Again](vim/horizontal-to-vertical-and-back-again.md)
373373
- [Incremental Searching](vim/incremental-searching.md)
374374
- [Increment All The Numbers](vim/increment-all-the-numbers.md)
375+
- [Interact With The Alternate File](vim/interact-with-the-alternate-file.md)
375376
- [Interactive Buffer List](vim/interactive-buffer-list.md)
376377
- [Joining Lines Together](vim/joining-lines-together.md)
377378
- [Jump To Matching Pair](vim/jump-to-matching-pair.md)

Diff for: vim/interact-with-the-alternate-file.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Interact With The Alternate File
2+
3+
If you have a couple buffers going in a Vim session and you check out the
4+
buffer list with `:ls`, you'll notice that one of those buffers has a `#`
5+
indicator next to it. That means the file for this buffer is considered the
6+
alternate file of the current, visible buffer. In addition to hitting
7+
`CTRL-^` to switch to that buffer, you can reference it in other commands
8+
with `#`. This means you can quickly `:edit`, `:split`, `:vsplit`, and so
9+
forth the alternate file by just giving `#` as the argument to those
10+
commands.
11+
12+
Quickly open the alternate file in a vertical split with:
13+
14+
```
15+
:vsp #
16+
```
17+
18+
See `:h alternate-file` for more details.

0 commit comments

Comments
 (0)