- Combine two commands with one shell execution:
:write !sh
- will write this file (a vim command) and start a shell
- Sort the content of this text:
first name, last name, email
john,smith,[email protected]
drew,neil,[email protected]
jane,doe,[email protected]
Visual highlight the lines to be sorted
:'<,'>!sort -t',' -k2
- the sort shell command is used to sort the lines
- Pull up command history in vim
q:
will show normal mode history
q/
will show search history