a guest Feb 20th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- (c-add-style "cts"
- (c-offsets-alist . ((substatement-open . 0)))
- (c-basic-offset . 4)))
- (defconst cts-c-regexp
- (concat "/c/\\(VK-GL-CTS\\|Vulkan-LoaderAndValidationLayers\\)/.*\\(?:c\\|cc\\|h\\|cpp\\|hpp\\)\\'"))
- (defun maybe-set-cts-c-style ()
- (when (and (buffer-file-name)
- (string-match cts-c-regexp (buffer-file-name)))
- (c-set-style "cts")
- (setq tab-width 4)
- (setq indent-tabs-mode t)))
- (add-hook 'c-mode-hook 'maybe-set-cts-c-style)
- (add-hook 'c++-mode-hook 'maybe-set-cts-c-style)
RAW Paste Data