How do you pipe buffer contents to a shell command?
Answer
:%!sort
Explanation
Use :%!command to filter the entire buffer through a shell command. :%!sort sorts all lines. Use visual selection for partial filtering.
:%!sort
Use :%!command to filter the entire buffer through a shell command. :%!sort sorts all lines. Use visual selection for partial filtering.