Get out of the pipe
Each pipe must be shielded. Then add it using <CR> , so you don't have to press enter all the time.
nnoremap - :!ps -ef \| grep chrome \|awk '{print $2}'\| xargs kill<CR>
Kill'em all
Notice also that we have a cute little tool to kill everyone. Therefore, instead of
ps -ef | grep chrome |awk '{print $2}'| xargs kill
You can do
killall chrome
Then your mapping will be
nnoremap - :!killall chrome<CR>
pacholik
source share