I tend to hit the Cmd-Q
instead of Cmd-W
when I am closing a tab and in my older installs on OS-X I had changed the shortcut for Safari Quit
and that is one thing (among others) that I did not migrate to my new OS-X 10.11 install.
So, open up System Perferences
and go to KeyBoards
and then the Shortcuts
pane and add an App Shortcuts
for Safari only for the menu item called Quit Safari
, mine now is Ctrl-CMD-Q
: