Skip to content

Commit 499bb8c

Browse files
committed
Add Center The Cursor as a vim til.
1 parent 6bc70ae commit 499bb8c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
235235
- [Buffer Time Travel](vim/buffer-time-travel.md)
236236
- [Case-Aware Substitution With vim-abolish](vim/case-aware-substitution-with-vim-abolish.md)
237237
- [Case-Insensitive Substitution](vim/case-insensitive-substitution.md)
238+
- [Center The Cursor](vim/center-the-cursor.md)
238239
- [Check Your Current Color Scheme](vim/check-your-current-color-scheme.md)
239240
- [Close the Current Buffer](vim/close-the-current-buffer.md)
240241
- [Coerce The Current Filetype](vim/coerce-the-current-filetype.md)

vim/center-the-cursor.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Center The Cursor
2+
3+
If you've moved the cursor to a particular line towards the top or bottom of
4+
the screen, you may want to center the screen on that line. This can be
5+
achieved by hitting `zz`. It is a quick way to center the cursor and ensure
6+
that you have an equal amount of context on either side of the line of
7+
interest.
8+
9+
Take care to not mistake this for `ZZ` which will save and quit the buffer.
10+
11+
See `:h zz` and `:h z.` for more details.
12+
13+
h/t Chris Erin

0 commit comments

Comments
 (0)