summaryrefslogtreecommitdiff
path: root/config/editor.el
diff options
context:
space:
mode:
Diffstat (limited to 'config/editor.el')
-rw-r--r--config/editor.el60
1 files changed, 47 insertions, 13 deletions
diff --git a/config/editor.el b/config/editor.el
index 0542f12..9217b96 100644
--- a/config/editor.el
+++ b/config/editor.el
@@ -1,17 +1,33 @@
;; -*- lexical-binding: t; -*-
-(setq-default indent-tabs-mode nil) ;; don't use tabs to indent
-(setq-default tab-width 4) ;; but maintain correct appearance
+(use-package emacs
+ :init
-;; Newline at end of file
-(setq require-final-newline t)
+ ;; Set all unicode
+ (set-charset-priority 'unicode)
+ (setq locale-coding-system 'utf-8
+ coding-system-for-read 'utf-8
+ coding-system-for-write 'utf-8)
+ (set-terminal-coding-system 'utf-8)
+ (set-keyboard-coding-system 'utf-8)
+ (set-selection-coding-system 'utf-8)
+ (prefer-coding-system 'utf-8)
+ (setq default-process-coding-system '(utf-8-unix . utf-8-unix))
-;; delete the selection with a keypress
-(delete-selection-mode t)
+ ;; indent
+ (setq-default indent-tabs-mode nil)
+ (setq-default tab-width 4)
-(global-auto-revert-mode t)
+ ;; Newline at the end of file
+ (setq require-final-newline t)
+
+ ;; delete the selection with a keypress
+ (delete-selection-mode t)
+
+ (global-auto-revert-mode t)
+
+ (global-hl-line-mode 1))
-(global-hl-line-mode 1)
;; meaningful names for buffers with the same name
(use-package uniquify
@@ -39,10 +55,6 @@
savehist-file (expand-file-name "savehist" savefile-dir))
(savehist-mode +1))
-
-;; smart tab behavior - indent or complete
-(setq tab-always-indent 'complete)
-
(use-package diminish :ensure t)
(use-package smartparens
@@ -54,7 +66,12 @@
(setq sp-base-key-bindings 'paredit)
(setq sp-autoskip-closing-pair 'always)
(setq sp-hybrid-kill-entire-symbol nil)
- (setq blink-matching-paren nil))
+ (setq blink-matching-paren nil)
+
+ (define-key smartparens-mode-map (kbd "C-<right>") 'sp-forward-slurp-sexp)
+ (define-key smartparens-mode-map (kbd "C-<left>") 'sp-forward-barf-sexp)
+ (define-key smartparens-mode-map (kbd "C-M-<left>") 'sp-backward-slurp-sexp)
+ (define-key smartparens-mode-map (kbd "C-M-<right>") 'sp-backward-barf-sexp))
(use-package easy-kill
:ensure t
@@ -83,3 +100,20 @@
:diminish t
:config
(volatile-highlights-mode t))
+
+(use-package crux
+ :ensure t
+ :config
+ (global-set-key [remap move-beginning-of-line] #'crux-move-beginning-of-line)
+ (global-set-key (kbd "C-c o") #'crux-open-with)
+ (global-set-key (kbd "C-<backspace>") 'crux-kill-line-backwards)
+ (global-set-key [remap kill-whole-line] 'crux-kill-whole-line))
+
+;; nfkjbndfkb kdjbnkfjb
+(use-package flyspell
+ :hook
+ ((text-mode . flyspell-mode)
+ (prog-mode . flyspell-prog-mode))
+ :config
+ (setq ispell-program-name "aspell")
+ (setq ispell-dictionary "british"))