Some Imperial Space Marines in Warhammer 40K are shown with long hair and/or long beards - the Space Wolves in particular. This must get in the way if they ever have to put on a helmet quickly, in the event of a chemical attack, decompression, etc. I get that this is sort of a "rule of cool" thing, but has there ever been an instance in the Warhammer 40K novels (or other game fluff) of a marine trying to put on their helmet, and having trouble due to their hair or beard?
- 'Rule of Cool' applies.
- Helmet necessary situations are rather limited in universe.
- Not having the ability to use your helmet would limit effectiveness and capability...
- There is no instance of 'having trouble' that I can recall.
So you are correct. The 'Rule of Cool' applies 100% in this situation. Models and images that we see are bursting with the impossibility of donning a vacuum seal helmet when the situation arises.
However, the chances of such a fatal situation happening do seem to be rather remote. Just about all known, un-Chaos modified, chemicals have no effect on Space Marines thanks to their Multi-Lung and the same organ grants the ability to breathe in low oxygen environments, such as decompression.
In addition, the Mucranoid implant allows Space Marines to secret a substance that creates a barrier on the user's skin for environments such as vacuum. While I have never read anything from the Black Library stating its use there is a chance the organ could also protect a user that is not wearing a helmet in a pinch.
And while there is the option for other situations that may arise where a helmet would be advisable, honestly the two you state are the not only the most obvious, but the most common as well. Vacuum aside, fighting on ships involves the same potential risks as fighting planet side. And poison aside the only advantage to having a helmet I can see would be in a situation where normal vision is completely obstructed, such as a really heavy fog or when communications break down and smart optics, like thermals, are paramount.
In universe, I would argue that not having the ability to don your helmet would limit your effectiveness and your deployment capabilities in certain situations. Should there be a need to fight in vacuum or underwater the Marine would be useless. While we don't explicitly 'see' the method of a Space marine donning their helmet, I would say there is a procedure in place to account for a Space Marine's individuality; custom helmets or some other adjustment.
And the few times that I have read of a Space Marine donning their helmet there has never been any issue. I will have to find the passage/book, but as I recall, during Warzone: Fenris all the Space Wolves fighting on Midgardia had to use their helmets to filter out a plague created by Mortarion. At some point they also found Logan Grimnar's helmet leading them to believe he was lost in battle. Depending on the image/model Grimnar himself has a great deal of excessive hair that would make wearing a helmet impossible. If he couldn't have even worn the helmet I am sure he would not have brought it with him.
The majority of space wolves don't put on helmets, instead preferring to display their long locks as intimidation.
From the wiki:
Originally the VI Legion of Astartes raised by the Emperor at the dawn of the Great Crusade, the Space Wolves are renowned for their anti-authoritarian ways and their embrace of their homeworld Fenris' savage barbarian culture as well as their extreme deviation from the Codex Astartes in the Chapter's organisation.
Thus, they are hardly representative of the average space marine. They are savage and barbaric, going into battle adorned with hunting trophies.
As to your second question, I don't think such a situation has ever been depicted. Most marines with long hair forgo helmets altogether.