Last active
April 1, 2025 21:13
-
-
Save tshrinivasan/d9750894d4a419b1920d55ad2ca28978 to your computer and use it in GitHub Desktop.
emacs as regular fullscreen editor
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
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
(cua-mode t) | |
(delete-selection-mode t) | |
(global-set-key (kbd "<left>") 'backward-char) | |
(global-set-key (kbd "<right>") 'forward-char) | |
(global-set-key (kbd "<up>") 'previous-line) | |
(global-set-key (kbd "<down>") 'next-line) | |
(global-set-key (kbd "C-f") 'isearch-forward) | |
(global-set-key (kbd "C-r") 'query-replace) | |
(global-set-key (kbd "C-S-h") 'query-replace-regexp) | |
(global-set-key (kbd "C-s") 'save-buffer) | |
(global-set-key (kbd "C-a") 'mark-whole-buffer) | |
(tab-bar-mode 1) ;; Enable tabs | |
(setq tab-bar-show 1) ;; Show tabs only if more than one tab is open | |
(require 'wc-mode) | |
;; Enable wc-mode globally | |
(add-hook 'after-init-hook 'wc-mode) | |
;; Enable wc-mode for text mode and org mode | |
(add-hook 'text-mode-hook 'wc-mode) | |
(add-hook 'org-mode-hook 'wc-mode) | |
(setq initial-scratch-message nil) | |
(setq left-margin-width 10) | |
(setq right-margin-width 1) | |
(add-hook 'text-mode-hook 'my-set-margins) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(custom-enabled-themes '(tango-dark)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment