yesthattom: (Default)
[personal profile] yesthattom
For years I've taken advantage of the fact that one can use the "+" option in "vi" to have the editor open up at a particular position:

Example: Open the file file.txt for editing and position cursor at the 5th line:
vi +5 file.txt

Today I saw a shell script that opened to line "$" which positions the cursor at the last line. It's obvious that it would work ("$" means "last line" in the vi command line) but I had never thought of it:
vi +$ file.txt
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

December 2015

S M T W T F S
  12345
6789 101112
13141516171819
202122 23242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 3rd, 2026 06:49 pm
Powered by Dreamwidth Studios