         guard self.blockCommentDelimiters != nil || self.inlineCommentDelimiter != nil else { return false }
         
         guard
-            let targetRange = self.commentingRange(fromLineHead: UserDefaults.standard[.commentsAtLineHead]),
+            let targetRange = self.commentingRange(fromLineHead: self.commentsAtLineHead),
             !targetRange.isEmpty else { return false }
         
         let target = self.string[targetRange]


import Cocoa

extension EditorTextView {
    
    // MARK: Options
    
    struct CommentTypes: OptionSet {
        
        let rawValue: Int
        
        static let inline = CommentTypes(rawValue: 1 << 0)
        static let block = CommentTypes(rawValue: 1 << 1)
        
        static let both: CommentTypes = [.inline, .block]
    }
    
    

            let targetRange = self.commentingRange(fromLineHead: fromLineHead)
            else { return }
        
        let spacer = self.appendsCommentSpacer ? " " : ""
        var new: (String, NSRange)?
        
        // insert delimiters
