I often find myself editing one of a set of configuration files by adding lines at the end. For editing I use vi
(from bash
) and currently use:
vi +$(wc -c /home/john/master/tried.cfg)
The above works, but it makes filename completion with Tab impossible, which is a nuisance when changing the filenames after scrolling back on the commandline.
Is there an easier way to do go to the last line of the opened file? Maybe with the +{}
commandline option that vi
offers. Or is there some way to make commandline completion in the $()
work?
vi +$ filename
wc -c
echoes the filename as well as the word count.