From 499bb8c29598e476c85353d4b10abee6f9235ace Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Tue, 3 Nov 2015 19:17:19 -0600 Subject: [PATCH] Add Center The Cursor as a vim til. --- README.md | 1 + vim/center-the-cursor.md | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 vim/center-the-cursor.md diff --git a/README.md b/README.md index 79c532e..51722e2 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Buffer Time Travel](vim/buffer-time-travel.md) - [Case-Aware Substitution With vim-abolish](vim/case-aware-substitution-with-vim-abolish.md) - [Case-Insensitive Substitution](vim/case-insensitive-substitution.md) +- [Center The Cursor](vim/center-the-cursor.md) - [Check Your Current Color Scheme](vim/check-your-current-color-scheme.md) - [Close the Current Buffer](vim/close-the-current-buffer.md) - [Coerce The Current Filetype](vim/coerce-the-current-filetype.md) diff --git a/vim/center-the-cursor.md b/vim/center-the-cursor.md new file mode 100644 index 0000000..2835893 --- /dev/null +++ b/vim/center-the-cursor.md @@ -0,0 +1,13 @@ +# Center The Cursor + +If you've moved the cursor to a particular line towards the top or bottom of +the screen, you may want to center the screen on that line. This can be +achieved by hitting `zz`. It is a quick way to center the cursor and ensure +that you have an equal amount of context on either side of the line of +interest. + +Take care to not mistake this for `ZZ` which will save and quit the buffer. + +See `:h zz` and `:h z.` for more details. + +h/t Chris Erin