Created
April 2, 2026 06:50
-
-
Save tahadraidia/e46a31d4edc722d7c0c9684e87880ada to your computer and use it in GitHub Desktop.
Public emacs init file - temp public version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (setq inhibit-startup-message t) | |
| (scroll-bar-mode -1) | |
| (tool-bar-mode -1) | |
| (load-theme 'modus-vivendi t) | |
| (tooltip-mode -1) | |
| (menu-bar-mode -1) | |
| (setq visible-bell t) | |
| (global-display-line-numbers-mode 1) | |
| (set-frame-font "Consolas 13") | |
| (set-fringe-mode 10) | |
| ;; Custom MSFT C and C++ coding style setup | |
| (with-eval-after-load 'cc-mode | |
| (c-add-style | |
| "msft" | |
| '("bsd" | |
| (c-basic-offset . 4) | |
| (indent-tabs-mode . nil) | |
| (tab-width . 4) | |
| (c-offsets-alist | |
| (access-label . -4) ;; public:, private:, protected: | |
| (case-label . +) | |
| (label . 0) | |
| (substatement-open . 0) | |
| (inline-open . 0) | |
| (block-open . 0) | |
| (brace-list-open . 0) | |
| (brace-list-intro . +)))) | |
| (defun taha-msft-cxx-style () | |
| "Taha's custom MSFT C/C++ coding style config in Emacs." | |
| (c-set-style "msft") | |
| (setq-local indent-tabs-mode nil) | |
| (setq-local tab-width 4)) | |
| (add-hook 'c-mode-common-hook #'taha-msft-cxx-style)) | |
| ;; Also apply to tree-sitter modes in newer Emacs | |
| (add-hook 'c-ts-mode-hook #'taha-msft-cxx-style) | |
| (add-hook 'c++-ts-mode-hook #'taha-msft-cxx-style) | |
| (setq-default indent-tabs-mode nil) | |
| (setq-default tab-width 4)(setq inhibit-startup-message t) | |
| (scroll-bar-mode -1) | |
| (tool-bar-mode -1) | |
| (load-theme 'modus-vivendi t) | |
| (tooltip-mode -1) | |
| (menu-bar-mode -1) | |
| (setq visible-bell t) | |
| (global-display-line-numbers-mode 1) | |
| (set-frame-font "Consolas 13") | |
| (set-fringe-mode 10) | |
| ;; Custom MSFT C and C++ coding style setup | |
| (with-eval-after-load 'cc-mode | |
| (c-add-style | |
| "msft" | |
| '("bsd" | |
| (c-basic-offset . 4) | |
| (indent-tabs-mode . nil) | |
| (tab-width . 4) | |
| (c-offsets-alist | |
| (access-label . -4) ;; public:, private:, protected: | |
| (case-label . +) | |
| (label . 0) | |
| (substatement-open . 0) | |
| (inline-open . 0) | |
| (block-open . 0) | |
| (brace-list-open . 0) | |
| (brace-list-intro . +)))) | |
| (defun taha-msft-cxx-style () | |
| "Taha's custom MSFT C/C++ coding style config in Emacs." | |
| (c-set-style "msft") | |
| (setq-local indent-tabs-mode nil) | |
| (setq-local tab-width 4)) | |
| (add-hook 'c-mode-common-hook #'taha-msft-cxx-style)) | |
| ;; Also apply to tree-sitter modes in newer Emacs | |
| (add-hook 'c-ts-mode-hook #'taha-msft-cxx-style) | |
| (add-hook 'c++-ts-mode-hook #'taha-msft-cxx-style) | |
| (setq-default indent-tabs-mode nil) | |
| (setq-default tab-width 4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment