When I use vi to analyze log files, it sometimes is stuck with the error: 'Line too long'. I can watch the file using more
, but that's not what I want.
The command view leads to the same result and less
is not installed.
System is HP-UX v B.11.31 U ia64
Moving to Start or End of Line Press ^ to move the cursor to the start of the current line. Press $ to move the cursor to the end of the current line.
This will make the text you're typing wrap to the next line when it is eight letters from the right-hand side of the screen. To type ^M , press Ctrl-v , then press Enter .
Delete All Lines Press the Esc key to go to normal mode. Type %d and hit Enter to delete all the lines.
Vi edit modes To enter Insert mode, press i . In Insert mode, you can enter text, use the Enter key to go to a new line, use the arrow keys to navigate text, and use vi as a free-form text editor. To return to Command mode, press the Esc key once. [ Looking for a different text editor?
Find out the limit supported, then use fold
fold -80 your_file | more
Or
fold -80 your_file > /tmp/your_file.0
vim /tmp/your_file.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With