I would like to reformat the entire document so that the line width is, say, 60 characters. If I have file.txt, the following shell command will do:
fmt -w 60 file.txt
or alternatively using pipe
cat file.txt | fmt -w 60
How to do this in Kate? Ideally, I would like to be able to select text, pipe it into fmt, and replace the selection with the output of fmt.
More information about formatting options
Can you call external shell command from the script?
I would like to reformat the entire document so that the line width is, say, 60 characters. If I have file.txt, the following shell command will do:
fmt -w 60 file.txt
or alternatively using pipe
cat file.txt | fmt -w 60
How to do this in Kate? Ideally, I would like to be able to select text, pipe it into fmt, and replace the selection with the output of fmt.