What is the best command line way to tell Vim to put the cursor on the last line for editing?
I ended up with: vi -c '$' myLargeFile.txt
which of course works fine. But I thought there was a dedicated command
for this. In less, you can use "+G", but that doesn't seem to work with vi(m), which surprised me.
What is the best command line way to tell Vim to put the cursor on the last line for editing?
I ended up with: vi -c '$' myLargeFile.txt
which of course works fine. But I thought there was a dedicated command
for this. In less, you can use "+G", but that doesn't seem to work with vi(m), which surprised me.
On 2026-04-05 15:43, Kenny McCormack wrote:
What is the best command line way to tell Vim to put the cursor on the last >> line for editing?
I ended up with: vi -c '$' myLargeFile.txt
which of course works fine. But I thought there was a dedicated command
for this. In less, you can use "+G", but that doesn't seem to work with
vi(m), which surprised me.
I just tried out omitting the line number and simply write
vim + myLargeFile.txt (instead of +N)
which places the cursor in the last line (similar to 'G' in
command mode).
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 53:49:54 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,448 |