SHARE
TWEET

Untitled

a guest Feb 20th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (c-add-style "cts"
  2.              '("gnu"
  3.                (c-offsets-alist . ((substatement-open . 0)))
  4.                (c-basic-offset . 4)))
  5.  
  6. (defconst cts-c-regexp
  7.   (concat "/c/\\(VK-GL-CTS\\|Vulkan-LoaderAndValidationLayers\\)/.*\\(?:c\\|cc\\|h\\|cpp\\|hpp\\)\\'"))
  8.  
  9. (defun maybe-set-cts-c-style ()
  10.   (when (and (buffer-file-name)
  11.              (string-match cts-c-regexp (buffer-file-name)))
  12.     (c-set-style "cts")
  13.     (setq tab-width 4)
  14.     (setq indent-tabs-mode t)))
  15.  
  16. (add-hook 'c-mode-hook 'maybe-set-cts-c-style)
  17. (add-hook 'c++-mode-hook 'maybe-set-cts-c-style)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top