# Edit A File At A Specific Line Number

I use long-running Vim sessions where I constantly open files as new buffers with the `:edit` (or `:e`) command. Generally, when I open a new file I end up with the cursor at the top of the buffer and go from there. But what if I have a specific line number in mind and I want the cursor to start there?

The `:edit` command can receive arguments, including a line number argument. To open up to line 159, I can include the `+159` argument in the command.

```
:edit +159 path/to/the/file.txt
```

See `:h :edit` and `:h +cmd` for more details about how `:edit` works and what the different arguments can do.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ploegert.gitbook.io/til/tools/vim/edit-a-file-at-a-specific-line-number.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
