1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 23:28:02 +00:00

Add Moving To A Specific Line as a vim til.

This commit is contained in:
jbranchaud
2015-04-23 08:54:21 -05:00
parent 2af3cf197c
commit 29c9c458bb
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# Moving To A Specific Line
Often times when I open a new buffer, it is with the intention of moving to
a particular line. For example, if I am trying to move to line 55 in the
file, then I will hit `55j`\*. This works fine when I am dealing with a
freshly opened buffer. That is, this works fine if I am starting from the
top of the buffer.
In general, there is a better approach. I can move to an exact line number
from normal mode with `:{N}` where `{N}` is the line number. So, if I want
to get to line 55 regardless of where I am currently positioned in the
buffer, I can simply hit `:55<cr>`.
\* *This actually is slightly inaccurate, it moves me to line 56, not 55.
If I need to be precise, this doesn't cut it.*