How do you filter a visual selection through an external command?
Answer
:'<,'>!sort -u
Explanation
Select lines, then type ! which auto-expands to :'<,'>!. Add any shell command like sort -u to filter the selection through it.
:'<,'>!sort -u
Select lines, then type ! which auto-expands to :'<,'>!. Add any shell command like sort -u to filter the selection through it.