Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 523 Bytes

35_running_commands_in_shell.md

File metadata and controls

22 lines (15 loc) · 523 Bytes

Running commands in shell

  1. Combine two commands with one shell execution:

:write !sh - will write this file (a vim command) and start a shell

  1. 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

  1. Pull up command history in vim

q: will show normal mode history q/ will show search history