From 31155589e59d1cb9e6f389c96e34fbc14e3fa34b Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 9 Apr 2024 14:35:02 +0630 Subject: (Emacs/init)~updated straight.el in bootstrap The URL for bootstrap.el has changed as a result of straight now being under a group rather than a user. Just means I need to change it here. While doing so, I update the bootstrap version as well. --- Emacs/.config/emacs/init.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index e182c69..4258d37 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -30,12 +30,15 @@ ;; Straight (defvar bootstrap-version) (let ((bootstrap-file - (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) - (bootstrap-version 5)) + (expand-file-name + "straight/repos/straight.el/bootstrap.el" + (or (bound-and-true-p straight-base-dir) + user-emacs-directory))) + (bootstrap-version 7)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously - "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) -- cgit v1.2.3-13-gbd6f From 37f5bf4b983f4db696d6dbf10a8970c8ef214e3a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 12 Apr 2024 18:20:57 +0630 Subject: (Emacs/config)+some bindings Recompile is now c instead of g --- Emacs/.config/emacs/config.org | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 5d62ac2..cd788ce 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1049,7 +1049,7 @@ Colourising the compilation buffer so ANSI colour codes get computed. "C" #'recompile) (nmmap :keymaps 'compilation-mode-map - "g" #'recompile) + "c" #'recompile) :display ("\\*compilation\\*" (display-buffer-reuse-window display-buffer-at-bottom) @@ -1798,10 +1798,15 @@ execution of d-mode blocks and alias ~D-mode~ with ~d-mode~. :straight t :general (code-leader - :keymaps 'rust-mode-hook + :keymaps 'rust-mode-map "f" #'rust-format-buffer) + (local-leader + :keymaps 'rust-mode-map + "c" #'rust-run-clippy) :init - (setq rust-format-on-save t)) + (setq rust-format-on-save t) + (with-eval-after-load "eglot" + (add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer")))) #+end_src ** Racket A scheme with lots of stuff inside it. Using it for a language design -- cgit v1.2.3-13-gbd6f From da9a14331f0eed6b1cfc596566691f575691f4ff Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 12 Apr 2024 18:21:12 +0630 Subject: (Emacs/app)+ERC (irc client for Emacs) --- Emacs/.config/emacs/app.org | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index c96d2e8..61ca240 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -830,3 +830,11 @@ and integrates slickly into image-dired. Of course, "k" #'image-previous-line "l" #'image-forward-hscroll)) #+end_src +* ERC +#+begin_src emacs-lisp +(use-package erc + :init + (setq erc-server "irc.libera.chat" + erc-nick "oreodave" + erc-buffer-display "current")) +#+end_src -- cgit v1.2.3-13-gbd6f From b31efd7b2c4fd495d188650a1761a673ec74c97e Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 14 Apr 2024 14:34:56 +0630 Subject: (Emacs/config)~g is not bound in compilation-mode-map This means I can use, say, ~gg~ to go to the top of the buffer without recompiling. --- Emacs/.config/emacs/config.org | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index cd788ce..c113a7b 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1050,6 +1050,9 @@ Colourising the compilation buffer so ANSI colour codes get computed. (nmmap :keymaps 'compilation-mode-map "c" #'recompile) + (general-def + :keymaps 'compilation-mode-map + "g" nil) ;; by default this is recompile :display ("\\*compilation\\*" (display-buffer-reuse-window display-buffer-at-bottom) -- cgit v1.2.3-13-gbd6f From d656f499c6241bdbfa1a098d1a2c1732f22994d2 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 14 Apr 2024 14:35:39 +0630 Subject: (Emacs/core)+evil-numbers packages Increment/decrement number at point. Something from vim which is quite nice. --- Emacs/.config/emacs/core.org | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 9ff0905..26be8ab 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -271,6 +271,17 @@ though, as I may disagree with some. So I use it in a mode to mode basis. (use-package evil-collection :after evil) #+end_src +** Evil number +Increment/decrement a number at point like Vim does, but use bindings +that don't conflict with Emacs default. +#+begin_src emacs-lisp +(use-package evil-numbers + :after evil + :general + (nmmap + "+" #'evil-numbers/inc-at-pt + "-" #'evil-numbers/dec-at-pt)) +#+end_src * Completion Emacs is a text based interface. Completion is its bread and butter in providing good user experience. By default Emacs provides -- cgit v1.2.3-13-gbd6f From e07c2c145722c3fd29d2eec6e5c665b1f3ac8acd Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 21:52:07 +0630 Subject: (Emacs/app)~Made eshell prompt a bit cooler Now it shows if the worktree is unclean and how many commits ahead or behind we are from the remote (if one is set). --- Emacs/.config/emacs/app.org | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 61ca240..ce47e23 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -455,17 +455,39 @@ much faster than ~cd ..; ls -l~). #+begin_src emacs-lisp (use-package eshell :config + (defun +eshell/--git-get-remote-status () + (let* ((branch-status (split-string + (shell-command-to-string "git status | grep 'Your branch is'"))) + (status (nth 3 branch-status)) + (diff (cl-position "by" branch-status :test #'string=))) + (if (null diff) + (propertize "=" 'font-lock-face '(:foreground "green")) + (let ((n (nth (+ 1 diff) branch-status))) + (concat + (cond + ((string= status "ahead") + (propertize "→ " 'font-lock-face '(:foreground "dodger blue"))) + ((string= status "behind") + (propertize "← " 'font-lock-face '(:foreground "orange red")))) + n))))) + + (defun +eshell/--git-get-change-status () + (let ((changed-files (- (length (split-string (shell-command-to-string "git status -s" ) "\n")) 1))) + (if (= changed-files 0) + (propertize "✓" 'font-lock-face '(:foreground "green")) + (propertize (number-to-string changed-files) 'font-lock-face '(:foreground "red"))))) + (defun +eshell/get-git-properties () (let ((git-branch (shell-command-to-string "git branch"))) (if (or (string= git-branch "") (not (string= "*" (substring git-branch 0 1)))) "" (format - "(%s<%s>)" + "(%s<%s>[%s])" (nth 2 (split-string git-branch "\n\\|\\*\\| ")) - (if (string= "" (shell-command-to-string "git status | grep 'up to date'")) - (propertize "×" 'font-lock-face '(:foreground "red")) - (propertize "✓" 'font-lock-face '(:foreground "green"))))))) + (+eshell/--git-get-change-status) + (+eshell/--git-get-remote-status))))) + (defun +eshell/prompt-function () (let ((git (+eshell/get-git-properties))) (mapconcat -- cgit v1.2.3-13-gbd6f From 55862a521696b9e36b43d719587a9f266b21749b Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 21:58:44 +0630 Subject: (Emacs/app)+eshell command that goes to `projectile-project-root` if it exists --- Emacs/.config/emacs/app.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index ce47e23..8fcecbb 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -520,7 +520,14 @@ much faster than ~cd ..; ls -l~). (defun eshell/goto (&rest args) "Use `read-directory-name' to change directories." - (eshell/cd (list (read-directory-name "Enter directory to go to:"))))) + (eshell/cd (list (read-directory-name "Enter directory to go to:")))) + + (with-eval-after-load "projectile" + (defun eshell/goto-project-root (&rest args) + "Change to directory `projectile-project-root'" + (if (projectile-project-root) + (eshell/cd (list (projectile-project-root))) + (eshell/echo "Projectile not active here..."))))) #+end_src ** Eshell change directory quickly ~eshell/goto~ is a better ~cd~ for eshell. However it is really just -- cgit v1.2.3-13-gbd6f From 98626cf2a8af51ea8e6ada03956c2c990d48074b Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 22:00:16 +0630 Subject: (Emacs/config)+wgrep binding to grep-mode-map --- Emacs/.config/emacs/config.org | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index c113a7b..f46344d 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -650,7 +650,11 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. (reusable-frames . t)) :general (search-leader - "d" #'rgrep)) + "d" #'rgrep) + (nmmap + :keymaps 'grep-mode-map + "0" #'evil-digit-argument-or-evil-beginning-of-line + "W" #'wgrep-change-to-wgrep-mode)) #+end_src *** rg #+begin_src emacs-lisp -- cgit v1.2.3-13-gbd6f From f735120b97f74e44c7339068cfe256abc2879f86 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 22:03:52 +0630 Subject: (Emacs/config)~Makefile auto insert now generates dependencies Using -M* options in gcc and clang we can generate dependencies for C files which can be used by make to rebuild files based on other files. --- Emacs/.config/emacs/config.org | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index f46344d..7f9e924 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1081,30 +1081,28 @@ change it for C++. "CC=gcc CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -std=c11 LIBS= + ARGS= OUT=main.out SRC=src DIST=build - -CODE=$(addprefix $(SRC)/, main.c) +CODE=$(addprefix $(SRC)/, ) # add source files here OBJECTS=$(CODE:$(SRC)/%.c=$(DIST)/%.o) -DEPS=$(OBJECTS:%.o=%.d) +DEPDIR:=$(DIST)/dependencies +DEPFLAGS=-MT $@ -MMD -MP -MF +DEPS:=$(CODE:$(SRC)/%.c=$(DEPDIR):%.d) $(DEPDIR)/main.d .PHONY: all all: $(OUT) $(OUT): $(DIST)/$(OUT) -$(DIST)/$(OUT): $(OBJECTS) - mkdir -p $(DIST) +$(DIST)/$(OUT): $(OBJECTS) $(SRC)/main.o | $(DIST) $(CC) $(CFLAGS) $^ -o $@ $(LIBS) --include $(DEPS) - -$(DIST)/%.o: $(SRC)/%.c - mkdir -p $(DIST) - $(CC) $(CFLAGS) -MMD -c $< -o $@ $(LIBS) +$(DIST)/%.o: $(SRC)/%.c | $(DIST) $(DEPDIR) + $(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS) .PHONY: run run: $(DIST)/$(OUT) @@ -1113,6 +1111,14 @@ run: $(DIST)/$(OUT) .PHONY: clean: rm -rfv $(DIST)/* + +$(DIST): + mkdir -p $(DIST) + +$(DEPDIR): + mkdir -p $(DEPDIR) + +-include $(DEPS) " _)) #+end_src -- cgit v1.2.3-13-gbd6f From 61ab6e7b7dabe0f618df530ab7b9ad9f29fe376f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 22:10:04 +0630 Subject: (Emacs/straight)~updated default.el --- Emacs/.config/emacs/straight/versions/default.el | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/straight/versions/default.el b/Emacs/.config/emacs/straight/versions/default.el index 07cbc38..412e488 100644 --- a/Emacs/.config/emacs/straight/versions/default.el +++ b/Emacs/.config/emacs/straight/versions/default.el @@ -1,5 +1,6 @@ (("Emacs-wgrep" . "f9687c28bbc2e84f87a479b6ce04407bb97cfb23") ("ace-window" . "c7cb315c14e36fded5ac4096e158497ae974bec9") + ("aggressive-indent-mode" . "a437a45868f94b77362c6b913c5ee8e67b273c42") ("all-the-icons.el" . "6f876fa11ef64af20d9b2a44fdabac6446de51ba") ("amx" . "37f9c7ae55eb0331b27200fb745206fc58ceffc0") ("annalist.el" . "134fa3f0fb91a636a1c005c483516d4b64905a6d") @@ -7,6 +8,7 @@ ("biblio.el" . "ee52f6cda82ea6fbc3b400e7b12132595cc0374c") ("citeproc-el" . "678db833e0128fe399ad4c99794186b46f33a68a") ("company-mode" . "88001d794d963049339883216b6606de0a1209ea") + ("compat" . "0108c5d31f1866cd4797efaa89431ac1d9af641f") ("counsel-projectile" . "06b03c1080d3ccc3fa9b9c41b1ccbcf13f058e4b") ("dash.el" . "a17b6b5409825891423b3867cd7bea84852d6ddd") ("eglot" . "b4ffcf26fb392ed83f6c40bc9b62cbe54483119c") @@ -14,19 +16,20 @@ ("eldoc" . "a8068079578b8a8bfffa046bd79f2005813161fe") ("eldoc-box" . "d4574ee392b9a8c537bec895be37468b600c25ac") ("elfeed" . "e29c8b91450bd42d90041231f769c4e5fe5070da") - ("elisp-refs" . "b3634a4567c655a1cda51b217629849cba0ac6a7") - ("emacs-dashboard" . "c3105dc0e1a32037a0db2d2808c980dd01053a8b") + ("elisp-refs" . "541a064c3ce27867872cf708354a65d83baf2a6d") ("emacs-htmlize" . "49205105898ba8993b5253beec55d8bddd820a70") + ("emacs-request" . "01e338c335c07e4407239619e57361944a82cb8a") ("emacs-which-key" . "c632dbf27a77c1c73ce559041b3a78ec5f78b187") ("emacsmirror-mirror" . "5785643381798bc5c82a11a1b9492c5857a20957") ("emmet-mode" . "1acb821e0142136344ccf40c1e5fb664d7db2e70") ("epl" . "78ab7a85c08222cd15582a298a364774e3282ce6") - ("esup" . "4b49c8d599d4cc0fbf994e9e54a9c78e5ab62a5f") + ("erc" . "6c8b390ae3ffe2d1c8d8200785da64100d8ad3cd") ("evil" . "325a822bee6b9f8590e6e77fe73b4d916fcec357") ("evil-collection" . "b45ec5b3156d27a18a949e4bf55643107a21abc2") ("evil-commentary" . "2dab6ac34d1617971768ad219d73af48f7473fec") ("evil-ledger" . "7a9f9f5d39c42fffdba8004f8982642351f2b233") ("evil-mc" . "f04fb17f35f2722f2ac93c862b4450bb8e5b739a") + ("evil-numbers" . "7a1b62afc12da2b582bf84d722e7b10ca8b97065") ("evil-org-mode" . "80ef38fb378541937f6ddfe836809e76eda1e355") ("evil-surround" . "346d4d85fcf1f9517e9c4991c1efe68b4130f93a") ("f.el" . "c4dbf8c8e83df834f5d6f72cd5649b9d8a8812ec") @@ -38,28 +41,30 @@ ("gnu-elpa-mirror" . "ff81342fefc6e7a58ce5861965d363d5c8b2de7c") ("goto-chg" . "2af612153bc9f5bed135d25abe62f46ddaa9027f") ("haskell-mode" . "20f72ccc17c8233dbb7c94ebf52a2a59e7d97730") - ("helpful" . "7e4b1f0d5572a4e2b8ee7a9b084ef863d0315a73") + ("helm-bibtex" . "8b71b4f5ce62eeaf18067f57faaddc06449fbe1c") + ("helpful" . "a32a5b3d959a7fccf09a71d97b3d7c888ac31c69") ("hl-todo" . "4d18ccde596aef84ef278aa60144390ab41f0046") ("ht.el" . "cdc76669a5032c42a2b9f7cddcbc33c5deeb6beb") ("hydra" . "317e1de33086637579a7aeb60f77ed0405bf359b") ("jsonrpc" . "dbfa30971026dacd9389f4312b0dd7a12fef0d87") ("key-chord" . "7f7fd7c5bd2b996fa054779357e1566f7989e07d") + ("le-thesaurus.el" . "83e8df8957a3b8167cc2bf97849a1eca555ce9a6") ("ledger-mode" . "4c48d4136229e1ba399906d6b23f7f39c9d4fb3c") ("let-alist" . "6708ec0b2e6dff80ff5b64698aa009d9070a2ed2") ("magit" . "386843483b262ad57b24aec3167035b01acb4bf1") ("melpa" . "d35f8cf6c6e0ee440ee5b6ca150b87015d1d4a46") ("nhexl-mode" . "211e6c72e1489426cde64eb9ac26719463524bde") ("no-littering" . "57357e15643158b4e0d9b3b4f70a82f5fc73178a") + ("nongnu-elpa" . "5623e3864f87f49d18bc48b3656dc0c2dea42973") ("notmuch" . "4e209ca99ac8084a357c6fc8d7773f6207cfa16d") ("olivetti" . "95479d5178fc5017060c963a45de0d2095c00e0f") ("orderless" . "2646dad28c0819fbe9ee521d39efb9ae40e03982") ("org" . "8589de94d8a44cd566eb3fe128f8091d7e958ee9") - ("org-fragtog" . "c675563af3f9ab5558cfd5ea460e2a07477b0cfd") ("org-msg" . "7b1dfb96d558f6e5626e96d4f4a5150d55cb7eb2") + ("org-ref" . "190248311f90cfc4f0cceef20c7bd52a5d5aa66f") ("org-reveal" . "f55c851bf6aeb1bb2a7f6cf0f2b7bd0e79c4a5a0") ("org-superstar-mode" . "54c81c27dde2a6dc461bb064e79a8b2089093a2e") ("ox-pandoc" . "f8eac5e5692fc44a4724ada43191e7c28a1ccf30") - ("page-break-lines" . "69caea070379f3324c530e96e06625c3cd097cb9") ("parsebib" . "ace9df707108b17759c004c7387655277122d4c1") ("pdf-tools" . "bb0b71f5bafd81d0b5647c4ec48fafa0bb6f6c21") ("pdfgrep" . "a4ca0a1e6521de93f28bb6736a5344b4974d144c") @@ -71,10 +76,12 @@ ("queue" . "130c2d656cd5d7376552272fab9e50a7c37d0c4a") ("racket-mode" . "7f12cb1ff2774e7592632d8aab1572f57d045419") ("rg.el" . "10e64887c224002572e1f1e19c74453cba606c3f") + ("rust-mode" . "b2b18aa6c135d9b06242b3d081d94fe0c0cb8e86") ("s.el" . "43ba8b563bee3426cead0e6d4ddc09398e1a349d") + ("seq" . "4355cde01767911660f761cf874edb412d06bd7a") ("sly" . "ef5211456a59d639c98b2ed42428726d32728ff8") ("smartparens" . "c59bfef7e8f1687ac77b0afaaaed86d8051d3de1") - ("straight.el" . "3eca39dfc6797243ec7d1c6a7d45142407f73f88") + ("straight.el" . "b3760f5829dba37e855add7323304561eb57a3d4") ("string-inflection" . "50ad54970b3cc79b6b83979bde9889ad9a9e1a9c") ("swiper" . "47b496544e238041bca5e3c9ca55848648344312") ("tablist" . "faab7a035ef2258cc4ea2182f67e3aedab7e2af9") @@ -87,4 +94,4 @@ ("xref" . "b2bf147ee8bb6c67403e6ce2104e164f184623c8") ("yaml-mode" . "fc5e1c58f94472944c4aa838f00f6adcac6fa992") ("yasnippet" . "5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6")) -:beta +:gamma -- cgit v1.2.3-13-gbd6f From c3518cb39c2039e0cd434dabcac268920b45da58 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 22:10:39 +0630 Subject: (Emacs/config|app)~disabled a few unused packages --- Emacs/.config/emacs/app.org | 22 ++++++++++++++++------ Emacs/.config/emacs/config.org | 5 ++++- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 8fcecbb..347c25f 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -556,7 +556,10 @@ using. (eshell-send-input)) (message "Could not switch eshell: buffer is not real file"))))) #+end_src -* Elfeed +* WIP Elfeed +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: Elfeed is the perfect RSS feed reader, integrated into Emacs perfectly. I've got a set of feeds that I use for a large variety of stuff, mostly media and entertainment. I've also bound " ar" @@ -670,6 +673,8 @@ don't need to write everything myself. (evil-collection-magit-setup))) #+end_src * IBuffer +IBuffer is the dired of buffers: providing the ability to mark +buffers, mass rename/delete and just observe stuff. #+begin_src emacs-lisp (use-package ibuffer :general @@ -679,14 +684,13 @@ don't need to write everything myself. (with-eval-after-load "evil-collection" (evil-collection-ibuffer-setup))) #+end_src -* Processes +* Proced Emacs has two systems for process management: + proced: a general 'top' like interface which allows general management of linux processes + list-processes: a specific Emacs based system that lists processes spawned by Emacs (similar to a top for Emacs specifically) -** Proced Core proced config, just a few bindings and evil collection setup. #+begin_src emacs-lisp (use-package proced @@ -707,7 +711,7 @@ Core proced config, just a few bindings and evil collection setup. (with-eval-after-load "evil-collection" (evil-collection-proced-setup))) #+end_src - +** Proced narrow Along with that I setup the package ~proced-narrow~ which allows further filtering of the process list. #+begin_src emacs-lisp @@ -773,7 +777,10 @@ work for me given the various TeX utilities installed via Arch. :straight (calctex :type git :host github :repo "johnbcoughlin/calctex") :hook (calc-mode-hook . calctex-mode)) #+end_src -* Ledger +* WIP Ledger +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: #+begin_src emacs-lisp (use-package ledger-mode :defer t) @@ -829,7 +836,10 @@ or something, but very annoying as it's a break from standards! :keymaps 'Man-mode-map "RET" #'man-follow)) #+end_src -* gif-screencast +* WIP gif-screencast +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: Little application that uses =gifsicle= to make essentially videos of Emacs. Useful for demonstrating features. #+begin_src emacs-lisp diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 7f9e924..712d05a 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1790,7 +1790,10 @@ it as an option in ~org-babel-load-languages~. 'org-babel-load-languages '((C . t)))) #+end_src -** D +** WIP D +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: D is a systems level programming language with C-style syntax. I think it has some interesting ideas such as a toggleable garbage collector. Here I just install the D-mode package, enable ~org-babel~ -- cgit v1.2.3-13-gbd6f From cdc3f11a81fc099bcaf0b02ca73786bf1e338bfe Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 22:29:01 +0630 Subject: (Emacs/config) Languages section -> lang.org Almost 700 lines of content, might as well move it. --- Emacs/.config/emacs/config.org | 746 +--------------------------------------- Emacs/.config/emacs/lang.org | 749 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 755 insertions(+), 740 deletions(-) create mode 100644 Emacs/.config/emacs/lang.org (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 712d05a..996ccfc 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1070,58 +1070,6 @@ Colourising the compilation buffer so ANSI colour codes get computed. (ansi-color-apply-on-region (point-min) (point-max)))) (add-hook 'compilation-filter-hook #'+compile/colourise)) #+end_src -** Makefile -Defines an auto-insert for Makefiles. Assumes C but it's very easy to -change it for C++. -#+begin_src emacs-lisp -(use-package emacs - :auto-insert - (("[mM]akefile\\'" . "Makefile skeleton") - "" - "CC=gcc -CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -std=c11 -LIBS= - -ARGS= -OUT=main.out - -SRC=src -DIST=build -CODE=$(addprefix $(SRC)/, ) # add source files here -OBJECTS=$(CODE:$(SRC)/%.c=$(DIST)/%.o) -DEPDIR:=$(DIST)/dependencies -DEPFLAGS=-MT $@ -MMD -MP -MF -DEPS:=$(CODE:$(SRC)/%.c=$(DEPDIR):%.d) $(DEPDIR)/main.d - -.PHONY: all -all: $(OUT) - -$(OUT): $(DIST)/$(OUT) - -$(DIST)/$(OUT): $(OBJECTS) $(SRC)/main.o | $(DIST) - $(CC) $(CFLAGS) $^ -o $@ $(LIBS) - -$(DIST)/%.o: $(SRC)/%.c | $(DIST) $(DEPDIR) - $(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS) - -.PHONY: run -run: $(DIST)/$(OUT) - ./$^ $(ARGS) - -.PHONY: -clean: - rm -rfv $(DIST)/* - -$(DIST): - mkdir -p $(DIST) - -$(DEPDIR): - mkdir -p $(DEPDIR) - --include $(DEPS) -" - _)) -#+end_src * Org mode 2023-03-30: finally decided to give org mode its own section. @@ -1541,693 +1489,11 @@ default asterisks. (use-package org-superstar :hook (org-mode-hook . org-superstar-mode)) #+end_src -* Languages -Configuration for specific languages or file formats. -** PDF -I use PDFs mostly for reading reports or papers. Though Emacs isn't -my preferred application for viewing PDFs (I highly recommend -[[https://pwmt.org/projects/zathura/][Zathura]]), similar to most things with Emacs, having a PDF viewer -builtin can be a very useful asset. - -For example if I were editing an org document which I was eventually -compiling into a PDF, my workflow would be much smoother with a PDF -viewer within Emacs that I can open on another pane. -*** PDF tools -~pdf-tools~ provides the necessary functionality for viewing PDFs. -There is no proper PDF viewing without this package. -~evil-collection~ provides a setup for this mode, so use that. -#+begin_src emacs-lisp -(use-package pdf-tools - :mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode) - :straight t - :display - ("^.*pdf$" - (display-buffer-same-window) - (inhibit-duplicate-buffer . t)) - :config - (pdf-tools-install-noverify) - (with-eval-after-load "evil-collection" - (evil-collection-pdf-setup))) -#+end_src -*** PDF grep -PDF grep is a Linux tool that allows for searches against the text -inside of PDFs similar to standard grep. This cannot be performed by -standard grep due to how PDFs are encoded; they are not a clear text -format. -#+begin_src emacs-lisp -(use-package pdfgrep - :after pdf-tools - :hook (pdf-view-mode-hook . pdfgrep-mode) - :general - (nmap - :keymaps 'pdf-view-mode-map - "M-g" #'pdfgrep)) -#+end_src -** SQL -The default SQL package provides support for connecting to common -database types (sqlite, mysql, etc) for auto completion and query -execution. I don't use SQL currently but whenever I need it it's -there. -#+begin_src emacs-lisp -(use-package sql - :defer t - :straight nil - :init - (setq sql-display-sqli-buffer-function nil)) -#+end_src -** WIP Ada -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Check out [[file:elisp/ada-mode.el][ada-mode]], my custom ~ada-mode~ -that replaces the default one. This mode just colourises stuff, and -uses eglot and a language server to do the hard work. - -#+begin_src emacs-lisp -(use-package ada-mode - :straight nil - :load-path "elisp/" - :defer t - :config - (with-eval-after-load "eglot" - (add-hook 'ada-mode-hook #'eglot))) -#+end_src -** NHexl -Hexl-mode is the inbuilt package within Emacs to edit hex and binary -format buffers. There are a few problems with hexl-mode though, -including an annoying prompt on /revert-buffer/. - -Thus, nhexl-mode! It comes with a few other improvements. Check out -the [[https://elpa.gnu.org/packages/nhexl-mode.html][page]] yourself. -#+begin_src emacs-lisp -(use-package nhexl-mode - :straight t - :mode "\\.bin") -#+end_src -** C/C++ -Setup for C and C++ modes via the cc-mode package. C and C++ are -great languages for general purpose programming. My preferred choice -when I want greater control over memory management. -*** cc-mode -Tons of stuff, namely: -+ ~auto-fill-mode~ for 80 char limit -+ Some keybindings to make evil statement movement is easy -+ Lots of pretty symbols -+ Indenting options and a nice (for me) code style for C (though - aggressive indent screws with this a bit) -+ Auto inserts to get a C file going -#+begin_src emacs-lisp -(use-package cc-mode - :defer t - :hook - (c-mode-hook . auto-fill-mode) - (c++-mode-hook . auto-fill-mode) - :general - (:keymaps '(c-mode-map c++-mode-map) - :states '(normal motion visual) - "(" #'c-beginning-of-statement - ")" #'c-end-of-statement) - :pretty - (c-mode-hook - ("puts" . "φ") - ("fputs" . "ϕ") - ("printf" . "ω") - ("fprintf" . "Ω") - ("NULL" . "Ø") - ("true" . "⊨") - ("false" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("return" . "⟼")) - (c++-mode-hook - ("nullptr" . "Ø") - ("string" . "𝕊") - ("vector" . "ℓ") - ("puts" . "φ") - ("fputs" . "ϕ") - ("printf" . "ω") - ("fprintf" . "Ω") - ("NULL" . "Ø") - ("true" . "⊨") - ("false" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("return" . "⟼")) - :init - (setq-default c-basic-offset 2) - (setq-default c-auto-newline nil) - (setq-default c-default-style '((other . "user"))) - (defun +cc/copyright-notice () - (let* ((lines (split-string (+license/copyright-notice) "\n")) - (copyright-line (car lines)) - (rest (cdr lines))) - (concat - "* " - copyright-line - "\n" - (mapconcat - #'(lambda (x) - (if (string= x "") - "" - (concat " * " x))) - rest - "\n")))) - - :auto-insert - (("\\.c\\'" . "C skeleton") - "" - "/" (+cc/copyright-notice) "\n\n" - " * Created: " (format-time-string "%Y-%m-%d") "\n" - " * Author: " user-full-name "\n" - " * Description: " _ "\n" - " */\n" - "\n") - (("\\.cpp\\'" "C++ skeleton") - "" - "/" (+cc/copyright-notice) "\n\n" - " * Created: " (format-time-string "%Y-%m-%d") "\n" - " * Author: " user-full-name "\n" - " * Description: " _ "\n" - " */\n" - "\n") - (("\\.\\([Hh]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'" . "C / C++ header") - (replace-regexp-in-string "[^A-Z0-9]" "_" - (string-replace "+" "P" - (upcase - (file-name-nondirectory buffer-file-name)))) - "/" (+cc/copyright-notice) "\n\n" - " * Created: " (format-time-string "%Y-%m-%d") "\n" - " * Author: " user-full-name "\n" - " * Description: " _ "\n" - " */\n\n" - "#ifndef " str n "#define " str "\n\n" "\n\n#endif") - :config - (c-add-style - "user" - '((c-basic-offset . 2) - (c-comment-only-line-offset . 0) - (c-hanging-braces-alist (brace-list-open) - (brace-entry-open) - (substatement-open after) - (block-close . c-snug-do-while) - (arglist-cont-nonempty)) - (c-cleanup-list brace-else-brace) - (c-offsets-alist - (statement-block-intro . +) - (substatement-open . 0) - (access-label . -) - (inline-open . 0) - (label . 0) - (statement-cont . +))))) -#+end_src -*** Clang format -Clang format comes inbuilt with clang, so download that before using -this. Formats C/C++ files depending on a format (checkout the Clang -format [[file:~/Dotfiles/ClangFormat/.clang-format][config file]] in -my dotfiles). - -#+begin_src emacs-lisp -(use-package clang-format - :straight nil - :load-path "/usr/share/clang/" - :after cc-mode - :commands (+code/clang-format-region-or-buffer - clang-format-mode) - :hook - (c-mode-hook . clang-format-mode) - (c++-mode-hook . clang-format-mode) - :general - (code-leader - :keymaps '(c-mode-map c++-mode-map) - "f" #'+code/clang-format-region-or-buffer) - :config - (define-minor-mode clang-format-mode - "On save formats the current buffer via clang-format." - :lighter nil - (let ((save-func (proc (interactive) - (clang-format-buffer)))) - (if clang-format-mode - (add-hook 'after-save-hook save-func nil t) - (remove-hook 'after-save-hook save-func t)))) - (defun +code/clang-format-region-or-buffer () - (interactive) - (if (mark) - (clang-format-region (region-beginning) (region-end)) - (clang-format-buffer)))) -#+end_src -*** cc org babel -To ensure org-babel executes language blocks of C/C++, I need to load -it as an option in ~org-babel-load-languages~. -#+begin_src emacs-lisp -(use-package org - :after cc-mode - :init - (org-babel-do-load-languages - 'org-babel-load-languages - '((C . t)))) -#+end_src -** WIP D -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -D is a systems level programming language with C-style syntax. I -think it has some interesting ideas such as a toggleable garbage -collector. Here I just install the D-mode package, enable ~org-babel~ -execution of d-mode blocks and alias ~D-mode~ with ~d-mode~. - -#+begin_src emacs-lisp -(use-package d-mode - :defer t - :straight t - :config - (fset 'D-mode 'd-mode) - (with-eval-after-load "org-mode" - (setf (alist-get 'd org-babel-load-languages) t))) -#+end_src -** Rust -#+begin_src emacs-lisp -(use-package rust-mode - :straight t - :general - (code-leader - :keymaps 'rust-mode-map - "f" #'rust-format-buffer) - (local-leader - :keymaps 'rust-mode-map - "c" #'rust-run-clippy) - :init - (setq rust-format-on-save t) - (with-eval-after-load "eglot" - (add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer")))) -#+end_src -** Racket -A scheme with lots of stuff inside it. Using it for a language design -book so it's useful to have some Emacs binds for it. -#+begin_src emacs-lisp -(use-package racket-mode - :straight t - :hook (racket-mode-hook . racket-xp-mode) - :display - ("\\*Racket.*" - (display-buffer-at-bottom) - (window-height . 0.25)) - :init - (setq racket-documentation-search-location 'local) - :general - (nmap - :keymaps 'racket-describe-mode-map - "q" #'quit-window) - (nmap - :keymaps 'racket-mode-map - "gr" #'racket-eval-last-sexp) - (local-leader - :keymaps '(racket-mode-map racket-repl-mode-map) - "d" #'racket-repl-describe) - (local-leader - :keymaps 'racket-mode-map - "r" #'racket-run - "i" #'racket-repl - "e" #'racket-send-definition - "sr" #'racket-send-region - "sd" #'racket-send-definition)) -#+end_src -** WIP CSharp -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Haven't used C# in a while, but Emacs is alright for it with -omnisharp. -#+begin_src emacs-lisp -(use-package csharp-mode - :defer t - :pretty - (csharp-mode-hook - ("null" . "∅") - ("string" . "𝕊") - ("List" . "ℓ") - ("WriteLine" . "φ") - ("Write" . "ω") - ("true" . "⊨") - ("false" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("return" . "⟼"))) -#+end_src -** Java -I kinda dislike Java, but if necessary I will code in it. Just setup -a style and some pretty symbols. You can use LSP to get cooler -features to be fair. -#+begin_src emacs-lisp -(use-package ob-java - :straight nil - :defer t - :pretty - (java-mode-hook - ("println" . "φ") - ("printf" . "ω") - ("null" . "Ø") - ("true" . "⊨") - ("false" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("return" . "⟼")) - :config - (with-eval-after-load "cc-mode" - (c-add-style - "java" - '((c-basic-offset . 4) - (c-comment-only-line-offset 0 . 0) - (c-offsets-alist - (inline-open . 0) - (topmost-intro-cont . +) - (statement-block-intro . +) - (knr-argdecl-intro . 5) - (substatement-open . 0) - (substatement-label . +) - (label . +) - (statement-case-open . +) - (statement-cont . +) - (arglist-intro . c-lineup-arglist-intro-after-paren) - (arglist-close . c-lineup-arglist) - (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ +) - (access-label . 0) - (inher-cont . c-lineup-java-inher) - (func-decl-cont . c-lineup-java-throws)))) - (add-to-list 'c-default-style '(java-mode . "java"))) - - (with-eval-after-load "abbrev" - (define-abbrev-table 'java-mode-abbrev-table nil) - (add-hook 'java-mode-hook - (proc (setq-local local-abbrev-table java-mode-abbrev-table))))) -#+end_src -** Haskell -Haskell is a static lazy functional programming language (what a -mouthful). It's quite a beautiful language and really learning it will -change the way you think about programming. However, my preferred -functional language is still unfortunately Lisp so no extra brownie -points there. - -Here I configure the REPL for Haskell via the -~haskell-interactive-mode~. I also load my custom package -[[file:elisp/haskell-multiedit.el][haskell-multiedit]] which allows a user to create temporary -~haskell-mode~ buffers that, upon completion, will run in the REPL. -Even easier than making your own buffer. -#+begin_src emacs-lisp -(use-package haskell-mode - :hook - (haskell-mode-hook . haskell-indentation-mode) - (haskell-mode-hook . interactive-haskell-mode) - :custom - (haskell-interactive-prompt "[λ] ") - (haskell-interactive-prompt-cont "{λ} ") - (haskell-interactive-popup-errors nil) - (haskell-stylish-on-save nil) - (haskell-process-type 'stack-ghci) - :general - (shell-leader - "h" #'+shell/toggle-haskell-repl) - :display - ("\\*haskell.**\\*" - (display-buffer-at-bottom) - (window-height . 0.25)) - :config - (load (concat user-emacs-directory "elisp/haskell-multiedit.el")) - (+oreo/create-toggle-function - +shell/toggle-haskell-repl - "*haskell*" - haskell-interactive-bring - nil)) -#+end_src -** Python -Works well for python. If you have ~pyls~ it should be on your path, so -just run eglot if you need. But an LSP server is not necessary for a -lot of my time in python. Here I also setup org-babel for python -source code blocks. -#+begin_src emacs-lisp -(use-package python - :defer t - :straight nil - :pretty - (python-mode-hook - ("None" . "Ø") - ("list" . "ℓ") - ("List" . "ℓ") - ("str" . "𝕊") - ("True" . "⊨") - ("False" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("print" . "φ") - ("lambda" . "λ") - ("return" . "⟼") - ("yield" . "⟻")) - :init - (setq python-indent-offset 4) - :config - (with-eval-after-load "org-mode" - (setf (alist-get 'python org-babel-load-languages) t))) -#+end_src -*** Python shell -Setup for python shell, including a toggle option -#+begin_src emacs-lisp -(use-package python - :straight nil - :commands +python/toggle-repl - :general - (shell-leader - "p" #'+shell/python-toggle-repl) - :display - ("\\*Python\\*" - (display-buffer-at-bottom) - (window-height . 0.25)) - :config - (+oreo/create-toggle-function - +shell/python-toggle-repl - "*Python*" - run-python - nil)) -#+end_src -** YAML -YAML is a data language which is useful for config files. -#+begin_src emacs-lisp -(use-package yaml-mode - :straight t) -#+end_src -** HTML/CSS/JS -Firstly, web mode for consistent colouring of syntax. -#+begin_src emacs-lisp -(use-package web-mode - :mode ("\\.html" . web-mode) - :mode ("\\.js" . web-mode) - :mode ("\\.css" . web-mode) - :custom - ((web-mode-code-indent-offset 2) - (web-mode-markup-indent-offset 2) - (web-mode-css-indent-offset 2))) -#+end_src -*** Emmet -Emmet for super speed code writing. -#+begin_src emacs-lisp -(use-package emmet-mode - :hook (web-mode-hook . emmet-mode) - :general - (imap - :keymaps 'emmet-mode-keymap - "TAB" #'emmet-expand-line - "M-j" #'emmet-next-edit-point - "M-k" #'emmet-prev-edit-point)) -#+end_src -*** HTML Auto insert -#+begin_src emacs-lisp -(use-package web-mode - :defer t - :auto-insert - (("\\.html\\'" . "HTML Skeleton") - "" - " - - - - - "(read-string "Enter title: ") | """ - - - - - - - - - - - -" - _ - " -")) -#+end_src -** Typescript -Kinda expressive, interesting. -#+begin_src emacs-lisp -(use-package typescript-mode - :defer t - :init - (setq typescript-indent-level 2)) -#+end_src -** Common Lisp -Common Lisp is a dialect of Lisp, the most /common/ one around. Emacs -comes with builtin Lisp support of course, but a REPL would be nice. - -Enter /SLY/. Sly is a fork of /SLIME/ and is *mandatory* for lisp -development on Emacs. - -#+begin_src emacs-lisp -(use-package sly - :straight t - :init - (setq inferior-lisp-program "sbcl") - :display - ("\\*sly-db" - (display-buffer-at-bottom) - (window-height . 0.5)) - ("\\*sly-" - (display-buffer-at-bottom) - (window-height . 0.25)) - :config - (evil-set-initial-state 'sly-db-mode 'emacs) - (with-eval-after-load "org" - (setq-default org-babel-lisp-eval-fn #'sly-eval)) - (with-eval-after-load "company" - (add-hook 'sly-mrepl-hook #'company-mode)) - (+oreo/create-toggle-function - +shell/toggle-sly - "*sly-mrepl for sbcl*" - sly-mrepl - nil) - :general - (shell-leader - "s" #'+shell/toggle-sly) - (nmap - :keymaps '(lisp-mode-map sly-mrepl-mode-map) - "gr" #'sly-eval-buffer - "gd" #'sly-edit-definition - "gR" #'sly-who-calls) - (local-leader - :keymaps '(lisp-mode-map sly-mrepl-mode-map) - "s" #'+shell/toggle-sly - "c" #'sly-compile-file - "a" #'sly-apropos - "d" #'sly-describe-symbol - "D" #'sly-documentation-lookup - "S" #'sly-mrepl-sync - "E" #'sly-eval-defun) - (local-leader - :keymaps 'lisp-mode-map - :infix "e" - "b" #'sly-eval-buffer - "e" #'sly-eval-last-expression - "f" #'sly-eval-defun - "r" #'sly-eval-region) - (nmap - :keymaps 'sly-inspector-mode-map - "q" #'sly-inspector-quit)) -#+end_src -*** Lisp indent function -Add a new lisp indent function which indents newline lists more -appropriately. +* Languages (loading) +For a variety of (programming) languages Emacs comes with default +modes but this configures them as well as pulls any modes Emacs +doesn't come with. I have a [[file:lang.org][separate file]] for this +configuration as it's quite large. #+begin_src emacs-lisp -(use-package lisp-mode - :straight nil - :pretty - (lisp-mode-hook - ("lambda" . "λ") - ("t" . "⊨") - ("nil" . "Ø") - ("and" . "∧") - ("or" . "∨") - ("defun" . "ƒ") - ("for" . "∀") - ("mapc" . "∀") - ("mapcar" . "∀")) - :general - (:states '(normal motion visual) - :keymaps '(emacs-lisp-mode-map lisp-mode-map) - ")" #'sp-next-sexp - "(" #'sp-previous-sexp) - :config - (defun +oreo/lisp-indent-function (indent-point state) - (let ((normal-indent (current-column)) - (orig-point (point))) - (goto-char (1+ (elt state 1))) - (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) - (cond - ;; car of form doesn't seem to be a symbol, or is a keyword - ((and (elt state 2) - (or (not (looking-at "\\sw\\|\\s_")) - (looking-at ":"))) - (if (not (> (save-excursion (forward-line 1) (point)) - calculate-lisp-indent-last-sexp)) - (progn (goto-char calculate-lisp-indent-last-sexp) - (beginning-of-line) - (parse-partial-sexp (point) - calculate-lisp-indent-last-sexp 0 t))) - ;; Indent under the list or under the first sexp on the same - ;; line as calculate-lisp-indent-last-sexp. Note that first - ;; thing on that line has to be complete sexp since we are - ;; inside the innermost containing sexp. - (backward-prefix-chars) - (current-column)) - ((and (save-excursion - (goto-char indent-point) - (skip-syntax-forward " ") - (not (looking-at ":"))) - (save-excursion - (goto-char orig-point) - (looking-at ":"))) - (save-excursion - (goto-char (+ 2 (elt state 1))) - (current-column))) - (t - (let ((function (buffer-substring (point) - (progn (forward-sexp 1) (point)))) - method) - (setq method (or (function-get (intern-soft function) - 'lisp-indent-function) - (get (intern-soft function) 'lisp-indent-hook))) - (cond ((or (eq method 'defun) - (and (null method) - (> (length function) 3) - (string-match "\\`def" function))) - (lisp-indent-defform state indent-point)) - ((integerp method) - (lisp-indent-specform method state - indent-point normal-indent)) - (method - (funcall method indent-point state)))))))) - (setq-default lisp-indent-function #'+oreo/lisp-indent-function)) -#+end_src -*** Emacs lisp -#+begin_src emacs-lisp -(use-package elisp-mode - :straight nil - :general - (vmap - :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) - "gr" #'eval-region)) +(load-file (concat user-emacs-directory "lang.el")) #+end_src diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org new file mode 100644 index 0000000..ce4e6de --- /dev/null +++ b/Emacs/.config/emacs/lang.org @@ -0,0 +1,749 @@ +#+title: Programming language configuration +#+author: Aryadev Chavali +#+description: Description +#+date: 2024-04-16 +#+property: header-args:emacs-lisp :tangle lang.el :comments link :results none +#+options: toc:nil +#+startup: noindent + +* Makefile +Defines an auto-insert for Makefiles. Assumes C but it's very easy to +change it for C++. +#+begin_src emacs-lisp +(use-package emacs + :auto-insert + (("[mM]akefile\\'" . "Makefile skeleton") + "" + "CC=gcc +CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -std=c11 +LIBS= + +ARGS= +OUT=main.out + +SRC=src +DIST=build +CODE=$(addprefix $(SRC)/, ) # add source files here +OBJECTS=$(CODE:$(SRC)/%.c=$(DIST)/%.o) +DEPDIR:=$(DIST)/dependencies +DEPFLAGS=-MT $@ -MMD -MP -MF +DEPS:=$(CODE:$(SRC)/%.c=$(DEPDIR):%.d) $(DEPDIR)/main.d + +.PHONY: all +all: $(OUT) + +$(OUT): $(DIST)/$(OUT) + +$(DIST)/$(OUT): $(OBJECTS) $(SRC)/main.o | $(DIST) + $(CC) $(CFLAGS) $^ -o $@ $(LIBS) + +$(DIST)/%.o: $(SRC)/%.c | $(DIST) $(DEPDIR) + $(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS) + +.PHONY: run +run: $(DIST)/$(OUT) + ./$^ $(ARGS) + +.PHONY: +clean: + rm -rfv $(DIST)/* + +$(DIST): + mkdir -p $(DIST) + +$(DEPDIR): + mkdir -p $(DEPDIR) + +-include $(DEPS) +" + _)) +#+end_src +* PDF +I use PDFs mostly for reading reports or papers. Though Emacs isn't +my preferred application for viewing PDFs (I highly recommend +[[https://pwmt.org/projects/zathura/][Zathura]]), similar to most +things with Emacs, having a PDF viewer builtin can be a very useful +asset. + +For example if I were editing an org document which I was eventually +compiling into a PDF, my workflow would be much smoother with a PDF +viewer within Emacs that I can open on another pane. +** PDF tools +~pdf-tools~ provides the necessary functionality for viewing PDFs. +There is no proper PDF viewing without this package. +~evil-collection~ provides a setup for this mode, so use that. +#+begin_src emacs-lisp +(use-package pdf-tools + :mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode) + :straight t + :display + ("^.*pdf$" + (display-buffer-same-window) + (inhibit-duplicate-buffer . t)) + :config + (pdf-tools-install-noverify) + (with-eval-after-load "evil-collection" + (evil-collection-pdf-setup))) +#+end_src +** PDF grep +PDF grep is a Linux tool that allows for searches against the text +inside of PDFs similar to standard grep. This cannot be performed by +standard grep due to how PDFs are encoded; they are not a clear text +format. +#+begin_src emacs-lisp +(use-package pdfgrep + :after pdf-tools + :hook (pdf-view-mode-hook . pdfgrep-mode) + :general + (nmap + :keymaps 'pdf-view-mode-map + "M-g" #'pdfgrep)) +#+end_src +* SQL +The default SQL package provides support for connecting to common +database types (sqlite, mysql, etc) for auto completion and query +execution. I don't use SQL currently but whenever I need it it's +there. +#+begin_src emacs-lisp +(use-package sql + :defer t + :straight nil + :init + (setq sql-display-sqli-buffer-function nil)) +#+end_src +* WIP Ada +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Check out [[file:elisp/ada-mode.el][ada-mode]], my custom ~ada-mode~ +that replaces the default one. This mode just colourises stuff, and +uses eglot and a language server to do the hard work. + +#+begin_src emacs-lisp +(use-package ada-mode + :straight nil + :load-path "elisp/" + :defer t + :config + (with-eval-after-load "eglot" + (add-hook 'ada-mode-hook #'eglot))) +#+end_src +* NHexl +Hexl-mode is the inbuilt package within Emacs to edit hex and binary +format buffers. There are a few problems with hexl-mode though, +including an annoying prompt on /revert-buffer/. + +Thus, nhexl-mode! It comes with a few other improvements. Check out +the [[https://elpa.gnu.org/packages/nhexl-mode.html][page]] yourself. +#+begin_src emacs-lisp +(use-package nhexl-mode + :straight t + :mode "\\.bin") +#+end_src +* C/C++ +Setup for C and C++ modes via the cc-mode package. C and C++ are +great languages for general purpose programming. My preferred choice +when I want greater control over memory management. +** cc-mode +Tons of stuff, namely: ++ ~auto-fill-mode~ for 80 char limit ++ Some keybindings to make evil statement movement is easy ++ Lots of pretty symbols ++ Indenting options and a nice (for me) code style for C (though + aggressive indent screws with this a bit) ++ Auto inserts to get a C file going +#+begin_src emacs-lisp +(use-package cc-mode + :defer t + :hook + (c-mode-hook . auto-fill-mode) + (c++-mode-hook . auto-fill-mode) + :general + (:keymaps '(c-mode-map c++-mode-map) + :states '(normal motion visual) + "(" #'c-beginning-of-statement + ")" #'c-end-of-statement) + :pretty + (c-mode-hook + ("puts" . "φ") + ("fputs" . "ϕ") + ("printf" . "ω") + ("fprintf" . "Ω") + ("NULL" . "Ø") + ("true" . "⊨") + ("false" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼")) + (c++-mode-hook + ("nullptr" . "Ø") + ("string" . "𝕊") + ("vector" . "ℓ") + ("puts" . "φ") + ("fputs" . "ϕ") + ("printf" . "ω") + ("fprintf" . "Ω") + ("NULL" . "Ø") + ("true" . "⊨") + ("false" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼")) + :init + (setq-default c-basic-offset 2) + (setq-default c-auto-newline nil) + (setq-default c-default-style '((other . "user"))) + (defun +cc/copyright-notice () + (let* ((lines (split-string (+license/copyright-notice) "\n")) + (copyright-line (car lines)) + (rest (cdr lines))) + (concat + "* " + copyright-line + "\n" + (mapconcat + #'(lambda (x) + (if (string= x "") + "" + (concat " * " x))) + rest + "\n")))) + + :auto-insert + (("\\.c\\'" . "C skeleton") + "" + "/" (+cc/copyright-notice) "\n\n" + " * Created: " (format-time-string "%Y-%m-%d") "\n" + " * Author: " user-full-name "\n" + " * Description: " _ "\n" + " */\n" + "\n") + (("\\.cpp\\'" "C++ skeleton") + "" + "/" (+cc/copyright-notice) "\n\n" + " * Created: " (format-time-string "%Y-%m-%d") "\n" + " * Author: " user-full-name "\n" + " * Description: " _ "\n" + " */\n" + "\n") + (("\\.\\([Hh]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'" . "C / C++ header") + (replace-regexp-in-string "[^A-Z0-9]" "_" + (string-replace "+" "P" + (upcase + (file-name-nondirectory buffer-file-name)))) + "/" (+cc/copyright-notice) "\n\n" + " * Created: " (format-time-string "%Y-%m-%d") "\n" + " * Author: " user-full-name "\n" + " * Description: " _ "\n" + " */\n\n" + "#ifndef " str n "#define " str "\n\n" "\n\n#endif") + :config + (c-add-style + "user" + '((c-basic-offset . 2) + (c-comment-only-line-offset . 0) + (c-hanging-braces-alist (brace-list-open) + (brace-entry-open) + (substatement-open after) + (block-close . c-snug-do-while) + (arglist-cont-nonempty)) + (c-cleanup-list brace-else-brace) + (c-offsets-alist + (statement-block-intro . +) + (substatement-open . 0) + (access-label . -) + (inline-open . 0) + (label . 0) + (statement-cont . +))))) +#+end_src +** Clang format +Clang format comes inbuilt with clang, so download that before using +this. Formats C/C++ files depending on a format (checkout the Clang +format [[file:~/Dotfiles/ClangFormat/.clang-format][config file]] in +my dotfiles). + +#+begin_src emacs-lisp +(use-package clang-format + :straight nil + :load-path "/usr/share/clang/" + :after cc-mode + :commands (+code/clang-format-region-or-buffer + clang-format-mode) + :hook + (c-mode-hook . clang-format-mode) + (c++-mode-hook . clang-format-mode) + :general + (code-leader + :keymaps '(c-mode-map c++-mode-map) + "f" #'+code/clang-format-region-or-buffer) + :config + (define-minor-mode clang-format-mode + "On save formats the current buffer via clang-format." + :lighter nil + (let ((save-func (proc (interactive) + (clang-format-buffer)))) + (if clang-format-mode + (add-hook 'after-save-hook save-func nil t) + (remove-hook 'after-save-hook save-func t)))) + (defun +code/clang-format-region-or-buffer () + (interactive) + (if (mark) + (clang-format-region (region-beginning) (region-end)) + (clang-format-buffer)))) +#+end_src +** cc org babel +To ensure org-babel executes language blocks of C/C++, I need to load +it as an option in ~org-babel-load-languages~. +#+begin_src emacs-lisp +(use-package org + :after cc-mode + :init + (org-babel-do-load-languages + 'org-babel-load-languages + '((C . t)))) +#+end_src +* WIP D +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +D is a systems level programming language with C-style syntax. I +think it has some interesting ideas such as a toggleable garbage +collector. Here I just install the D-mode package, enable ~org-babel~ +execution of d-mode blocks and alias ~D-mode~ with ~d-mode~. + +#+begin_src emacs-lisp +(use-package d-mode + :defer t + :straight t + :config + (fset 'D-mode 'd-mode) + (with-eval-after-load "org-mode" + (setf (alist-get 'd org-babel-load-languages) t))) +#+end_src +* Rust +#+begin_src emacs-lisp +(use-package rust-mode + :straight t + :general + (code-leader + :keymaps 'rust-mode-map + "f" #'rust-format-buffer) + (local-leader + :keymaps 'rust-mode-map + "c" #'rust-run-clippy) + :init + (setq rust-format-on-save t) + (with-eval-after-load "eglot" + (add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer")))) +#+end_src +* Racket +A scheme with lots of stuff inside it. Using it for a language design +book so it's useful to have some Emacs binds for it. +#+begin_src emacs-lisp +(use-package racket-mode + :straight t + :hook (racket-mode-hook . racket-xp-mode) + :display + ("\\*Racket.*" + (display-buffer-at-bottom) + (window-height . 0.25)) + :init + (setq racket-documentation-search-location 'local) + :general + (nmap + :keymaps 'racket-describe-mode-map + "q" #'quit-window) + (nmap + :keymaps 'racket-mode-map + "gr" #'racket-eval-last-sexp) + (local-leader + :keymaps '(racket-mode-map racket-repl-mode-map) + "d" #'racket-repl-describe) + (local-leader + :keymaps 'racket-mode-map + "r" #'racket-run + "i" #'racket-repl + "e" #'racket-send-definition + "sr" #'racket-send-region + "sd" #'racket-send-definition)) +#+end_src +* WIP CSharp +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Haven't used C# in a while, but Emacs is alright for it with +omnisharp. +#+begin_src emacs-lisp +(use-package csharp-mode + :defer t + :pretty + (csharp-mode-hook + ("null" . "∅") + ("string" . "𝕊") + ("List" . "ℓ") + ("WriteLine" . "φ") + ("Write" . "ω") + ("true" . "⊨") + ("false" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼"))) +#+end_src +* Java +I kinda dislike Java, but if necessary I will code in it. Just setup +a style and some pretty symbols. You can use LSP to get cooler +features to be fair. +#+begin_src emacs-lisp +(use-package ob-java + :straight nil + :defer t + :pretty + (java-mode-hook + ("println" . "φ") + ("printf" . "ω") + ("null" . "Ø") + ("true" . "⊨") + ("false" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼")) + :config + (with-eval-after-load "cc-mode" + (c-add-style + "java" + '((c-basic-offset . 4) + (c-comment-only-line-offset 0 . 0) + (c-offsets-alist + (inline-open . 0) + (topmost-intro-cont . +) + (statement-block-intro . +) + (knr-argdecl-intro . 5) + (substatement-open . 0) + (substatement-label . +) + (label . +) + (statement-case-open . +) + (statement-cont . +) + (arglist-intro . c-lineup-arglist-intro-after-paren) + (arglist-close . c-lineup-arglist) + (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ +) + (access-label . 0) + (inher-cont . c-lineup-java-inher) + (func-decl-cont . c-lineup-java-throws)))) + (add-to-list 'c-default-style '(java-mode . "java"))) + + (with-eval-after-load "abbrev" + (define-abbrev-table 'java-mode-abbrev-table nil) + (add-hook 'java-mode-hook + (proc (setq-local local-abbrev-table java-mode-abbrev-table))))) +#+end_src +* Haskell +Haskell is a static lazy functional programming language (what a +mouthful). It's quite a beautiful language and really learning it will +change the way you think about programming. However, my preferred +functional language is still unfortunately Lisp so no extra brownie +points there. + +Here I configure the REPL for Haskell via the +~haskell-interactive-mode~. I also load my custom package +[[file:elisp/haskell-multiedit.el][haskell-multiedit]] which allows a user to create temporary +~haskell-mode~ buffers that, upon completion, will run in the REPL. +Even easier than making your own buffer. +#+begin_src emacs-lisp +(use-package haskell-mode + :hook + (haskell-mode-hook . haskell-indentation-mode) + (haskell-mode-hook . interactive-haskell-mode) + :custom + (haskell-interactive-prompt "[λ] ") + (haskell-interactive-prompt-cont "{λ} ") + (haskell-interactive-popup-errors nil) + (haskell-stylish-on-save nil) + (haskell-process-type 'stack-ghci) + :general + (shell-leader + "h" #'+shell/toggle-haskell-repl) + :display + ("\\*haskell.**\\*" + (display-buffer-at-bottom) + (window-height . 0.25)) + :config + (load (concat user-emacs-directory "elisp/haskell-multiedit.el")) + (+oreo/create-toggle-function + +shell/toggle-haskell-repl + "*haskell*" + haskell-interactive-bring + nil)) +#+end_src +* Python +Works well for python. If you have ~pyls~ it should be on your path, so +just run eglot if you need. But an LSP server is not necessary for a +lot of my time in python. Here I also setup org-babel for python +source code blocks. +#+begin_src emacs-lisp +(use-package python + :defer t + :straight nil + :pretty + (python-mode-hook + ("None" . "Ø") + ("list" . "ℓ") + ("List" . "ℓ") + ("str" . "𝕊") + ("True" . "⊨") + ("False" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("print" . "φ") + ("lambda" . "λ") + ("return" . "⟼") + ("yield" . "⟻")) + :init + (setq python-indent-offset 4) + :config + (with-eval-after-load "org-mode" + (setf (alist-get 'python org-babel-load-languages) t))) +#+end_src +** Python shell +Setup for python shell, including a toggle option +#+begin_src emacs-lisp +(use-package python + :straight nil + :commands +python/toggle-repl + :general + (shell-leader + "p" #'+shell/python-toggle-repl) + :display + ("\\*Python\\*" + (display-buffer-at-bottom) + (window-height . 0.25)) + :config + (+oreo/create-toggle-function + +shell/python-toggle-repl + "*Python*" + run-python + nil)) +#+end_src +* YAML +YAML is a data language which is useful for config files. +#+begin_src emacs-lisp +(use-package yaml-mode + :straight t) +#+end_src +* HTML/CSS/JS +Firstly, web mode for consistent colouring of syntax. +#+begin_src emacs-lisp +(use-package web-mode + :mode ("\\.html" . web-mode) + :mode ("\\.js" . web-mode) + :mode ("\\.css" . web-mode) + :custom + ((web-mode-code-indent-offset 2) + (web-mode-markup-indent-offset 2) + (web-mode-css-indent-offset 2))) +#+end_src +** Emmet +Emmet for super speed code writing. +#+begin_src emacs-lisp +(use-package emmet-mode + :hook (web-mode-hook . emmet-mode) + :general + (imap + :keymaps 'emmet-mode-keymap + "TAB" #'emmet-expand-line + "M-j" #'emmet-next-edit-point + "M-k" #'emmet-prev-edit-point)) +#+end_src +** HTML Auto insert +#+begin_src emacs-lisp +(use-package web-mode + :defer t + :auto-insert + (("\\.html\\'" . "HTML Skeleton") + "" + " + + + + + "(read-string "Enter title: ") | """ + + + + + + + + + + + +" + _ + " +")) +#+end_src +* Typescript +Kinda expressive, interesting. +#+begin_src emacs-lisp +(use-package typescript-mode + :defer t + :init + (setq typescript-indent-level 2)) +#+end_src +* Common Lisp +Common Lisp is a dialect of Lisp, the most /common/ one around. Emacs +comes with builtin Lisp support of course, but a REPL would be nice. + +Enter /SLY/. Sly is a fork of /SLIME/ and is *mandatory* for lisp +development on Emacs. + +#+begin_src emacs-lisp +(use-package sly + :straight t + :init + (setq inferior-lisp-program "sbcl") + :display + ("\\*sly-db" + (display-buffer-at-bottom) + (window-height . 0.5)) + ("\\*sly-" + (display-buffer-at-bottom) + (window-height . 0.25)) + :config + (evil-set-initial-state 'sly-db-mode 'emacs) + (with-eval-after-load "org" + (setq-default org-babel-lisp-eval-fn #'sly-eval)) + (with-eval-after-load "company" + (add-hook 'sly-mrepl-hook #'company-mode)) + (+oreo/create-toggle-function + +shell/toggle-sly + "*sly-mrepl for sbcl*" + sly-mrepl + nil) + :general + (shell-leader + "s" #'+shell/toggle-sly) + (nmap + :keymaps '(lisp-mode-map sly-mrepl-mode-map) + "gr" #'sly-eval-buffer + "gd" #'sly-edit-definition + "gR" #'sly-who-calls) + (local-leader + :keymaps '(lisp-mode-map sly-mrepl-mode-map) + "s" #'+shell/toggle-sly + "c" #'sly-compile-file + "a" #'sly-apropos + "d" #'sly-describe-symbol + "D" #'sly-documentation-lookup + "S" #'sly-mrepl-sync + "E" #'sly-eval-defun) + (local-leader + :keymaps 'lisp-mode-map + :infix "e" + "b" #'sly-eval-buffer + "e" #'sly-eval-last-expression + "f" #'sly-eval-defun + "r" #'sly-eval-region) + (nmap + :keymaps 'sly-inspector-mode-map + "q" #'sly-inspector-quit)) +#+end_src +** Lisp indent function +Add a new lisp indent function which indents newline lists more +appropriately. +#+begin_src emacs-lisp +(use-package lisp-mode + :straight nil + :pretty + (lisp-mode-hook + ("lambda" . "λ") + ("t" . "⊨") + ("nil" . "Ø") + ("and" . "∧") + ("or" . "∨") + ("defun" . "ƒ") + ("for" . "∀") + ("mapc" . "∀") + ("mapcar" . "∀")) + :general + (:states '(normal motion visual) + :keymaps '(emacs-lisp-mode-map lisp-mode-map) + ")" #'sp-next-sexp + "(" #'sp-previous-sexp) + :config + (defun +oreo/lisp-indent-function (indent-point state) + (let ((normal-indent (current-column)) + (orig-point (point))) + (goto-char (1+ (elt state 1))) + (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) + (cond + ;; car of form doesn't seem to be a symbol, or is a keyword + ((and (elt state 2) + (or (not (looking-at "\\sw\\|\\s_")) + (looking-at ":"))) + (if (not (> (save-excursion (forward-line 1) (point)) + calculate-lisp-indent-last-sexp)) + (progn (goto-char calculate-lisp-indent-last-sexp) + (beginning-of-line) + (parse-partial-sexp (point) + calculate-lisp-indent-last-sexp 0 t))) + ;; Indent under the list or under the first sexp on the same + ;; line as calculate-lisp-indent-last-sexp. Note that first + ;; thing on that line has to be complete sexp since we are + ;; inside the innermost containing sexp. + (backward-prefix-chars) + (current-column)) + ((and (save-excursion + (goto-char indent-point) + (skip-syntax-forward " ") + (not (looking-at ":"))) + (save-excursion + (goto-char orig-point) + (looking-at ":"))) + (save-excursion + (goto-char (+ 2 (elt state 1))) + (current-column))) + (t + (let ((function (buffer-substring (point) + (progn (forward-sexp 1) (point)))) + method) + (setq method (or (function-get (intern-soft function) + 'lisp-indent-function) + (get (intern-soft function) 'lisp-indent-hook))) + (cond ((or (eq method 'defun) + (and (null method) + (> (length function) 3) + (string-match "\\`def" function))) + (lisp-indent-defform state indent-point)) + ((integerp method) + (lisp-indent-specform method state + indent-point normal-indent)) + (method + (funcall method indent-point state)))))))) + (setq-default lisp-indent-function #'+oreo/lisp-indent-function)) +#+end_src +** Emacs lisp +#+begin_src emacs-lisp +(use-package elisp-mode + :straight nil + :general + (vmap + :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) + "gr" #'eval-region)) +#+end_src -- cgit v1.2.3-13-gbd6f From 4be897e92228d3c708c4667c841e67a60048d9e6 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 22:29:42 +0630 Subject: (Emacs/elisp)~Clean up haskell-multiedit top --- Emacs/.config/emacs/elisp/haskell-multiedit.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/elisp/haskell-multiedit.el b/Emacs/.config/emacs/elisp/haskell-multiedit.el index 1dc857f..89aeb7b 100644 --- a/Emacs/.config/emacs/elisp/haskell-multiedit.el +++ b/Emacs/.config/emacs/elisp/haskell-multiedit.el @@ -1,4 +1,6 @@ -;;; haskell-multiedit.el --- Minor mode to edit and evaluate multi-line scripts of Haskell without making a file -*- lexical-binding: t; -*- +;;; haskell-multiedit.el --- Minor mode to edit and evaluate +;;; multi-line scripts of Haskell without making a file +;;; -*- lexical-binding: t; -*- ;; Copyright (C) 2021 Aryadev Chavali -- cgit v1.2.3-13-gbd6f From 40dab72e6cd8c2b4ba99bccdd9e40bd22cb9eef5 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 14:49:22 +0630 Subject: (Emacs|^)~Some general cleanup --- Emacs/.config/emacs/app.org | 4 +--- Emacs/.config/emacs/config.org | 3 ++- Emacs/.config/emacs/core.org | 3 +-- Emacs/.config/emacs/lang.org | 19 +++++++++---------- 4 files changed, 13 insertions(+), 16 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 347c25f..d108e8d 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -546,9 +546,7 @@ using. (interactive) (let ((dir (if buffer-file-name (file-name-directory buffer-file-name) - (if default-directory - default-directory - nil))) + default-directory)) (buf (eshell))) (if dir (with-current-buffer buf diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 996ccfc..d2bce28 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -752,7 +752,8 @@ text. That's what this is mainly for. #+end_src ** Licensing Loads [[file:elisp/license.el][license.el]] for inserting licenses. -Licenses are important for distribution and attribution to be defined clearly. +Licenses are important for distribution and attribution to be defined +clearly. #+begin_src emacs-lisp (use-package license :straight nil diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 26be8ab..53cff6d 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -116,8 +116,7 @@ Some bindings that I couldn't fit elsewhere easily. (use-package emacs :straight nil :general - (general-def - "C-x d" #'delete-frame) + ("C-x d" #'delete-frame) (nmmap "C--" #'text-scale-decrease diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index ce4e6de..da59f1d 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -34,7 +34,7 @@ all: $(OUT) $(OUT): $(DIST)/$(OUT) -$(DIST)/$(OUT): $(OBJECTS) $(SRC)/main.o | $(DIST) +$(DIST)/$(OUT): $(OBJECTS) $(DIST)/main.o | $(DIST) $(CC) $(CFLAGS) $^ -o $@ $(LIBS) $(DIST)/%.o: $(SRC)/%.c | $(DIST) $(DEPDIR) @@ -141,9 +141,7 @@ the [[https://elpa.gnu.org/packages/nhexl-mode.html][page]] yourself. :mode "\\.bin") #+end_src * C/C++ -Setup for C and C++ modes via the cc-mode package. C and C++ are -great languages for general purpose programming. My preferred choice -when I want greater control over memory management. +Setup for C and C++ modes, using Emacs' default package: cc-mode. ** cc-mode Tons of stuff, namely: + ~auto-fill-mode~ for 80 char limit @@ -453,9 +451,9 @@ points there. Here I configure the REPL for Haskell via the ~haskell-interactive-mode~. I also load my custom package -[[file:elisp/haskell-multiedit.el][haskell-multiedit]] which allows a user to create temporary -~haskell-mode~ buffers that, upon completion, will run in the REPL. -Even easier than making your own buffer. +[[file:elisp/haskell-multiedit.el][haskell-multiedit]] which allows a +user to create temporary ~haskell-mode~ buffers that, upon completion, +will run in the REPL. Even easier than making your own buffer. #+begin_src emacs-lisp (use-package haskell-mode :hook @@ -571,7 +569,7 @@ Emmet for super speed code writing. (("\\.html\\'" . "HTML Skeleton") "" " - + @@ -598,8 +596,8 @@ Emmet for super speed code writing. " ")) #+end_src -* Typescript -Kinda expressive, interesting. +** Typescript +A child language of javascript which compiles to it. #+begin_src emacs-lisp (use-package typescript-mode :defer t @@ -610,6 +608,7 @@ Kinda expressive, interesting. Common Lisp is a dialect of Lisp, the most /common/ one around. Emacs comes with builtin Lisp support of course, but a REPL would be nice. +** Sly Enter /SLY/. Sly is a fork of /SLIME/ and is *mandatory* for lisp development on Emacs. -- cgit v1.2.3-13-gbd6f From 381199ea85b285c57a326551c07fca04c0422d5e Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 14:52:04 +0630 Subject: (Emacs/lang)~Disabled SQL, Racket and Haskell This is obviously just temporary until I find uses for them again. Of course, if I do want to use them I can just call the emacs-lisp block to pull the repository and install it. --- Emacs/.config/emacs/lang.org | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index da59f1d..62a38a5 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -99,7 +99,10 @@ format. :keymaps 'pdf-view-mode-map "M-g" #'pdfgrep)) #+end_src -* SQL +* WIP SQL +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: The default SQL package provides support for connecting to common database types (sqlite, mysql, etc) for auto completion and query execution. I don't use SQL currently but whenever I need it it's @@ -338,7 +341,10 @@ execution of d-mode blocks and alias ~D-mode~ with ~d-mode~. (with-eval-after-load "eglot" (add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer")))) #+end_src -* Racket +* WIP Racket +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: A scheme with lots of stuff inside it. Using it for a language design book so it's useful to have some Emacs binds for it. #+begin_src emacs-lisp @@ -442,7 +448,10 @@ features to be fair. (add-hook 'java-mode-hook (proc (setq-local local-abbrev-table java-mode-abbrev-table))))) #+end_src -* Haskell +* WIP Haskell +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: Haskell is a static lazy functional programming language (what a mouthful). It's quite a beautiful language and really learning it will change the way you think about programming. However, my preferred -- cgit v1.2.3-13-gbd6f From 592433f91e106428e17b58b642ebb7827cb16f11 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 14:53:07 +0630 Subject: (Emacs/lang)~NHexl now works on .out files as well --- Emacs/.config/emacs/lang.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 62a38a5..29b3266 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -141,7 +141,7 @@ the [[https://elpa.gnu.org/packages/nhexl-mode.html][page]] yourself. #+begin_src emacs-lisp (use-package nhexl-mode :straight t - :mode "\\.bin") + :mode ("\\.bin" "\\.out")) #+end_src * C/C++ Setup for C and C++ modes, using Emacs' default package: cc-mode. -- cgit v1.2.3-13-gbd6f From f60c3b5bad999d961141ce73a3b71910e102fff5 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 14:53:30 +0630 Subject: (Emacs/core)+package hydra and use-package-hydra Defines persistent sub-key-maps which can provide some really nice behavior. --- Emacs/.config/emacs/core.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 53cff6d..a9113f0 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -747,3 +747,16 @@ for all snippets I've got. :config (yas-load-directory (no-littering-expand-etc-file-name "yasnippet/snippets"))) #+end_src +* Hydra +Hydra is a great package by =abo-abo= (yes the same guy who made ivy +and swiper) and I hope to use it later on in the config. There are +two use-package declarations here: one for ~hydra~ itself, and the +other for ~use-package-hydra~ which provides the keyword ~:hydra~ in +use-package declarations. +#+begin_src emacs-lisp +(use-package hydra + :straight t) + +(use-package use-package-hydra + :straight t) +#+end_src -- cgit v1.2.3-13-gbd6f From 03a2fc0541cc3e302592e9803a7b6ea1425b658f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 14:54:42 +0630 Subject: (Emacs/lang)~split Lisp section into Emacs lisp and Lisp indent Not much of a difference but it does make it cleaner to look at. --- Emacs/.config/emacs/lang.org | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 29b3266..5b10d72 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -672,11 +672,9 @@ development on Emacs. :keymaps 'sly-inspector-mode-map "q" #'sly-inspector-quit)) #+end_src -** Lisp indent function -Add a new lisp indent function which indents newline lists more -appropriately. +** Emacs lisp #+begin_src emacs-lisp -(use-package lisp-mode +(use-package elisp-mode :straight nil :pretty (lisp-mode-hook @@ -694,6 +692,19 @@ appropriately. :keymaps '(emacs-lisp-mode-map lisp-mode-map) ")" #'sp-next-sexp "(" #'sp-previous-sexp) + (nmmap + :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) + "gr" #'eval-last-sexp) + (vmap + :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) + "gr" #'eval-region)) +#+end_src +** Lisp indent function +Add a new lisp indent function which indents newline lists more +appropriately. +#+begin_src emacs-lisp +(use-package lisp-mode + :straight nil :config (defun +oreo/lisp-indent-function (indent-point state) (let ((normal-indent (current-column)) @@ -746,12 +757,3 @@ appropriately. (funcall method indent-point state)))))))) (setq-default lisp-indent-function #'+oreo/lisp-indent-function)) #+end_src -** Emacs lisp -#+begin_src emacs-lisp -(use-package elisp-mode - :straight nil - :general - (vmap - :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) - "gr" #'eval-region)) -#+end_src -- cgit v1.2.3-13-gbd6f From 2b0397b3bcfd915fde2d2823ec1cffcebde19917 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 15:21:27 +0630 Subject: (Emacs/*)~WIP -> WAIT for subtrees that aren't used --- Emacs/.config/emacs/app.org | 14 +++++++------- Emacs/.config/emacs/config.org | 8 ++++---- Emacs/.config/emacs/core.org | 8 ++++---- Emacs/.config/emacs/lang.org | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index d108e8d..4fda55d 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -10,7 +10,7 @@ Applications are greater than packages; they provide a set of functionality to create an interface in Emacs. Emacs comes with applications and others may be installed. -* WIP Dashboard +* WAIT Dashboard :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -260,7 +260,7 @@ Uses fd for finding file results in a directory: ~find-dired~ -> (dir-leader "g" #'fd-dired)) #+end_src -* WIP Xwidget +* WAIT Xwidget :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -554,7 +554,7 @@ using. (eshell-send-input)) (message "Could not switch eshell: buffer is not real file"))))) #+end_src -* WIP Elfeed +* WAIT Elfeed :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -758,7 +758,7 @@ without invoking calc directly: $1 + 2\rightarrow_{\text{calc-embed}} 3$. (with-eval-after-load "evil-collection" (evil-collection-calc-setup))) #+end_src -** WIP Calctex +** WAIT Calctex :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -775,7 +775,7 @@ work for me given the various TeX utilities installed via Arch. :straight (calctex :type git :host github :repo "johnbcoughlin/calctex") :hook (calc-mode-hook . calctex-mode)) #+end_src -* WIP Ledger +* WAIT Ledger :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -786,7 +786,7 @@ work for me given the various TeX utilities installed via Arch. (use-package evil-ledger :after ledger-mode) #+end_src -* WIP Zone +* WAIT Zone :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -834,7 +834,7 @@ or something, but very annoying as it's a break from standards! :keymaps 'Man-mode-map "RET" #'man-follow)) #+end_src -* WIP gif-screencast +* WAIT gif-screencast :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index d2bce28..f6c7697 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -11,7 +11,7 @@ * Introduction Welcome to my Emacs configuration. This thing is quite big, but a lot of it has been "write and forget" i.e. I've only needed to configure -it once. Sections tagged =WIP= are currently unused, usually with +it once. Sections tagged =WAIT= are currently unused, usually with some reasoning given. Some sections border on blog posts justifying why I think they're good @@ -334,7 +334,7 @@ simplicity is above all. mode-line-misc-info mode-line-end-spaces)) #+end_src -*** WIP Telephone-line +*** WAIT Telephone-line :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -453,7 +453,7 @@ necessary. :init (setq-default display-line-numbers-type 'relative)) #+end_src -** WIP esup +** WAIT esup :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -1464,7 +1464,7 @@ reveal.js. Pretty nifty and it's easy to use. (setq org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js" org-reveal-theme "sky")) #+end_src -** WIP Org fragtog +** WAIT Org fragtog :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index a9113f0..0f0d9c6 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -373,7 +373,7 @@ Setup for counsel. Load after ivy and helpful. (t . ivy--regex-ignore-order))) (counsel-mode)) #+end_src -*** WIP Ivy posframe +*** WAIT Ivy posframe :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -392,7 +392,7 @@ Very nice eyecandy, but can get kinda annoying. (setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-window-center)))) #+end_src -*** WIP Counsel etags +*** WAIT Counsel etags :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -409,7 +409,7 @@ This has been replaced by [[*xref][xref]] which is inbuilt. (search-leader "t" #'counsel-etags-find-tag)) #+end_src -** WIP Ido +** WAIT Ido :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -680,7 +680,7 @@ with abstracting a few things away. ("smon" (format-time-string "%B" (current-time))))) #+end_src -** WIP Skeletons +** WAIT Skeletons :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 5b10d72..9bbf65c 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -99,7 +99,7 @@ format. :keymaps 'pdf-view-mode-map "M-g" #'pdfgrep)) #+end_src -* WIP SQL +* WAIT SQL :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -114,7 +114,7 @@ there. :init (setq sql-display-sqli-buffer-function nil)) #+end_src -* WIP Ada +* WAIT Ada :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -307,7 +307,7 @@ it as an option in ~org-babel-load-languages~. 'org-babel-load-languages '((C . t)))) #+end_src -* WIP D +* WAIT D :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -341,7 +341,7 @@ execution of d-mode blocks and alias ~D-mode~ with ~d-mode~. (with-eval-after-load "eglot" (add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer")))) #+end_src -* WIP Racket +* WAIT Racket :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -375,7 +375,7 @@ book so it's useful to have some Emacs binds for it. "sr" #'racket-send-region "sd" #'racket-send-definition)) #+end_src -* WIP CSharp +* WAIT CSharp :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: @@ -448,7 +448,7 @@ features to be fair. (add-hook 'java-mode-hook (proc (setq-local local-abbrev-table java-mode-abbrev-table))))) #+end_src -* WIP Haskell +* WAIT Haskell :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: -- cgit v1.2.3-13-gbd6f From 65c7cd01386eb0acd8680ed8adc1e7f8f8b85b6e Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 15:23:38 +0630 Subject: (Emacs/lang)+WIP section on Lisp and a hydra for it --- Emacs/.config/emacs/lang.org | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 9bbf65c..c404f04 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -699,6 +699,44 @@ development on Emacs. :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) "gr" #'eval-region)) #+end_src +** WIP Hydra like Lispy +A [[file:core.org::*Hydra][Hydra]] which uses the ~Lispy~ package (by +abo-abo) to create a set of motions that allow movement around a lisp +file easily. + +2024-04-18: Still working on this, quite rough around the edges. +#+begin_src emacs-lisp +(use-package lispy + :after (lisp-mode elisp-mode) + :hydra + (hydra-lispy + nil "Move around quickly in Lisp" + ("h" #'lispy-left) + ("j" ("t" #'lispy-teleport) + #'lispy-down) + ("k" #'lispy-up) + ("l" #'lispy-right) + ("d" #'lispy-different) + ("u" #'lispy-flow) + ("o" #'lispy-oneline) + ("m" #'lispy-multiline) + ("N" #'lispy-narrow) + ("W" #'lispy-widen) + ("c" #'lispy-clone) + ("fp" #'lispy-ace-paren) + ("fs" #'lispy-ace-symbol :exit t) + ("H" #'lispy-slurp) + ("L" #'lispy-barf) + ("M-h" #'lispy-move-left) + ("M-j" #'lispy-move-down) + ("M-k" #'lispy-move-up) + ("M-l" #'lispy-move-right) + ("C-g" nil)) + :general + (nmmap + :keymaps '(emacs-lisp-mode-map lisp-mode-map) + "." #'hydra-lispy/body)) +#+end_src ** Lisp indent function Add a new lisp indent function which indents newline lists more appropriately. -- cgit v1.2.3-13-gbd6f From 198f8d57d806dc1e7f5186bab07490fa6340138f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 15:23:54 +0630 Subject: (Emacs/elisp/license)~Behavior when licence-choice is NIL Instead of defaulting to the Unlicense, we now completely copyright the material. This is the default behavior when a LICENSE is not attached to a project in open source: copyright is completely preserved. --- Emacs/.config/emacs/elisp/license.el | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/elisp/license.el b/Emacs/.config/emacs/elisp/license.el index 8ea64fd..5921d59 100644 --- a/Emacs/.config/emacs/elisp/license.el +++ b/Emacs/.config/emacs/elisp/license.el @@ -419,20 +419,22 @@ For more information, please refer to "))) (car (alist-get choice +license/licenses-alist "" nil #'string=)))) (defun +license/copyright-notice () - (let ((license-name (or (if (listp +license/license-choice) - (car +license/license-choice) - +license/license-choice) - "Unlicense"))) - (format "Copyright (C) %s %s - -You may distribute and modify this code under the terms of the %s + (let ((license-name (if (listp +license/license-choice) + (car +license/license-choice) + +license/license-choice))) + (concat + (format "Copyright (C) %s %s\n\n" (format-time-string "%Y") user-full-name) + (if license-name + (format "You may distribute and modify this code under the terms of the %s license. You should have received a copy of the %s license with this file. If not, please write to: %s." - (format-time-string "%Y") - user-full-name - license-name - license-name - user-mail-address))) + license-name + license-name + user-mail-address) + (format + "All rights reserved. You may not distribute or modify this code +without explicit legal permission from the author \"%s\"" + user-full-name))))) (defun +license/insert-complete-license () (interactive) -- cgit v1.2.3-13-gbd6f From fe2fd08cfb88eecb221da0e9397e7833402cbe61 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 18 Apr 2024 15:41:23 +0630 Subject: (Emacs/config)+argument to restrict search-headings to only first level --- Emacs/.config/emacs/config.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index f6c7697..9219e66 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1237,7 +1237,9 @@ Some bindings for org mode. "Searches USER-EMACS-DIRECTORY for org headings via counsel-rg" (interactive) (counsel-rg "^\\* " - (cl-subseq user-emacs-directory 0 (- (length user-emacs-directory) 1)))) + (substring user-emacs-directory 0 + (- (length user-emacs-directory) 1)) + "--max-depth=1")) :general (file-leader "l" #'org-store-link -- cgit v1.2.3-13-gbd6f From c76475e427c788ae24e12e283cb07607f89c6526 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 19 Apr 2024 04:39:42 +0530 Subject: (Emacs/*)~cleaning up --- Emacs/.config/emacs/app.org | 30 ++++++++++++------------------ Emacs/.config/emacs/config.org | 11 +++++++---- Emacs/.config/emacs/core.org | 4 ++-- 3 files changed, 21 insertions(+), 24 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 4fda55d..4e413f7 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -213,8 +213,8 @@ are some corners I'd like to adjust). "d" #'dired "D" #'dired-other-frame "i" #'image-dired - "p" `((proc (interactive) - (dired "~/Text/PDFs/")) + "p" `(,(proc (interactive) + (dired "~/Text/PDFs/")) :which-key "Open PDFs")) :config (defun +dired/insert-all-subdirectories () @@ -786,29 +786,23 @@ work for me given the various TeX utilities installed via Arch. (use-package evil-ledger :after ledger-mode) #+end_src -* WAIT Zone -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: +* Zone Of course Emacs has a cool screensaver software. #+begin_src emacs-lisp (use-package zone-matrix :straight t - :after dashboard + :commands (zone) + :general + (leader + "z" #'zone) :init (setq zone-programs - [zone-pgm-jitter - zone-pgm-putz-with-case - zone-pgm-dissolve - zone-pgm-whack-chars - zone-pgm-drip - zone-pgm-rat-race - zone-pgm-random-life - zone-matrix - ]) - :config - (zone-when-idle 15)) + [zone-pgm-drip + zone-pgm-drip-fretfully + zone-pgm-martini-swan-dive + zone-pgm-stress + zone-pgm-random-life])) #+end_src * (Wo)man Man pages are the user manuals for most software on Linux. Really diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 9219e66..8d2c83d 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -560,10 +560,10 @@ need to use it. :after evil :general (nmmap + :keymaps 'override "C-s" #'avy-goto-char-timer - "M-s" #'isearch-forward) - (search-leader - "l" #'avy-goto-line)) + "M-s" #'isearch-forward + "gl" #'avy-goto-line)) #+end_src ** Ace window Though evil provides a great many features in terms of window @@ -608,7 +608,10 @@ possible options for the next key. :config (which-key-mode)) #+end_src -** Keychord +** WAIT Keychord +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: Keychord is only really here for this one chord I wish to define: "jk" for exiting insert state. #+begin_src emacs-lisp diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 0f0d9c6..bc3a2cd 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -125,7 +125,7 @@ Some bindings that I couldn't fit elsewhere easily. (leader "SPC" '(execute-extended-command :which-key "M-x") - "'" '(browse-url-emacs :which-key "Open url in Emacs") + "'" '(browse-url-emacs :which-key "Download URL to Emacs") ";" 'eval-expression ":" `(,(proc (interactive) (switch-to-buffer "*scratch*")) :which-key "Switch to *scratch*") @@ -185,7 +185,7 @@ Setup the evil package, with some opinionated keybindings: "TAB" #'evil-jump-item "r" #'evil-replace-state "zC" #'hs-hide-level - "zO" #'hs-show-all + "zO" #'hs-show-all "'" #'evil-goto-mark "`" #'evil-goto-mark-line "C-w" #'evil-window-map -- cgit v1.2.3-13-gbd6f From a6fe9aaf6ebe7232f54f17ac86f5384617bc6fe5 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 20 Apr 2024 02:52:41 +0530 Subject: (Emacs/local)+game scores --- .../bubbles-default-2-10-10-scores | 5 ++++ .../emacs/.local/gamegrid-user-score/snake-scores | 1 + .../emacs/.local/gamegrid-user-score/tetris-scores | 29 ++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 Emacs/.config/emacs/.local/gamegrid-user-score/bubbles-default-2-10-10-scores create mode 100644 Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores create mode 100644 Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.local/gamegrid-user-score/bubbles-default-2-10-10-scores b/Emacs/.config/emacs/.local/gamegrid-user-score/bubbles-default-2-10-10-scores new file mode 100644 index 0000000..a8cbfbd --- /dev/null +++ b/Emacs/.config/emacs/.local/gamegrid-user-score/bubbles-default-2-10-10-scores @@ -0,0 +1,5 @@ +03380 Fri Oct 14 14:33:15 2022 Aryadev Chavali +03197 Fri Oct 14 14:23:23 2022 Aryadev Chavali +02854 Fri Oct 14 14:32:54 2022 Aryadev Chavali +02729 Fri Oct 14 14:33:36 2022 Aryadev Chavali +02347 Fri Oct 14 14:23:06 2022 Aryadev Chavali diff --git a/Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores b/Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores new file mode 100644 index 0000000..bd2c71d --- /dev/null +++ b/Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores @@ -0,0 +1 @@ +00017 Sat Apr 20 02:48:23 2024 Aryadev Chavali diff --git a/Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores b/Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores new file mode 100644 index 0000000..e971694 --- /dev/null +++ b/Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores @@ -0,0 +1,29 @@ +00281 Thu Jul 13 03:07:51 2023 Aryadev Chavali +00253 Fri Dec 2 14:00:06 2022 Aryadev Chavali +00243 Wed Mar 15 09:25:03 2023 Aryadev Chavali +00210 Thu Dec 29 14:43:23 2022 Aryadev Chavali +00204 Wed Dec 28 14:50:42 2022 Aryadev Chavali +00187 Thu Jan 12 01:30:09 2023 Aryadev Chavali +00172 Mon Jan 9 12:59:13 2023 Aryadev Chavali +00114 Fri Jul 21 11:58:31 2023 Aryadev Chavali +00096 Sat Dec 3 16:21:40 2022 Aryadev Chavali +00092 Sun Nov 13 23:34:52 2022 Aryadev Chavali +00089 Thu Dec 1 23:27:02 2022 Aryadev Chavali +00075 Tue Oct 4 16:03:38 2022 Aryadev Chavali +00068 Wed Sep 28 19:42:19 2022 Aryadev Chavali +00065 Fri Oct 14 14:21:16 2022 Aryadev Chavali +00058 Thu Dec 1 23:27:55 2022 Aryadev Chavali +00057 Thu Jan 12 01:15:49 2023 Aryadev Chavali +00056 Tue Sep 20 18:13:37 2022 Aryadev Chavali +00050 Fri May 26 16:33:56 2023 Aryadev Chavali +00046 Wed Oct 12 11:27:19 2022 Aryadev Chavali +00042 Tue Aug 1 19:58:49 2023 Aryadev Chavali +00038 Tue Oct 11 16:47:44 2022 Aryadev Chavali +00038 Fri Oct 14 13:05:44 2022 Aryadev Chavali +00037 Thu Aug 17 18:11:59 2023 Aryadev Chavali +00027 Thu Jan 12 01:14:32 2023 Aryadev Chavali +00024 Thu Jan 12 01:14:54 2023 Aryadev Chavali +00012 Tue Jan 17 13:58:01 2023 Aryadev Chavali +00006 Thu Jun 22 23:16:42 2023 Aryadev Chavali +00006 Mon Jan 9 11:04:43 2023 Aryadev Chavali +00000 Fri Dec 2 13:58:02 2022 Aryadev Chavali -- cgit v1.2.3-13-gbd6f From 5aec6298cfc2ca9889f9fababf5d38281ce0a192 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 01:40:07 +0530 Subject: (Emacs/config|core)+move-line-{up|down} --- Emacs/.config/emacs/config.org | 21 +++++++++++++++++++++ Emacs/.config/emacs/core.org | 5 +++++ 2 files changed, 26 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 8d2c83d..9df46d4 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -184,6 +184,27 @@ any buffers in ~+oreo/keep-buffer~ and kills the rest. (kill-buffer buf))) (buffer-list))) #+end_src +** Move line {up/down} +Shamelessly copied from +[[https://emacsredux.com/blog/2013/04/02/move-current-line-up-or-down/][this +article]]. Will be bound in [[file:core.org::*Some binds in +Emacs][core.org]]. +#+begin_src emacs-lisp +(defun move-line-up () + "Move up the current line." + (interactive) + (transpose-lines 1) + (forward-line -2) + (indent-according-to-mode)) + +(defun move-line-down () + "Move down the current line." + (interactive) + (forward-line 1) + (transpose-lines 1) + (forward-line -1) + (indent-according-to-mode)) +#+end_src * Aesthetics General look and feel of Emacs (mostly disabling stuff I don't like). ** Themes diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index bc3a2cd..b0d7e2f 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -118,6 +118,11 @@ Some bindings that I couldn't fit elsewhere easily. :general ("C-x d" #'delete-frame) + (nmmap + :keymaps 'override + "C-M-j" #'move-line-down + "C-M-k" #'move-line-up) + (nmmap "C--" #'text-scale-decrease "C-=" #'text-scale-increase -- cgit v1.2.3-13-gbd6f From a35eeb19b96a2de797df192664c5480d3c5507c7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 01:40:27 +0530 Subject: (Emacs/config|core)~: go to config.org -> search org heading --- Emacs/.config/emacs/config.org | 12 +++++------- Emacs/.config/emacs/core.org | 5 +---- 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 9df46d4..7318b77 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -555,11 +555,8 @@ a 'project'. "t" #'projectile-test-project "r" #'projectile-run-project "q" #'projectile-replace-regexp) - (leader "p" '(projectile-command-map :which-key "Projectile")) - (nmap - "" #'projectile-compile-project - "" #'projectile-configure-project - "" #'projectile-test-project) + (leader + "p" '(projectile-command-map :which-key "Projectile")) :init (setq projectile-tags-command "ctags -Re -f \"%s\" %s \"%s\"" projectile-enable-caching t)) @@ -1257,6 +1254,7 @@ Some bindings for org mode. "Searches directory (of buffer) for org headings via counsel-rg" (interactive) (counsel-rg "^\\* " (file-name-directory (buffer-file-name)))) + (defun +org/search-config-headings () "Searches USER-EMACS-DIRECTORY for org headings via counsel-rg" (interactive) @@ -1270,8 +1268,8 @@ Some bindings for org mode. "i" #'org-insert-last-stored-link) (code-leader "D" #'org-babel-detangle) - (search-leader - "c" #'+org/search-config-headings) + (file-leader + "p" #'+org/search-config-headings) (search-leader :keymaps 'org-mode-map "I" #'+org/search-headings) diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index b0d7e2f..ef0270b 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -147,10 +147,7 @@ Some bindings that I couldn't fit elsewhere easily. (file-leader "f" #'find-file "F" #'find-file-other-frame - "s" #'save-buffer - "p" `(,(proc (interactive) - (find-file (concat user-emacs-directory "config.org"))) - :which-key "Open config.org")) + "s" #'save-buffer) (quit-leader "q" #'save-buffers-kill-terminal -- cgit v1.2.3-13-gbd6f From 50a3add8751ce1b32045c18edd528460815e33e0 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 01:41:19 +0530 Subject: (Emacs/core)+some more bindings --- Emacs/.config/emacs/core.org | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index ef0270b..8ad8c4d 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -181,6 +181,7 @@ Setup the evil package, with some opinionated keybindings: :general (leader "w" '(evil-window-map :which-key "Window") + "wT" #'window-swap-states ; transpose two windows "wd" #'delete-frame) (nmmap @@ -512,9 +513,7 @@ just setup some evil binds for company. (eshell-mode-hook . company-mode) :general (imap - "C-SPC" #'company-complete) - (general-def - :states '(normal insert) + "C-SPC" #'company-complete "M-j" #'company-select-next "M-k" #'company-select-previous)) #+end_src -- cgit v1.2.3-13-gbd6f From 74186f287ff2a687ef534ff19746b2369492167f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 01:41:31 +0530 Subject: (Emacs/lang)+emacs-lisp-mode-hook prettify-symbols --- Emacs/.config/emacs/lang.org | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index c404f04..5ef31fc 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -687,6 +687,16 @@ development on Emacs. ("for" . "∀") ("mapc" . "∀") ("mapcar" . "∀")) + (emacs-lisp-mode-hook + ("lambda" . "λ") + ("t" . "⊨") + ("nil" . "Ø") + ("and" . "∧") + ("or" . "∨") + ("defun" . "ƒ") + ("for" . "∀") + ("mapc" . "∀") + ("mapcar" . "∀")) :general (:states '(normal motion visual) :keymaps '(emacs-lisp-mode-map lisp-mode-map) -- cgit v1.2.3-13-gbd6f From f5efdb6faf14de74455d0974ecb597d5a54e9048 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 01:41:42 +0530 Subject: (Emacs/lang)~disable "Hydra like lispy" --- Emacs/.config/emacs/lang.org | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 5ef31fc..33b6861 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -710,6 +710,9 @@ development on Emacs. "gr" #'eval-region)) #+end_src ** WIP Hydra like Lispy +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: A [[file:core.org::*Hydra][Hydra]] which uses the ~Lispy~ package (by abo-abo) to create a set of motions that allow movement around a lisp file easily. -- cgit v1.2.3-13-gbd6f From 6782fce8899a98929fa34920e72d1325124a5ad6 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 01:46:57 +0530 Subject: (Emacs/app)~move eshell/goto to subheading --- Emacs/.config/emacs/app.org | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 4e413f7..30f845a 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -447,11 +447,6 @@ a git repo in the current directory and provides some extra information in that case (in particular, branch name and if there any changes that haven't been committed). -Also add ~eshell/goto~, which is actually a command accessible from -within eshell (this is because ~eshell/*~ creates an accessible -function within eshell with name ~*~). ~eshell/goto~ makes it easier -to change directories by using Emacs' find-file interface (which is -much faster than ~cd ..; ls -l~). #+begin_src emacs-lisp (use-package eshell :config @@ -480,7 +475,7 @@ much faster than ~cd ..; ls -l~). (defun +eshell/get-git-properties () (let ((git-branch (shell-command-to-string "git branch"))) (if (or (string= git-branch "") - (not (string= "*" (substring git-branch 0 1)))) + (not (string= "*" (substring git-branch 0 1)))) "" (format "(%s<%s>[%s])" @@ -516,25 +511,20 @@ much faster than ~cd ..; ls -l~). eshell-banner-message (concat (shell-command-to-string "fortune | cowsay") "\n") eshell-highlight-prompt nil eshell-prompt-function #'+eshell/prompt-function - eshell-prompt-regexp "^𝜆> ") - - (defun eshell/goto (&rest args) - "Use `read-directory-name' to change directories." - (eshell/cd (list (read-directory-name "Enter directory to go to:")))) - - (with-eval-after-load "projectile" - (defun eshell/goto-project-root (&rest args) - "Change to directory `projectile-project-root'" - (if (projectile-project-root) - (eshell/cd (list (projectile-project-root))) - (eshell/echo "Projectile not active here..."))))) + eshell-prompt-regexp "^𝜆> ")) #+end_src ** Eshell change directory quickly +Add ~eshell/goto~, which is actually a command accessible from within +eshell (this is because ~eshell/*~ creates an accessible function +within eshell with name ~*~). ~eshell/goto~ makes it easier to change +directories by using Emacs' find-file interface (which is much faster +than ~cd ..; ls -l~). + ~eshell/goto~ is a better ~cd~ for eshell. However it is really just a plaster over a bigger issue for my workflow; many times I want eshell to be present in the current directory of the buffer I am -using. - +using. So here's also a command for opening eshell with the current +directory. #+begin_src emacs-lisp (use-package eshell :straight nil @@ -542,6 +532,17 @@ using. (shell-leader "T" #'+eshell/current-buffer) :config + (defun eshell/goto (&rest args) + "Use `read-directory-name' to change directories." + (eshell/cd (list (read-directory-name "Directory?: ")))) + + (with-eval-after-load "projectile" + (defun eshell/goto-project-root (&rest args) + "Change to directory `projectile-project-root'" + (if (projectile-project-root) + (eshell/cd (list (projectile-project-root))) + (eshell/echo "Projectile not active here...")))) + (defun +eshell/current-buffer () (interactive) (let ((dir (if buffer-file-name -- cgit v1.2.3-13-gbd6f From 253f2f5ef9eb0d95639d259a48875d76d3ecab75 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 01:47:17 +0530 Subject: (Emacs/app)+randomise banner-message's cowsay --- Emacs/.config/emacs/app.org | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 30f845a..bfea843 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -506,9 +506,17 @@ changes that haven't been committed). "\n" '("𝜆> " :foreground "DeepSkyBlue"))))) + (defun +eshell/banner-message () + (concat (shell-command-to-string + (let ((possible-cows '("default" "cower" "moofasa" "moose" + "mutilated" "satanic" "sheep" + "small" "tux" "vader"))) + (format "fortune | cowsay -f %s" (nth (random (length possible-cows)) possible-cows)))) + "\n")) + (setq eshell-cmpl-ignore-case t eshell-cd-on-directory t - eshell-banner-message (concat (shell-command-to-string "fortune | cowsay") "\n") + eshell-banner-message '(+eshell/banner-message) eshell-highlight-prompt nil eshell-prompt-function #'+eshell/prompt-function eshell-prompt-regexp "^𝜆> ")) -- cgit v1.2.3-13-gbd6f From 2baf2fca03a6d0201939a4b4201b8b6e5a9bda3f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 16:58:33 +0530 Subject: (Emacs/app|lang)~pdf-tools is disabled, dired-guess-shell pdf zathura I find pdf-tools really slow in comparison to zathura, with very little benefit to it being integrated into Emacs. Zathura is faster, leaner and more fit for purpose. PDFs, if a shell command may be invoked on them in dired, now show zathura as a default argument. --- Emacs/.config/emacs/app.org | 2 +- Emacs/.config/emacs/lang.org | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index bfea843..669b1c5 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -217,6 +217,7 @@ are some corners I'd like to adjust). (dired "~/Text/PDFs/")) :which-key "Open PDFs")) :config + (add-to-list 'dired-guess-shell-alist-user '("\\.pdf\\'" "zathura")) (defun +dired/insert-all-subdirectories () "Insert all subdirectories currently viewable." (interactive) @@ -247,7 +248,6 @@ are some corners I'd like to adjust). "m" #'dired-mark-files-regexp "u" #'dired-undo)) #+end_src - ** fd-dired Uses fd for finding file results in a directory: ~find-dired~ -> ~fd-dired~. diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 33b6861..fb1ee36 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -68,7 +68,10 @@ asset. For example if I were editing an org document which I was eventually compiling into a PDF, my workflow would be much smoother with a PDF viewer within Emacs that I can open on another pane. -** PDF tools +** WAIT PDF tools +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: ~pdf-tools~ provides the necessary functionality for viewing PDFs. There is no proper PDF viewing without this package. ~evil-collection~ provides a setup for this mode, so use that. -- cgit v1.2.3-13-gbd6f From 92310685d1056fdf549905cbddd1625951fd34d8 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 16:59:31 +0530 Subject: (Emacs/app)-magit-file-dispatch (vf) and magit-blame (vb) --- Emacs/.config/emacs/app.org | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 669b1c5..38f94a1 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -659,9 +659,7 @@ don't need to write everything myself. (display-buffer-same-window)) :general (leader - "g" '(magit-dispatch :which-key "Magit") - "vf" '(magit-file-dispatch :which-key "Magit file") - "vb" '(magit-blame :which-key "Magit blame")) + "g" '(magit-dispatch :which-key "Magit")) (code-leader "b" #'magit-blame) :auto-insert -- cgit v1.2.3-13-gbd6f From c3ecf07798d5a32b959e54f60429b9fbcb95af5c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 17:00:11 +0530 Subject: (Emacs/app)+wdired binding --- Emacs/.config/emacs/app.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 38f94a1..c75e8f1 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -260,6 +260,21 @@ Uses fd for finding file results in a directory: ~find-dired~ -> (dir-leader "g" #'fd-dired)) #+end_src +** wdired +Similar to [[file:config.org::*(Rip)grep][wgrep]] =wdired= provides +the ability to use Emacs motions and editing on file names. This +makes stuff like mass renaming and other file management tasks way +easier than even using the mark based system. +#+begin_src emacs-lisp +(use-package wdired + :after dired + :straight t + :general + (nmmap + :keymaps 'dired-mode-map + "." #'browse-url-of-dired-file + "W" #'wdired-change-to-wdired-mode)) +#+end_src * WAIT Xwidget :PROPERTIES: :header-args:emacs-lisp: :tangle no -- cgit v1.2.3-13-gbd6f From f10436c0b73bcf9fbb58075f392abbf06937a28c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 17:00:21 +0530 Subject: (Emacs/config)+eshell to oreo/keep-buffers So my eshell instance doesn't die just cos I'm cleaning up. --- Emacs/.config/emacs/config.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 7318b77..83655e4 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -173,7 +173,7 @@ any buffers in ~+oreo/keep-buffer~ and kills the rest. (defconst +oreo/keep-buffers (list "config.org" "*scratch*" "*dashboard*" "*Messages*" - "*Warnings*") + "*Warnings*" "*eshell*") "List of buffer names to preserve.") (defun +oreo/clean-buffer-list () -- cgit v1.2.3-13-gbd6f From 1039114d2f7e1aa11a72822e212f5a27236ece53 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 17:00:48 +0530 Subject: (Emacs/core)+nmmap binding K to man By default evil-lookup-func is woman, which throws annoying warnings and isn't a complete manpage reader. So here I rebind it to use man, which is fully functioning. --- Emacs/.config/emacs/core.org | 1 + 1 file changed, 1 insertion(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 8ad8c4d..759ee24 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -185,6 +185,7 @@ Setup the evil package, with some opinionated keybindings: "wd" #'delete-frame) (nmmap + "K" #'man "TAB" #'evil-jump-item "r" #'evil-replace-state "zC" #'hs-hide-level -- cgit v1.2.3-13-gbd6f From 08519319b287f8645852a94f1a160205ab0a46c8 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 17:01:34 +0530 Subject: (Emacs/early-init)~alpha: 85 -> 85 for focused and 65 for unfocused --- Emacs/.config/emacs/early-init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/early-init.el b/Emacs/.config/emacs/early-init.el index dd0be9a..a238e8e 100644 --- a/Emacs/.config/emacs/early-init.el +++ b/Emacs/.config/emacs/early-init.el @@ -35,5 +35,5 @@ (push '(menu-bar-lines . 0) default-frame-alist) (push '(tool-bar-lines . 0) default-frame-alist) (push '(vertical-scroll-bars) default-frame-alist) -(push '(alpha . 85) default-frame-alist) +(push '(alpha . (85 65)) default-frame-alist) (advice-add #'x-apply-session-resources :override #'ignore) -- cgit v1.2.3-13-gbd6f From a01cba5589368b6b2c3946d1286e8b295ab3403d Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Apr 2024 18:18:05 +0530 Subject: (Emacs/*)~stop using create-toggle-function --- Emacs/.config/emacs/app.org | 19 ++++--------------- Emacs/.config/emacs/config.org | 10 ++++++++-- Emacs/.config/emacs/core.org | 7 ++++++- Emacs/.config/emacs/lang.org | 17 +++-------------- 4 files changed, 21 insertions(+), 32 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index c75e8f1..5b94a9d 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -96,7 +96,7 @@ to the kill ring and bind it to "Y". :keymaps 'calendar-mode-map "Y" #'+calendar/copy-date) (app-leader - "d" #'+calendar/toggle-calendar) + "d" #'calendar) :config (defun +calendar/copy-date () "Copy date under cursor into kill ring." @@ -106,12 +106,7 @@ to the kill ring and bind it to "Y". (let ((date (calendar-cursor-to-date))) (when date (setq date (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))) - (kill-new (format-time-string "%Y-%m-%d" date)))))) - (+oreo/create-toggle-function - +calendar/toggle-calendar - "*Calendar*" - calendar - nil)) + (kill-new (format-time-string "%Y-%m-%d" date))))))) #+end_src * Mail Mail is a funny thing; most people use it just for business or @@ -417,7 +412,7 @@ function to pull up the eshell quickly. :commands +shell/toggle-eshell :general (shell-leader - "t" #'+shell/toggle-eshell) + "t" #'eshell) :init (add-hook 'eshell-mode-hook @@ -432,13 +427,7 @@ function to pull up the eshell quickly. :keymaps 'eshell-mode-map "c" (proc (interactive) (eshell/clear) (recenter)) - "k" #'eshell-kill-process))) - :config - (+oreo/create-toggle-function - +shell/toggle-eshell - "*eshell*" - eshell - t)) + "k" #'eshell-kill-process)))) #+end_src ** Eshell pretty symbols and display Pretty symbols and a display record. diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 83655e4..a0c6cc8 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -59,9 +59,15 @@ temporary customisation) in the etc folder. Functions that don't require a packages to work other than Emacs, which means I can define them early. These are used much later in the config. -** Toggle buffer +** WAIT Toggle buffer +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: Like VSCode's toggling feature for just the terminal but now for any buffer of choice, as long as I can generate it via a command. + +2024-04-23: Don't need this anymore due to +~switch-to-buffer-obey-display-actions~. #+begin_src emacs-lisp (with-eval-after-load "window" (defmacro +oreo/create-toggle-function (func-name buf-name @@ -253,7 +259,6 @@ dark easily, so here's a command to switch between them. ((eq +oreo/theme 'light) (load-theme 'personal-primary t) (setq +oreo/theme 'dark))))) - #+end_src ** Font size Set font size to 140 if on my desktop (oldboy) or 175 if on my laptop @@ -663,6 +668,7 @@ I have no use for standard 'grep'; ~counsel-swiper~ does the same thing faster and within Emacs lisp. ~rgrep~ is useful though. #+begin_src emacs-lisp (use-package grep + :after evil :straight nil :display ("^\\*grep.*" diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 759ee24..60fb64c 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -578,9 +578,13 @@ a whim and not particularly caring for the current window setup. Thankfully you can change this via the ~display-buffer-alist~ which matches buffer names with how the window for the buffer should be displayed. I add a use-package keyword to make ~display-buffer-alist~ -records within use-package. +records within a use-package call. I have no idea whether it's optimal AT ALL, but it works for me. + +2024-04-23: Found this option ~switch-to-buffer-obey-display-actions~ +which makes manual buffer switches obey the same constraints via +~display-buffer-alist~ as creating the buffer automatically. #+begin_src emacs-lisp (use-package window :straight nil @@ -593,6 +597,7 @@ I have no idea whether it's optimal AT ALL, but it works for me. "k" #'previous-buffer "D" '(+oreo/clean-buffer-list :which-key "Kill most buffers")) :init + (setq switch-to-buffer-obey-display-actions t) (with-eval-after-load "use-package-core" (add-to-list 'use-package-keywords ':display) (defun use-package-normalize/:display (_name-symbol _keyword args) diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index fb1ee36..594c52e 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -531,17 +531,11 @@ Setup for python shell, including a toggle option :commands +python/toggle-repl :general (shell-leader - "p" #'+shell/python-toggle-repl) + "p" #'run-python) :display ("\\*Python\\*" (display-buffer-at-bottom) - (window-height . 0.25)) - :config - (+oreo/create-toggle-function - +shell/python-toggle-repl - "*Python*" - run-python - nil)) + (window-height . 0.25))) #+end_src * YAML YAML is a data language which is useful for config files. @@ -642,14 +636,9 @@ development on Emacs. (setq-default org-babel-lisp-eval-fn #'sly-eval)) (with-eval-after-load "company" (add-hook 'sly-mrepl-hook #'company-mode)) - (+oreo/create-toggle-function - +shell/toggle-sly - "*sly-mrepl for sbcl*" - sly-mrepl - nil) :general (shell-leader - "s" #'+shell/toggle-sly) + "s" #'sly-mrepl) (nmap :keymaps '(lisp-mode-map sly-mrepl-mode-map) "gr" #'sly-eval-buffer -- cgit v1.2.3-13-gbd6f From 617b849be18420eeb32e599acbfd63ca0bdee020 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 03:41:32 +0530 Subject: (Emacs/app)+some defer statements to make bootup quicker Cuts a second off the time to bootup. --- Emacs/.config/emacs/app.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 5b94a9d..1cda909 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -409,7 +409,7 @@ Bind some evil-like movements for easy shell usage, and a toggle function to pull up the eshell quickly. #+begin_src emacs-lisp (use-package eshell - :commands +shell/toggle-eshell + :defer t :general (shell-leader "t" #'eshell) @@ -453,6 +453,7 @@ changes that haven't been committed). #+begin_src emacs-lisp (use-package eshell + :defer t :config (defun +eshell/--git-get-remote-status () (let* ((branch-status (split-string @@ -539,7 +540,7 @@ using. So here's also a command for opening eshell with the current directory. #+begin_src emacs-lisp (use-package eshell - :straight nil + :defer t :general (shell-leader "T" #'+eshell/current-buffer) @@ -875,6 +876,7 @@ and integrates slickly into image-dired. Of course, * ERC #+begin_src emacs-lisp (use-package erc + :defer t :init (setq erc-server "irc.libera.chat" erc-nick "oreodave" -- cgit v1.2.3-13-gbd6f From aedab997d32d162ac18b34cf0f540c2b785a686d Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 03:42:11 +0530 Subject: (Emacs/app)+mpv package Only really useful for integration in org-mode --- Emacs/.config/emacs/app.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 1cda909..415019c 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -882,3 +882,19 @@ and integrates slickly into image-dired. Of course, erc-nick "oreodave" erc-buffer-display "current")) #+end_src +* MPV +Basically a porcelain over mpv via the IPC interface. +#+begin_src emacs-lisp +(use-package mpv + :defer t + :straight t + :config + (with-eval-after-load "org" + (defun org-mpv-complete-link (&optional arg) + (replace-regexp-in-string + "file:" "mpv:" + (org-link-complete-file arg) + t t)) + (org-link-set-parameters "mpv" + :follow #'mpv-play :complete #'org-mpv-complete-link))) +#+end_src -- cgit v1.2.3-13-gbd6f From 711dcf5e2d592271e0939c205ba33dbd93a4d547 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:00:41 +0530 Subject: (Emacs/literate)~reworked literate to only compile if necessary Speeds up boot and kill. Actually checks for timestamps and logical errors are removed. --- Emacs/.config/emacs/elisp/literate.el | 144 +++++++++++++++++++++++----------- Emacs/.config/emacs/init.el | 3 - 2 files changed, 100 insertions(+), 47 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/elisp/literate.el b/Emacs/.config/emacs/elisp/literate.el index 114c3bb..077de93 100644 --- a/Emacs/.config/emacs/elisp/literate.el +++ b/Emacs/.config/emacs/elisp/literate.el @@ -24,6 +24,16 @@ ;;; Code: +;; Predicates +(defun +literate/org-to-el (name) + (string-replace ".org" ".el" name)) + +(defun +literate/org-to-elc (name) + (string-replace ".org" ".elc" name)) + +(defun +literate/el-to-elc (name) + (string-replace ".el" ".elc" name)) + (defun +literate/filter (predicate list) (if (null list) nil @@ -39,70 +49,116 @@ (defun +literate/el-p (filename) (string= "el" (file-name-extension filename))) +(defun +literate/--reduce-bool (bools init) + (if (= (length bools) 0) + init + (+literate/--reduce-bool (cdr bools) (and (car bools) init)))) + +;; Files (defconst +literate/org-files (+literate/filter #'+literate/org-p (mapcar #'(lambda (file) (concat user-emacs-directory file)) - (cddr (directory-files user-emacs-directory))))) + (cddr (directory-files user-emacs-directory))))) -(defconst +literate/output-files - (mapcar #'(lambda (x) (replace-regexp-in-string ".org" ".el" x)) +literate/org-files)) - -(defconst +literate/elisp-files +(defconst +literate/el-init-files `(,(concat user-emacs-directory "early-init.el") - ,(concat user-emacs-directory "init.el") - ,@+literate/output-files - ,@(mapcar - #'(lambda (name) (concat user-emacs-directory "elisp/" name)) - ;; Only take .el files - (+literate/filter - #'+literate/el-p - (cddr (directory-files (concat user-emacs-directory "elisp/"))))))) + ,(concat user-emacs-directory "init.el"))) -;; Setup predicates and loading +(defconst +literate/el-lib-files + (mapcar + #'(lambda (name) (concat user-emacs-directory "elisp/" name)) + ;; Only take .el files + (+literate/filter + #'+literate/el-p + (cddr (directory-files (concat user-emacs-directory "elisp/")))))) -(defun +literate/--reduce-bool (bools init) - (if (= (length bools) 0) - init - (+literate/--reduce-bool (cdr bools) (and (car bools) init)))) +(defconst +literate/el-org-files + (mapcar #'+literate/org-to-el +literate/org-files)) -(defun +literate/output-files-exist () - "Checks if output files exist, for compilation purposes." - (if (< 1 (length +literate/output-files)) - (+literate/--reduce-bool (mapcar #'file-exists-p +literate/output-files) t) - (file-exists-p (car +literate/output-files)))) +(defconst +literate/el-files + (cl-concatenate + 'list + +literate/el-init-files + +literate/el-lib-files + +literate/el-org-files)) -(defun +literate/load-config () - "Load the first file in +literate/output-files." - (interactive) - (load-file (concat user-emacs-directory "config.el"))) +(defconst +literate/elc-init-files + (mapcar #'+literate/el-to-elc +literate/el-init-files)) + +(defconst +literate/elc-lib-files + (mapcar #'+literate/el-to-elc +literate/el-lib-files)) +(defconst +literate/elc-org-files + (mapcar #'+literate/org-to-elc +literate/org-files)) + +;; Basic compilation and loading files (autoload #'org-babel-tangle-file "ob-tangle") (defun +literate/tangle-if-old (org-file) - (let ((output-file (replace-regexp-in-string ".org" ".el" org-file))) - (message "Tangle(%s)->%s" org-file output-file) - (if (or (not (file-exists-p output-file)) (file-newer-than-file-p org-file output-file)) - (org-babel-tangle-file org-file)))) + (let ((output-file (+literate/org-to-el org-file))) + (when (file-newer-than-file-p org-file output-file) + (message "[Literate]:\tTangle(%s)->%s" org-file output-file) + (org-babel-tangle-file org-file)))) (defun +literate/byte-compile-if-old (el-file) - (let ((output-file (replace-regexp-in-string ".el" ".elc" el-file))) - (if (file-newer-than-file-p el-file output-file) - (byte-compile-file el-file)))) + (let ((output-file (+literate/el-to-elc el-file))) + (when (file-newer-than-file-p el-file output-file) + (message "[Literate]:\tByteCompile(%s)->%s" el-file output-file) + (byte-compile-file el-file)))) + +(defun +literate/load-org-file (org-file) + (+literate/tangle-if-old org-file) + (load-file (+literate/org-to-el org-file))) + +(defun +literate/load-config () + "Load the config.el." + (interactive) + (mapcar #'+literate/tangle-if-old +literate/org-files) + (load-file (concat user-emacs-directory "config.el"))) + +;; Compiling all files +(defun +literate/compile-init-files () + (message "[Literate/init]: Byte compiling init files...") + (mapc #'+literate/byte-compile-if-old +literate/el-init-files) + (message "[Literate/init]: Init files compiled!")) + +(defun +literate/compile-lib-files () + (message "[Literate/lib]: Byte compiling lib files...") + (mapc #'+literate/byte-compile-if-old +literate/el-lib-files) + (message "[Literate/lib]: Lib files compiled!")) + +(defun +literate/compile-org-files () + (message "[Literate/org]: Tangling org files...") + (mapc #'+literate/tangle-if-old +literate/org-files) + (message "[Literate/org]: Tangled org files!") + (message "[Literate/org]: Byte compiling org files...") + (mapc #'+literate/byte-compile-if-old +literate/el-org-files) + (message "[Literate/org]: Byte compiled org files!")) (defun +literate/compile-config () "Compile all files in +literate/org-files via org-babel-tangle." (interactive) - (message "Compiling files...") - (mapc #'+literate/tangle-if-old +literate/org-files) - (message "Files compiled") - - (message "Byte-compiling literate files...") - (mapc #'+literate/byte-compile-if-old +literate/output-files) - (message "Literate files byte-compiled") - (message "Byte compiling init.el, early-init.el, *.org~>*.el elisp/*") - (mapc #'+literate/byte-compile-if-old +literate/elisp-files) - (message "Finished byte-compiling")) + (message "[Literate]: Starting compilation...") + (+literate/compile-init-files) + (+literate/compile-lib-files) + (+literate/compile-org-files) + (message "[Literate]: Finished compilation!")) + +;; Cleaning config +(defun +literate/clean-config () + "Removes all .el files generated by literate org files and .elc +files by byte compilation" + (interactive) + (message "[Literate]: Cleaning configuration...") + (mapcar #'delete-file + (cl-concatenate + 'list + +literate/el-org-files + +literate/elc-init-files + +literate/elc-lib-files + +literate/elc-org-files)) + (message "[Literate]: Cleaned configuration!")) (provide 'literate) ;;; literate.el ends here diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index 4258d37..049a15c 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -70,9 +70,6 @@ 'kill-emacs-hook #'+literate/compile-config) -(if (not (+literate/output-files-exist)) - (+literate/compile-config)) - (+literate/load-config) (when (daemonp) -- cgit v1.2.3-13-gbd6f From 5c47cacdbd9204b8c0a2546a054b6f3f37ea851a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:01:33 +0530 Subject: (Emacs/lang)-clang-format-mode on cc-mode-hook I can configure projects to use it if necessary. --- Emacs/.config/emacs/lang.org | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 594c52e..b1cbcb2 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -277,9 +277,13 @@ my dotfiles). :after cc-mode :commands (+code/clang-format-region-or-buffer clang-format-mode) - :hook - (c-mode-hook . clang-format-mode) - (c++-mode-hook . clang-format-mode) + ;;; 2024-04-24: disabled as it's annoying on projects where a + ;;; .clang-format isn't defined. Furthermore, does it make sense + ;;; for *every* file you open and edit to have a format function run + ;;; right after? seems a bit slow. + ;; :hook + ;; (c-mode-hook . clang-format-mode) + ;; (c++-mode-hook . clang-format-mode) :general (code-leader :keymaps '(c-mode-map c++-mode-map) -- cgit v1.2.3-13-gbd6f From 90c0766992ee1e5326d288f164569c33ceb7bda2 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:02:38 +0530 Subject: (Emacs/core|config)~do a bit of clean up --- Emacs/.config/emacs/config.org | 21 +++++++++++---------- Emacs/.config/emacs/core.org | 5 ++++- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index a0c6cc8..020cf8d 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -425,9 +425,9 @@ with colouring and a ton of presentations to choose from. (telephone-line-mode)) #+end_src ** Mouse -Eww who uses a mouse? +Who uses a mouse? 🤮 #+begin_src emacs-lisp -(setq use-file-dialog nil) +(setq-default use-file-dialog nil) #+end_src * Core packages (loading) For my core packages, whose configuration doesn't change much anyway, @@ -1119,17 +1119,16 @@ to a few formats, all within Emacs. Some other features include: demand ** Org Essentials Org has a ton of settings to tweak, which change your experience quite -a bit. My setup should be as portable as possible and (/sometimes/) I -need to access org mode files in other editors, so org files should be -as close to clear text as possible. This is the guiding philosophy -that essentially makes most of my options pretty immediate. +a bit. Here are mine, but this took a lot of just reading other +people's configurations and testing. I don't do a good job of +explaining how this works in all honesty, but it works well for me so +I'm not very bothered. -Some arbitrary notes: + By default =~/Text= is my directory for text files. I actually have a repository that manages this directory for agenda files and other documents -+ Indentation in file should not be allowed, i.e. text indentation, - as that forces other editors to read it a certain way as well. It ++ Indentation in file should not be allowed, i.e. text indentation, as + that forces other editors to read it a certain way as well. It's obtrusive hence it's off. + Org startup indented is on by default as most documents do benefit from the indentation, but I do turn it off for some files via @@ -1364,6 +1363,8 @@ a very tidy way to manage your time. "r" #'org-agenda-redo)) #+end_src ** Org capture +2024-04-24: I actually need to clean this up, in particular explain +what org-capture does. #+begin_src emacs-lisp (use-package org-capture :straight nil @@ -1409,7 +1410,7 @@ time a clock out occurs.") (setq-local +org/clock-out-toggle-report (not +org/clock-out-toggle-report))))) #+end_src -** Org on save +** Org compile to PDF on save If ~+org/compile-to-pdf-on-save-p~ is non-nil, then compile to \(\LaTeX\) and run an async process to compile it to a PDF. Doesn't make Emacs hang (like ~org-latex-export-to-pdf~) and doesn't randomly diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 60fb64c..143af67 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -754,7 +754,10 @@ for all snippets I've got. :config (yas-load-directory (no-littering-expand-etc-file-name "yasnippet/snippets"))) #+end_src -* Hydra +** WAIT Hydra +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: Hydra is a great package by =abo-abo= (yes the same guy who made ivy and swiper) and I hope to use it later on in the config. There are two use-package declarations here: one for ~hydra~ itself, and the -- cgit v1.2.3-13-gbd6f From c135997363495a523ff28ab30086d766a26d7c95 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:02:54 +0530 Subject: (Emacs/config)+fix error with wgrep Need to set initial state to Normal instead of motion and bind stuff properly for it to work. --- Emacs/.config/emacs/config.org | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 020cf8d..2154153 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -680,8 +680,17 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. "d" #'rgrep) (nmmap :keymaps 'grep-mode-map - "0" #'evil-digit-argument-or-evil-beginning-of-line - "W" #'wgrep-change-to-wgrep-mode)) + "0" #'evil-beginning-of-line + "q" #'quit-window + "i" #'wgrep-change-to-wgrep-mode) + (nmmap + :keymaps 'wgrep-mode-map + "q" #'evil-record-macro + "Zz" #'wgrep-finish-edit + "Zq" #'wgrep-abort-changes) + :config + ;; Without this wgrep doesn't work properly + (evil-set-initial-state 'grep-mode 'normal)) #+end_src *** rg #+begin_src emacs-lisp -- cgit v1.2.3-13-gbd6f From 1de12e582b9c6aa6cbbbbd5e2bd49c84c6b71f7d Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:04:14 +0530 Subject: (Emacs/config)+method of searching +literate/el-files Uses grep by default. Also made a method of searching a discrete list of files using grep. --- Emacs/.config/emacs/config.org | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 2154153..279e617 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -712,6 +712,26 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. rg-default-alias-fallback "all" rg-buffer-name "*ripgrep*")) #+end_src +*** Searching Lisp config +Using grep search all the elisp files. With ~wgrep~ this provides +another method of refactoring. +#+begin_src emacs-lisp +(use-package grep + :general + (search-leader + "c" #'+grep/search-config) + :config + (defun +grep/grep-cmd-str (str files) + (cl-reduce + #'concat + (append (list grep-command "\"" str "\" ") + (mapcar (lambda (x) (concat x " ")) files)))) + + (defun +grep/search-config () + (interactive) + (grep (+grep/grep-cmd-str (read-string "Search?: ") + +literate/el-files)))) +#+end_src ** Olivetti Olivetti provides a focus mode for Emacs, which makes it look a bit nicer with fringes. I also define ~+olivetti-mode~ which will -- cgit v1.2.3-13-gbd6f From 37351ad29953e3c12851efef05406a5a2f57cace Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:05:13 +0530 Subject: (Emacs/config)~rearrange org-mode configuration --- Emacs/.config/emacs/config.org | 114 +++++++++++++++++++++++------------------ 1 file changed, 65 insertions(+), 49 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 279e617..56beaf2 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1169,25 +1169,29 @@ I'm not very bothered. preview, I'll do it myself, so turn it off. + Org manages windowing itself, to some extent, so I set those options to be as unobtrusive as possible ++ Load languages I use in =src= blocks in org-mode (Emacs-lisp for + this configuration, C and Python) #+begin_src emacs-lisp (use-package org :defer t :straight t :init - (setq - org-directory "~/Text" - org-adapt-indentation nil - org-indent-mode nil - org-startup-indented t - org-startup-folded 'content - org-startup-with-latex-preview nil - org-imenu-depth 10 - org-src-window-setup 'current-window - org-indirect-buffer-display 'current-window - org-link-frame-setup '((vm . vm-visit-folder-other-frame) - (vm-imap . vm-visit-imap-folder-other-frame) - (file . find-file)))) + (setq org-directory "~/Text" + org-adapt-indentation nil + org-indent-mode nil + org-startup-indented t + org-startup-folded 'content + org-startup-with-latex-preview nil + org-imenu-depth 10 + org-src-window-setup 'current-window + org-indirect-buffer-display 'current-window + org-link-frame-setup '((vm . vm-visit-folder-other-frame) + (vm-imap . vm-visit-imap-folder-other-frame) + (file . find-file)) + org-babel-load-languages '((emacs-lisp . t) + (lisp . t) + (shell . t)))) #+end_src ** Org Latex Org mode has deep integration with latex, can export to PDF and even @@ -1247,10 +1251,7 @@ Emacs was very helpful here. org-todo-keywords '((sequence "TODO" "WIP" "DONE") (sequence "PROJ" "WAIT" "COMPLETE")) - org-use-sub-superscripts '{} - org-babel-load-languages '((emacs-lisp . t) - (lisp . t) - (shell . t)))) + org-use-sub-superscripts '{})) #+end_src ** Org Core Functionality Hooks, prettify-symbols and records for auto insertion. @@ -1279,37 +1280,13 @@ Hooks, prettify-symbols and records for auto insertion. Some bindings for org mode. #+begin_src emacs-lisp (use-package org - :after counsel - :config - (defun +org/swiper-goto () - (interactive) - (swiper "^\\* ")) - (defun +org/search-headings () - "Searches directory (of buffer) for org headings via counsel-rg" - (interactive) - (counsel-rg "^\\* " (file-name-directory (buffer-file-name)))) - - (defun +org/search-config-headings () - "Searches USER-EMACS-DIRECTORY for org headings via counsel-rg" - (interactive) - (counsel-rg "^\\* " - (substring user-emacs-directory 0 - (- (length user-emacs-directory) 1)) - "--max-depth=1")) :general (file-leader "l" #'org-store-link "i" #'org-insert-last-stored-link) (code-leader + :keymaps 'emacs-lisp-mode-map "D" #'org-babel-detangle) - (file-leader - "p" #'+org/search-config-headings) - (search-leader - :keymaps 'org-mode-map - "I" #'+org/search-headings) - (nmmap - :keymaps 'org-mode-map - [remap imenu] #'+org/swiper-goto) (local-leader :keymaps 'org-mode-map "l" '(nil :which-key "Links") @@ -1340,14 +1317,52 @@ Some bindings for org mode. "t" #'org-table-toggle-coordinate-overlays "s" #'org-table-sum "e" #'org-table-calc-current-TBLFM - "E" #'org-table-eval-formula) - (local-leader + "E" #'org-table-eval-formula)) +#+end_src +** Searching org files +The default ~imenu~ support for Org-mode is god-awful. ~Imenu~ for +org-mode should show me a list of headings and provide a +completing-read interface to search them. + +[[file:core.org::*Counsel][Counsel]] has me covered for this as I can +just provide it a regex as an initial prompt to narrow the candidates +down to just the headings then let the user go from there. I use +~swiper~ when considering just the local file (a la ~imenu~) and +~counsel-rg~ to search multiple org-files. + +The cherry on top is ~+org/search-config-headings~ which searches the +org files in ~user-emacs-directory~ and provides the headings for +them. This allows me to search my configuration pretty quickly. +#+begin_src emacs-lisp +(use-package org + :after counsel + :config + (defun +org/swiper-goto () + (interactive) + (swiper "^\\* ")) + + (defun +org/search-headings () + "Searches directory (of buffer) for org headings via counsel-rg" + (interactive) + (counsel-rg "^\\* " (file-name-directory (buffer-file-name)))) + + (defun +org/search-config-headings () + "Searches USER-EMACS-DIRECTORY for org headings via counsel-rg" + (interactive) + (counsel-rg "^\\* " + (substring user-emacs-directory 0 + (- (length user-emacs-directory) 1)) + "--max-depth=1")) + :general + (search-leader + "C" #'+org/search-config-headings) + (search-leader :keymaps 'org-mode-map - :infix "c" - "i" #'org-clock-clock-in - "o" #'org-clock-clock-out - "c" #'org-clock-in-last - "d" #'org-clock-display)) + "I" #'+org/search-headings) + (nmmap + :keymaps 'org-mode-map + [remap imenu] #'+org/swiper-goto)) + #+end_src ** Org Agenda Org agenda provides a nice viewing for schedules. With org mode it's @@ -1432,6 +1447,7 @@ time a clock out occurs.") (local-leader :keymaps 'org-mode-map :infix "c" + "d" #'org-clock-display "c" #'org-clock-in "o" #'org-clock-out "r" #'org-clock-report -- cgit v1.2.3-13-gbd6f From 8ea2b51e5afbf413b3c46f2c532b052b1028bec6 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:05:31 +0530 Subject: (Emacs/core)+binding fp to use counsel-git in defiles folder Lookup all files in the repository. Best solution I could come up with. --- Emacs/.config/emacs/core.org | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 143af67..5298760 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -360,7 +360,11 @@ Setup for counsel. Load after ivy and helpful. "s" #'counsel-grep-or-swiper "r" #'counsel-rg) (file-leader - "r" #'counsel-recentf) + "r" #'counsel-recentf + "p" (proc (interactive) + (with-current-buffer (find-file-noselect + (concat user-emacs-directory "config.org")) + (counsel-git)))) (insert-leader "c" #'counsel-unicode-char) (general-def -- cgit v1.2.3-13-gbd6f From ff1dab3f6b0d35ffac7c88ee0c003a8b13d4e05f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:06:56 +0530 Subject: (Emacs/snippets)~Modified some C++ snippets to be easier to use --- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class | 3 +-- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy | 2 +- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if | 2 +- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count | 2 +- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete | 2 +- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum | 1 + Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class index dcd73f9..83ba750 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class @@ -5,5 +5,4 @@ class ${1:Name} { public: ${1:$(yas/substr yas-text "[^: ]*")}(); ${2:virtual ~${1:$(yas/substr yas-text "[^: ]*")}();} - $0 -}; \ No newline at end of file +};$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy index 6db7b97..18653db 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: copy -# key: cpy +# key: copy # -- std::copy(std::begin(${1:container}), std::end($1), std::begin($2)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if index 611aa75..f1cb633 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if @@ -1,6 +1,6 @@ # -*- mode: snippet -*- # name: copy_if -# key: cpi +# key: copy_if # -- std::copy_if(std::begin(${1:container}), std::end($1), std::begin($2), []($3) { diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count index 95936e2..d6ae58a 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: count -# key: cnt +# key: count # -- auto n = std::count(std::begin(${1:container}), std::end($1), $2); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete index cf0376c..1a7d1fe 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete @@ -1,6 +1,6 @@ # -*- mode: snippet -*- # name: delete -# key: dl +# key: delete # uuid: dl # -- delete ${1:pointer}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum index 99f9923..14032a0 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum @@ -1,4 +1,5 @@ # -*- mode: snippet -*- # name: enum +# key: enum # -- enum ${1:NAME} {$0}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal index 09cfb44..1317962 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal @@ -1,6 +1,6 @@ # -*- mode: snippet -*- # name: equal -# key: eql +# key: equal # -- if (std::equal(std::begin(${1:container}), std::end($1), std::begin($2))) { $3 -- cgit v1.2.3-13-gbd6f From eb5b11e71bfc3a9f8cacd47fa747b05e19479f27 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:08:12 +0530 Subject: (Emacs/snippet)~rename a few C++ snippets --- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/beginend | 6 ------ Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend | 6 ++++++ Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/doc | 8 -------- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox | 8 ++++++++ 4 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/beginend create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/doc create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/beginend b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/beginend deleted file mode 100644 index 26ee232..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/beginend +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: v.begin(), v.end() -# key: beginend -# uuid: beginend -# -- -${1:v}.begin(), $1.end \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend new file mode 100644 index 0000000..13451e1 --- /dev/null +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: v.begin(), v.end() +# key: bend +# uuid: beginend +# -- +${1:v}.begin(), $1.end \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/doc b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/doc deleted file mode 100644 index 6f100ae..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/doc +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: doc -# key: /** -# uuid: /** -# -- -/** - * $0 - */ \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox new file mode 100644 index 0000000..84162af --- /dev/null +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: doc +# key: dox +# uuid: /** +# -- +/** + * $0 + */ \ No newline at end of file -- cgit v1.2.3-13-gbd6f From 870ce03d0279bc1ce7215c311b061d68c95fdbc1 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 27 Apr 2024 14:42:15 +0530 Subject: (Emacs/config|core|elisp)+move.el Library to move words forward and backward as well as lines up and down. These movements keep the object in question under the cursor which provides a nice experience. --- Emacs/.config/emacs/config.org | 25 +++--------- Emacs/.config/emacs/core.org | 8 ++-- Emacs/.config/emacs/elisp/move.el | 85 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 23 deletions(-) create mode 100644 Emacs/.config/emacs/elisp/move.el (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 56beaf2..f962021 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -190,26 +190,11 @@ any buffers in ~+oreo/keep-buffer~ and kills the rest. (kill-buffer buf))) (buffer-list))) #+end_src -** Move line {up/down} -Shamelessly copied from -[[https://emacsredux.com/blog/2013/04/02/move-current-line-up-or-down/][this -article]]. Will be bound in [[file:core.org::*Some binds in -Emacs][core.org]]. -#+begin_src emacs-lisp -(defun move-line-up () - "Move up the current line." - (interactive) - (transpose-lines 1) - (forward-line -2) - (indent-according-to-mode)) - -(defun move-line-down () - "Move down the current line." - (interactive) - (forward-line 1) - (transpose-lines 1) - (forward-line -1) - (indent-according-to-mode)) +** Move +Allows {hjkl} movement of text objects. Will be bound in +[[file:core.org::*Some binds in Emacs][core.org]]. +#+begin_src emacs-lisp +(load-file (concat user-emacs-directory "elisp/move.el")) #+end_src * Aesthetics General look and feel of Emacs (mostly disabling stuff I don't like). diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 5298760..4756e46 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -119,9 +119,11 @@ Some bindings that I couldn't fit elsewhere easily. ("C-x d" #'delete-frame) (nmmap - :keymaps 'override - "C-M-j" #'move-line-down - "C-M-k" #'move-line-up) + :keymaps '(text-mode-map prog-mode-map) + "C-M-h" #'+move/word-backward + "C-M-j" #'+move/line-down + "C-M-k" #'+move/line-up + "C-M-l" #'+move/word-forward) (nmmap "C--" #'text-scale-decrease diff --git a/Emacs/.config/emacs/elisp/move.el b/Emacs/.config/emacs/elisp/move.el new file mode 100644 index 0000000..77dd785 --- /dev/null +++ b/Emacs/.config/emacs/elisp/move.el @@ -0,0 +1,85 @@ +;;; move-line.el --- Move current line up or down -*- lexical-binding: t; -*- + +;; Copyright (C) 2024 Aryadev Chavali + +;; Author: Aryadev Chavali +;; Keywords: + +;; This is free and unencumbered software released into the public domain. + +;; Anyone is free to copy, modify, publish, use, compile, sell, or +;; distribute this software, either in source code form or as a compiled +;; binary, for any purpose, commercial or non-commercial, and by any +;; means. + +;; In jurisdictions that recognize copyright laws, the author or authors +;; of this software dedicate any and all copyright interest in the +;; software to the public domain. We make this dedication for the benefit +;; of the public at large and to the detriment of our heirs and +;; successors. We intend this dedication to be an overt act of +;; relinquishment in perpetuity of all present and future rights to this +;; software under copyright law. + +;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +;; IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +;; OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +;; ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +;; OTHER DEALINGS IN THE SOFTWARE. + +;; For more information, please refer to + +;;; Commentary: + +;; Move the current line up or down. Shamelessly copied from +;; https://emacsredux.com/blog/2013/04/02/move-current-line-up-or-down/ so + +;;; Code: + +(defun +move/--normalise-arg (arg) + (if (or (null arg) (< arg 1)) + 1 + arg)) + +(defmacro +move/create-move (name description &rest body) + `(defun ,name (&optional arg) + ,description + (interactive "P") + (let ((arg (+move/--normalise-arg arg))) + (while (not (= arg 0)) + ,@body + (setq arg (- arg 1)))))) + +(+move/create-move + +move/line-up + "Move the current line up" + (transpose-lines 1) + (forward-line -2) + (indent-according-to-mode)) + +(+move/create-move + +move/line-down + "Move the current line down" + (forward-line 1) + (transpose-lines 1) + (forward-line -1) + (indent-according-to-mode)) + +(+move/create-move + +move/word-forward + "Move the current word forward" + (forward-word 1) + (transpose-words 1) + (forward-word -1) + (indent-according-to-mode)) + +(+move/create-move + +move/word-backward + "Move the current word backward" + (transpose-words 1) + (forward-word -2) + (indent-according-to-mode)) + +(provide 'move) +;;; move.el ends here -- cgit v1.2.3-13-gbd6f From e7c5cd8d159e8936d9b53c53fc2eedf033c57c2c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 27 Apr 2024 15:09:57 +0530 Subject: (Emacs/config|core)Switched fP and fp --- Emacs/.config/emacs/config.org | 4 ++-- Emacs/.config/emacs/core.org | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index f962021..b8665a8 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1339,8 +1339,8 @@ them. This allows me to search my configuration pretty quickly. (- (length user-emacs-directory) 1)) "--max-depth=1")) :general - (search-leader - "C" #'+org/search-config-headings) + (file-leader + "p" #'+org/search-config-headings) (search-leader :keymaps 'org-mode-map "I" #'+org/search-headings) diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 4756e46..417d978 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -363,7 +363,7 @@ Setup for counsel. Load after ivy and helpful. "r" #'counsel-rg) (file-leader "r" #'counsel-recentf - "p" (proc (interactive) + "P" (proc (interactive) (with-current-buffer (find-file-noselect (concat user-emacs-directory "config.org")) (counsel-git)))) -- cgit v1.2.3-13-gbd6f From 89f65d77b791ce886f1e4559ee2aef9f489f648c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 27 Apr 2024 15:11:42 +0530 Subject: (Emacs/config)+flycheck-eglot to replace flymake integration of eglot --- Emacs/.config/emacs/config.org | 74 +++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 26 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index b8665a8..3d1043b 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -970,6 +970,35 @@ in the minibuffer. A lot cleaner. (setq eldoc-box-position-function #'eldoc-box--default-upper-corner-position-function eldoc-box-clear-with-C-g t)) #+end_src +** Flycheck +Flycheck is the checking system for Emacs. I don't necessarily like +having all my code checked all the time, so I haven't added a hook to +prog-mode as it would be better for me to decide when I want checking +and when I don't. + +I've added it to C/C++ mode because I use them regularly and flycheck +has very little overhead to work there. +#+begin_src emacs-lisp +(use-package flycheck + :commands (flycheck-mode flycheck-list-errors) + :hook + (c-mode-hook . flycheck-mode) + (c++-mode-hook . flycheck-mode) + :general + (mode-leader + "f" #'flycheck-mode) + (code-leader + "x" #'flycheck-list-errors + "J" #'flycheck-next-error + "K" #'flycheck-previous-error) + :display + ("\\*Flycheck.*" + (display-buffer-at-bottom) + (window-height . 0.25)) + :config + (with-eval-after-load "evil-collection" + (evil-collection-flycheck-setup))) +#+end_src ** Eglot Eglot is package to communicate with LSP servers for better programming capabilities. Interactions with a server provide results @@ -994,36 +1023,29 @@ server when I need it. "a" #'eglot-code-actions "r" #'eglot-rename "R" #'eglot-reconnect) - ;; :init - ;; (setq eglot-stay-out-of '(flymake)) + :init + (setq eglot-stay-out-of '(flymake)) :config (add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd"))) #+end_src -** Flycheck -Flycheck is the checking system for Emacs. I don't necessarily like -having all my code checked all the time, so I haven't added a hook to -prog-mode as it would be better for me to decide when I want checking -and when I don't. +*** Flycheck-Eglot +By default Eglot uses the integrated flymake package for error +reporting. I don't mind flymake, and I think an integrated solution +which doesn't rely on external packages is always a great idea. +However, I just personally prefer flycheck and it's become part of my +mental model when programming. So here's a package which will +integrate flycheck into Eglot's error reporting. + +(Funny but also kind of depressing is this issue in Eglot where +someone requested this integration, which caused a bit of a flame war. +People are stupid. +[[https://github.com/joaotavora/eglot/issues/42][no opinion on +flymake]]) #+begin_src emacs-lisp -(use-package flycheck - :commands (flycheck-mode flycheck-list-errors) - :hook - (c-mode-hook . flycheck-mode) - (c++-mode-hook . flycheck-mode) - :general - (mode-leader - "f" #'flycheck-mode) - (code-leader - "x" #'flycheck-list-errors - "J" #'flycheck-next-error - "K" #'flycheck-previous-error) - :display - ("\\*Flycheck.*" - (display-buffer-at-bottom) - (window-height . 0.25)) - :config - (with-eval-after-load "evil-collection" - (evil-collection-flycheck-setup))) +(use-package flycheck-eglot + :straight t + :after (flycheck eglot) + :hook (eglot-managed-mode-hook . flycheck-eglot-mode)) #+end_src ** Tabs and spaces By default, turn off tabs and set the tab width to two. -- cgit v1.2.3-13-gbd6f From 0c741c29c7976781824d8fae1dd2396a294db78f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 27 Apr 2024 15:40:53 +0530 Subject: (Emacs/yasnippet)~Moved c++-mode/dox -> cc-mode/dox --- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox | 8 -------- Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/dox | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/dox (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox deleted file mode 100644 index 84162af..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dox +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: doc -# key: dox -# uuid: /** -# -- -/** - * $0 - */ \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/dox b/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/dox new file mode 100644 index 0000000..424de7c --- /dev/null +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/dox @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: doc +# key: dox +# uuid: /** +# -- +/** + $0 + */ \ No newline at end of file -- cgit v1.2.3-13-gbd6f From a08ebf097a90429d080acd1b62e9179894538e1e Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 27 Apr 2024 15:42:54 +0530 Subject: (Emacs/app|config)~change some window heights in :display --- Emacs/.config/emacs/app.org | 2 +- Emacs/.config/emacs/config.org | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 415019c..5145d4a 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -443,7 +443,7 @@ Pretty symbols and a display record. :display ("\\*e?shell\\*" ; for general shells as well (display-buffer-at-bottom) - (window-height . 0.40))) + (window-height . 0.30))) #+end_src ** Eshell variables and aliases Set some sane defaults, a banner and a prompt. The prompt checks for diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 3d1043b..c0f279e 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -658,7 +658,7 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. :display ("^\\*grep.*" (display-buffer-at-bottom display-buffer-reuse-window) - (window-height . 0.25) + (window-height . 0.35) (reusable-frames . t)) :general (search-leader -- cgit v1.2.3-13-gbd6f From ce066bd6b2a89d0b3d0e9f8677c5772cfbd3cd01 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 27 Apr 2024 15:43:18 +0530 Subject: (Emacs/app)~enabled elfeed and added changed feeds --- Emacs/.config/emacs/app.org | 47 ++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 5145d4a..485c891 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -568,10 +568,7 @@ directory. (eshell-send-input)) (message "Could not switch eshell: buffer is not real file"))))) #+end_src -* WAIT Elfeed -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: +* Elfeed Elfeed is the perfect RSS feed reader, integrated into Emacs perfectly. I've got a set of feeds that I use for a large variety of stuff, mostly media and entertainment. I've also bound " ar" @@ -587,31 +584,26 @@ to elfeed for loading the system. "" #'elfeed-search-show-entry) :init (setq elfeed-db-directory (no-littering-expand-var-file-name "elfeed/")) + (setq +rss/feed-urls '(("Arch Linux" "https://www.archlinux.org/feeds/news/" - Linux) - ("LEMMiNO" - "https://www.youtube.com/feeds/videos.xml?channel_id=UCRcgy6GzDeccI7dkbbBna3Q" - YouTube Stories) + News Technology) ("The Onion" "https://www.theonion.com/rss" Social) - ("Stack exchange" - "http://morss.aryadevchavali.com/stackexchange.com/feeds/questions" - Social) - ("Dark Sominium" - "https://www.youtube.com/feeds/videos.xml?channel_id=UC_e39rWdkQqo5-LbiLiU10g" - YouTube Stories) - ("Dark Sominium Music" - "https://www.youtube.com/feeds/videos.xml?channel_id=UCkLiZ_zLynyNd5fd62hg1Kw" - YouTube Music) + ("Protesilaos Stavrou" + "https://www.youtube.com/@protesilaos" + YouTube Technology) + ("Tsoding Daily" + "https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg" + YouTube Technology) + ("Tsoding" + "https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg" + YouTube Technology) ("Nexpo" "https://www.youtube.com/feeds/videos.xml?channel_id=UCpFFItkfZz1qz5PpHpqzYBw" - YouTube) - ("Techquickie" - "https://www.youtube.com/feeds/videos.xml?channel_id=UC0vBXGSyV14uvJ4hECDOl0Q" - YouTube) + YouTube Stories) ("3B1B" "https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw" YouTube) @@ -625,20 +617,15 @@ to elfeed for loading the system. "https://www.youtube.com/feeds/videos.xml?channel_id=UCn8OYopT9e8tng-CGEWzfmw" YouTube Stories) ("Hacker News" - "http://morss.aryadevchavali.com/news.ycombinator.com/rss" - Social) + "https://news.ycombinator.com/rss" + Social News Technology) ("Hacker Factor" "https://www.hackerfactor.com/blog/index.php?/feeds/index.rss2" - Social) - ("BBC Top News" - "http://morss.aryadevchavali.com/feeds.bbci.co.uk/news/rss.xml" - News) - ("BBC Tech News" - "http://morss.aryadevchavali.com/feeds.bbci.co.uk/news/technology/rss.xml" - News))) + Social))) :config (with-eval-after-load "evil-collection" (evil-collection-elfeed-setup)) + (setq elfeed-feeds (cl-map 'list #'(lambda (item) (append (list (nth 1 item)) (cdr (cdr item)))) +rss/feed-urls))) -- cgit v1.2.3-13-gbd6f From c08bf7e1b835dab5273980ec89fec4c2a3441329 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 27 Apr 2024 15:43:31 +0530 Subject: (Emacs/app)+elfeed advice to open articles in different applications --- Emacs/.config/emacs/app.org | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 485c891..a173269 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -628,7 +628,18 @@ to elfeed for loading the system. (setq elfeed-feeds (cl-map 'list #'(lambda (item) (append (list (nth 1 item)) (cdr (cdr item)))) - +rss/feed-urls))) + +rss/feed-urls)) + + (advice-add 'elfeed-search-show-entry :after #'+elfeed/dispatch-entry) + + (defun +elfeed/dispatch-entry (entry) + "Process each type of entry differently. + e.g., you may want to open HN entries in eww." + (let ((url (elfeed-entry-link entry))) + (pcase url + ((pred (string-match-p "https\\:\\/\\/www.youtube.com\\/watch")) + (mpv-play-url url)) + (_ (eww url)))))) #+end_src * Magit Magit is *the* git porcelain for Emacs, which perfectly encapsulates -- cgit v1.2.3-13-gbd6f From 04a4f50daf64f3159b9f8f15c0a106073d738a54 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 5 May 2024 23:24:38 +0530 Subject: (Emacs/elisp)+customised faces for tab-bar-mode --- Emacs/.config/emacs/elisp/personal-light-theme.el | 45 ++++++----- .../.config/emacs/elisp/personal-primary-theme.el | 93 ++++++++++++---------- 2 files changed, 76 insertions(+), 62 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/elisp/personal-light-theme.el b/Emacs/.config/emacs/elisp/personal-light-theme.el index 5486b5c..94a0a18 100644 --- a/Emacs/.config/emacs/elisp/personal-light-theme.el +++ b/Emacs/.config/emacs/elisp/personal-light-theme.el @@ -3,18 +3,10 @@ (custom-theme-set-faces 'personal-light - '(default ((t (:family "Source Code Pro" :foundry "ADBO" :width normal :height 143 :weight normal :slant normal :underline nil :overline nil :extend nil :strike-through nil :box nil :inverse-video nil :foreground "black" :background "white" :stipple nil :inherit nil)))) + '(button ((t (:inherit (link))))) '(cursor ((((background light)) (:background "black")) (((background dark)) (:background "white")))) - '(fixed-pitch ((t (:family "Monospace")))) - '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) - '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) - '(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue")))) - '(highlight ((((class color) (min-colors 88) (background light)) (:background "darkseagreen2")) (((class color) (min-colors 88) (background dark)) (:background "darkolivegreen")) (((class color) (min-colors 16) (background light)) (:background "darkseagreen2")) (((class color) (min-colors 16) (background dark)) (:background "darkolivegreen")) (((class color) (min-colors 8)) (:foreground "black" :background "green")) (t (:inverse-video t)))) - '(region ((t (:extend t :background "green yellow" :distant-foreground "gtk_selection_fg_color")))) - '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) - '(secondary-selection ((((class color) (min-colors 88) (background light)) (:extend t :background "yellow1")) (((class color) (min-colors 88) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:extend t :background "yellow")) (((class color) (min-colors 16) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 8)) (:extend t :foreground "black" :background "cyan")) (t (:inverse-video t)))) - '(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t)))) + '(fixed-pitch ((t (:family "Monospace")))) '(font-lock-builtin-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold)))) '(font-lock-comment-delimiter-face ((t (:inherit (font-lock-comment-face))))) '(font-lock-comment-face ((t (:foreground "dim gray")))) @@ -31,26 +23,37 @@ '(font-lock-type-face ((((class grayscale) (background light)) (:weight bold :foreground "Gray90")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 16) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 8)) (:foreground "green")) (t (:underline (:color foreground-color :style line) :weight bold)))) '(font-lock-variable-name-face ((((class grayscale) (background light)) (:slant italic :weight bold :foreground "Gray90")) (((class grayscale) (background dark)) (:slant italic :weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "sienna")) (((class color) (min-colors 88) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 8)) (:weight light :foreground "yellow")) (t (:slant italic :weight bold)))) '(font-lock-warning-face ((t (:inherit (error))))) - '(button ((t (:inherit (link))))) - '(link ((t (:underline (:color foreground-color :style line) :foreground "RoyalBlue3")))) - '(link-visited ((t (:foreground "magenta4" :inherit (link))))) '(fringe ((((class color) (background light)) (:background "grey95")) (((class color) (background dark)) (:background "grey10")) (t (:background "gray")))) '(header-line ((t (:box nil :foreground "grey20" :background "grey90" :inherit (mode-line))))) - '(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch))))) - '(mode-line ((t (:box (:line-width (1 . -1) :color nil :style released-button) :foreground "black" :background "grey75")))) - '(mode-line-buffer-id ((t (:weight bold)))) - '(mode-line-emphasis ((t (:weight bold)))) - '(mode-line-highlight ((t (:box (:line-width (2 . 2) :color "grey40" :style released-button))))) - '(mode-line-inactive ((t (:weight light :box (:line-width (1 . -1) :color "grey75" :style nil) :foreground "grey20" :background "grey90" :inherit (mode-line))))) + '(highlight ((t (:background "gainsboro")))) + '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) '(isearch ((((class color) (min-colors 88) (background light)) (:foreground "lightskyblue1" :background "magenta3")) (((class color) (min-colors 88) (background dark)) (:foreground "brown4" :background "palevioletred2")) (((class color) (min-colors 16)) (:foreground "cyan1" :background "magenta4")) (((class color) (min-colors 8)) (:foreground "cyan1" :background "magenta4")) (t (:inverse-video t)))) '(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t)))) '(lazy-highlight ((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) (((class color) (min-colors 88) (background dark)) (:background "paleturquoise4")) (((class color) (min-colors 16)) (:background "turquoise3")) (((class color) (min-colors 8)) (:background "turquoise3")) (t (:underline (:color foreground-color :style line))))) + '(link ((t (:underline (:color foreground-color :style line) :foreground "RoyalBlue3")))) + '(link-visited ((t (:foreground "magenta4" :inherit (link))))) '(match ((((class color) (min-colors 88) (background light)) (:background "khaki1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray")))) + '(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue")))) + '(mode-line ((t (:box nil :background "LightSkyBlue" :foreground "black")))) + '(mode-line-buffer-id ((t (:weight bold)))) + '(mode-line-emphasis ((t (:weight bold)))) + '(mode-line-highlight ((t (:box (:line-width (2 . 2) :color "grey40" :style released-button))))) + '(mode-line-inactive ((t (:foreground "grey20" :background "grey90" :inherit (mode-line))))) '(next-error ((t (:inherit (region))))) - '(query-replace ((t (:inherit (isearch))))) '(org-block ((t (:background "white" :inherit shadow)))) - '(whitespace-space ((t (:background "white" :foreground "lightgray")))) + '(query-replace ((t (:inherit (isearch))))) + '(region ((t (:extend t :background "green yellow" :distant-foreground "gtk_selection_fg_color")))) + '(secondary-selection ((((class color) (min-colors 88) (background light)) (:extend t :background "yellow1")) (((class color) (min-colors 88) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:extend t :background "yellow")) (((class color) (min-colors 16) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 8)) (:extend t :foreground "black" :background "cyan")) (t (:inverse-video t)))) + '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) + '(tab-bar ((t (:background "white")))) + '(tab-bar-tab ((t (:foreground "gray30" :background "white")))) + '(tab-bar-tab-inactive ((t (:foreground "gray13" :background "gray80")))) + '(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch))))) + '(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t)))) + '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) '(whitespace-line ((t (:background "white" :foreground "violet")))) + '(whitespace-space ((t (:background "white" :foreground "lightgray")))) + '(default ((t (:family "Source Code Pro" :foundry "ADBO" :width normal :height 143 :weight normal :slant normal :underline nil :overline nil :extend nil :strike-through nil :box nil :inverse-video nil :foreground "black" :background "white" :stipple nil :inherit nil)))) ) (provide-theme 'personal-light) diff --git a/Emacs/.config/emacs/elisp/personal-primary-theme.el b/Emacs/.config/emacs/elisp/personal-primary-theme.el index 747b483..8f65078 100644 --- a/Emacs/.config/emacs/elisp/personal-primary-theme.el +++ b/Emacs/.config/emacs/elisp/personal-primary-theme.el @@ -3,26 +3,30 @@ (custom-theme-set-faces 'personal-primary - '(line-number ((t (:foreground "gray45" :background "gray1" :inherit (default))))) - '(line-number-current-line ((t (:foreground "white" :background "gray1" :inherit (default))))) + '(button ((t (:inherit (link))))) + '(tab-bar ((t (:background "gray13")))) + '(tab-bar-tab ((t (:background "gray20" :foreground "white" :box (:color ))))) + '(tab-bar-tab-inactive ((t (:background "gray13" :foreground "DimGrey")))) '(child-frame-border ((t (:background "white")))) - '(cursor ((((background light)) (:background "black")) (((background dark)) (:background "white")))) + '(company-preview + ((t (:foreground "wheat" :background "blue4")))) + '(company-preview-common ((t (:inherit company-preview :foreground "grey")))) + '(company-tooltip ((t (:background "black" :foreground "white")))) + '(company-tooltip-annotation ((t (:foreground "grey" :slant italic)))) + '(company-tooltip-selection ((t (:background "gray31" :slant italic)))) + '(cursor ((t (:background "white")))) + '(dired-ignored ((t (:background "gray10")))) + '(escape-glyph ((t (:foreground "cyan")))) + '(eshell-ls-directory ((t (:foreground "DeepSkyBlue3" :weight bold)))) + '(eshell-prompt ((t (:foreground "turquoise3" :weight bold)))) '(fixed-pitch ((t (:family "Monospace")))) - '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) - '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) - '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) - '(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue")))) - '(highlight ((t (:background "gray14")))) - '(region ((t (:extend t :background "gray25")))) - '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) - '(secondary-selection ((((class color) (min-colors 88) (background light)) (:extend t :background "yellow1")) (((class color) (min-colors 88) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:extend t :background "yellow")) (((class color) (min-colors 16) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 8)) (:extend t :foreground "black" :background "cyan")) (t (:inverse-video t)))) - '(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")))) ;;(t (:inverse-video t)))) '(font-lock-builtin-face ((t (:foreground "powder blue")))) '(font-lock-comment-delimiter-face ((t (:slant italic :foreground "gray24")))) '(font-lock-comment-face ((t (:slant italic :foreground "#868686")))) '(font-lock-constant-face ((t (:foreground "indian red" :weight semi-bold :height 0.99 :family "Source Code Pro")))) '(font-lock-doc-face ((t (:inherit (font-lock-string-face))))) - '(font-lock-function-name-face ((t (:weight semi-bold)))) + '(font-lock-function-name-face ((t (:weight semi-bold :foreground "#b6b6b6")))) + '(font-lock-function-call-face ((t (:weight semi-bold :foreground "#b6b6b6")))) '(font-lock-keyword-face ((t (:foreground "spring green" :weight bold :height 0.95 :family "Fira Code")))) '(font-lock-negation-char-face ((t nil))) '(font-lock-preprocessor-face ((t (:family "Source Code Pro" :foreground "#868686")))) @@ -32,44 +36,51 @@ '(font-lock-type-face ((t (:weight light :foreground "deepskyblue" :family "DejaVu Sans Mono")))) '(font-lock-variable-name-face ((nil (:family "Source Code Pro" :foreground "white")))) '(font-lock-warning-face ((t (:inherit (error))))) - '(button ((t (:inherit (link))))) - '(link ((t (:underline (:color foreground-color :style line) :foreground "cyan1")))) - '(link-visited ((t (:foreground "violet" :inherit (link))))) '(fringe ((t (:background "grey4")))) + '(haskell-interactive-face-prompt ((t (:foreground "green")))) '(header-line ((t (:box nil :foreground "grey90" :background "grey20" :inherit (mode-line))))) - '(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch))))) + '(highlight ((t (:background "gray14")))) + '(homoglyph ((t (:foreground "cyan")))) + '(isearch ((t (:foreground "brown4" :background "white")))) + '(isearch-fail ((t (:background "red4")))) + '(ivy-current-match ((t (:weight bold :underline t :slant italic)))) + '(lazy-highlight ((t (:background "paleturquoise4")))) + '(line-number ((t (:foreground "gray45" :background "gray1" :inherit (default))))) + '(line-number-current-line ((t (:foreground "white" :background "gray1" :inherit (default))))) + '(link ((t (:underline (:color foreground-color :style line) :foreground "cyan1")))) + '(link-visited ((t (:foreground "violet" :inherit (link))))) + '(match ((t (:background "RoyalBlue3")))) + '(minibuffer-prompt ((t (:foreground "cyan")))) '(mode-line ((t (:box nil :foreground "LightSkyBlue" :background "black")))) '(mode-line-buffer-id ((t (:weight bold)))) '(mode-line-emphasis ((t (:weight bold)))) - '(mode-line-highlight ((((class color) (min-colors 88)) (:box (:line-width 2 :color "grey40" :style released-button))) (t (:inherit (highlight))))) - '(mode-line-inactive ((t (:weight light :foreground "CadetBlue" :background "grey7" :inherit (mode-line))))) - '(isearch ((t (:foreground "brown4" :background "white")))) - '(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t)))) - '(lazy-highlight ((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) (((class color) (min-colors 88) (background dark)) (:background "paleturquoise4")) (((class color) (min-colors 16)) (:background "turquoise3")) (((class color) (min-colors 8)) (:background "turquoise3")) (t (:underline (:color foreground-color :style line))))) - '(match ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray")))) + '(mode-line-inactive ((t (:weight light :foreground "CadetBlue" :background "grey7" + :inherit (mode-line))))) '(next-error ((t (:inherit (region))))) - '(query-replace ((t (:inherit (isearch))))) - '(company-tooltip ((t (:background "black" :foreground "white")))) - '(company-tooltip-selection ((t (:background "gray31" :slant italic)))) - '(company-tooltip-annotation ((t (:foreground "grey" :slant italic)))) - '(company-preview ((((background light)) (:inherit (company-tooltip-selection company-tooltip))) (((background dark)) (:foreground "wheat" :background "blue4")))) - '(company-preview-common ((t (:inherit company-preview :foreground "grey")))) - '(org-block ((t (:background "gray3" :inherit shadow)))) - '(org-quote ((t (:slant italic)))) - '(eshell-prompt ((t (:foreground "turquoise3" :weight bold)))) - '(eshell-ls-directory ((t (:foreground "DeepSkyBlue3" :weight bold)))) - '(whitespace-tab ((t (:background "gray5" :foreground "gray20")))) - '(whitespace-space ((t (:background "gray2" :foreground "darkgray")))) - '(whitespace-line ((t (:background "black" :foreground "violet")))) - '(haskell-interactive-face-prompt ((t (:foreground "green")))) - '(org-verbatim ((t (:foreground "red3")))) - '(org-code ((t (:foreground "green3")))) - '(ivy-current-match ((t (:weight bold :underline t :slant italic)))) '(orderless-match-face-0 ((t (:weight bold :foreground "lime green")))) '(orderless-match-face-1 ((t (:weight bold :foreground "light green")))) '(orderless-match-face-2 ((t (:weight bold :foreground "forest green")))) '(orderless-match-face-3 ((t (:weight bold :foreground "dark green")))) + '(org-block ((t (:background "gray3" :inherit shadow)))) + '(org-code ((t (:foreground "green3")))) + '(org-quote ((t (:slant italic)))) + '(org-verbatim ((t (:foreground "red3")))) '(pdf-isearch-batch ((t (:foreground "black" :background "white")))) - '(default ((t (:family "Source Code Pro" :foundry "ADBO" :width normal :weight normal :slant normal :underline nil :overline nil :extend nil :strike-through nil :box nil :inverse-video nil :foreground "#b6b6b6" :background "gray5" :stipple nil :inherit nil))))) + '(query-replace ((t (:inherit (isearch))))) + '(region ((t (:extend t :background "gray25")))) + '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) + '(secondary-selection + ((t (:extend t :background "SkyBlue4")))) + '(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch))))) + '(trailing-whitespace ((((class color) (background light)) (:background "red1")) + (((class color) (background dark)) (:background "red1")))) + '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) + '(whitespace-line ((t (:background "black" :foreground "violet")))) + '(whitespace-space ((t (:background "gray2" :foreground "darkgray")))) + '(whitespace-tab ((t (:background "gray5" :foreground "gray20")))) + '(default ((t (:family "Source Code Pro" :foundry "ADBO" :width normal + :weight normal :slant normal :underline nil :overline nil + :extend nil :strike-through nil :box nil :inverse-video nil :foreground "#b6b6b6" + :background "black" :stipple nil :inherit nil))))) (provide-theme 'personal-primary) -- cgit v1.2.3-13-gbd6f From 2986c04c2fcad44eb80ce01336ade33a7429cf7a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:23:38 +0530 Subject: (Emacs|Shell|SystemD)~Small changes --- Emacs/.config/emacs/app.org | 8 +- Emacs/.config/emacs/config.org | 108 +++++++++++++++++-------- Emacs/.config/emacs/core.org | 6 +- Emacs/.config/emacs/early-init.el | 2 +- Emacs/.config/emacs/elisp/haskell-multiedit.el | 5 +- Emacs/.config/emacs/elisp/move.el | 7 +- Emacs/.config/emacs/lang.org | 2 +- 7 files changed, 86 insertions(+), 52 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index a173269..4791444 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -158,8 +158,7 @@ integrate it into my workflow just a bit better. (notmuch-tag-change-list '("-inbox" "+flagged") unflag) beg end) (when (eq beg end) (notmuch-search-next-thread))) - (advice-add #'notmuch-poll-and-refresh-this-buffer :before - #'+mail/sync-mail) + (advice-add #'notmuch-poll-and-refresh-this-buffer :after #'+mail/trash-junk) (with-eval-after-load "evil-collection" @@ -194,7 +193,8 @@ are some corners I'd like to adjust). :init (setq-default dired-listing-switches "-AFBlu --group-directories-first" dired-omit-files "^\\." - dired-dwim-target t) + dired-dwim-target t + image-dired-external-viewer "nsxiv") (with-eval-after-load "evil-collection" (evil-collection-dired-setup)) :general @@ -443,7 +443,7 @@ Pretty symbols and a display record. :display ("\\*e?shell\\*" ; for general shells as well (display-buffer-at-bottom) - (window-height . 0.30))) + (window-height . 0.33))) #+end_src ** Eshell variables and aliases Set some sane defaults, a banner and a prompt. The prompt checks for diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index c0f279e..05a9d62 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -159,8 +159,8 @@ In [[file:early-init.el][early-init.el]] I set the number of native-workers to 4, which isn't necessarily optimal when loading/compiling the rest of this file depending on the machine I use: -- On my laptop (=spiderboy=) I'd prefer to have it use 2-3 threads so I - can actually use the rest of the laptop while waiting for +- On my laptop (=spiderboy=) I'd prefer to have it use 2-3 threads so + I can actually use the rest of the laptop while waiting for compilation - On my desktop (=oldboy=) I'd prefer to use 4-6 threads as I can afford more, so I can get a faster load up. @@ -253,7 +253,7 @@ Set font size to 140 if on my desktop (oldboy) or 175 if on my laptop :straight nil :config (+oreo/sys-name-cond - ("spiderboy" (set-face-attribute 'default nil :height 175)) + ("spiderboy" (set-face-attribute 'default nil :height 145)) ("oldboy" (set-face-attribute 'default nil :height 140)))) #+end_src ** Startup screen @@ -571,7 +571,9 @@ need to use it. :keymaps 'override "C-s" #'avy-goto-char-timer "M-s" #'isearch-forward - "gl" #'avy-goto-line)) + "gp" #'avy-move-region + "gl" #'avy-goto-line + "gw" #'avy-goto-word-1)) #+end_src ** Ace window Though evil provides a great many features in terms of window @@ -587,6 +589,16 @@ management of windows (closing, switching, etc). (nmmap [remap evil-window-next] #'ace-window)) #+end_src +** Ace link +Avy-style link following! +#+begin_src emacs-lisp +(use-package ace-link + :straight t + :general + (nmmap + :keymaps 'override + "gL" #'ace-link)) +#+end_src ** Helpful Helpful provides a modernised interface for some common help commands. I replace ~describe-function~, ~describe-variable~ and @@ -667,7 +679,8 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. :keymaps 'grep-mode-map "0" #'evil-beginning-of-line "q" #'quit-window - "i" #'wgrep-change-to-wgrep-mode) + "i" #'wgrep-change-to-wgrep-mode + "c" #'recompile) (nmmap :keymaps 'wgrep-mode-map "q" #'evil-record-macro @@ -681,13 +694,22 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. #+begin_src emacs-lisp (use-package rg :after grep + :display + ("^\\*\\*ripgrep\\*\\*" + (display-buffer-at-bottom display-buffer-reuse-window) + (window-height . 0.35) + (reusable-frames . t)) :general (search-leader "R" #'rg) - (:keymaps 'rg-mode-map - "]]" #'rg-next-file - "[[" #'rg-prev-file - "q" #'quit-window) + (nmmap + :keymaps 'rg-mode-map + "c" #'rg-recompile + "C" #'rg-rerun-toggle-case + "]]" #'rg-next-file + "[[" #'rg-prev-file + "q" #'quit-window + "i" #'wgrep-change-to-wgrep-mode) :init (setq rg-group-result t rg-hide-command t @@ -695,7 +717,9 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. rg-show-header t rg-custom-type-aliases nil rg-default-alias-fallback "all" - rg-buffer-name "*ripgrep*")) + rg-buffer-name "*ripgrep*") + :config + (evil-set-initial-state 'rg-mode 'normal)) #+end_src *** Searching Lisp config Using grep search all the elisp files. With ~wgrep~ this provides @@ -730,10 +754,12 @@ focus on a buffer. (mode-leader "o" #'+olivetti-mode) :init - (setq-default olivetti-body-width 0.7) - (setq olivetti-style nil) - (add-hook 'olivetti-mode-on-hook (proc (interactive) (text-scale-increase 1))) - (add-hook 'olivetti-mode-off-hook (proc (interactive) (text-scale-decrease 1))) + (setq-default olivetti-body-width 0.6) + (setq olivetti-style 'fancy) + (add-hook 'olivetti-mode-on-hook + (proc (interactive) (text-scale-increase 1))) + (add-hook 'olivetti-mode-off-hook + (proc (interactive) (text-scale-decrease 1))) :config (defun +olivetti-mode () (interactive) @@ -939,12 +965,14 @@ keymaps. Same with dictionary searching. ("\\*Dictionary\\*" (display-buffer-reuse-window display-buffer-same-window) (reusable-frames . t)) + :init + (setq dictionary-server "dict.org") :general - (local-leader - :keymaps 'override - "[" #'le-thesaurus-get-synonyms - "]" #'le-thesaurus-get-antonyms - "#" #'dictionary-search)) + (search-leader + :infix "w" + "s" #'le-thesaurus-get-synonyms + "a" #'le-thesaurus-get-antonyms + "d" #'dictionary-search)) #+end_src * Programming packages Packages that help with programming in general, providing IDE like @@ -962,13 +990,19 @@ in the minibuffer. A lot cleaner. :straight nil :hook (prog-mode-hook . eldoc-mode) :init - (global-eldoc-mode 1)) + (global-eldoc-mode 1) + :general + (leader + "h>" #'eldoc-doc-buffer)) (use-package eldoc-box :hook (eldoc-mode-hook . eldoc-box-hover-mode) :init (setq eldoc-box-position-function #'eldoc-box--default-upper-corner-position-function - eldoc-box-clear-with-C-g t)) + eldoc-box-clear-with-C-g t) + :general + (leader + "h." #'eldoc-box-help-at-point)) #+end_src ** Flycheck Flycheck is the checking system for Emacs. I don't necessarily like @@ -1047,7 +1081,7 @@ flymake]]) :after (flycheck eglot) :hook (eglot-managed-mode-hook . flycheck-eglot-mode)) #+end_src -** Tabs and spaces +** Indentation By default, turn off tabs and set the tab width to two. #+begin_src emacs-lisp (setq-default indent-tabs-mode nil @@ -1056,7 +1090,7 @@ By default, turn off tabs and set the tab width to two. However, if necessary later, define a function that may activate tabs locally. #+begin_src emacs-lisp -(defun +oreo/activate-tabs () +(defun +oreo/use-tabs () (interactive) (setq-local indent-tabs-mode t)) #+end_src @@ -1209,9 +1243,10 @@ for latex fragments. (use-package org :defer t :init - (setq org-format-latex-options '(:foreground default :background default :scale 2 - :html-foreground "Black" :html-background "Transparent" - :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) + (setq org-format-latex-options + '(:foreground default :background default :scale 2 + :html-foreground "Black" :html-background "Transparent" + :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) org-latex-src-block-backend 'minted org-latex-minted-langs '((emacs-lisp "common-lisp") (ledger "text") @@ -1221,15 +1256,18 @@ for latex fragments. (caml "ocaml")) org-latex-packages-alist '(("" "minted")) org-latex-pdf-process - '("latexmk -f -bibtex -pdf -shell-escape -%latex -interaction=nonstopmode -output-directory=%o %f") - org-latex-minted-options '(("style" "colorful") - ("linenos") - ("frame" "single") - ("mathescape") - ("fontfamily" "courier") - ("samepage" "false") - ("breaklines" "true") - ("breakanywhere" "true")))) + (list (concat "latexmk -f -bibtex -pdf " + "-shell-escape -%latex -interaction=nonstopmode " + "-output-directory=%o %f")) + org-latex-minted-options + '(("style" "colorful") + ("linenos") + ("frame" "single") + ("mathescape") + ("fontfamily" "courier") + ("samepage" "false") + ("breaklines" "true") + ("breakanywhere" "true")))) #+end_src ** Org Core Variables Tons of variables for org-mode, including a ton of latex ones. Can't diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 417d978..b727f78 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -110,7 +110,7 @@ code. (general-evil-setup t)) #+end_src -** Some binds in Emacs +** Some binds for Emacs Some bindings that I couldn't fit elsewhere easily. #+begin_src emacs-lisp (use-package emacs @@ -126,6 +126,8 @@ Some bindings that I couldn't fit elsewhere easily. "C-M-l" #'+move/word-forward) (nmmap + "M-;" #'eval-expression + "g=" #'align-regexp "C--" #'text-scale-decrease "C-=" #'text-scale-increase "C-+" #'text-scale-adjust) @@ -140,7 +142,7 @@ Some bindings that I couldn't fit elsewhere easily. "h" '(help-command :which-key "Help")) (mode-leader - "t" #'+oreo/switch-theme) + "T" #'+oreo/switch-theme) (code-leader "F" `(,(proc (interactive) (find-file "~/Code/")) diff --git a/Emacs/.config/emacs/early-init.el b/Emacs/.config/emacs/early-init.el index a238e8e..da57d3c 100644 --- a/Emacs/.config/emacs/early-init.el +++ b/Emacs/.config/emacs/early-init.el @@ -35,5 +35,5 @@ (push '(menu-bar-lines . 0) default-frame-alist) (push '(tool-bar-lines . 0) default-frame-alist) (push '(vertical-scroll-bars) default-frame-alist) -(push '(alpha . (85 65)) default-frame-alist) +(push '(alpha . (85 80)) default-frame-alist) (advice-add #'x-apply-session-resources :override #'ignore) diff --git a/Emacs/.config/emacs/elisp/haskell-multiedit.el b/Emacs/.config/emacs/elisp/haskell-multiedit.el index 89aeb7b..96eb19d 100644 --- a/Emacs/.config/emacs/elisp/haskell-multiedit.el +++ b/Emacs/.config/emacs/elisp/haskell-multiedit.el @@ -37,9 +37,8 @@ "Minor mode for haskell buffers generated by haskell-interactive-mode. Provides bindings to retrieve content back into the REPL with full multi-edit commands" - nil - "" - haskell-multiedit-mode-map) + :lighter nil + :keymap haskell-multiedit-mode-map) (with-eval-after-load "haskell" (defun haskell-multiedit () diff --git a/Emacs/.config/emacs/elisp/move.el b/Emacs/.config/emacs/elisp/move.el index 77dd785..ed154fb 100644 --- a/Emacs/.config/emacs/elisp/move.el +++ b/Emacs/.config/emacs/elisp/move.el @@ -37,16 +37,11 @@ ;;; Code: -(defun +move/--normalise-arg (arg) - (if (or (null arg) (< arg 1)) - 1 - arg)) - (defmacro +move/create-move (name description &rest body) `(defun ,name (&optional arg) ,description (interactive "P") - (let ((arg (+move/--normalise-arg arg))) + (let ((arg (if (or (null arg) (< arg 1)) 1 arg))) (while (not (= arg 0)) ,@body (setq arg (- arg 1)))))) diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index b1cbcb2..15f9ecb 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -15,7 +15,7 @@ change it for C++. (("[mM]akefile\\'" . "Makefile skeleton") "" "CC=gcc -CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -std=c11 +CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -fsanitize=undefined -std=c11 LIBS= ARGS= -- cgit v1.2.3-13-gbd6f From 1a7a3670c1e3c43c91722b68d25768e545158e88 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:24:33 +0530 Subject: (Emacs/core)~Use standard windowing system now I've reached a level of complexity where I'd rather use Emacs to manage windows than my window manager. --- Emacs/.config/emacs/core.org | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index b727f78..9558eb9 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -33,6 +33,7 @@ code. :states '(normal motion) "SPC" 'nil "\\" '(nil :which-key "Local leader") + "SPC ;" '(nil :which-key "Shell") "SPC a" '(nil :which-key "Applications") "SPC b" '(nil :which-key "Buffers") "SPC c" '(nil :which-key "Code") @@ -40,9 +41,9 @@ code. "SPC f" '(nil :which-key "Files") "SPC i" '(nil :which-key "Insert") "SPC m" '(nil :which-key "Modes") - "SPC q" '(nil :which-key "Quit/Literate") "SPC s" '(nil :which-key "Search") "SPC t" '(nil :which-key "Shell")) + "SPC q" '(nil :which-key "Quit/Literate")) (general-create-definer leader :states '(normal motion) @@ -135,7 +136,6 @@ Some bindings that I couldn't fit elsewhere easily. (leader "SPC" '(execute-extended-command :which-key "M-x") "'" '(browse-url-emacs :which-key "Download URL to Emacs") - ";" 'eval-expression ":" `(,(proc (interactive) (switch-to-buffer "*scratch*")) :which-key "Switch to *scratch*") "!" '(async-shell-command :which-key "Async shell command") @@ -156,8 +156,8 @@ Some bindings that I couldn't fit elsewhere easily. (quit-leader "q" #'save-buffers-kill-terminal "c" #'+literate/compile-config - "l" #'+literate/load-config - "d" #'delete-frame) + "C" #'+literate/clean-config + "l" #'+literate/load-config) (search-leader "i" #'imenu)) #+end_src @@ -185,8 +185,8 @@ Setup the evil package, with some opinionated keybindings: :general (leader "w" '(evil-window-map :which-key "Window") - "wT" #'window-swap-states ; transpose two windows - "wd" #'delete-frame) + "wT" #'window-swap-states + "wd" #'evil-window-delete) (nmmap "K" #'man @@ -214,9 +214,7 @@ Setup the evil package, with some opinionated keybindings: evil-split-window-below t evil-vsplit-window-right t evil-want-abbrev-expand-on-insert-exit t - evil-undo-system #'undo-tree) - :config - (fset #'evil-window-vsplit #'make-frame)) + evil-undo-system #'undo-tree)) #+end_src ** Evil surround Evil surround is a port for vim-surround. -- cgit v1.2.3-13-gbd6f From 8c13aa67b61ba5cf1b88c304ed1c4e3e29e03d0d Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:26:58 +0530 Subject: (Emacs/core)+Use Emacs Tabs Emacs tabs are actually quite powerful and solve the namespace problem, at least for me. This is why I started using standard windowing rather than using new frames: I can have all my workspaces in one frame. --- Emacs/.config/emacs/core.org | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 9558eb9..3c2d293 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -42,7 +42,7 @@ code. "SPC i" '(nil :which-key "Insert") "SPC m" '(nil :which-key "Modes") "SPC s" '(nil :which-key "Search") - "SPC t" '(nil :which-key "Shell")) + "SPC t" '(nil :which-key "Tabs") "SPC q" '(nil :which-key "Quit/Literate")) (general-create-definer leader @@ -65,6 +65,11 @@ code. :prefix "SPC f") (general-create-definer shell-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC ;") + + (general-create-definer tab-leader :states '(normal motion) :keymaps 'override :prefix "SPC t") @@ -645,6 +650,35 @@ records. This is mostly for packages that aren't really configured (display-buffer-at-bottom) (window-height . 0.25))) #+end_src +* Tabs +Tabs in vscode are just like buffers in Emacs but way slower and +harder to use. Tabs in Emacs are essentially window layouts, similar +to instances in Tmux. With this setup I can use tabs quite +effectively. + +#+begin_src emacs-lisp +(use-package tab-bar + :straight nil + :init + (setq tab-bar-show 1) + :config + (tab-bar-mode) + :general + (tab-leader + "t" #'tab-switch + "j" #'tab-next + "k" #'tab-previous + "h" #'tab-move-to + "l" #'tab-move + "n" #'tab-new + "c" #'tab-close + "d" #'tab-close + "f" #'tab-detach + "w" #'tab-window-detach + "r" #'tab-rename) + (mode-leader + "t" #'toggle-tab-bar-mode-from-frame)) +#+end_src * Auto typing Snippets are a pretty nice way of automatically inserting code. Emacs provides a ton of packages by default to do this, but there are great -- cgit v1.2.3-13-gbd6f From 915971d5aa5a812de1ef137088c33eb92c2cc5ca Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:34:13 +0530 Subject: (Emacs/core|config)~use drag stuff instead of move.el Works with regions! --- Emacs/.config/emacs/config.org | 17 +++++++++++------ Emacs/.config/emacs/core.org | 7 ------- 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 05a9d62..12644ab 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -190,12 +190,6 @@ any buffers in ~+oreo/keep-buffer~ and kills the rest. (kill-buffer buf))) (buffer-list))) #+end_src -** Move -Allows {hjkl} movement of text objects. Will be bound in -[[file:core.org::*Some binds in Emacs][core.org]]. -#+begin_src emacs-lisp -(load-file (concat user-emacs-directory "elisp/move.el")) -#+end_src * Aesthetics General look and feel of Emacs (mostly disabling stuff I don't like). ** Themes @@ -849,6 +843,17 @@ eating up memory. :config (savehist-mode t)) #+end_src +** Drag Stuff +#+begin_src emacs-lisp +(use-package drag-stuff + :straight t + :general + (nmmap + "C-M-h" #'drag-stuff-left + "C-M-j" #'drag-stuff-down + "C-M-k" #'drag-stuff-up + "C-M-l" #'drag-stuff-right)) +#+end_src * Applications (loading) Emacs is basically an operating system whose primary datatype is text. Applications are interfaces/environments which serve a variety of diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 3c2d293..f4e45d4 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -124,13 +124,6 @@ Some bindings that I couldn't fit elsewhere easily. :general ("C-x d" #'delete-frame) - (nmmap - :keymaps '(text-mode-map prog-mode-map) - "C-M-h" #'+move/word-backward - "C-M-j" #'+move/line-down - "C-M-k" #'+move/line-up - "C-M-l" #'+move/word-forward) - (nmmap "M-;" #'eval-expression "g=" #'align-regexp -- cgit v1.2.3-13-gbd6f From 60c9b63fedf56ac6cae34c831fb06e01ebee5440 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:35:57 +0530 Subject: (Emacs/config)+A simple presentation mode using org-mode and olivetti Works by narrowing around subtrees and using olivetti for focus. --- Emacs/.config/emacs/config.org | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 12644ab..80127fa 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -765,6 +765,53 @@ focus on a buffer. (jump-to-register 1) (olivetti-mode 0)))) #+end_src +*** Presentation mode +A simple presentation system using org-mode and olivetti. +#+begin_src emacs-lisp +(use-package olivetti + :defer t + :config + (defun +presentation/prev-slide () + (interactive) + (when presentation-mode + (widen) + (outline-previous-visible-heading 1) + (end-of-line) + (if (org-fold-folded-p) + (org-cycle)) + (org-narrow-to-subtree))) + (defun +presentation/next-slide () + (interactive) + (when presentation-mode + (widen) + (outline-next-visible-heading 1) + (end-of-line) + (if (org-fold-folded-p) + (org-cycle)) + (org-narrow-to-subtree))) + (defvar presentation-mode-map (make-sparse-keymap)) + (define-minor-mode presentation-mode + "When in org-mode, use each heading like a slide!" + :lighter nil + :keymap presentation-mode-map + (cond + (presentation-mode + (olivetti-mode t) + (outline-show-heading) + (org-narrow-to-subtree)) + (t + (olivetti-mode -1) + (widen)))) + :general + (leader + :states 'normal + :keymaps 'presentation-mode-map + "j" #'+presentation/next-slide + "k" #'+presentation/prev-slide) + (local-leader + :keymaps 'org-mode-map + "P" #'presentation-mode)) +#+end_src ** All the Icons Nice set of icons with a great user interface to manage them. #+begin_src emacs-lisp -- cgit v1.2.3-13-gbd6f From 14f29b83197b72ad0d99b646bb18f0c2f01f6709 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:36:27 +0530 Subject: (Emacs/elisp)+italic and underline to dired-ignore face in primary-theme --- Emacs/.config/emacs/elisp/personal-primary-theme.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/elisp/personal-primary-theme.el b/Emacs/.config/emacs/elisp/personal-primary-theme.el index 8f65078..6411f08 100644 --- a/Emacs/.config/emacs/elisp/personal-primary-theme.el +++ b/Emacs/.config/emacs/elisp/personal-primary-theme.el @@ -15,7 +15,7 @@ '(company-tooltip-annotation ((t (:foreground "grey" :slant italic)))) '(company-tooltip-selection ((t (:background "gray31" :slant italic)))) '(cursor ((t (:background "white")))) - '(dired-ignored ((t (:background "gray10")))) + '(dired-ignored ((t (:background "gray10" :slant italic :underline t)))) '(escape-glyph ((t (:foreground "cyan")))) '(eshell-ls-directory ((t (:foreground "DeepSkyBlue3" :weight bold)))) '(eshell-prompt ((t (:foreground "turquoise3" :weight bold)))) -- cgit v1.2.3-13-gbd6f From 41bf661eed2a7d26872dbb60b91777bb7895c2e3 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:36:54 +0530 Subject: (Emacs/init)~gc-cons-threshold is set to max at start of bootup --- Emacs/.config/emacs/init.el | 103 ++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 52 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index 049a15c..6571584 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -25,60 +25,59 @@ ;; Before doing anything else, make gc-cons-threshold ridiculously ;; high. This makes it so we have as few pauses during init as ;; possible. -(setq gc-cons-threshold (* 1024 1024 1024)) ; ~1GiB - -;; Straight -(defvar bootstrap-version) -(let ((bootstrap-file - (expand-file-name - "straight/repos/straight.el/bootstrap.el" - (or (bound-and-true-p straight-base-dir) - user-emacs-directory))) - (bootstrap-version 7)) - (unless (file-exists-p bootstrap-file) - (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) - (load bootstrap-file nil 'nomessage)) - -(setq straight-disable-native-compile nil - straight-use-package-by-default t - use-package-enable-imenu-support t - use-package-always-demand nil - use-package-always-defer nil - use-package-hook-name-suffix nil - use-package-compute-statistics t) - -(straight-use-package 'use-package) -(straight-use-package 'org) -(straight-use-package 'no-littering) - -(setq no-littering-etc-directory (expand-file-name ".config/" user-emacs-directory) - no-littering-var-directory (expand-file-name ".local/" user-emacs-directory) - custom-file (no-littering-expand-etc-file-name "custom.el")) - -(load-file custom-file) +(let ((gc-cons-threshold most-positive-fixnum)) + ;; Straight + (defvar bootstrap-version) + (let ((bootstrap-file + (expand-file-name + "straight/repos/straight.el/bootstrap.el" + (or (bound-and-true-p straight-base-dir) + user-emacs-directory))) + (bootstrap-version 7)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + + (setq straight-disable-native-compile nil + straight-use-package-by-default t + use-package-enable-imenu-support t + use-package-always-demand nil + use-package-always-defer nil + use-package-hook-name-suffix nil + use-package-compute-statistics t) + + (straight-use-package 'use-package) + (straight-use-package 'org) + (straight-use-package 'no-littering) + + (setq no-littering-etc-directory (expand-file-name ".config/" user-emacs-directory) + no-littering-var-directory (expand-file-name ".local/" user-emacs-directory) + custom-file (no-littering-expand-etc-file-name "custom.el")) + + (load-file custom-file) ;;; Load literate -(load-file (concat user-emacs-directory "elisp/literate.el")) - -;; Compile on Emacs quit -(add-hook - 'kill-emacs-hook - #'+literate/compile-config) - -(+literate/load-config) - -(when (daemonp) - (require 'general) - (require 'evil) - (require 'notmuch) - (require 'company) - (require 'org) - (require 'eglot)) + (load-file (concat user-emacs-directory "elisp/literate.el")) + + ;; Compile on Emacs quit + (add-hook + 'kill-emacs-hook + #'+literate/compile-config) + + (+literate/load-config) + + (when (daemonp) + (require 'general) + (require 'evil) + (require 'notmuch) + (require 'company) + (require 'org) + (require 'eglot))) (setq gc-cons-threshold (* 100 1024 1024) ; ~100MiB read-process-output-max 5242880 ; ~5MiB -- cgit v1.2.3-13-gbd6f From ef5eb9615a6af6c0f38fb4e7cec1b7de57f9d150 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:38:40 +0530 Subject: (Emacs/lang)~enable and clean up haskell mode --- Emacs/.config/emacs/lang.org | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 15f9ecb..aaa5f61 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -455,10 +455,7 @@ features to be fair. (add-hook 'java-mode-hook (proc (setq-local local-abbrev-table java-mode-abbrev-table))))) #+end_src -* WAIT Haskell -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: +* Haskell Haskell is a static lazy functional programming language (what a mouthful). It's quite a beautiful language and really learning it will change the way you think about programming. However, my preferred @@ -480,21 +477,27 @@ will run in the REPL. Even easier than making your own buffer. (haskell-interactive-prompt-cont "{λ} ") (haskell-interactive-popup-errors nil) (haskell-stylish-on-save nil) - (haskell-process-type 'stack-ghci) + (haskell-process-type 'auto) :general (shell-leader - "h" #'+shell/toggle-haskell-repl) + "h" #'haskell-interactive-bring) + (local-leader + :keymaps 'haskell-mode-map + "l" #'haskell-process-load-or-reload + "t" #'haskell-process-do-type) + (local-leader + :keymaps 'haskell-interactive-mode-map + "c" #'haskell-interactive-mode-clear) + (imap + :keymaps 'haskell-interactive-mode-map + "M-k" #'haskell-interactive-mode-history-previous + "M-j" #'haskell-interactive-mode-history-next) :display ("\\*haskell.**\\*" (display-buffer-at-bottom) (window-height . 0.25)) :config - (load (concat user-emacs-directory "elisp/haskell-multiedit.el")) - (+oreo/create-toggle-function - +shell/toggle-haskell-repl - "*haskell*" - haskell-interactive-bring - nil)) + (load (concat user-emacs-directory "elisp/haskell-multiedit.el"))) #+end_src * Python Works well for python. If you have ~pyls~ it should be on your path, so -- cgit v1.2.3-13-gbd6f From 3a982bf71729c9a15f3c048a85e734beaa730041 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:38:58 +0530 Subject: (Emacs/straight)~Update versions again --- Emacs/.config/emacs/straight/versions/default.el | 150 +++++++++++------------ 1 file changed, 73 insertions(+), 77 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/straight/versions/default.el b/Emacs/.config/emacs/straight/versions/default.el index 412e488..eb14e45 100644 --- a/Emacs/.config/emacs/straight/versions/default.el +++ b/Emacs/.config/emacs/straight/versions/default.el @@ -1,97 +1,93 @@ -(("Emacs-wgrep" . "f9687c28bbc2e84f87a479b6ce04407bb97cfb23") - ("ace-window" . "c7cb315c14e36fded5ac4096e158497ae974bec9") +(("Emacs-wgrep" . "3132abd3750b8c87cbcf6942db952acfab5edccd") + ("ace-link" . "06ab398df85e81d1dc763b3210732dd26cba60a1") + ("ace-window" . "77115afc1b0b9f633084cf7479c767988106c196") ("aggressive-indent-mode" . "a437a45868f94b77362c6b913c5ee8e67b273c42") - ("all-the-icons.el" . "6f876fa11ef64af20d9b2a44fdabac6446de51ba") - ("amx" . "37f9c7ae55eb0331b27200fb745206fc58ceffc0") + ("all-the-icons.el" . "f491f39c21336d354e85bdb4cca281e0a0c2f880") + ("amx" . "5b3aa1aae84f4a225cb8d26ab79a32f97693f023") ("annalist.el" . "134fa3f0fb91a636a1c005c483516d4b64905a6d") - ("avy" . "e92cb37457b43336b765630dbfbea8ba4be601fa") + ("avy" . "be612110cb116a38b8603df367942e2bb3d9bdbe") ("biblio.el" . "ee52f6cda82ea6fbc3b400e7b12132595cc0374c") - ("citeproc-el" . "678db833e0128fe399ad4c99794186b46f33a68a") - ("company-mode" . "88001d794d963049339883216b6606de0a1209ea") - ("compat" . "0108c5d31f1866cd4797efaa89431ac1d9af641f") - ("counsel-projectile" . "06b03c1080d3ccc3fa9b9c41b1ccbcf13f058e4b") - ("dash.el" . "a17b6b5409825891423b3867cd7bea84852d6ddd") - ("eglot" . "b4ffcf26fb392ed83f6c40bc9b62cbe54483119c") - ("el-get" . "9a4ab9cc8ae4a9b9a4b232788039cc679a4ba249") - ("eldoc" . "a8068079578b8a8bfffa046bd79f2005813161fe") - ("eldoc-box" . "d4574ee392b9a8c537bec895be37468b600c25ac") + ("citeproc-el" . "290320fc579f886255f00d7268600df7fa5cc7e8") + ("company-mode" . "7c24dc8668af5aea8a5d07aeceda5fac7a2a85b5") + ("compat" . "a20862e377a137961dd82706a7654a090210f7f7") + ("counsel-projectile" . "40d1e1d4bb70acb00fddd6f4df9778bf2c52734b") + ("dash.el" . "6db80c711ce947f6c6fa11e5c2257fff2c79d139") + ("eglot" . "bc85762d234805f21e1ab168af6826a50e93a3fb") + ("el-get" . "f3f1edd434221dc6daef565ebf77fa40c4cead36") + ("eldoc" . "a2aaed2b7c70c1f28dd212fe2f4304ce89c338d7") + ("eldoc-box" . "b5aa4814326f592d15332c5da4e62ed513fa85d7") ("elfeed" . "e29c8b91450bd42d90041231f769c4e5fe5070da") - ("elisp-refs" . "541a064c3ce27867872cf708354a65d83baf2a6d") - ("emacs-htmlize" . "49205105898ba8993b5253beec55d8bddd820a70") + ("elisp-refs" . "bf3cca8f74065b1b31036f461e3a093b162311bd") + ("emacs-htmlize" . "dd27bc3f26efd728f2b1f01f9e4ac4f61f2ffbf9") ("emacs-request" . "01e338c335c07e4407239619e57361944a82cb8a") - ("emacs-which-key" . "c632dbf27a77c1c73ce559041b3a78ec5f78b187") - ("emacsmirror-mirror" . "5785643381798bc5c82a11a1b9492c5857a20957") - ("emmet-mode" . "1acb821e0142136344ccf40c1e5fb664d7db2e70") + ("emacs-which-key" . "df6b0cb8449812e7fb200bc852107fa7eb708496") + ("emacsmirror-mirror" . "8e7cbfea765e5f9095c6f130a5efd949c04f9c72") + ("emmet-mode" . "63b6932603184956b5ea8919036d2b307b48d7fd") ("epl" . "78ab7a85c08222cd15582a298a364774e3282ce6") ("erc" . "6c8b390ae3ffe2d1c8d8200785da64100d8ad3cd") - ("evil" . "325a822bee6b9f8590e6e77fe73b4d916fcec357") - ("evil-collection" . "b45ec5b3156d27a18a949e4bf55643107a21abc2") - ("evil-commentary" . "2dab6ac34d1617971768ad219d73af48f7473fec") - ("evil-ledger" . "7a9f9f5d39c42fffdba8004f8982642351f2b233") - ("evil-mc" . "f04fb17f35f2722f2ac93c862b4450bb8e5b739a") + ("evil" . "6e30037fdc6a275d78d6b82d89bd8e47bcf4d4e3") + ("evil-collection" . "1ad283f5b7ac9320ac3d41bccfc71a52f714563a") + ("evil-commentary" . "c5945f28ce47644c828aac1f5f6ec335478d17fb") + ("evil-mc" . "bdf893ea6f52fd0f10bece8ddae813658e17bbb4") ("evil-numbers" . "7a1b62afc12da2b582bf84d722e7b10ca8b97065") - ("evil-org-mode" . "80ef38fb378541937f6ddfe836809e76eda1e355") - ("evil-surround" . "346d4d85fcf1f9517e9c4991c1efe68b4130f93a") - ("f.el" . "c4dbf8c8e83df834f5d6f72cd5649b9d8a8812ec") - ("faceup" . "6c92dad56a133e14e7b27831e1bcf9b3a71ff154") + ("evil-org-mode" . "b1f309726b1326e1a103742524ec331789f2bf94") + ("evil-surround" . "4a21d756b76a50e0c0619555836c9aa98f103d3d") + ("external-completion" . "d717c138623aeecc8e0a0312e0576e98604c43f2") + ("f.el" . "19e1da061e759b05e8c480b426287a063ca39484") ("fd-dired" . "458464771bb220b6eb87ccfd4c985c436e57dc7e") - ("flycheck" . "f8c679fff349850c80541a31de50009c3c15d4c9") - ("flymake" . "43ec1aff768073aacc842dd418944f81e80e9ee0") - ("general.el" . "a0b17d207badf462311b2eef7c065b884462cb7c") - ("gnu-elpa-mirror" . "ff81342fefc6e7a58ce5861965d363d5c8b2de7c") - ("goto-chg" . "2af612153bc9f5bed135d25abe62f46ddaa9027f") - ("haskell-mode" . "20f72ccc17c8233dbb7c94ebf52a2a59e7d97730") - ("helm-bibtex" . "8b71b4f5ce62eeaf18067f57faaddc06449fbe1c") - ("helpful" . "a32a5b3d959a7fccf09a71d97b3d7c888ac31c69") - ("hl-todo" . "4d18ccde596aef84ef278aa60144390ab41f0046") - ("ht.el" . "cdc76669a5032c42a2b9f7cddcbc33c5deeb6beb") + ("flycheck" . "5f2ef177cb21ae8b73714575802beef04abd0f5e") + ("flycheck-eglot" . "114e1315aaf0dc3196da67da426bbe2b46384fe2") + ("flymake" . "6950c8099e3ee7cafc701b1f86797b2a1b466067") + ("general.el" . "833dea2c4a60e06fcd552b653dfc8960935c9fb4") + ("gnu-elpa-mirror" . "be1351c478935b8348c19d3197cd5d84330c708d") + ("goto-chg" . "278cd3e6d5107693aa2bb33189ca503f22f227d0") + ("haskell-mode" . "d23ec34788286405f377ce485d2a17e302d94a4f") + ("helm-bibtex" . "ef07adfeda1e25d891875cb9a11983d5e26fc36d") + ("helpful" . "6f8991a72c83d904725a9d6c00de2cabbef32de9") + ("hl-todo" . "b27cddf7373408681cc949c8ef829f87a01ed3f3") + ("ht.el" . "1c49aad1c820c86f7ee35bf9fff8429502f60fef") ("hydra" . "317e1de33086637579a7aeb60f77ed0405bf359b") - ("jsonrpc" . "dbfa30971026dacd9389f4312b0dd7a12fef0d87") - ("key-chord" . "7f7fd7c5bd2b996fa054779357e1566f7989e07d") + ("jsonrpc" . "ba4275ef5bcbfceebd7049c5669dec9edabcb1fc") ("le-thesaurus.el" . "83e8df8957a3b8167cc2bf97849a1eca555ce9a6") - ("ledger-mode" . "4c48d4136229e1ba399906d6b23f7f39c9d4fb3c") - ("let-alist" . "6708ec0b2e6dff80ff5b64698aa009d9070a2ed2") - ("magit" . "386843483b262ad57b24aec3167035b01acb4bf1") - ("melpa" . "d35f8cf6c6e0ee440ee5b6ca150b87015d1d4a46") - ("nhexl-mode" . "211e6c72e1489426cde64eb9ac26719463524bde") - ("no-littering" . "57357e15643158b4e0d9b3b4f70a82f5fc73178a") - ("nongnu-elpa" . "5623e3864f87f49d18bc48b3656dc0c2dea42973") - ("notmuch" . "4e209ca99ac8084a357c6fc8d7773f6207cfa16d") - ("olivetti" . "95479d5178fc5017060c963a45de0d2095c00e0f") - ("orderless" . "2646dad28c0819fbe9ee521d39efb9ae40e03982") - ("org" . "8589de94d8a44cd566eb3fe128f8091d7e958ee9") - ("org-msg" . "7b1dfb96d558f6e5626e96d4f4a5150d55cb7eb2") - ("org-ref" . "190248311f90cfc4f0cceef20c7bd52a5d5aa66f") + ("let-alist" . "021fc10df2e44faba4728d849ee767cf890aa51a") + ("magit" . "93d30c5459e75a0d53581da2a5539a54efa329ab") + ("melpa" . "fc5b27dd4aa32f75844bf6db7e9e0f44275631ea") + ("mpv.el" . "2e0234bc21a3dcdf12d94d3285475e7f6769d3e8") + ("nhexl-mode" . "dec55097dc6938122e7886a89e64dd528b1ce55a") + ("no-littering" . "fcfd51fbdf08469e6d1b59bc4bd2d75aa708c791") + ("nongnu-elpa" . "14e9631cd2b81f66ed551b14d31811a75cc53a4b") + ("notmuch" . "b6f144abe1f5aa3519240cf52f4cb9907fefcd0e") + ("olivetti" . "a644ee9d24c7283435ce42e11498951e100608c9") + ("orderless" . "6936fe46ef07df168a423f04efeda130b4e69753") + ("org" . "a18ebc78934a1efa2adec3ebc88d8e155d5b3301") + ("org-msg" . "055de4abf611c5d5e12c770fe149c1861b402817") + ("org-ref" . "26c06912c7833104c7b4c7b96b8f200e98067a68") ("org-reveal" . "f55c851bf6aeb1bb2a7f6cf0f2b7bd0e79c4a5a0") ("org-superstar-mode" . "54c81c27dde2a6dc461bb064e79a8b2089093a2e") - ("ox-pandoc" . "f8eac5e5692fc44a4724ada43191e7c28a1ccf30") + ("ox-pandoc" . "0f758517f512e375825679541b5d905be40342eb") ("parsebib" . "ace9df707108b17759c004c7387655277122d4c1") - ("pdf-tools" . "bb0b71f5bafd81d0b5647c4ec48fafa0bb6f6c21") ("pdfgrep" . "a4ca0a1e6521de93f28bb6736a5344b4974d144c") ("pkg-info" . "76ba7415480687d05a4353b27fea2ae02b8d9d61") - ("pos-tip" . "179cc126b363f72ca12fab1e0dc462ce0ee79742") ("proced-narrow" . "0e2a4dfb072eb0369d0020b429e820ae620d325e") - ("project" . "388ffdfc5cdd075fa868d472c57369fd955d1e6a") - ("projectile" . "1528ed4f082e7aaca19f22394eb4bed879645b7c") + ("project" . "927a7534138b70fa80e89450c77258f9386d03a1") + ("projectile" . "971cd5c4f25ff1f84ab7e8337ffc7f89f67a1b52") ("queue" . "130c2d656cd5d7376552272fab9e50a7c37d0c4a") - ("racket-mode" . "7f12cb1ff2774e7592632d8aab1572f57d045419") - ("rg.el" . "10e64887c224002572e1f1e19c74453cba606c3f") - ("rust-mode" . "b2b18aa6c135d9b06242b3d081d94fe0c0cb8e86") - ("s.el" . "43ba8b563bee3426cead0e6d4ddc09398e1a349d") - ("seq" . "4355cde01767911660f761cf874edb412d06bd7a") - ("sly" . "ef5211456a59d639c98b2ed42428726d32728ff8") - ("smartparens" . "c59bfef7e8f1687ac77b0afaaaed86d8051d3de1") - ("straight.el" . "b3760f5829dba37e855add7323304561eb57a3d4") + ("rg.el" . "e9dc4ed342e0212d08fb82554dfd3c57fdfa5b1a") + ("rust-mode" . "9c26dc1195ec05309ee15c014631fb9abd6cf5d2") + ("s.el" . "dda84d38fffdaf0c9b12837b504b402af910d01d") + ("sly" . "df62abae73bd511885c9c7ec0ea7ea1469a00923") + ("smartparens" . "79a338db115f441cd47bb91e6f75816c5e78a772") + ("straight.el" . "ff63b154bef1ef8d92c141bd189001bff74f6982") ("string-inflection" . "50ad54970b3cc79b6b83979bde9889ad9a9e1a9c") - ("swiper" . "47b496544e238041bca5e3c9ca55848648344312") - ("tablist" . "faab7a035ef2258cc4ea2182f67e3aedab7e2af9") - ("transient" . "cc16a5eaa73617a281b0bbf71b24432c38994e30") - ("typescript.el" . "b369d7d2518fa11760ac3908a383405350cd51d2") - ("undo-tree" . "e326c6135e62f5fe8536528d3acd5e798f847407") - ("use-package" . "a7422fb8ab1baee19adb2717b5b47b9c3812a84c") - ("web-mode" . "8ef47935d638902ba35a557cae5edd6ab6ab1346") - ("with-editor" . "ebcbd3b137154e6c5a2b976bacbb89d48ddfa242") - ("xref" . "b2bf147ee8bb6c67403e6ce2104e164f184623c8") - ("yaml-mode" . "fc5e1c58f94472944c4aa838f00f6adcac6fa992") - ("yasnippet" . "5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6")) + ("swiper" . "595d44264420d989e420351ea25b3c99528547c0") + ("transient" . "323d6b6c84e6ae55e578efa1efb6bb4d42a69cac") + ("typescript.el" . "4fcb4594819caf472ae42ea068a1c7795cf07f46") + ("undo-tree" . "16f4121032d09ef44b3d7d02c4d02c3c2f18041f") + ("use-package" . "a6e856418d2ebd053b34e0ab2fda328abeba731c") + ("web-mode" . "57856ba64b9382811b35df0d9ab0a24aede0c1f0") + ("with-editor" . "a4853781835346aabf083d2d9cb87f656d01ccac") + ("xref" . "420511e20187d0c6c8680c0e63ae8810f84dee00") + ("yaml-mode" . "13728b4b1b1bd33d3a754236a0f23e4c76d6ba91") + ("yasnippet" . "5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6") + ("zone-matrix" . "3ab1b47f9c0ff92ec71f76f5e95cdea3a7b06870")) :gamma -- cgit v1.2.3-13-gbd6f From 8613890606da0176d6b9e31e3b2dbc08a55aa8d9 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 02:50:33 +0530 Subject: (Emacs/game-grid)Update game scores --- Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores | 4 ++++ Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores | 2 ++ 2 files changed, 6 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores b/Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores index bd2c71d..27ef654 100644 --- a/Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores +++ b/Emacs/.config/emacs/.local/gamegrid-user-score/snake-scores @@ -1 +1,5 @@ 00017 Sat Apr 20 02:48:23 2024 Aryadev Chavali +00011 Mon May 6 02:44:35 2024 Aryadev Chavali +00010 Mon May 6 02:43:59 2024 Aryadev Chavali +00002 Mon May 6 02:42:08 2024 Aryadev Chavali +00001 Sat Apr 27 15:55:53 2024 Aryadev Chavali diff --git a/Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores b/Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores index e971694..06cdbcb 100644 --- a/Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores +++ b/Emacs/.config/emacs/.local/gamegrid-user-score/tetris-scores @@ -5,6 +5,7 @@ 00204 Wed Dec 28 14:50:42 2022 Aryadev Chavali 00187 Thu Jan 12 01:30:09 2023 Aryadev Chavali 00172 Mon Jan 9 12:59:13 2023 Aryadev Chavali +00166 Mon May 6 02:40:23 2024 Aryadev Chavali 00114 Fri Jul 21 11:58:31 2023 Aryadev Chavali 00096 Sat Dec 3 16:21:40 2022 Aryadev Chavali 00092 Sun Nov 13 23:34:52 2022 Aryadev Chavali @@ -16,6 +17,7 @@ 00057 Thu Jan 12 01:15:49 2023 Aryadev Chavali 00056 Tue Sep 20 18:13:37 2022 Aryadev Chavali 00050 Fri May 26 16:33:56 2023 Aryadev Chavali +00048 Sun May 5 19:34:16 2024 Aryadev Chavali 00046 Wed Oct 12 11:27:19 2022 Aryadev Chavali 00042 Tue Aug 1 19:58:49 2023 Aryadev Chavali 00038 Tue Oct 11 16:47:44 2022 Aryadev Chavali -- cgit v1.2.3-13-gbd6f From 9aa6de5f2433b457f2aa7b89bf6301074e1d7f21 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 May 2024 23:50:06 +0530 Subject: (Emacs/config|core)~projectile -> project Removing a dependency! --- Emacs/.config/emacs/config.org | 5 ++++- Emacs/.config/emacs/core.org | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 80127fa..92b9683 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -524,7 +524,10 @@ Recentf provides a method of keeping track of recently opened files. :straight nil :hook (emacs-startup-hook . recentf-mode)) #+end_src -** Projectile +** WAIT Projectile +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: Projectile is a project management package which integrates with Emacs very well. It essentially provides alternative Emacs commands scoped to the current 'project', based on differing signs that a directory is diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index f4e45d4..9326f02 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -133,11 +133,12 @@ Some bindings that I couldn't fit elsewhere easily. (leader "SPC" '(execute-extended-command :which-key "M-x") + "p" `(,project-prefix-map :which-key "Project") "'" '(browse-url-emacs :which-key "Download URL to Emacs") ":" `(,(proc (interactive) (switch-to-buffer "*scratch*")) :which-key "Switch to *scratch*") "!" '(async-shell-command :which-key "Async shell command") - "h" '(help-command :which-key "Help")) + "h" '(help-command :which-key "Help")) (mode-leader "T" #'+oreo/switch-theme) -- cgit v1.2.3-13-gbd6f From d96d7c32150269b3b58097d426a22d5ded8b9d1a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 7 May 2024 00:10:19 +0530 Subject: (Emacs/config)~Clean up a bit --- Emacs/.config/emacs/config.org | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 92b9683..6bf4df1 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -416,17 +416,6 @@ usage later on. (load-file (concat user-emacs-directory "core.el")) #+end_src * Small packages -** ISearch -ISearch is the default incremental search application in Emacs. I use -~evil-search-forward~ so I don't interact with isearch that much, but -I may need it occasionally. -#+begin_src emacs-lisp -(use-package isearch - :straight nil - :general - (:keymaps 'isearch-mode-map - "M-s" #'isearch-repeat-forward)) -#+end_src ** Info Info is GNU's attempt at better man pages. Most Emacs packages have info pages so I'd like nice navigation options. @@ -1611,8 +1600,9 @@ learnt the basics of org). #+begin_src emacs-lisp (use-package org-msg - :hook (message-mode-hook . org-msg-mode) - :hook (notmuch-message-mode-hook . org-msg-mode) + :hook + (message-mode-hook . org-msg-mode) + (notmuch-message-mode-hook . org-msg-mode) :config (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t tex:dvipng" org-msg-greeting-name-limit 3) -- cgit v1.2.3-13-gbd6f From 89cc78f476ada3f3cf1f125c5c9b4e9b3e215d59 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 7 May 2024 00:14:32 +0530 Subject: (Emacs/elisp)+bytecompile? option to literate So if you don't want to, say while debugging, it won't. --- Emacs/.config/emacs/elisp/literate.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/elisp/literate.el b/Emacs/.config/emacs/elisp/literate.el index 077de93..ffd4963 100644 --- a/Emacs/.config/emacs/elisp/literate.el +++ b/Emacs/.config/emacs/elisp/literate.el @@ -92,6 +92,9 @@ (defconst +literate/elc-org-files (mapcar #'+literate/org-to-elc +literate/org-files)) +(defvar +literate/bytecompile? t + "Bytecompile all files?") + ;; Basic compilation and loading files (autoload #'org-babel-tangle-file "ob-tangle") @@ -119,22 +122,25 @@ ;; Compiling all files (defun +literate/compile-init-files () - (message "[Literate/init]: Byte compiling init files...") - (mapc #'+literate/byte-compile-if-old +literate/el-init-files) + (when +literate/bytecompile? + (message "[Literate/init]: Byte compiling init files...") + (mapc #'+literate/byte-compile-if-old +literate/el-init-files)) (message "[Literate/init]: Init files compiled!")) (defun +literate/compile-lib-files () - (message "[Literate/lib]: Byte compiling lib files...") - (mapc #'+literate/byte-compile-if-old +literate/el-lib-files) + (when +literate/bytecompile? + (message "[Literate/lib]: Byte compiling lib files...") + (mapc #'+literate/byte-compile-if-old +literate/el-lib-files)) (message "[Literate/lib]: Lib files compiled!")) (defun +literate/compile-org-files () (message "[Literate/org]: Tangling org files...") (mapc #'+literate/tangle-if-old +literate/org-files) (message "[Literate/org]: Tangled org files!") - (message "[Literate/org]: Byte compiling org files...") - (mapc #'+literate/byte-compile-if-old +literate/el-org-files) - (message "[Literate/org]: Byte compiled org files!")) + (when +literate/bytecompile? + (message "[Literate/org]: Byte compiling org files...") + (mapc #'+literate/byte-compile-if-old +literate/el-org-files) + (message "[Literate/org]: Byte compiled org files!"))) (defun +literate/compile-config () "Compile all files in +literate/org-files via org-babel-tangle." -- cgit v1.2.3-13-gbd6f From 6656253cacf198380fd764c99895b7dd5c7d68ed Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 7 May 2024 01:32:21 +0530 Subject: (Emacs/config|core)~switch ripgrep bindings --- Emacs/.config/emacs/config.org | 2 +- Emacs/.config/emacs/core.org | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 6bf4df1..2464cea 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -687,7 +687,7 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. (reusable-frames . t)) :general (search-leader - "R" #'rg) + "r" #'rg) (nmmap :keymaps 'rg-mode-map "c" #'rg-recompile diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 9326f02..2e80e8a 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -359,7 +359,7 @@ Setup for counsel. Load after ivy and helpful. :general (search-leader "s" #'counsel-grep-or-swiper - "r" #'counsel-rg) + "R" #'counsel-rg) (file-leader "r" #'counsel-recentf "P" (proc (interactive) -- cgit v1.2.3-13-gbd6f From 6b6055a85567c04fd9fabf67603fbeaa7e51df7b Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 7 May 2024 23:54:37 +0530 Subject: (Emacs/config)~Fix bug with mode-line on bootup --- Emacs/.config/emacs/config.org | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 2464cea..1635eab 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -323,12 +323,13 @@ simplicity is above all. (list "%l:%c " ;; Line and column "%p[" ;; Where in file + Evil state - '(:eval (upcase - (substring - (format "%s" (if (bound-and-true-p evil-state) - evil-state - "")) - 0 1))) + '(:eval (with-eval-after-load "evil" + (upcase + (substring + (format "%s" (if (bound-and-true-p evil-state) + evil-state + " ")) + 0 1)))) "] " "%+%b(" '(:eval (format "%s" major-mode)) -- cgit v1.2.3-13-gbd6f From 4845453a695de69d7290f3c12313081d937012f1 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 7 May 2024 23:56:29 +0530 Subject: (Emacs/yasnippet)+braces to end() in beginend snippet for C++ --- Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend index 13451e1..7642355 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend @@ -3,4 +3,4 @@ # key: bend # uuid: beginend # -- -${1:v}.begin(), $1.end \ No newline at end of file +${1:v}.begin(), $1.end() \ No newline at end of file -- cgit v1.2.3-13-gbd6f From 4f2ec316e45810e428a1d8f8750fff52a9e7d992 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 7 May 2024 23:56:57 +0530 Subject: (Emacs/config|core)+some defers --- Emacs/.config/emacs/config.org | 3 +-- Emacs/.config/emacs/core.org | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 1635eab..27c20d4 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -40,7 +40,7 @@ Set the encoding to UTF-8-Unix by default. (setq-default buffer-file-coding-system 'utf-8-unix save-buffer-coding-system 'utf-8-unix)) #+end_src -** File saves and custom file + Setup automatic saving for files (in case of system failure) and auto-revert-mode (which refreshes the buffer on changes to the underlying file). Along with that, set the custom-file (which holds @@ -680,7 +680,6 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. *** rg #+begin_src emacs-lisp (use-package rg - :after grep :display ("^\\*\\*ripgrep\\*\\*" (display-buffer-at-bottom display-buffer-reuse-window) diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 2e80e8a..b0bc70d 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -179,7 +179,7 @@ Setup the evil package, with some opinionated keybindings: - Use 'T' character as an action for transposing objects #+begin_src emacs-lisp (use-package evil - :demand t + :defer t :hook (after-init-hook . evil-mode) :general (leader @@ -652,6 +652,7 @@ effectively. #+begin_src emacs-lisp (use-package tab-bar + :defer t :straight nil :init (setq tab-bar-show 1) -- cgit v1.2.3-13-gbd6f From 2450e47882750f1a46911f99503a068df84c2181 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 8 May 2024 01:17:29 +0530 Subject: (Scripts|Emacs/app)~ported eshell banner to a script Instead of doing it all in Emacs lisp (which while pretty fun to write, is not fun to execute outside of Emacs), I wrote a shell script which generates the same banners, then just linked +eshell/banner-message to it. --- Emacs/.config/emacs/app.org | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 4791444..590bd4d 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -512,11 +512,7 @@ changes that haven't been committed). '("𝜆> " :foreground "DeepSkyBlue"))))) (defun +eshell/banner-message () - (concat (shell-command-to-string - (let ((possible-cows '("default" "cower" "moofasa" "moose" - "mutilated" "satanic" "sheep" - "small" "tux" "vader"))) - (format "fortune | cowsay -f %s" (nth (random (length possible-cows)) possible-cows)))) + (concat (shell-command-to-string "~/.local/scripts/cowfortune") "\n")) (setq eshell-cmpl-ignore-case t -- cgit v1.2.3-13-gbd6f From d998ae45cfbf71601061c052848a3e3c5aa0c9b7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 8 May 2024 01:30:04 +0530 Subject: (Emacs/*)~disable a lot of packages Don't use them most of the time so what's the need? If I'm ever in the situation where I need to use these I hope I have internet connection. --- Emacs/.config/emacs/app.org | 22 ++++++++-------------- Emacs/.config/emacs/config.org | 5 ++++- Emacs/.config/emacs/lang.org | 22 +++++++++++++++++----- 3 files changed, 29 insertions(+), 20 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 590bd4d..d5201a6 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -564,7 +564,10 @@ directory. (eshell-send-input)) (message "Could not switch eshell: buffer is not real file"))))) #+end_src -* Elfeed +* WAIT Elfeed +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: Elfeed is the perfect RSS feed reader, integrated into Emacs perfectly. I've got a set of feeds that I use for a large variety of stuff, mostly media and entertainment. I've also bound " ar" @@ -715,18 +718,6 @@ Core proced config, just a few bindings and evil collection setup. (with-eval-after-load "evil-collection" (evil-collection-proced-setup))) #+end_src -** Proced narrow -Along with that I setup the package ~proced-narrow~ which allows -further filtering of the process list. -#+begin_src emacs-lisp -(use-package proced-narrow - :straight t - :after proced - :general - (nmap - :keymaps 'proced-mode-map - "%" #'proced-narrow)) -#+end_src * Calculator Surprise, surprise Emacs comes with a calculator. @@ -867,7 +858,10 @@ and integrates slickly into image-dired. Of course, "k" #'image-previous-line "l" #'image-forward-hscroll)) #+end_src -* ERC +* WAIT ERC +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: #+begin_src emacs-lisp (use-package erc :defer t diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 27c20d4..045502b 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1570,7 +1570,10 @@ crash (like the async handler for org-export). Works really well with (start-process-shell-command "" "*pdflatex*" (concat "pdflatex -shell-escape " (org-latex-export-to-latex))))) #+end_src -** Org ref +** WAIT Org ref +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: For bibliographic stuff in $\LaTeX$ export. #+begin_src emacs-lisp (use-package org-ref diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index aaa5f61..7242d6c 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -88,7 +88,10 @@ There is no proper PDF viewing without this package. (with-eval-after-load "evil-collection" (evil-collection-pdf-setup))) #+end_src -** PDF grep +** WAIT PDF grep +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: PDF grep is a Linux tool that allows for searches against the text inside of PDFs similar to standard grep. This cannot be performed by standard grep due to how PDFs are encoded; they are not a clear text @@ -332,7 +335,10 @@ execution of d-mode blocks and alias ~D-mode~ with ~d-mode~. (with-eval-after-load "org-mode" (setf (alist-get 'd org-babel-load-languages) t))) #+end_src -* Rust +* WAIT Rust +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: #+begin_src emacs-lisp (use-package rust-mode :straight t @@ -406,7 +412,10 @@ omnisharp. ("for" . "∀") ("return" . "⟼"))) #+end_src -* Java +* WAIT Java +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: I kinda dislike Java, but if necessary I will code in it. Just setup a style and some pretty symbols. You can use LSP to get cooler features to be fair. @@ -609,7 +618,10 @@ Emmet for super speed code writing. " ")) #+end_src -** Typescript +** WAIT Typescript +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: A child language of javascript which compiles to it. #+begin_src emacs-lisp (use-package typescript-mode @@ -621,7 +633,7 @@ A child language of javascript which compiles to it. Common Lisp is a dialect of Lisp, the most /common/ one around. Emacs comes with builtin Lisp support of course, but a REPL would be nice. -** Sly +** WAIT Sly Enter /SLY/. Sly is a fork of /SLIME/ and is *mandatory* for lisp development on Emacs. -- cgit v1.2.3-13-gbd6f From a6fffa384c0e383e3ea6d5daab3c61f60478c871 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 8 May 2024 01:30:48 +0530 Subject: (Emacs/app|config)~w(grep|dired) have the same finish/abort binds ZZ and ZQ. --- Emacs/.config/emacs/app.org | 7 +++++-- Emacs/.config/emacs/config.org | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index d5201a6..089a3d4 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -267,8 +267,11 @@ easier than even using the mark based system. :general (nmmap :keymaps 'dired-mode-map - "." #'browse-url-of-dired-file - "W" #'wdired-change-to-wdired-mode)) + "W" #'wdired-change-to-wdired-mode) + (nmmap + :keymaps 'wdired-mode-map + "ZZ" #'wdired-finish-edit + "ZQ" #'wdired-abort-changes)) #+end_src * WAIT Xwidget :PROPERTIES: diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 045502b..61c60f5 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -671,8 +671,8 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. (nmmap :keymaps 'wgrep-mode-map "q" #'evil-record-macro - "Zz" #'wgrep-finish-edit - "Zq" #'wgrep-abort-changes) + "ZZ" #'wgrep-finish-edit + "ZQ" #'wgrep-abort-changes) :config ;; Without this wgrep doesn't work properly (evil-set-initial-state 'grep-mode 'normal)) -- cgit v1.2.3-13-gbd6f From d4f4169b9c6fca694094df1443adb787b9894e4a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 8 May 2024 01:34:31 +0530 Subject: (Emacs/app)~rearranged dired config Put more stuff in :general and it seems to work?! --- Emacs/.config/emacs/app.org | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 089a3d4..6357b93 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -200,9 +200,11 @@ are some corners I'd like to adjust). :general (nmmap :keymaps 'dired-mode-map - "T" #'dired-create-empty-file - "H" #'dired-up-directory - "L" #'dired-find-file) + "SPC" nil + "SPC ," nil + "T" #'dired-create-empty-file + "H" #'dired-up-directory + "L" #'dired-find-file) (dir-leader "f" #'find-dired "d" #'dired @@ -211,20 +213,6 @@ are some corners I'd like to adjust). "p" `(,(proc (interactive) (dired "~/Text/PDFs/")) :which-key "Open PDFs")) - :config - (add-to-list 'dired-guess-shell-alist-user '("\\.pdf\\'" "zathura")) - (defun +dired/insert-all-subdirectories () - "Insert all subdirectories currently viewable." - (interactive) - (dired-mark-directories nil) - (dolist #'dired-insert-subdir (dired-get-marked-files)) - (dired-unmark-all-marks)) - - (nmmap - :keymaps 'dired-mode-map - "SPC" nil - "SPC ," nil) - (nmmap :keymaps 'image-dired-thumbnail-mode-map "h" #'image-dired-backward-image @@ -242,6 +230,14 @@ are some corners I'd like to adjust). "l" #'dired-maybe-insert-subdir "m" #'dired-mark-files-regexp "u" #'dired-undo)) + :config + (add-to-list 'dired-guess-shell-alist-user '("\\.pdf\\'" "zathura")) + (defun +dired/insert-all-subdirectories () + "Insert all subdirectories currently viewable." + (interactive) + (dired-mark-directories nil) + (mapc #'dired-insert-subdir (dired-get-marked-files)) + (dired-unmark-all-marks))) #+end_src ** fd-dired Uses fd for finding file results in a directory: ~find-dired~ -> -- cgit v1.2.3-13-gbd6f From 89ce0a30121e5b3aab71d3b9977a940c4b658fb5 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 8 May 2024 01:35:25 +0530 Subject: (Emacs/app)~dired-other(frame->window) and added dired-subdir binds --- Emacs/.config/emacs/app.org | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 6357b93..63434ab 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -208,11 +208,20 @@ are some corners I'd like to adjust). (dir-leader "f" #'find-dired "d" #'dired - "D" #'dired-other-frame + "D" #'dired-other-window "i" #'image-dired "p" `(,(proc (interactive) (dired "~/Text/PDFs/")) :which-key "Open PDFs")) + (local-leader + :keymaps 'dired-mode-map + "i" #'dired-maybe-insert-subdir + "I" #'+dired/insert-all-subdirectories + "k" #'dired-prev-subdir + "j" #'dired-next-subdir + "K" #'dired-kill-subdir + "m" #'dired-mark-files-regexp + "u" #'dired-undo) (nmmap :keymaps 'image-dired-thumbnail-mode-map "h" #'image-dired-backward-image @@ -224,12 +233,6 @@ are some corners I'd like to adjust). "RET" #'image-dired-display-this "m" #'image-dired-mark-thumb-original-file "q" #'quit-window) - - (local-leader - :keymaps 'dired-mode-map - "l" #'dired-maybe-insert-subdir - "m" #'dired-mark-files-regexp - "u" #'dired-undo)) :config (add-to-list 'dired-guess-shell-alist-user '("\\.pdf\\'" "zathura")) (defun +dired/insert-all-subdirectories () -- cgit v1.2.3-13-gbd6f From a082b261e267f98878e7be58fe062305c786d9a8 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 10 May 2024 01:04:38 +0530 Subject: (Emacs/config)-telephone-line Mode line also now includes project name in mode line --- Emacs/.config/emacs/config.org | 85 ++++-------------------------------------- 1 file changed, 7 insertions(+), 78 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 61c60f5..ae8d3d3 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -309,21 +309,14 @@ little. I customised the Emacs modeline to give me a bit of info, Currently I use the default mode line with some customisation; simplicity is above all. -*** Emacs Mode-line -#+begin_src emacs-lisp -(defun +mode-line/generate-padding () - (let ((wid (frame-width)) - (str "")) - (dotimes (n (floor (/ wid 7))) - (setq str (concat str " "))) - str)) +#+begin_src emacs-lisp (setq-default mode-line-format (list "%l:%c " ;; Line and column - "%p[" ;; Where in file + Evil state - '(:eval (with-eval-after-load "evil" + "%p[" ;; %into file + '(:eval (with-eval-after-load "evil" ;; Evil state (upcase (substring (format "%s" (if (bound-and-true-p evil-state) @@ -331,79 +324,15 @@ simplicity is above all. " ")) 0 1)))) "] " - "%+%b(" + "%+%b(" ;; Buffer name '(:eval (format "%s" major-mode)) ") " - "%I " - '(:eval (+mode-line/generate-padding)) - '(vc-mode vc-mode) + "%I " ;; file size + '(:eval (project-name (project-current))) + '(vc-mode vc-mode) ;; git branch mode-line-misc-info mode-line-end-spaces)) #+end_src -*** WAIT Telephone-line -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Telephone-line is a mode-line package for Emacs which prioritises -extensibility. It also looks much nicer than the default mode line -with colouring and a ton of presentations to choose from. -#+begin_src emacs-lisp -(use-package telephone-line - :init - (defface +telephone/position-face '((t (:foreground "red" :background "grey10"))) "") - (defface +telephone/mode-face '((t (:foreground "white" :background "dark green"))) "") - (defface +telephone/file-info-face '((t (:foreground "white" :background "Dark Blue"))) "") - :custom - (telephone-line-faces - '((evil . telephone-line-modal-face) - (modal . telephone-line-modal-face) - (ryo . telephone-line-ryo-modal-face) - (accent . (telephone-line-accent-active . telephone-line-accent-inactive)) - (nil . (mode-line . mode-line-inactive)) - (position . (+telephone/position-face . mode-line-inactive)) - (mode . (+telephone/mode-face . mode-line-inactive)) - (file-info . (+telephone/file-info-face . mode-line-inactive)))) - (telephone-line-primary-left-separator 'telephone-line-halfcos-left) - (telephone-line-secondary-left-separator 'telephone-line-halfcos-hollow-left) - (telephone-line-primary-right-separator 'telephone-line-identity-right) - (telephone-line-secondary-right-separator 'telephone-line-identity-hollow-right) - (telephone-line-height 24) - (telephone-line-evil-use-short-tag nil) - :config - (telephone-line-defsegment +telephone/buffer-or-filename () - (cond - ((buffer-file-name) - (if (and (fboundp 'projectile-project-name) - (fboundp 'projectile-project-p) - (projectile-project-p)) - (list "" - (funcall (telephone-line-projectile-segment) face) - (propertize - (concat "/" - (file-relative-name (file-truename (buffer-file-name)) - (projectile-project-root))) - 'help-echo (buffer-file-name))) - (buffer-file-name))) - (t (buffer-name)))) - - (telephone-line-defsegment +telephone/get-position () - `(,(concat "%lL:%cC" - (if (not mark-active) - "" - (format " | %dc" (- (+ 1 (region-end)) (region-beginning))))))) - - (setq-default - telephone-line-lhs '((mode telephone-line-major-mode-segment) - (file-info telephone-line-input-info-segment) - (position +telephone/get-position) - (accent +telephone/buffer-or-filename - telephone-line-process-segment)) - telephone-line-rhs '((accent telephone-line-flycheck-segment telephone-line-misc-info-segment - telephone-line-projectile-segment) - (file-info telephone-line-filesize-segment) - (evil telephone-line-evil-tag-segment))) - (telephone-line-mode)) -#+end_src ** Mouse Who uses a mouse? 🤮 #+begin_src emacs-lisp -- cgit v1.2.3-13-gbd6f From 7105788014b2ab8a31c8dbc69dc489f5762babbc Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 10 May 2024 01:05:16 +0530 Subject: (Emacs/core)~Switched prefixes for tab and shell leader --- Emacs/.config/emacs/core.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index b0bc70d..3902e51 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -33,7 +33,7 @@ code. :states '(normal motion) "SPC" 'nil "\\" '(nil :which-key "Local leader") - "SPC ;" '(nil :which-key "Shell") + "SPC ;" '(nil :which-key "Tabs") "SPC a" '(nil :which-key "Applications") "SPC b" '(nil :which-key "Buffers") "SPC c" '(nil :which-key "Code") @@ -42,7 +42,7 @@ code. "SPC i" '(nil :which-key "Insert") "SPC m" '(nil :which-key "Modes") "SPC s" '(nil :which-key "Search") - "SPC t" '(nil :which-key "Tabs") + "SPC t" '(nil :which-key "Shell") "SPC q" '(nil :which-key "Quit/Literate")) (general-create-definer leader -- cgit v1.2.3-13-gbd6f From 31329c3dab4e794ac3b3b801db57a2e9d745c771 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 10 May 2024 01:05:35 +0530 Subject: (Emacs/app)~+eshell/current-buffer command now uses T --- Emacs/.config/emacs/app.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 63434ab..d4ac94d 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -540,7 +540,7 @@ directory. (use-package eshell :defer t :general - (shell-leader + (leader "T" #'+eshell/current-buffer) :config (defun eshell/goto (&rest args) -- cgit v1.2.3-13-gbd6f From d44273c668340fe360e17bfc3f74005c2c40e3d8 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 10 May 2024 01:05:54 +0530 Subject: (Emacs/yasnippet)+new snippet for macros in C/C++ --- Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/define | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/define (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/define b/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/define new file mode 100644 index 0000000..ad12f3b --- /dev/null +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/define @@ -0,0 +1,4 @@ +# key: #def +# name: define +# -- +#define $1 $2 \ No newline at end of file -- cgit v1.2.3-13-gbd6f From 41e85002dcf8dc14e188c60f531711de0acade02 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 10 May 2024 01:57:42 +0530 Subject: (Emacs)-Emacs Lisp snippets Don't use ANY of them anyway. --- .../yasnippet/snippets/emacs-lisp-mode/advise | 9 ------- .../.config/yasnippet/snippets/emacs-lisp-mode/and | 4 --- .../yasnippet/snippets/emacs-lisp-mode/append | 4 --- .../yasnippet/snippets/emacs-lisp-mode/apply | 6 ----- .../yasnippet/snippets/emacs-lisp-mode/aref | 4 --- .../yasnippet/snippets/emacs-lisp-mode/aset | 4 --- .../yasnippet/snippets/emacs-lisp-mode/assq | 4 --- .../.config/yasnippet/snippets/emacs-lisp-mode/au | 4 --- .../yasnippet/snippets/emacs-lisp-mode/autodef | 6 ----- .../yasnippet/snippets/emacs-lisp-mode/autoload | 4 --- .../snippets/emacs-lisp-mode/backward-char | 8 ------ .../snippets/emacs-lisp-mode/beginning-of-line | 8 ------ .../emacs-lisp-mode/bounds-of-thing-at-point | 8 ------ .../snippets/emacs-lisp-mode/buffer-file-name | 6 ----- .../snippets/emacs-lisp-mode/buffer-modified-p | 8 ------ .../snippets/emacs-lisp-mode/buffer-substring | 6 ----- .../emacs-lisp-mode/buffer-substring-no-properties | 6 ----- .../.config/yasnippet/snippets/emacs-lisp-mode/car | 4 --- .../.config/yasnippet/snippets/emacs-lisp-mode/cdr | 4 --- .../snippets/emacs-lisp-mode/cl-destructuring-bind | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/concat | 4 --- .../snippets/emacs-lisp-mode/condition-case | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/cons | 4 --- .../yasnippet/snippets/emacs-lisp-mode/consp | 7 ----- .../snippets/emacs-lisp-mode/copy-directory | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/copy-file | 8 ------ .../snippets/emacs-lisp-mode/current-buffer | 6 ----- .../snippets/emacs-lisp-mode/custom-autoload | 8 ------ .../snippets/emacs-lisp-mode/def-package! | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/defalias | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/defconst | 5 ---- .../yasnippet/snippets/emacs-lisp-mode/defcustom | 4 --- .../yasnippet/snippets/emacs-lisp-mode/define-key | 6 ----- .../yasnippet/snippets/emacs-lisp-mode/defsubst | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/defvar | 5 ---- .../yasnippet/snippets/emacs-lisp-mode/delete-char | 8 ------ .../snippets/emacs-lisp-mode/delete-directory | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/delete-file | 8 ------ .../snippets/emacs-lisp-mode/delete-region | 8 ------ .../snippets/emacs-lisp-mode/directory-files | 8 ------ .../snippets/emacs-lisp-mode/dired.process_marked | 17 ------------ .../yasnippet/snippets/emacs-lisp-mode/end-of-line | 8 ------ .../.config/yasnippet/snippets/emacs-lisp-mode/eq | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/equal | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/error | 7 ----- .../snippets/emacs-lisp-mode/expand-file-name | 4 --- .../yasnippet/snippets/emacs-lisp-mode/fboundp | 4 --- .../snippets/emacs-lisp-mode/file-name-directory | 8 ------ .../snippets/emacs-lisp-mode/file-name-extension | 4 --- .../emacs-lisp-mode/file-name-nondirectory | 8 ------ .../emacs-lisp-mode/file-name-sans-extension | 8 ------ .../snippets/emacs-lisp-mode/file-relative-name | 8 ------ .../snippets/emacs-lisp-mode/file.process | 18 ------------- .../snippets/emacs-lisp-mode/file.read-lines | 18 ------------- .../yasnippet/snippets/emacs-lisp-mode/find-file | 8 ------ .../snippets/emacs-lisp-mode/find-replace | 18 ------------- .../yasnippet/snippets/emacs-lisp-mode/format | 4 --- .../snippets/emacs-lisp-mode/forward-char | 8 ------ .../snippets/emacs-lisp-mode/forward-line | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/funcall | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/function | 4 --- .../.config/yasnippet/snippets/emacs-lisp-mode/get | 7 ----- .../snippets/emacs-lisp-mode/global-set-key | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/goto-char | 4 --- .../yasnippet/snippets/emacs-lisp-mode/grabstring | 5 ---- .../yasnippet/snippets/emacs-lisp-mode/grabthing | 5 ---- .../yasnippet/snippets/emacs-lisp-mode/if-let | 5 ---- .../yasnippet/snippets/emacs-lisp-mode/if-let-2 | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/insert | 8 ------ .../snippets/emacs-lisp-mode/insert-file-contents | 8 ------ .../.config/yasnippet/snippets/emacs-lisp-mode/int | 5 ---- .../yasnippet/snippets/emacs-lisp-mode/interactive | 5 ---- .../.config/yasnippet/snippets/emacs-lisp-mode/kbd | 4 --- .../yasnippet/snippets/emacs-lisp-mode/kill-buffer | 8 ------ .../.config/yasnippet/snippets/emacs-lisp-mode/lam | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/length | 4 --- .../emacs-lisp-mode/line-beginning-position | 8 ------ .../snippets/emacs-lisp-mode/line-end-position | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/list | 4 --- .../yasnippet/snippets/emacs-lisp-mode/looking-at | 4 --- .../snippets/emacs-lisp-mode/make-directory | 8 ------ .../snippets/emacs-lisp-mode/make-hash-table | 6 ----- .../snippets/emacs-lisp-mode/make-local-variable | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/mapc | 4 --- .../yasnippet/snippets/emacs-lisp-mode/mapcar | 4 --- .../snippets/emacs-lisp-mode/match-beginning | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/match-end | 8 ------ .../snippets/emacs-lisp-mode/match-string | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/memq | 4 --- .../yasnippet/snippets/emacs-lisp-mode/message | 6 ----- .../yasnippet/snippets/emacs-lisp-mode/minor_mode | 21 --------------- .../.config/yasnippet/snippets/emacs-lisp-mode/not | 4 --- .../.config/yasnippet/snippets/emacs-lisp-mode/nth | 4 --- .../yasnippet/snippets/emacs-lisp-mode/optional | 5 ---- .../.config/yasnippet/snippets/emacs-lisp-mode/or | 4 --- .../yasnippet/snippets/emacs-lisp-mode/point | 5 ---- .../yasnippet/snippets/emacs-lisp-mode/point-max | 6 ----- .../yasnippet/snippets/emacs-lisp-mode/point-min | 6 ----- .../yasnippet/snippets/emacs-lisp-mode/princ | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/print | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/provide | 4 --- .../.config/yasnippet/snippets/emacs-lisp-mode/put | 7 ----- .../snippets/emacs-lisp-mode/re-search-backward | 8 ------ .../snippets/emacs-lisp-mode/re-search-forward | 8 ------ .../snippets/emacs-lisp-mode/region-active-p | 8 ------ .../snippets/emacs-lisp-mode/region-beginning | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/region-end | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/rename-file | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/repeat | 7 ----- .../snippets/emacs-lisp-mode/replace-regexp | 8 ------ .../emacs-lisp-mode/replace-regexp-in-string | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/require | 4 --- .../yasnippet/snippets/emacs-lisp-mode/rest | 4 --- .../yasnippet/snippets/emacs-lisp-mode/save-buffer | 8 ------ .../snippets/emacs-lisp-mode/search-backward | 8 ------ .../emacs-lisp-mode/search-backward-regexp | 8 ------ .../snippets/emacs-lisp-mode/search-forward | 8 ------ .../snippets/emacs-lisp-mode/search-forward-regexp | 8 ------ .../.config/yasnippet/snippets/emacs-lisp-mode/set | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/set-buffer | 8 ------ .../snippets/emacs-lisp-mode/set-file-modes | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/set-mark | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/setq | 4 --- .../snippets/emacs-lisp-mode/setq-default | 6 ----- .../snippets/emacs-lisp-mode/skip-chars-backward | 8 ------ .../snippets/emacs-lisp-mode/skip-chars-forward | 8 ------ .../snippets/emacs-lisp-mode/split-string | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/string | 7 ----- .../snippets/emacs-lisp-mode/string-match | 4 --- .../snippets/emacs-lisp-mode/string-match-p | 4 --- .../snippets/emacs-lisp-mode/string-to-number | 6 ----- .../yasnippet/snippets/emacs-lisp-mode/string= | 6 ----- .../yasnippet/snippets/emacs-lisp-mode/stringp | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/substring | 7 ----- .../snippets/emacs-lisp-mode/thing-at-point | 8 ------ .../snippets/emacs-lisp-mode/traverse_dir | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/use-package | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/vector | 8 ------ .../yasnippet/snippets/emacs-lisp-mode/widget-get | 8 ------ .../snippets/emacs-lisp-mode/word-or-region | 28 -------------------- .../yasnippet/snippets/emacs-lisp-mode/word_regexp | 6 ----- .../emacs-lisp-mode/x-dired.process_marked | 19 -------------- .../snippets/emacs-lisp-mode/x-file.process | 20 --------------- .../snippets/emacs-lisp-mode/x-file.read-lines | 20 --------------- .../snippets/emacs-lisp-mode/x-find-replace | 20 --------------- .../snippets/emacs-lisp-mode/x-grabstring | 7 ----- .../yasnippet/snippets/emacs-lisp-mode/x-grabthing | 7 ----- .../snippets/emacs-lisp-mode/x-traverse_dir | 9 ------- .../snippets/emacs-lisp-mode/x-word-or-region | 30 ---------------------- .../yasnippet/snippets/emacs-lisp-mode/y-or-n-p | 5 ---- .../yasnippet/snippets/emacs-lisp-mode/yes-or-no-p | 5 ---- 151 files changed, 1131 deletions(-) delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/advise delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/and delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/append delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/apply delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/aref delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/aset delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/assq delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/au delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/autodef delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/autoload delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/backward-char delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/beginning-of-line delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/bounds-of-thing-at-point delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-file-name delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-modified-p delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-substring delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-substring-no-properties delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/car delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cdr delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cl-destructuring-bind delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/concat delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/condition-case delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cons delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/consp delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/copy-directory delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/copy-file delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/current-buffer delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/custom-autoload delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/def-package! delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defalias delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defconst delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defcustom delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/define-key delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defsubst delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defvar delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-char delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-directory delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-file delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-region delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/directory-files delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/dired.process_marked delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/end-of-line delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/eq delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/equal delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/error delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/expand-file-name delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/fboundp delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-directory delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-extension delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-nondirectory delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-sans-extension delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-relative-name delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file.process delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file.read-lines delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/find-file delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/find-replace delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/format delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/forward-char delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/forward-line delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/funcall delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/function delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/get delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/global-set-key delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/goto-char delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/grabstring delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/grabthing delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/if-let delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/if-let-2 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/insert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/insert-file-contents delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/int delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/interactive delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/kbd delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/kill-buffer delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/lam delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/length delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/line-beginning-position delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/line-end-position delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/list delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/looking-at delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-directory delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-hash-table delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-local-variable delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/mapc delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/mapcar delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-beginning delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-end delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-string delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/memq delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/message delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/minor_mode delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/not delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/nth delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/optional delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/or delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point-max delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point-min delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/princ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/print delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/provide delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/put delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/re-search-backward delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/re-search-forward delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-active-p delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-beginning delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-end delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/rename-file delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/repeat delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/replace-regexp delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/replace-regexp-in-string delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/require delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/rest delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/save-buffer delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-backward delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-backward-regexp delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-forward delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-forward-regexp delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-buffer delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-file-modes delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-mark delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/setq delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/setq-default delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/skip-chars-backward delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/skip-chars-forward delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/split-string delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-match delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-match-p delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-to-number delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string= delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/stringp delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/substring delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/thing-at-point delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/traverse_dir delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/use-package delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/vector delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/widget-get delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/word-or-region delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/word_regexp delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-dired.process_marked delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-file.process delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-file.read-lines delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-find-replace delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-grabstring delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-grabthing delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-traverse_dir delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-word-or-region delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/y-or-n-p delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/yes-or-no-p (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/advise b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/advise deleted file mode 100644 index 2e74532..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/advise +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: advise function -# key: adv -# uuid: adv -# -- -(defun ${3:adviser-name} (orig-fn &rest args) - ${4:} - (apply orig-fn args)) -(advice-add #'${1:function-name} ${2::around} #'${3:adviser-name}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/and b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/and deleted file mode 100644 index 63a0fc2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/and +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: and -# -- -(and $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/append b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/append deleted file mode 100644 index 86c62c7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/append +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: append -# -- -(append $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/apply b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/apply deleted file mode 100644 index 894e746..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/apply +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: apply -# key: apply -# uuid: apply -# -- -(apply $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/aref b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/aref deleted file mode 100644 index 1bc181a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/aref +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: aref -# -- -(aref ${1:array} ${0:index}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/aset b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/aset deleted file mode 100644 index 40ed691..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/aset +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: aset -# -- -(aset ${1:array} ${2:index} ${3:newelt}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/assq b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/assq deleted file mode 100644 index f2de7c6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/assq +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: assq -# -- -(assq ${0:sym} ${1:list}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/au b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/au deleted file mode 100644 index b76c3a1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/au +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: autoload tag -# -- -;;;###autoload`(%emacs-lisp-evil-autoload)`$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/autodef b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/autodef deleted file mode 100644 index 0658ee4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/autodef +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: doom autodef tag -# key: ad -# uuid: ad -# -- -;;;###autodef \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/autoload b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/autoload deleted file mode 100644 index 7ffdf3b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/autoload +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: autoload -# -- -(autoload '${1:fn} "${2:file}"${3:"${4:doc}" ${5:t} ${6:type}}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/backward-char b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/backward-char deleted file mode 100644 index d483463..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/backward-char +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: backward-char -# key: backward-char -# uuid: backward-char -# key: bc -# -- -(backward-char $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/beginning-of-line b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/beginning-of-line deleted file mode 100644 index f0d4359..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/beginning-of-line +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: beginning-of-line -# key: beginning-of-line -# uuid: beginning-of-line -# key: bol -# -- -(beginning-of-line) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/bounds-of-thing-at-point b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/bounds-of-thing-at-point deleted file mode 100644 index d74228f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/bounds-of-thing-at-point +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: bounds-of-thing-at-point -# key: bounds-of-thing-at-point -# uuid: bounds-of-thing-at-point -# key: botap -# -- -(bounds-of-thing-at-point '$0) ; symbol, list, sexp, defun, filename, url, email, word, sentence, whitespace, line, page ... \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-file-name b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-file-name deleted file mode 100644 index 9fe30b6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-file-name +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: buffer-file-name -# key: bfn -# uuid: bfn -# -- -buffer-file-name \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-modified-p b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-modified-p deleted file mode 100644 index cf4f2df..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-modified-p +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: buffer-modified-p -# key: buffer-modified-p -# uuid: buffer-modified-p -# key: bmp -# -- -(buffer-modified-p $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-substring b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-substring deleted file mode 100644 index d9c9dba..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-substring +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: buffer-substring -# key: bs -# uuid: bs -# -- -(buffer-substring ${1:start} ${2:end}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-substring-no-properties b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-substring-no-properties deleted file mode 100644 index d286c08..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/buffer-substring-no-properties +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: buffer-substring-no-properties -# key: bsnp -# uuid: bsnp -# -- -(buffer-substring-no-properties ${1:start} ${2:end}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/car b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/car deleted file mode 100644 index f18c455..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/car +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: car -# -- -(car ${0:}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cdr b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cdr deleted file mode 100644 index c5a2e1e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cdr +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: cdr -# -- -(cdr ${0:}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cl-destructuring-bind b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cl-destructuring-bind deleted file mode 100644 index 6f08a67..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cl-destructuring-bind +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: cl-destructuring-bind -# key: cdb -# uuid: cdb -# -- -(cl-destructuring-bind (${1:args}) - ${2:expr} - $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/concat b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/concat deleted file mode 100644 index bc7bd50..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/concat +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: concat -# -- -(concat $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/condition-case b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/condition-case deleted file mode 100644 index 5e80e4b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/condition-case +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: condition-case -# key: cc -# uuid: cc -# -- -(condition-case ex - $>${0:} - (error $0)) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cons b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cons deleted file mode 100644 index 82e8c98..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/cons +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: cons -# -- -(cons ${1:} $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/consp b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/consp deleted file mode 100644 index 869e831..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/consp +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: consp -# key: consp -# uuid: consp -# -- -(consp $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/copy-directory b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/copy-directory deleted file mode 100644 index 9c89c78..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/copy-directory +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: copy-directory -# key: copy-directory -# uuid: copy-directory -# key: cd -# -- -(copy-directory $0 NEWNAME &optional KEEP-TIME PARENTS) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/copy-file b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/copy-file deleted file mode 100644 index d79e1aa..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/copy-file +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: copy-file -# key: copy-file -# uuid: copy-file -# key: cf -# -- -(copy-file FILE$0 NEWNAME &optional OK-IF-ALREADY-EXISTS KEEP-TIME PRESERVE-UID-GID) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/current-buffer b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/current-buffer deleted file mode 100644 index 4d8217f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/current-buffer +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: current-buffer -# key: cb -# uuid: cb -# -- -(current-buffer) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/custom-autoload b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/custom-autoload deleted file mode 100644 index c84d862..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/custom-autoload +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: custom-autoload -# key: custom-autoload -# uuid: custom-autoload -# key: ca -# -- -(custom-autoload$0 SYMBOL LOAD &optional NOSET) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/def-package! b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/def-package! deleted file mode 100644 index 4579471..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/def-package! +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: def-package! ... -# key: dp -# uuid: dp -# -- -(def-package! ${1:package} - :${2:config} - $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defalias b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defalias deleted file mode 100644 index 80f18df..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defalias +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: defalias -# key: defalias -# uuid: defalias -# -- -(defalias 'SYMBOL$0 'DEFINITION &optional DOCSTRING) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defconst b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defconst deleted file mode 100644 index f8b3749..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defconst +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: defconst -# -- -(defconst ${1:var} ${2:`(or % "value")`} - $>"${3:TODO}") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defcustom b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defcustom deleted file mode 100644 index 865cf39..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defcustom +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: defcustom -# -- -(defcustom $1 ${2:VALUE} "${3:doc}" $4) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/define-key b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/define-key deleted file mode 100644 index 6f0126b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/define-key +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: define-key -# key: dk -# uuid: dk -# -- -(define-key ${1:keymap} ${2:key} ${0:fn}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defsubst b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defsubst deleted file mode 100644 index db7c62f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defsubst +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: defsubst -# key: defsubst -# uuid: defsubst -# -- -(defsubst $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defvar b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defvar deleted file mode 100644 index 96647f7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/defvar +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: defvar -# -- -(defvar ${1:var} ${2:`(or % "value")`} - $>"${3:TODO}") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-char b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-char deleted file mode 100644 index b003ee4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-char +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: delete-char -# key: delete-char -# uuid: delete-char -# key: dc -# -- -(delete-char $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-directory b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-directory deleted file mode 100644 index 3cd42e4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-directory +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: delete-directory -# key: delete-directory -# uuid: delete-directory -# key: dd -# -- -(delete-directory $0 &optional RECURSIVE) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-file b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-file deleted file mode 100644 index 3d280ec..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-file +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: delete-file -# key: delete-file -# uuid: delete-file -# key: df -# -- -(delete-file $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-region b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-region deleted file mode 100644 index 8df1afa..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/delete-region +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: delete-region -# key: delete-region -# uuid: delete-region -# key: dr -# -- -(delete-region $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/directory-files b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/directory-files deleted file mode 100644 index 444bb03..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/directory-files +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: directory-files -# key: directory-files -# uuid: directory-files -# key: df -# -- -(directory-files $0 &optional FULL MATCH NOSORT) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/dired.process_marked b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/dired.process_marked deleted file mode 100644 index ec2df13..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/dired.process_marked +++ /dev/null @@ -1,17 +0,0 @@ -# -*- mode: snippet -*- -# name: process marked files in dired -# contributor: Xah Lee -# -- -;; idiom for processing a list of files in dired's marked files - -;; suppose myProcessFile is your function that takes a file path -;; and do some processing on the file - -(defun dired-myProcessFile () - "apply myProcessFile function to marked files in dired." - (interactive) - (require 'dired) - (mapc 'myProcessFile (dired-get-marked-files)) -) - -;; to use it, type M-x dired-myProcessFile diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/end-of-line b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/end-of-line deleted file mode 100644 index e01053d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/end-of-line +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: end-of-line -# key: end-of-line -# uuid: end-of-line -# key: eol -# -- -(end-of-line) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/eq b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/eq deleted file mode 100644 index 704f6a3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/eq +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: eq -# key: eq -# uuid: eq -# -- -(eq $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/equal b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/equal deleted file mode 100644 index 2387712..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/equal +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: equal -# key: equal -# uuid: equal -# -- -(equal $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/error b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/error deleted file mode 100644 index 5f8d3c7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/error +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: error -# key: error -# uuid: error -# -- -(error "$0" &optional ARGS) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/expand-file-name b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/expand-file-name deleted file mode 100644 index fee7367..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/expand-file-name +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: expand-file-name -# -- -(expand-file-name $0${1: ${2:default-directory}}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/fboundp b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/fboundp deleted file mode 100644 index af9d098..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/fboundp +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: fboundp -# -- -(fboundp '$0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-directory b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-directory deleted file mode 100644 index f899866..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-directory +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: file-name-directory -# key: file-name-directory -# uuid: file-name-directory -# key: fnd -# -- -(file-name-directory $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-extension b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-extension deleted file mode 100644 index 8e2665f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-extension +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: file-name-extension -# -- -(file-name-extension $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-nondirectory b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-nondirectory deleted file mode 100644 index a637eb7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-nondirectory +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: file-name-nondirectory -# key: file-name-nondirectory -# uuid: file-name-nondirectory -# key: fnn -# -- -(file-name-nondirectory $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-sans-extension b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-sans-extension deleted file mode 100644 index c97007c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-name-sans-extension +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: file-name-sans-extension -# key: file-name-sans-extension -# uuid: file-name-sans-extension -# key: fnse -# -- -(file-name-sans-extension $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-relative-name b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-relative-name deleted file mode 100644 index 634caaf..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file-relative-name +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: file-relative-name -# key: file-relative-name -# uuid: file-relative-name -# key: frn -# -- -(file-relative-name $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file.process b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file.process deleted file mode 100644 index cbf0563..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file.process +++ /dev/null @@ -1,18 +0,0 @@ -# -*- mode: snippet -*- -# name: a function that process a file -# contributor: Xah Lee -# -- -(defun doThisFile (fpath) - "Process the file at path FPATH ..." - (let () - ;; create temp buffer without undo record or font lock. (more efficient) - ;; first space in temp buff name is necessary - (set-buffer (get-buffer-create " myTemp")) - (insert-file-contents fpath nil nil nil t) - - ;; process it ... - ;; (goto-char 0) ; move to begining of file's content (in case it was open) - ;; ... do something here - ;; (write-file fpath) ;; write back to the file - - (kill-buffer " myTemp"))) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file.read-lines b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file.read-lines deleted file mode 100644 index 0cf8d25..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/file.read-lines +++ /dev/null @@ -1,18 +0,0 @@ -# -*- mode: snippet -*- -# name: read lines of a file -# contributor: Xah Lee -# -- -(defun read-lines (filePath) - "Return a list of lines in FILEPATH." - (with-temp-buffer - (insert-file-contents filePath) - (split-string - (buffer-string) "\n" t)) ) - -;; process all lines -(mapc - (lambda (aLine) - (message aLine) ; do your stuff here - ) - (read-lines "inputFilePath") -) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/find-file b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/find-file deleted file mode 100644 index 8f74392..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/find-file +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: find-file -# key: find-file -# uuid: find-file -# key: ff -# -- -(find-file $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/find-replace b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/find-replace deleted file mode 100644 index 3372a23..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/find-replace +++ /dev/null @@ -1,18 +0,0 @@ -# -*- mode: snippet -*- -# name: find and replace on region -# contributor: Xah Lee -# -- -(defun replace-html-chars-region (start end) - "Replace “<” to “<” and other chars in HTML. -This works on the current region." - (interactive "r") - (save-restriction - (narrow-to-region start end) - (goto-char (point-min)) - (while (search-forward "&" nil t) (replace-match "&" nil t)) - (goto-char (point-min)) - (while (search-forward "<" nil t) (replace-match "<" nil t)) - (goto-char (point-min)) - (while (search-forward ">" nil t) (replace-match ">" nil t)) - ) - ) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/format b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/format deleted file mode 100644 index 993ac1d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/format +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: format -# -- -(format "$0" $1) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/forward-char b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/forward-char deleted file mode 100644 index c1aa8a0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/forward-char +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: forward-char -# key: forward-char -# uuid: forward-char -# key: fc -# -- -(forward-char $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/forward-line b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/forward-line deleted file mode 100644 index 79d91ca..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/forward-line +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: forward-line -# key: forward-line -# uuid: forward-line -# key: fl -# -- -(forward-line $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/funcall b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/funcall deleted file mode 100644 index df30971..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/funcall +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: funcall -# key: funcall -# uuid: funcall -# -- -(funcall $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/function b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/function deleted file mode 100644 index db9565a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/function +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: function -# -- -(function $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/get b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/get deleted file mode 100644 index 1fa0a11..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/get +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: get -# key: get -# uuid: get -# -- -(get SYMBOL$0 PROPNAME) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/global-set-key b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/global-set-key deleted file mode 100644 index 0c9f70e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/global-set-key +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: global-set-key -# key: global-set-key -# uuid: global-set-key -# key: gsk -# -- -(global-set-key (kbd "C-$0") 'COMMAND) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/goto-char b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/goto-char deleted file mode 100644 index 3eeec19..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/goto-char +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: goto-char -# -- -(goto-char $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/grabstring b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/grabstring deleted file mode 100644 index 95f52b6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/grabstring +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: grab buffer substring -# contributor: Xah Lee -# -- -(setq $0 (buffer-substring-no-properties myStartPos myEndPos)) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/grabthing b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/grabthing deleted file mode 100644 index de0cd3f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/grabthing +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: grab word under cursor -# contributor: Xah Lee -# -- -(setq $0 (thing-at-point 'symbol)) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/if-let b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/if-let deleted file mode 100644 index 18398b5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/if-let +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: if-let -# condition: (<= (doom-snippets-count-lines %) 1) -# -- -(if-let* (($1)) $0)`(doom-snippets-newline-or-eol)` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/if-let-2 b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/if-let-2 deleted file mode 100644 index 2adf3e7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/if-let-2 +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: if-let -# uuid: if-let-2 -# key: if-let -# condition: (> (doom-snippets-count-lines %) 1) -# -- -(if-let (($1)) $0 `(doom-snippets-format "%n%s")`)`(doom-snippets-newline-or-eol)` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/insert b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/insert deleted file mode 100644 index ea1a081..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/insert +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: insert -# key: insert -# uuid: insert -# key: i -# -- -(insert $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/insert-file-contents b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/insert-file-contents deleted file mode 100644 index 1fcc121..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/insert-file-contents +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: insert-file-contents -# key: insert-file-contents -# uuid: insert-file-contents -# key: ifc -# -- -(insert-file-contents $0 &optional VISIT BEG END REPLACE) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/int b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/int deleted file mode 100644 index 3413c41..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/int +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: interactive -# uuid: int -# -- -(interactive)$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/interactive b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/interactive deleted file mode 100644 index 916bc85..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/interactive +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: interactive -# -- -(interactive$1)$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/kbd b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/kbd deleted file mode 100644 index 50b26c0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/kbd +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: kbd -# -- -(kbd "${0:}") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/kill-buffer b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/kill-buffer deleted file mode 100644 index 27d0f44..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/kill-buffer +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: kill-buffer -# key: kill-buffer -# uuid: kill-buffer -# key: kb -# -- -(kill-buffer $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/lam b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/lam deleted file mode 100644 index 50cf6ff..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/lam +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Henrik Lissner (henrik.io) -# name: lambda shortcut -# key: lam -# uuid: lam -# -- -(λ! $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/length b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/length deleted file mode 100644 index 8f89a17..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/length +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: length -# -- -(length $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/line-beginning-position b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/line-beginning-position deleted file mode 100644 index d6f9bcc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/line-beginning-position +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: line-beginning-position -# key: line-beginning-position -# uuid: line-beginning-position -# key: lbp -# -- -(line-beginning-position) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/line-end-position b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/line-end-position deleted file mode 100644 index 986732b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/line-end-position +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: line-end-position -# key: line-end-position -# uuid: line-end-position -# key: lep -# -- -(line-end-position) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/list b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/list deleted file mode 100644 index b19d670..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/list +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: list -# -- -(list $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/looking-at b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/looking-at deleted file mode 100644 index 79d554a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/looking-at +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: looking-at -# -- -(looking-at $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-directory b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-directory deleted file mode 100644 index 6eec6ff..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-directory +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: make-directory -# key: make-directory -# uuid: make-directory -# key: md -# -- -(make-directory $0 &optional PARENTS) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-hash-table b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-hash-table deleted file mode 100644 index ee3a5e6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-hash-table +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: hash -# key: mht -# uuid: mht -# -- -(make-hash-table${1: :test '${2:equal}}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-local-variable b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-local-variable deleted file mode 100644 index fea5a14..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/make-local-variable +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: make-local-variable -# key: make-local-variable -# uuid: make-local-variable -# key: mlv -# -- -(make-local-variable $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/mapc b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/mapc deleted file mode 100644 index 4ea1bed..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/mapc +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: mapc -# -- -(mapc ${1:fn} ${0:list}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/mapcar b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/mapcar deleted file mode 100644 index f1ef8e9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/mapcar +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: mapcar -# -- -(mapcar ${1:fn} ${0:list}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-beginning b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-beginning deleted file mode 100644 index 6694bb7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-beginning +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: match-beginning -# key: match-beginning -# uuid: match-beginning -# key: mb -# -- -(match-beginning N$0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-end b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-end deleted file mode 100644 index 9fc2690..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-end +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: match-end -# key: match-end -# uuid: match-end -# key: me -# -- -(match-end N$0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-string b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-string deleted file mode 100644 index c64d45b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/match-string +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: match-string -# key: match-string -# uuid: match-string -# key: ms -# -- -(match-string $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/memq b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/memq deleted file mode 100644 index 33fbf30..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/memq +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: memq -# -- -(memq ${0:sym} ${1:list}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/message b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/message deleted file mode 100644 index 76f2650..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/message +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: message -# key: m -# uuid: m -# -- -(message "${1:}"$0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/minor_mode b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/minor_mode deleted file mode 100644 index 214a00c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/minor_mode +++ /dev/null @@ -1,21 +0,0 @@ -# -*- mode: snippet -*- -# name: minor_mode -# key: minor -# uuid: minor -# -- -(defvar ${1:mode}-modeline-indicator " ${2:INDICATOR}" - "call ($1-install-mode) again if this is changed") - -(defvar $1-mode nil) -(make-variable-buffer-local '$1-mode) -(put '$1-mode 'permanent-local t) - -(defun $1-mode (&optional arg) - "$0" - (interactive "P") - (setq $1-mode - (if (null arg) (not $1-mode) - (> (prefix-numeric-value arg) 0))) - (force-mode-line-update)) - -(provide '$1-mode) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/not b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/not deleted file mode 100644 index 78bec14..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/not +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: not -# -- -(not $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/nth b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/nth deleted file mode 100644 index b8b6351..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/nth +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: nth -# -- -(nth ${0:n} ${1:list}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/optional b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/optional deleted file mode 100644 index 006715b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/optional +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: &optional ... -# uuid: optional -# -- -&optional $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/or b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/or deleted file mode 100644 index e865ba5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/or +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: or -# -- -(or $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point deleted file mode 100644 index 55b6623..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: point -# key: pt -# -- -(point) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point-max b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point-max deleted file mode 100644 index 389a243..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point-max +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: point-max -# uuid: point-max -# key: pma -# -- -(point-max) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point-min b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point-min deleted file mode 100644 index 9bf5c5e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/point-min +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: point-min -# uuid: point-min -# key: pmi -# -- -(point-min) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/princ b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/princ deleted file mode 100644 index f0c308c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/princ +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: princ -# key: princ -# uuid: princ -# -- -(princ $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/print b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/print deleted file mode 100644 index 2649da8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/print +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: print -# key: print -# uuid: print -# -- -(print $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/provide b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/provide deleted file mode 100644 index 374effc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/provide +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: provide -# -- -(provide '`(file-name-base buffer-file-name)`) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/put b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/put deleted file mode 100644 index 0f8b96f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/put +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: put -# key: put -# uuid: put -# -- -(put $0 PROPNAME VALUE) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/re-search-backward b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/re-search-backward deleted file mode 100644 index eb3f210..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/re-search-backward +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: re-search-backward -# key: re-search-backward -# uuid: re-search-backward -# key: rsb -# -- -(re-search-backward REGEXP$0 &optional BOUND NOERROR COUNT) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/re-search-forward b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/re-search-forward deleted file mode 100644 index 970b23e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/re-search-forward +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: re-search-forward -# key: re-search-forward -# uuid: re-search-forward -# key: rsf -# -- -(re-search-forward REGEXP$0 &optional BOUND NOERROR COUNT) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-active-p b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-active-p deleted file mode 100644 index d696b97..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-active-p +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: region-active-p -# key: region-active-p -# uuid: region-active-p -# key: rap -# -- -(region-active-p) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-beginning b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-beginning deleted file mode 100644 index 8c06c3f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-beginning +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: region-beginning -# key: region-beginning -# uuid: region-beginning -# key: rb -# -- -(region-beginning) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-end b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-end deleted file mode 100644 index 1ab4f60..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/region-end +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: region-end -# key: region-end -# uuid: region-end -# key: re -# -- -(region-end) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/rename-file b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/rename-file deleted file mode 100644 index e61ee95..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/rename-file +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: rename-file -# key: rename-file -# uuid: rename-file -# key: rf -# -- -(rename-file FILE$0 NEWNAME &optional OK-IF-ALREADY-EXISTS) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/repeat b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/repeat deleted file mode 100644 index 754fd26..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/repeat +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: repeat -# key: repeat -# uuid: repeat -# -- -(repeat $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/replace-regexp b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/replace-regexp deleted file mode 100644 index b2a78aa..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/replace-regexp +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: replace-regexp -# key: replace-regexp -# uuid: replace-regexp -# key: rr -# -- -(replace-regexp REGEXP$0 TO-STRING &optional DELIMITED START END) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/replace-regexp-in-string b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/replace-regexp-in-string deleted file mode 100644 index 4648f3d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/replace-regexp-in-string +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: replace-regexp-in-string -# key: replace-regexp-in-string -# uuid: replace-regexp-in-string -# key: rris -# -- -(replace-regexp-in-string REGEXP$0 REP STRING &optional FIXEDCASE LITERAL SUBEXP START) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/require b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/require deleted file mode 100644 index eed355f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/require +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: require -# -- -(require '${1:package}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/rest b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/rest deleted file mode 100644 index af50300..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/rest +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: &rest ... -# -- -&rest $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/save-buffer b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/save-buffer deleted file mode 100644 index 0f7df36..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/save-buffer +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: save-buffer -# key: save-buffer -# uuid: save-buffer -# key: sb -# -- -(save-buffer $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-backward b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-backward deleted file mode 100644 index 9ef33cc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-backward +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: search-backward -# key: search-backward -# uuid: search-backward -# key: sb -# -- -(search-backward "$0" &optional BOUND NOERROR COUNT) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-backward-regexp b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-backward-regexp deleted file mode 100644 index 43f4bb1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-backward-regexp +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: search-backward-regexp -# key: search-backward-regexp -# uuid: search-backward-regexp -# key: sbr -# -- -(search-backward-regexp "$0" &optional BOUND NOERROR COUNT) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-forward b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-forward deleted file mode 100644 index cb20dd2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-forward +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: search-forward -# key: search-forward -# uuid: search-forward -# key: sf -# -- -(search-forward "$0" &optional BOUND NOERROR COUNT) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-forward-regexp b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-forward-regexp deleted file mode 100644 index e70e3cb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/search-forward-regexp +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: search-forward-regexp -# key: search-forward-regexp -# uuid: search-forward-regexp -# key: sfr -# -- -(search-forward-regexp "$0" &optional BOUND NOERROR COUNT) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set deleted file mode 100644 index c6f34aa..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: set -# key: set -# uuid: set -# -- -(set $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-buffer b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-buffer deleted file mode 100644 index b8692a9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-buffer +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: set-buffer -# key: set-buffer -# uuid: set-buffer -# key: sb -# -- -(set-buffer $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-file-modes b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-file-modes deleted file mode 100644 index bc3aa1e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-file-modes +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: set-file-modes -# key: set-file-modes -# uuid: set-file-modes -# key: sfm -# -- -(set-file-modes $0 MODE) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-mark b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-mark deleted file mode 100644 index 245cea9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/set-mark +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: set-mark -# key: set-mark -# uuid: set-mark -# key: sm -# -- -(set-mark $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/setq b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/setq deleted file mode 100644 index 8dcb8c4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/setq +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: setq -# -- -(setq ${1:var} ${0:}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/setq-default b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/setq-default deleted file mode 100644 index c69fe3a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/setq-default +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: setq-default -# key: setqd -# uuid: setqd -# -- -(setq-default ${1:} ${0:value}) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/skip-chars-backward b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/skip-chars-backward deleted file mode 100644 index c51cc5e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/skip-chars-backward +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: skip-chars-backward -# key: skip-chars-backward -# uuid: skip-chars-backward -# key: scb -# -- -(skip-chars-backward "$0" &optional LIM) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/skip-chars-forward b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/skip-chars-forward deleted file mode 100644 index e3a6b00..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/skip-chars-forward +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: skip-chars-forward -# key: skip-chars-forward -# uuid: skip-chars-forward -# key: scf -# -- -(skip-chars-forward "$0" &optional LIM) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/split-string b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/split-string deleted file mode 100644 index 9a59963..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/split-string +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: split-string -# key: split-string -# uuid: split-string -# key: ss -# -- -(split-string $0 &optional SEPARATORS OMIT-NULLS) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string deleted file mode 100644 index b102d6e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: string -# key: string -# uuid: string -# -- -(string $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-match b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-match deleted file mode 100644 index 67ae912..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-match +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: string-match -# -- -(string-match "${0:regexp}" ${1:string}${2: ${3:START}}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-match-p b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-match-p deleted file mode 100644 index d7ab230..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-match-p +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: string-match-p -# -- -(string-match-p "${0:regexp}" ${1:string}${2: ${3:START}}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-to-number b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-to-number deleted file mode 100644 index 3a108bd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string-to-number +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: string-to-number -# key: stn -# uuid: stn -# -- -(string-to-number "$0") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string= b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string= deleted file mode 100644 index c6d2743..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/string= +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: string= -# key: string= -# uuid: string= -# -- -(string= ${1:} ${2:str}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/stringp b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/stringp deleted file mode 100644 index 7827762..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/stringp +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: stringp -# key: stringp -# uuid: stringp -# -- -(stringp $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/substring b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/substring deleted file mode 100644 index 0df2462..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/substring +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: substring -# key: substring -# uuid: substring -# -- -(substring STRING$0 FROM &optional TO) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/thing-at-point b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/thing-at-point deleted file mode 100644 index eb0ef1b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/thing-at-point +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: thing-at-point -# key: thing-at-point -# uuid: thing-at-point -# key: tap -# -- -(thing-at-point '$0) ; symbol, list, sexp, defun, filename, url, email, word, sentence, whitespace, line, page ... \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/traverse_dir b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/traverse_dir deleted file mode 100644 index 1bf675f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/traverse_dir +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: traversing a directory -# contributor: Xah Lee -# -- -;; apply a function to all files in a dir -(require 'find-lisp) -(mapc 'my-process-file (find-lisp-find-files "~/myweb/" "\\.html$")) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/use-package b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/use-package deleted file mode 100644 index 3c1bbba..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/use-package +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: use-package -# key: up -# uuid: up -# -- -(use-package ${1:package} - :${2:config} - $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/vector b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/vector deleted file mode 100644 index af13f98..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/vector +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: vector -# key: vector -# uuid: vector -# key: v -# -- -(vector $0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/widget-get b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/widget-get deleted file mode 100644 index e74471a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/widget-get +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: widget-get -# key: widget-get -# uuid: widget-get -# key: wg -# -- -(widget-get $0 ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/word-or-region b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/word-or-region deleted file mode 100644 index e2cadda..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/word-or-region +++ /dev/null @@ -1,28 +0,0 @@ -# -*- mode: snippet -*- -# name: Command that works on region or word -# contributor: Xah Lee -# -- -;; example of a command that works on current word or text selection -(defun down-case-word-or-region () - "Lower case the current word or text selection." -(interactive) -(let (pos1 pos2 meat) - (if (and transient-mark-mode mark-active) - (setq pos1 (region-beginning) - pos2 (region-end)) - (setq pos1 (car (bounds-of-thing-at-point 'symbol)) - pos2 (cdr (bounds-of-thing-at-point 'symbol)))) - - ; now, pos1 and pos2 are the starting and ending positions - ; of the current word, or current text selection if exists - - ;; put your code here. - $0 - ;; Some example of things you might want to do - (downcase-region pos1 pos2) ; example of a func that takes region as args - (setq meat (buffer-substring-no-properties pos1 pos2)) ; grab the text. - (delete-region pos1 pos2) ; get rid of it - (insert "newText") ; insert your new text - - ) -) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/word_regexp b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/word_regexp deleted file mode 100644 index c94419d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/word_regexp +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: word_regexp -# key: < -# uuid: < -# -- -"\\_<${1:word}\\_>" \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-dired.process_marked b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-dired.process_marked deleted file mode 100644 index 81becbd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-dired.process_marked +++ /dev/null @@ -1,19 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: process marked files in dired -# key: x-dired -# uuid: x-dired -# -- -;; idiom for processing a list of files in dired's marked files - -;; suppose myProcessFile is your function that takes a file path -;; and do some processing on the file - -(defun dired-myProcessFile () - "apply myProcessFile function to marked files in dired." - (interactive) - (require 'dired) - (mapc 'myProcessFile (dired-get-marked-files)) -) - -;; to use it, type M-x dired-myProcessFile \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-file.process b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-file.process deleted file mode 100644 index ec6870a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-file.process +++ /dev/null @@ -1,20 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: a function that process a file -# key: x-file -# uuid: x-file -# -- -(defun doThisFile (fpath) - "Process the file at path FPATH ..." - (let () - ;; create temp buffer without undo record or font lock. (more efficient) - ;; first space in temp buff name is necessary - (set-buffer (get-buffer-create " myTemp")) - (insert-file-contents fpath nil nil nil t) - - ;; process it ... - ;; (goto-char 0) ; move to begining of file's content (in case it was open) - ;; ... do something here - ;; (write-file fpath) ;; write back to the file - - (kill-buffer " myTemp"))) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-file.read-lines b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-file.read-lines deleted file mode 100644 index 0b034a1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-file.read-lines +++ /dev/null @@ -1,20 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: read lines of a file -# key: x-file -# uuid: x-file -# -- -(defun read-lines (filePath) - "Return a list of lines in FILEPATH." - (with-temp-buffer - (insert-file-contents filePath) - (split-string - (buffer-string) "\n" t)) ) - -;; process all lines -(mapc - (lambda (aLine) - (message aLine) ; do your stuff here - ) - (read-lines "inputFilePath") -) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-find-replace b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-find-replace deleted file mode 100644 index 8aadfc9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-find-replace +++ /dev/null @@ -1,20 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: find and replace on region -# key: x-find-replace -# uuid: x-find-replace -# -- -(defun replace-html-chars-region (start end) - "Replace “<” to “<” and other chars in HTML. -This works on the current region." - (interactive "r") - (save-restriction - (narrow-to-region start end) - (goto-char (point-min)) - (while (search-forward "&" nil t) (replace-match "&" nil t)) - (goto-char (point-min)) - (while (search-forward "<" nil t) (replace-match "<" nil t)) - (goto-char (point-min)) - (while (search-forward ">" nil t) (replace-match ">" nil t)) - ) - ) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-grabstring b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-grabstring deleted file mode 100644 index 4a5c008..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-grabstring +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: grab buffer substring -# key: x-grabstring -# uuid: x-grabstring -# -- -(setq $0 (buffer-substring-no-properties myStartPos myEndPos)) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-grabthing b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-grabthing deleted file mode 100644 index f59a37d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-grabthing +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: grab word under cursor -# key: x-grabthing -# uuid: x-grabthing -# -- -(setq $0 (thing-at-point 'symbol)) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-traverse_dir b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-traverse_dir deleted file mode 100644 index 57c487d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-traverse_dir +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: traversing a directory -# contributor: Xah Lee (XahLee.org) -# key: x-traverse_dir -# uuid: x-traverse_dir -# -- -;; apply a function to all files in a dir -(require 'find-lisp) -(mapc 'my-process-file (find-lisp-find-files "~/myweb/" "\\.html$")) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-word-or-region b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-word-or-region deleted file mode 100644 index 846c59f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/x-word-or-region +++ /dev/null @@ -1,30 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Xah Lee (XahLee.org) -# name: Command that works on region or word -# key: x-word-or-region -# uuid: x-word-or-region -# -- -;; example of a command that works on current word or text selection -(defun down-case-word-or-region () - "Lower case the current word or text selection." -(interactive) -(let (pos1 pos2 meat) - (if (and transient-mark-mode mark-active) - (setq pos1 (region-beginning) - pos2 (region-end)) - (setq pos1 (car (bounds-of-thing-at-point 'symbol)) - pos2 (cdr (bounds-of-thing-at-point 'symbol)))) - - ; now, pos1 and pos2 are the starting and ending positions - ; of the current word, or current text selection if exists - - ;; put your code here. - $0 - ;; Some example of things you might want to do - (downcase-region pos1 pos2) ; example of a func that takes region as args - (setq meat (buffer-substring-no-properties pos1 pos2)) ; grab the text. - (delete-region pos1 pos2) ; get rid of it - (insert "newText") ; insert your new text - - ) -) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/y-or-n-p b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/y-or-n-p deleted file mode 100644 index c47d287..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/y-or-n-p +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: y-or-n-p -# key: yn -# -- -(y-or-n-p "$1") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/yes-or-no-p b/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/yes-or-no-p deleted file mode 100644 index fb2b64b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/emacs-lisp-mode/yes-or-no-p +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: y-or-n-p -# key: yesno -# -- -(yes-or-no-p "$1") \ No newline at end of file -- cgit v1.2.3-13-gbd6f From 750722d463978eebff1b0037e1bc230c6e60397d Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 12:44:48 +0530 Subject: (Emacs/yasnippet)~C++ snippets have been pruned and edited --- .../emacs/.config/yasnippet/snippets/c++-mode/accumulate | 5 ----- .../yasnippet/snippets/c++-mode/accumulate-with-closure | 7 ------- .../.config/yasnippet/snippets/c++-mode/adjacent_find | 8 -------- .../emacs/.config/yasnippet/snippets/c++-mode/all_of | 9 --------- .../emacs/.config/yasnippet/snippets/c++-mode/any_of | 9 --------- .../emacs/.config/yasnippet/snippets/c++-mode/assert | 4 ---- .../.config/emacs/.config/yasnippet/snippets/c++-mode/bend | 2 +- .../.config/yasnippet/snippets/c++-mode/boost_require | 8 -------- .../emacs/.config/yasnippet/snippets/c++-mode/class | 8 -------- .../emacs/.config/yasnippet/snippets/c++-mode/const_[] | 9 --------- .../emacs/.config/yasnippet/snippets/c++-mode/constructor | 8 -------- .../.config/emacs/.config/yasnippet/snippets/c++-mode/copy | 2 +- .../.config/yasnippet/snippets/c++-mode/copy_backward | 5 ----- .../emacs/.config/yasnippet/snippets/c++-mode/copy_if | 8 ++++---- .../emacs/.config/yasnippet/snippets/c++-mode/copy_n | 4 ++-- .../.config/yasnippet/snippets/c++-mode/copy_ostream_iter | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/count | 2 +- .../emacs/.config/yasnippet/snippets/c++-mode/count_if | 6 +++--- .../.config/emacs/.config/yasnippet/snippets/c++-mode/cstd | 6 ------ .../.config/emacs/.config/yasnippet/snippets/c++-mode/d+= | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/d_operator | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/d_operator[] | 6 ------ .../.config/yasnippet/snippets/c++-mode/d_operator[]_const | 6 ------ .../.config/yasnippet/snippets/c++-mode/d_operator_istream | 5 ----- .../.config/yasnippet/snippets/c++-mode/d_operator_ostream | 5 ----- .../emacs/.config/yasnippet/snippets/c++-mode/delete | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/delete[] | 6 ------ .../.config/yasnippet/snippets/c++-mode/dynamic_casting | 6 ------ .../.config/emacs/.config/yasnippet/snippets/c++-mode/enum | 5 ----- .../emacs/.config/yasnippet/snippets/c++-mode/equal | 4 +--- .../emacs/.config/yasnippet/snippets/c++-mode/erase | 5 ----- .../yasnippet/snippets/c++-mode/erase_find_last_not_of | 5 ----- .../.config/emacs/.config/yasnippet/snippets/c++-mode/fill | 4 ++-- .../emacs/.config/yasnippet/snippets/c++-mode/fill_n | 4 ++-- .../.config/emacs/.config/yasnippet/snippets/c++-mode/fin | 11 ----------- .../.config/emacs/.config/yasnippet/snippets/c++-mode/find | 7 ++----- .../emacs/.config/yasnippet/snippets/c++-mode/find_end | 11 ----------- .../.config/yasnippet/snippets/c++-mode/find_first_of | 13 +++++-------- .../emacs/.config/yasnippet/snippets/c++-mode/find_if | 11 ++++------- .../emacs/.config/yasnippet/snippets/c++-mode/find_if_not | 7 +++++++ .../emacs/.config/yasnippet/snippets/c++-mode/fixture | 10 ---------- .../emacs/.config/yasnippet/snippets/c++-mode/for_each | 8 ++++---- .../emacs/.config/yasnippet/snippets/c++-mode/for_element | 7 +++++++ .../emacs/.config/yasnippet/snippets/c++-mode/for_iter | 2 +- .../emacs/.config/yasnippet/snippets/c++-mode/friend | 6 ------ .../.config/yasnippet/snippets/c++-mode/fun_declaration | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/function | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/generate | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/generate_n | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/gtest | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/ignore | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/include | 5 ----- .../.config/yasnippet/snippets/c++-mode/include_iostream | 6 ------ .../.config/yasnippet/snippets/c++-mode/include_sstream | 6 ------ .../.config/yasnippet/snippets/c++-mode/include_string | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/inline | 6 ------ .../.config/emacs/.config/yasnippet/snippets/c++-mode/iota | 4 ++-- .../emacs/.config/yasnippet/snippets/c++-mode/is_heap | 7 ------- .../.config/yasnippet/snippets/c++-mode/is_heap_until | 8 -------- .../.config/yasnippet/snippets/c++-mode/is_partitioned | 9 --------- .../.config/yasnippet/snippets/c++-mode/is_permutation | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/is_sorted | 6 ++---- .../.config/yasnippet/snippets/c++-mode/is_sorted_until | 8 -------- .../emacs/.config/yasnippet/snippets/c++-mode/iterator | 2 +- .../emacs/.config/yasnippet/snippets/c++-mode/lambda | 2 +- .../yasnippet/snippets/c++-mode/lexigraphical_compare | 6 ++---- .../emacs/.config/yasnippet/snippets/c++-mode/make_heap | 5 ----- .../.config/emacs/.config/yasnippet/snippets/c++-mode/map | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/max_element | 4 ++-- .../.config/yasnippet/snippets/c++-mode/member_function | 8 -------- .../emacs/.config/yasnippet/snippets/c++-mode/merge | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/min_element | 4 ++-- .../.config/yasnippet/snippets/c++-mode/minmax_element | 4 ++-- .../emacs/.config/yasnippet/snippets/c++-mode/mismatch | 10 ---------- .../emacs/.config/yasnippet/snippets/c++-mode/module | 9 --------- .../.config/yasnippet/snippets/c++-mode/move_backward | 5 ----- .../emacs/.config/yasnippet/snippets/c++-mode/namespace | 6 ------ .../.config/yasnippet/snippets/c++-mode/namespace_block | 7 ------- .../.config/yasnippet/snippets/c++-mode/next_permutation | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/none_of | 10 ++++------ .../emacs/.config/yasnippet/snippets/c++-mode/nth_element | 5 ----- .../emacs/.config/yasnippet/snippets/c++-mode/operator!= | 9 --------- .../emacs/.config/yasnippet/snippets/c++-mode/operator+ | 12 ------------ .../emacs/.config/yasnippet/snippets/c++-mode/operator+= | 11 ----------- .../emacs/.config/yasnippet/snippets/c++-mode/operator= | 14 -------------- .../emacs/.config/yasnippet/snippets/c++-mode/operator== | 9 --------- .../emacs/.config/yasnippet/snippets/c++-mode/operator[] | 10 ---------- .../.config/yasnippet/snippets/c++-mode/operator_istream | 5 +++-- .../.config/yasnippet/snippets/c++-mode/operator_ostream | 6 +++--- .../emacs/.config/yasnippet/snippets/c++-mode/ostream | 6 ------ .../.config/emacs/.config/yasnippet/snippets/c++-mode/pack | 10 ---------- .../emacs/.config/yasnippet/snippets/c++-mode/partial_sort | 5 ----- .../.config/yasnippet/snippets/c++-mode/partial_sort_copy | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/partition | 10 ---------- .../.config/yasnippet/snippets/c++-mode/partition_copy | 6 ------ .../.config/yasnippet/snippets/c++-mode/partition_point | 10 ---------- .../.config/yasnippet/snippets/c++-mode/prev_permutation | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/private | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/protected | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/public | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/push_heap | 5 ----- .../.config/yasnippet/snippets/c++-mode/random_shuffle | 2 +- .../emacs/.config/yasnippet/snippets/c++-mode/remove | 7 ++----- .../emacs/.config/yasnippet/snippets/c++-mode/remove_copy | 6 +++--- .../.config/yasnippet/snippets/c++-mode/remove_copy_if | 10 +++++----- .../emacs/.config/yasnippet/snippets/c++-mode/remove_if | 11 ++++------- .../emacs/.config/yasnippet/snippets/c++-mode/replace | 4 ++-- .../emacs/.config/yasnippet/snippets/c++-mode/replace_copy | 4 ++-- .../.config/yasnippet/snippets/c++-mode/replace_copy_if | 13 +++++++------ .../emacs/.config/yasnippet/snippets/c++-mode/replace_if | 12 ++++++------ .../emacs/.config/yasnippet/snippets/c++-mode/reverse | 4 ++-- .../emacs/.config/yasnippet/snippets/c++-mode/rotate | 4 ++-- .../emacs/.config/yasnippet/snippets/c++-mode/rotate_copy | 5 ----- .../emacs/.config/yasnippet/snippets/c++-mode/search | 8 ++------ .../emacs/.config/yasnippet/snippets/c++-mode/search_n | 7 ++----- .../.config/emacs/.config/yasnippet/snippets/c++-mode/sort | 2 +- .../emacs/.config/yasnippet/snippets/c++-mode/sort_heap | 2 +- .../.config/yasnippet/snippets/c++-mode/stable_partition | 11 ++++------- .../emacs/.config/yasnippet/snippets/c++-mode/stable_sort | 2 +- .../.config/emacs/.config/yasnippet/snippets/c++-mode/std | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/std_colon | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/swap_ranges | 4 ++-- .../emacs/.config/yasnippet/snippets/c++-mode/template | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/test-case | 10 ---------- .../emacs/.config/yasnippet/snippets/c++-mode/test_main | 10 ---------- .../emacs/.config/yasnippet/snippets/c++-mode/test_suite | 11 ----------- .../.config/emacs/.config/yasnippet/snippets/c++-mode/this | 4 ---- .../emacs/.config/yasnippet/snippets/c++-mode/throw | 6 ------ .../emacs/.config/yasnippet/snippets/c++-mode/transform | 11 +++++------ .../yasnippet/snippets/c++-mode/transform-with-closure | 7 ------- .../yasnippet/snippets/c++-mode/transform_lowercase | 7 ------- .../emacs/.config/yasnippet/snippets/c++-mode/trim_left | 5 ----- .../.config/emacs/.config/yasnippet/snippets/c++-mode/tryw | 10 ---------- .../emacs/.config/yasnippet/snippets/c++-mode/unique | 4 ++-- .../emacs/.config/yasnippet/snippets/c++-mode/unique_copy | 5 ++--- .../emacs/.config/yasnippet/snippets/c++-mode/using | 6 ------ 136 files changed, 129 insertions(+), 775 deletions(-) delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate-with-closure delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/adjacent_find delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/all_of delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/any_of delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/assert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/boost_require delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/const_[] delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/constructor delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_backward delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_ostream_iter delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/cstd delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d+= delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator[] delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator[]_const delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator_istream delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator_ostream delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete[] delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dynamic_casting delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/erase delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/erase_find_last_not_of delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fin delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_end create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_if_not delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fixture create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_element delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/friend delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fun_declaration delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/function delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/generate delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/generate_n delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/gtest delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/ignore delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_iostream delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_sstream delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_string delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/inline delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_heap delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_heap_until delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_partitioned delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_permutation delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_sorted_until delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/make_heap delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/map delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/member_function delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/merge delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/mismatch delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/module delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/move_backward delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/namespace delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/namespace_block delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/next_permutation delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/nth_element delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator!= delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator+ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator+= delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator= delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator== delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator[] delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/ostream delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/pack delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partial_sort delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partial_sort_copy delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition_copy delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition_point delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/prev_permutation delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/private delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/protected delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/public delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/push_heap delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/rotate_copy delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/std delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/std_colon delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/template delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test-case delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test_main delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test_suite delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/this delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/throw delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform-with-closure delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform_lowercase delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/trim_left delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/tryw delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/using (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate deleted file mode 100644 index 496b75c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: accumulate -# key: acm -# -- -auto sum = std::accumulate(std::begin(${1:container}), std::end($1), 0); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate-with-closure b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate-with-closure deleted file mode 100644 index f2fd2cd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate-with-closure +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: accumulate w/ closure -# key: acl -# -- -auto sum = std::accumulate(std::begin(${1:container}), std::end($1), 0, [](int total, $2) { - $3 -}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/adjacent_find b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/adjacent_find deleted file mode 100644 index fd4c436..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/adjacent_find +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: adjacent_find -# key: ajf -# -- -auto pos = std::adjacent_find(std::begin(${1:container}), std::end($1)); -if (pos != std::end($1)) { - $2 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/all_of b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/all_of deleted file mode 100644 index 299f837..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/all_of +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: all_of -# key: alo -# -- -if (std::all_of(std::begin(${1:container}), std::end($1), []($2) { - $3 -})) { - $4 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/any_of b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/any_of deleted file mode 100644 index 7c957f8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/any_of +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: any_of -# key: ano -# -- -if (std::any_of(std::begin(${1:container}), std::end($1), []($2) { - $3 -})) { - $4 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/assert b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/assert deleted file mode 100644 index a662dd8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/assert +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: assert -# -- -assert($0); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend index 7642355..e5cc387 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/bend @@ -3,4 +3,4 @@ # key: bend # uuid: beginend # -- -${1:v}.begin(), $1.end() \ No newline at end of file +${1:a}.begin(), $1.end() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/boost_require b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/boost_require deleted file mode 100644 index 7b05028..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/boost_require +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: boost_require -# key: req -# uuid: req -# group: boost -# -- -BOOST_REQUIRE( ${1:condition} ); -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class deleted file mode 100644 index 83ba750..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/class +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: class -# -- -class ${1:Name} { - public: - ${1:$(yas/substr yas-text "[^: ]*")}(); - ${2:virtual ~${1:$(yas/substr yas-text "[^: ]*")}();} -};$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/const_[] b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/const_[] deleted file mode 100644 index 57eed01..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/const_[] +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: const_[] -# key: c[ -# uuid: c[ -# -- -const ${1:Type}& operator[](${2:int index}) const -{ - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/constructor b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/constructor deleted file mode 100644 index f76454b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/constructor +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: constructor -# key: ct -# uuid: ct -# -- -${1:Class}::$1(${2:args}) ${3: : ${4:init}} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy index 18653db..490d344 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy @@ -2,4 +2,4 @@ # name: copy # key: copy # -- -std::copy(std::begin(${1:container}), std::end($1), std::begin($2)); \ No newline at end of file +std::copy(${1:std::begin(${2:a})}, ${3:std::end($2)}, ${4:std::begin(${5:b})}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_backward b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_backward deleted file mode 100644 index 74a986c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_backward +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: copy_backward -# key: cpb -# -- -std::copy_backward(std::begin(${1:container}), std::end($1), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if index f1cb633..05cdb6e 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_if @@ -2,7 +2,7 @@ # name: copy_if # key: copy_if # -- -std::copy_if(std::begin(${1:container}), std::end($1), std::begin($2), -[]($3) { - $4 -}); \ No newline at end of file +std::copy_if(std::begin(${1:a}), std::end($1), std::begin(${2:b}), +${3:[](${4:auto x}) { + ${5:return true;} +}}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_n b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_n index af2f225..281f094 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_n +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_n @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: copy_n -# key: cpn +# key: copy_n # -- -std::copy_n(std::begin(${1:container}), $2, std::end($1)); \ No newline at end of file +std::copy_n(std::begin(${1:a}), ${2:n}, std::begin(${3:b})); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_ostream_iter b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_ostream_iter deleted file mode 100644 index d836ecb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/copy_ostream_iter +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: copy -# key: oit -# -- -std::copy(std::begin(${1:container}), std::end($1), std::ostream_iterator<$2>{ -%\istd::cout, "$3" -}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count index d6ae58a..453fd11 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count @@ -2,4 +2,4 @@ # name: count # key: count # -- -auto n = std::count(std::begin(${1:container}), std::end($1), $2); \ No newline at end of file +std::count(std::begin(${1:a}), std::end($1), ${2:b}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count_if b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count_if index dccc852..6abbf9c 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count_if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/count_if @@ -2,6 +2,6 @@ # name: count_if # key: count_if # -- -auto n = std::count_if(std::begin(${1:container}), std::end($1), []($2) { - $3 -}); \ No newline at end of file +std::count_if(std::begin(${1:a}), std::end($1), ${2:[](${3:auto x}) { + ${4:return true;} +}}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/cstd b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/cstd deleted file mode 100644 index 44074c9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/cstd +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: cstd -# key: cstd -# uuid: cstd -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d+= b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d+= deleted file mode 100644 index e5c32c9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d+= +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: d+= -# key: d+= -# uuid: d+= -# -- -${1:MyClass}& operator+=(${2:const $1 &}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator deleted file mode 100644 index b92780d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: d_operator<< -# key: << -# uuid: << -# -- -friend std::ostream& operator<<(std::ostream&, const ${1:Class}&); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator[] b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator[] deleted file mode 100644 index a96be67..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator[] +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: d_operator[] -# key: [ -# uuid: [ -# -- -${1:Type}& operator[](${2:int index}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator[]_const b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator[]_const deleted file mode 100644 index 9c3a1ab..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator[]_const +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: d_operator[]_const -# key: c[ -# uuid: c[ -# -- -const ${1:Type}& operator[](${2:int index}) const; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator_istream b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator_istream deleted file mode 100644 index d38c0fc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator_istream +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: d_operator>> -# key: >> -# -- -friend std::istream& operator>>(std::istream&, const ${1:Name}&); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator_ostream b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator_ostream deleted file mode 100644 index d23f4d6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/d_operator_ostream +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: d_operator<< -# key: << -# -- -friend std::ostream& operator<<(std::ostream&, const ${1:Name}&); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete deleted file mode 100644 index 1a7d1fe..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: delete -# key: delete -# uuid: dl -# -- -delete ${1:pointer}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete[] b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete[] deleted file mode 100644 index eb85608..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/delete[] +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: delete[] -# key: dla -# uuid: dla -# -- -delete[] ${1:arr}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dynamic_casting b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dynamic_casting deleted file mode 100644 index a016c70..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/dynamic_casting +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: dynamic_casting -# key: cast -# uuid: cast -# -- -check_and_cast<${1:Type} *>(${2:msg}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum deleted file mode 100644 index 14032a0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/enum +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: enum -# key: enum -# -- -enum ${1:NAME} {$0}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal index 1317962..a46eeb2 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/equal @@ -2,6 +2,4 @@ # name: equal # key: equal # -- -if (std::equal(std::begin(${1:container}), std::end($1), std::begin($2))) { - $3 -} \ No newline at end of file +std::equal(std::begin(${1:a}), std::end($1), std::begin(${2:b})) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/erase b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/erase deleted file mode 100644 index 4ab6679..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/erase +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: remove -# key: erm -# -- -${1:container}.erase(std::remove(std::begin($1), std::end($1), $2), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/erase_find_last_not_of b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/erase_find_last_not_of deleted file mode 100644 index d2cf0b1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/erase_find_last_not_of +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: generate_n -# key: erf -# -- -${1:container}.erase($1.find_last_not_of(" \t\n\r") + 1); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fill b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fill index 99130c9..e5e6923 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fill +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fill @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: fill -# key: fil +# key: fill # -- -std::fill(std::begin(${1:container}), std::end($1), $2); \ No newline at end of file +std::fill(std::begin(${1:a}), std::end($1), ${2:n}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fill_n b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fill_n index 5c6b04a..f48a218 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fill_n +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fill_n @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: fill_n -# key: fln +# key: fill_n # -- -std::fill_n(std::begin(${1:container}), $2, $3); \ No newline at end of file +std::fill_n(std::begin(${1:v}), ${2:a}, ${3:n}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fin b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fin deleted file mode 100644 index 41eaf6c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fin +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: find_if_not -# key: fin -# -- -auto pos = std::find_if_not(std::begin(${1:container}), std::end($1),[]($2) { - $3 -}); -if (pos != std::end($1)) { - $4 -} -$0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find index f45093b..c4f16e1 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find @@ -1,8 +1,5 @@ # -*- mode: snippet -*- # name: find -# key: fnd +# key: find # -- -auto pos = std::find(std::begin(${1:container}), std::end($1), $2); -if (pos != std::end($1)) { - $3 -} \ No newline at end of file +std::find(std::begin(${1:v}), std::end$(1), ${2:a}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_end b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_end deleted file mode 100644 index 2eca444..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_end +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: find_end -# key: fne -# -- -auto pos = std::find_std::end( - std::begin(${1:container}), std::end($1), - std::begin($2), std::end($3) -); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_first_of b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_first_of index 8217cc1..6d845f4 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_first_of +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_first_of @@ -1,11 +1,8 @@ # -*- mode: snippet -*- # name: find_first_of -# key: ffo +# key: find_first_of # -- -auto pos = std::find_first_of( - std::begin(${1:container}), std::end($1), - std::begin($2), std::end($3) -); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file +std::find_first_of( + std::begin(${1:a}), std::end($1), + std::begin(${2:b}), std::end($2) +); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_if b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_if index 1c02a0b..985aa0d 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_if @@ -1,10 +1,7 @@ # -*- mode: snippet -*- # name: find_if -# key: fni +# key: find_if # -- -auto pos = std::find_if(std::begin(${1:container}), std::end($1), []($2) { - $3 -}); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file +std::find_if(std::begin(${1:v}), std::end($1), ${2:[](${3:auto x}) { + ${4:return true;} +}}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_if_not b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_if_not new file mode 100644 index 0000000..b1d32f4 --- /dev/null +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/find_if_not @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: find_if_not +# key: find_if_not +# -- +std::find_if_not(std::begin(${1:v}), std::end($1), ${2:[](${3:auto x}) { + ${4:return true;} +}}); diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fixture b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fixture deleted file mode 100644 index f628b95..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fixture +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: fixture -# key: fixt -# uuid: fixt -# -- -BOOST_FIXTURE_TEST_SUITE( ${1:name}, ${2:Fixture} ) - -$0 - -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_each b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_each index de1fbbb..22f9fb0 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_each +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_each @@ -1,7 +1,7 @@ # -*- mode: snippet -*- # name: for_each -# key: fre +# key: for_each # -- -std::for_each(std::begin(${1:container}), std::end($1), []($2) { - $3 -}); \ No newline at end of file +std::for_each(std::begin(${1:container}), std::end($1), ${2:[](${3:auto x}) { + ${4:(void) x;} +}}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_element b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_element new file mode 100644 index 0000000..9295e64 --- /dev/null +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_element @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: for_element +# key: fore +# -- +for (${1:const auto &x} : ${2:u}) { + $0 +} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_iter b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_iter index 2e76242..3199fea 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_iter +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/for_iter @@ -3,6 +3,6 @@ # key: fori # uuid: fori # -- -for (${1:iter}=${2:var}.begin(); $1!=$2.end(); ++$1) { +for (auto ${1:iter} = std::begin(${2:var}); $1 != std::end($2); ++$1) { $0 } \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/friend b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/friend deleted file mode 100644 index df0c024..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/friend +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: friend -# key: fr -# uuid: fr -# -- -friend $0; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fun_declaration b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fun_declaration deleted file mode 100644 index 795365c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/fun_declaration +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: fun_declaration -# key: f -# uuid: f -# -- -${1:void} ${2:name}($3)$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/function b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/function deleted file mode 100644 index 52d0402..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/function +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: function -# -- -${1:void} ${2:Class}::${3:name}($4)${5: const} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/generate b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/generate deleted file mode 100644 index 73d65a9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/generate +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: generate -# key: gnr -# -- -std::generate(std::begin(${1:container}), std::end($1), []($2) { - $3 -}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/generate_n b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/generate_n deleted file mode 100644 index 8084b14..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/generate_n +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: generate_n -# key: gnn -# -- -std::generate_n(std::begin(${1:container}), $2, []($3) { - $4 -}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/gtest b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/gtest deleted file mode 100644 index 4cc61a8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/gtest +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: gtest -# key: gtest -# uuid: gtest -# group: testing -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/ignore b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/ignore deleted file mode 100644 index 3a3c610..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/ignore +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: ignore -# key: ignore -# uuid: ignore -# -- -${1:std::}cin.ignore(std::numeric_limits::max(), '\n'); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include deleted file mode 100644 index c4f4d44..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: #include -# key: inc -# -- -#include <${1:lib}> \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_iostream b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_iostream deleted file mode 100644 index b1ba34c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_iostream +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: #include -# key: iio -# uuid: iio -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_sstream b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_sstream deleted file mode 100644 index bd97bcb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_sstream +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: #include -# key: iss -# uuid: iss -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_string b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_string deleted file mode 100644 index 686660a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/include_string +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: #include -# key: istr -# uuid: istr -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/inline b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/inline deleted file mode 100644 index e545492..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/inline +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: inline -# key: il -# uuid: il -# -- -inline $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/iota b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/iota index 2690ac4..742dbb7 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/iota +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/iota @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: iota -# key: ita +# key: iota # -- -std::iota(std::begin(${1:container}), std::end($1), $2); \ No newline at end of file +std::iota(std::begin(${1:v}), std::end($1), ${2:n}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_heap b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_heap deleted file mode 100644 index 24048b2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_heap +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: is_heap -# key: ihp -# -- -if (std::is_heap(std::begin(${1:container}), std::end($1))) { - $2 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_heap_until b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_heap_until deleted file mode 100644 index 99bf8f0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_heap_until +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: is_heap_until -# key: ihu -# -- -auto pos = std::is_heap_until(std::begin(${1:container}), std::end($1)); -if (pos != std::end($1)) { - $2 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_partitioned b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_partitioned deleted file mode 100644 index 48877b5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_partitioned +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: is_partitioned -# key: ipt -# -- -if (std::is_partitioned(std::begin(${1:container}), std::end($1), []($2) { - $3 -})) { - $4 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_permutation b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_permutation deleted file mode 100644 index eee5ba3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_permutation +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: is_permutation -# key: ipr -# -- -if (std::is_permutation(std::begin(${1:container}), std::end($1), std::begin($2))) { - $3 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_sorted b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_sorted index ddc3a96..46de96d 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_sorted +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_sorted @@ -1,7 +1,5 @@ # -*- mode: snippet -*- # name: is_sorted -# key: iss +# key: is_sorted # -- -if (std::is_sorted(std::begin(${1:container}), std::end($1))) { - $2 -} \ No newline at end of file +std::is_sorted(std::begin(${1:v}), std::end($1)) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_sorted_until b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_sorted_until deleted file mode 100644 index 9eb6699..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/is_sorted_until +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: is_sorted_until -# key: isu -# -- -auto pos = std::is_sorted_until(std::begin(${1:container}), std::end($1)); -if (pos != std::end($1)) { - $2 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/iterator b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/iterator index fe2b5cd..85c812d 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/iterator +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/iterator @@ -3,4 +3,4 @@ # key: iter # uuid: iter # -- -${1:std::}${2:vector}::iterator ${3:iter}; +${1:std::vector}::iterator ${3:iter}; diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/lambda b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/lambda index aa72fa3..59fa225 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/lambda +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/lambda @@ -2,4 +2,4 @@ # name: lambda # key: lam # -- -[$1]($2) { `(!%!)`$3 } \ No newline at end of file +[$1]($2) { $0 } \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/lexigraphical_compare b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/lexigraphical_compare index 2d6dd06..f6c19d6 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/lexigraphical_compare +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/lexigraphical_compare @@ -1,7 +1,5 @@ # -*- mode: snippet -*- # name: lexigraphical_compare -# key: lxc +# key: lexigraphical_compare # -- -if (std::lexigraphical_compare(std::begin(${1:container}), std::end($1), std::begin($2), std::end($3))) { - $4 -} \ No newline at end of file +std::lexigraphical_compare(std::begin(${1:a}), std::end($1), std::begin(${2:b}), std::end($2)) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/make_heap b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/make_heap deleted file mode 100644 index 6640b0e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/make_heap +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: make_heap -# key: mkh -# -- -std::make_heap(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/map b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/map deleted file mode 100644 index ff349e1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/map +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: map -# key: map -# uuid: map -# -- -std::map<${1:type1}$0> ${2:var}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/max_element b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/max_element index 4a29080..2cd3721 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/max_element +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/max_element @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: max_element -# key: mxe +# key: max_element # -- -auto pos = std::max_element(std::begin(${1:container}), std::end($1)); \ No newline at end of file +std::max_element(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/member_function b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/member_function deleted file mode 100644 index ccc03fd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/member_function +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: member_function -# key: mf -# -- -${1:type} ${2:Name}::${3:name}(${4:args})${5: const} -{ - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/merge b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/merge deleted file mode 100644 index c4753a2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/merge +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: merge -# key: mrg -# -- -std::merge(std::begin(${1:container}), std::end($1), -std::begin($2), std::end($3), std::begin($4)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/min_element b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/min_element index e85d6f2..39fcfc6 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/min_element +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/min_element @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: min_element -# key: mne +# key: min_element # -- -auto pos = std::min_element(std::begin(${1:container}), std::end($1)); \ No newline at end of file +std::min_element(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/minmax_element b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/minmax_element index b80f63b..4c36571 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/minmax_element +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/minmax_element @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: minmax_element -# key: mme +# key: minmax_element # -- -auto minmax = std::minmax_element(std::begin(${1:container}), std::end($1)); \ No newline at end of file +std::minmax_element(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/mismatch b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/mismatch deleted file mode 100644 index 243ee0f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/mismatch +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: mismatch -# key: msm -# -- -auto values = std::mismatch(std::begin(${1:container}), std::end($1), std::begin($1)); -if (values.first == std::end($1)) { - $2 -} else { - $3 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/module b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/module deleted file mode 100644 index c203632..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/module +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: module -# key: mod -# uuid: mod -# -- -class ${1:Class} : public cSimpleModule -{ - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/move_backward b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/move_backward deleted file mode 100644 index 62e7849..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/move_backward +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: move_backward -# key: mpb -# -- -std::move_backward(std::begin(${1:container}), std::end($1), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/namespace b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/namespace deleted file mode 100644 index e4afdb0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/namespace +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name : namespace ... -# key: ns -# uuid: ns -# -- -namespace ${1:name} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/namespace_block b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/namespace_block deleted file mode 100644 index 839ef70..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/namespace_block +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: namespace -# key: nss -# -- -namespace ${1:name} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/next_permutation b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/next_permutation deleted file mode 100644 index 78b468a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/next_permutation +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: next_permutation -# key: nxp -# -- -if (std::next_permutation(std::begin(${1:container}), std::end($1))) { - $2 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/none_of b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/none_of index 88a716d..eb9b23e 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/none_of +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/none_of @@ -1,9 +1,7 @@ # -*- mode: snippet -*- # name: none_of -# key: nno +# key: none_of # -- -if (std::none_of(std::begin(${1:container}), std::end($1), []($2) { - $3 -})) { - $4 -} \ No newline at end of file +std::none_of(std::begin(${1:container}), std::end($1), ${2:[](${3:auto x}) { + ${4:return true;} +}}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/nth_element b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/nth_element deleted file mode 100644 index b0da080..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/nth_element +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: nth_element -# key: nth -# -- -std::nth_element(std::begin(${1:container}), std::end($1), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator!= b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator!= deleted file mode 100644 index 5cf876b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator!= +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: operator!= -# key: != -# uuid: != -# group: operator overloading -# -- -bool ${1:MyClass}::operator!=(const $1 &other) const { - return !(*this == other); -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator+ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator+ deleted file mode 100644 index 0d4d10c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator+ +++ /dev/null @@ -1,12 +0,0 @@ -# -*- mode: snippet -*- -# name: operator+ -# key: + -# uuid: + -# group: operator overloading -# -- -${1:MyClass} $1::operator+(const $1 &other) -{ - $1 result = *this; - result += other; - return result; -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator+= b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator+= deleted file mode 100644 index 643a65e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator+= +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: operator+= -# key: += -# uuid: += -# group: operator overloading -# -- -${1:MyClass}& $1::operator+=(${2:const $1 &rhs}) -{ - $0 - return *this; -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator= b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator= deleted file mode 100644 index 08f2e67..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator= +++ /dev/null @@ -1,14 +0,0 @@ -# -*- mode: snippet -*- -# name: operator= -# key: = -# uuid: = -# where this is a reference to myself -# group: operator overloading -# -- -${1:MyClass}& $1::operator=(const $1 &rhs) { - // Check for self-assignment! - if (this == &rhs) - return *this; - $0 - return *this; -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator== b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator== deleted file mode 100644 index 08f804e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator== +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: operator== -# key: == -# uuid: == -# group: operator overloading -# -- -bool ${1:MyClass}::operator==(const $1 &other) const { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator[] b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator[] deleted file mode 100644 index 9bfea7d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator[] +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: operator[] -# key: [] -# uuid: [] -# group: operator overloading -# -- -${1:Type}& operator[](${2:int index}) -{ - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator_istream b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator_istream index 9b4c8c2..73c3ff7 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator_istream +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator_istream @@ -1,10 +1,11 @@ # -*- mode: snippet -*- # name: operator>> -# key: >> +# key: operator>> # uuid: >> # group: operator overloading # -- istream& operator>>(istream& s, const ${1:type}& ${2:c}) { - $0 + $0 + return s; } diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator_ostream b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator_ostream index 9463e2c..ac28638 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator_ostream +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/operator_ostream @@ -1,11 +1,11 @@ # -*- mode: snippet -*- # name: operator<< -# key: << +# key: operator<< # uuid: << # group: operator overloading # -- std::ostream& operator<<(std::ostream& s, const ${1:type}& ${2:c}) { - $0 - return s; + $0 + return s; } \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/ostream b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/ostream deleted file mode 100644 index b0054f7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/ostream +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: ostream -# key: os -# uuid: os -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/pack b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/pack deleted file mode 100644 index c15b02e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/pack +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: pack -# key: pack -# uuid: pack -# -- -void cNetCommBuffer::pack(${1:type}) { - -} - -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partial_sort b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partial_sort deleted file mode 100644 index eafb136..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partial_sort +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: partial_sort -# key: pst -# -- -std::partial_sort(std::begin(${1:container}), std::end($1), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partial_sort_copy b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partial_sort_copy deleted file mode 100644 index be91ecd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partial_sort_copy +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: partial_sort_copy -# key: psc -# -- -std::partial_sort_copy(std::begin(${1:container}), std::end($1), - std::begin($2), std::end($3)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition deleted file mode 100644 index e381b28..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: partition -# key: ptn -# -- -auto pos = std::partition(std::begin(${1:container}), std::end($1), []($2) { - $3 -}); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition_copy b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition_copy deleted file mode 100644 index f74d0da..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition_copy +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: partition_copy -# key: ptc -# -- -std::partition_copy(std::begin(${1:container}), std::end($1), - std::begin($2), std::end($3)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition_point b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition_point deleted file mode 100644 index d890532..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/partition_point +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: partition_point -# key: ppt -# -- -auto pos = std::partition_point(std::begin(${1:container}), std::end($1), []($2) { - $3 -}); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/prev_permutation b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/prev_permutation deleted file mode 100644 index 9b202f6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/prev_permutation +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: prev_permutation -# key: prp -# -- -if (std::prev_permutation(std::begin(${1:container}), std::end($1))) { - $2 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/private b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/private deleted file mode 100644 index ddf50d7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/private +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: private -# expand-env: ((yas-also-auto-indent-first-line t)) -# -- -private: - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/protected b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/protected deleted file mode 100644 index 931eb2e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/protected +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: protected -# expand-env: ((yas-also-auto-indent-first-line t)) -# -- -protected: - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/public b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/public deleted file mode 100644 index 04b1afb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/public +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: public -# expand-env: ((yas-also-auto-indent-first-line t)) -# -- -public: - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/push_heap b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/push_heap deleted file mode 100644 index 281a847..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/push_heap +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: push_heap -# key: phh -# -- -std::push_heap(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/random_shuffle b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/random_shuffle index bbc078d..af7be45 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/random_shuffle +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/random_shuffle @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: random_shuffle -# key: shf +# key: random_shuffle # -- std::random_shuffle(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove index 3cbee04..10b0d10 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove @@ -1,8 +1,5 @@ # -*- mode: snippet -*- # name: remove -# key: rmv +# key: remove # -- -auto pos = std::remove(std::begin(${1:container}), std::end($1), $2); -if (pos != std::end($1)) { - $3 -} \ No newline at end of file +std::remove(std::begin(${1:v}), std::end($1), ${2:n}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_copy b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_copy index 3dbf85a..4312811 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_copy +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_copy @@ -1,6 +1,6 @@ # -*- mode: snippet -*- # name: remove_copy -# key: rmc +# key: remove_copy # -- -std::remove_copy(std::begin(${1:container}), std::end($1), - std::begin($1), $2); \ No newline at end of file +std::remove_copy(std::begin(${1:u}), std::end($1), + std::begin(${2:v}), ${3:n}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_copy_if b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_copy_if index cba8760..66be9b8 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_copy_if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_copy_if @@ -1,9 +1,9 @@ # -*- mode: snippet -*- # name: remove_copy_if -# key: rmf +# key: remove_copy_if # -- -std::remove_copy_if(std::begin(${1:container}), std::end($1), - std::begin($1), []($2) { - $3 - } +std::remove_copy_if(std::begin(${1:u}), ${2:std::end($1)}, + std::begin(${3:v}), ${4:[](${5:auto x}) { + ${6:return true;} + }} ); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_if b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_if index e12d0c8..b4f7814 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/remove_if @@ -1,10 +1,7 @@ # -*- mode: snippet -*- # name: remove_if -# key: rmi +# key: remove_if # -- -auto pos = std::remove_if(std::begin(${1:container}), std::end($1), []($2) { - $3 -}); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file +std::remove_if(std::begin(${1:u}), ${2:std::end($1)}, ${3:[](${4:auto x}) { + ${5:return true;} +}}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace index be2729e..c765530 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: replace -# key: rpl +# key: replace # -- -std::replace(std::begin(${1:container}), std::end($1), $2, $3); \ No newline at end of file +std::replace(std::begin(${1:container}), std::end($1), ${2:old}, ${3:new}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_copy b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_copy index a085f1d..67a0866 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_copy +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_copy @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: replace_copy -# key: rpc +# key: replace_copy # -- -std::replace_copy(std::begin(${1:container}), std::end($1), std::begin($1), $2, $3); \ No newline at end of file +std::replace_copy(std::begin(${1:u}), std::end($1), std::begin(${2:v}), ${3:old}, ${4:new}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_copy_if b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_copy_if index 4558e0d..709026d 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_copy_if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_copy_if @@ -1,12 +1,13 @@ # -*- mode: snippet -*- # name: replace_copy_if -# key: rci +# key: replace_copy_if # -- std::replace_copy_if( - std::begin(${1:container}), + std::begin(${1:u}), std::end($1), - std::begin($1), []($2) { - $3 - }, - $4 + std::begin(${2:v}), + ${3:[](${4:auto x}) { + ${5:return true;} + }}, + ${6:new} ); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_if b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_if index 9cc11d3..494238c 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/replace_if @@ -1,11 +1,11 @@ # -*- mode: snippet -*- # name: replace_if -# key: rpi +# key: replace_if # -- std::replace_if( - std::begin(${1:container}), - std::end($1), []($2) { - $3 - }, - $4 + std::begin(${1:v}), + std::end($1), ${2:[](${3:auto x}) { + ${4:return true;} + }}, + ${5:new} ); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/reverse b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/reverse index 8a64ca1..48c6105 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/reverse +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/reverse @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: reverse -# key: rvr +# key: reverse # -- -std::reverse(std::begin(${1:container}), std::end($1)); \ No newline at end of file +std::reverse(std::begin(${1:container}, std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/rotate b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/rotate index 1fb59ec..b2786ed 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/rotate +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/rotate @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: rotate -# key: rte +# key: rotate # -- -std::rotate(std::begin(${1:container}), std::begin($2), std::end($1)); \ No newline at end of file +std::rotate(std::begin(${1:u}), ${2:middle}, std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/rotate_copy b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/rotate_copy deleted file mode 100644 index 287fb07..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/rotate_copy +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: rotate_copy -# key: rtc -# -- -std::rotate_copy(std::begin(${1:container}), std::begin($2), std::end($1), std::begin($3)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/search b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/search index 580a29a..324b483 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/search +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/search @@ -1,9 +1,5 @@ # -*- mode: snippet -*- # name: search -# key: srh +# key: search # -- -auto pos = std::search(std::begin(${1:container}), std::end($1), - std::begin($2), std::end($3)); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file +std::search(std::begin(${1:u}), std::end($1), std::begin(${2:v}), std::end($2)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/search_n b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/search_n index 7f7f879..0b6338b 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/search_n +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/search_n @@ -1,8 +1,5 @@ # -*- mode: snippet -*- # name: search_n -# key: srn +# key: search_n # -- -auto pos = std::search_n(std::begin(${1:container}), std::end($1),$2,$3); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file +std::search_n(std::begin(${1:u}), std::end($1), ${2:size}, ${3:value}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/sort b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/sort index 4b88ee8..3574a79 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/sort +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/sort @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: sort -# key: srt +# key: sort # -- std::sort(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/sort_heap b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/sort_heap index c83c6a9..8516bd5 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/sort_heap +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/sort_heap @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: sort_heap -# key: sth +# key: sort_heap # -- std::sort_heap(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/stable_partition b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/stable_partition index 1c3b9f7..035c844 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/stable_partition +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/stable_partition @@ -1,10 +1,7 @@ # -*- mode: snippet -*- # name: stable_partition -# key: spt +# key: stable_partition # -- -auto pos = std::stable_partition(std::begin(${1:container}), std::end($1), []($2) { - $3 -}); -if (pos != std::end($1)) { - $4 -} \ No newline at end of file +std::stable_partition(std::begin(${1:u}), std::end($1), ${3:[](${4:auto x}) { + ${5:return true;} +}}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/stable_sort b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/stable_sort index 74cede9..7248aa8 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/stable_sort +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/stable_sort @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: stable_sort -# key: sts +# key: stable_sort # -- std::stable_sort(std::begin(${1:container}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/std b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/std deleted file mode 100644 index 5df8934..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/std +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: std -# key: std -# uuid: std -# -- -using namespace std; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/std_colon b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/std_colon deleted file mode 100644 index 950aa0e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/std_colon +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: std:: -# key: st -# uuid: st -# -- -std::$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/swap_ranges b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/swap_ranges index 9f2f4b5..17c60f3 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/swap_ranges +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/swap_ranges @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: swap_ranges -# key: swr +# key: swap_ranges # -- -std::swap_ranges(std::begin(${1:container}), std::end($1), std::begin($2)); \ No newline at end of file +std::swap_ranges(std::begin(${1:u}), std::end($1), std::begin(${2:v})); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/template b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/template deleted file mode 100644 index f40864d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/template +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: template -# key: temp -# uuid: temp -# -- -template<${1:$$(yas/choose-value '("typename" "class"))} ${2:T}> -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test-case b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test-case deleted file mode 100644 index 8af5260..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test-case +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: test case -# key: tc -# uuid: tc -# group: testing -# -- -BOOST_AUTO_TEST_CASE( ${1:test_case} ) -{ - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test_main b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test_main deleted file mode 100644 index c96e40d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test_main +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: test_main -# key: test_main -# uuid: test_main -# group: testing -# -- -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test_suite b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test_suite deleted file mode 100644 index dc6dda3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/test_suite +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: test_suite -# key: ts -# uuid: ts -# group: testing -# -- -BOOST_AUTO_TEST_SUITE( ${1:test_suite1} ) - -$0 - -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/this b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/this deleted file mode 100644 index 173cb26..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/this +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: this -# -- -this \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/throw b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/throw deleted file mode 100644 index d264dd7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/throw +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: throw -# key: throw -# uuid: throw -# -- -throw ${1:MyError}($0); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform index 12d4881..d3fb9ee 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform @@ -1,9 +1,8 @@ # -*- mode: snippet -*- # name: transform -# key: tfm +# key: transform # -- -std::transform(std::begin(${1:container}), std::end($1), - std::begin($1), []($2) { -$3% -}); -$0 +std::transform(std::begin(${1:u}), std::end($1), + std::begin(${2:$1}), ${3:[](${4:auto x}) { + ${5:return x;} +}}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform-with-closure b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform-with-closure deleted file mode 100644 index 51427c7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform-with-closure +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: transform -# key: upr -# -- -std::transform(std::begin(${1:container}), std::end($1), std::begin($1), [](char c) { - `(or (concat % "\n") "")`return std::toupper(c); -}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform_lowercase b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform_lowercase deleted file mode 100644 index 045c98b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/transform_lowercase +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: string to lower case -# key: lwr -# -- -std::transform(std::begin(${1:container}), std::end($1), std::begin($1), [](char c) { - `(or (concat % "\n") "")`return std::tolower(c); -}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/trim_left b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/trim_left deleted file mode 100644 index c456570..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/trim_left +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: remove whitespace at beginning -# key: ltr -# -- -${1:container}.erase(0, $1.find_first_not_of(" \t\n\r")); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/tryw b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/tryw deleted file mode 100644 index 004d15c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/tryw +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: tryw -# key: tryw -# uuid: tryw -# -- -try { - `(or yas/selected-text (car kill-ring))` -} catch ${1:Exception} { - -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/unique b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/unique index 7268a3d..fff99af 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/unique +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/unique @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: unique -# key: uqe +# key: unique # -- -auto pos = std::unique(std::begin(${1:container}), std::end($1)); \ No newline at end of file +std::unique(std::begin(${1:u}), std::end($1)); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/unique_copy b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/unique_copy index 709b875..3738983 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/unique_copy +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/unique_copy @@ -1,6 +1,5 @@ # -*- mode: snippet -*- # name: unique_copy -# key: ucp +# key: unique_copy # -- -std::unique_copy(std::begin(${1:container}), std::end($1), - std::ostream_iterator(std::cout, "\n")); \ No newline at end of file +std::unique_copy(std::begin(${1:u}), std::end($1), std::begin(${2:v})); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/using b/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/using deleted file mode 100644 index 3c113ce..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/using +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: using namespace ... -# key: using -# uuid: using -# -- -using namespace ${std}; \ No newline at end of file -- cgit v1.2.3-13-gbd6f From 48b14108899ba26cbc4b009afe03b27bf1ccce65 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 13:02:20 +0530 Subject: (Emacs/yasnippet)~cleaned up a TON of snippets --- .../emacs/.config/yasnippet/snippets/c-mode/assert | 7 ------- .../emacs/.config/yasnippet/snippets/c-mode/define | 6 ------ .../emacs/.config/yasnippet/snippets/c-mode/malloc | 2 +- .../emacs/.config/yasnippet/snippets/c-mode/packed | 6 ------ .../emacs/.config/yasnippet/snippets/c-mode/printf | 4 ++-- .../emacs/.config/yasnippet/snippets/c-mode/stdio | 4 ---- .../emacs/.config/yasnippet/snippets/c-mode/stdlib | 4 ---- .../emacs/.config/yasnippet/snippets/c-mode/string | 4 ---- .../emacs/.config/yasnippet/snippets/c-mode/union | 4 ++-- .../emacs/.config/yasnippet/snippets/c-mode/unistd | 6 ------ .../.config/yasnippet/snippets/cc-mode/assert | 6 ++++++ .../emacs/.config/yasnippet/snippets/cc-mode/once | 2 +- .../yasnippet/snippets/csharp-mode/.yas-parents | 1 - .../.config/yasnippet/snippets/csharp-mode/attrib | 10 --------- .../yasnippet/snippets/csharp-mode/attrib.1 | 24 ---------------------- .../yasnippet/snippets/csharp-mode/attrib.2 | 24 ---------------------- .../.config/yasnippet/snippets/csharp-mode/class | 24 ---------------------- .../.config/yasnippet/snippets/csharp-mode/comment | 9 -------- .../yasnippet/snippets/csharp-mode/comment.1 | 7 ------- .../yasnippet/snippets/csharp-mode/comment.2 | 7 ------- .../yasnippet/snippets/csharp-mode/comment.3 | 7 ------- .../.config/yasnippet/snippets/csharp-mode/method | 13 ------------ .../yasnippet/snippets/csharp-mode/namespace | 10 --------- .../.config/yasnippet/snippets/csharp-mode/prop | 19 ----------------- .../.config/yasnippet/snippets/csharp-mode/region | 9 -------- .../.config/yasnippet/snippets/csharp-mode/using | 7 ------- .../.config/yasnippet/snippets/csharp-mode/using.1 | 7 ------- .../.config/yasnippet/snippets/csharp-mode/using.2 | 7 ------- .../.config/yasnippet/snippets/css-mode/importfont | 6 ------ .../.config/yasnippet/snippets/css-mode/margin | 6 ------ .../.config/yasnippet/snippets/css-mode/media | 8 -------- .../yasnippet/snippets/css-mode/media_orientation | 5 ----- .../yasnippet/snippets/css-mode/media_print | 6 ------ .../.config/yasnippet/snippets/css-mode/padding | 6 ------ .../.config/yasnippet/snippets/css-mode/property | 6 ------ .../.config/yasnippet/snippets/haskell-mode/case | 9 -------- .../.config/yasnippet/snippets/haskell-mode/data | 6 ------ .../.config/yasnippet/snippets/haskell-mode/doc | 8 -------- .../yasnippet/snippets/haskell-mode/function | 7 ------- .../.config/yasnippet/snippets/haskell-mode/import | 6 ------ .../yasnippet/snippets/haskell-mode/instance | 7 ------- .../.config/yasnippet/snippets/haskell-mode/main | 6 ------ .../.config/yasnippet/snippets/haskell-mode/module | 7 ------- .../yasnippet/snippets/haskell-mode/new-class | 7 ------- .../.config/yasnippet/snippets/haskell-mode/pragma | 6 ------ .../.config/yasnippet/snippets/haskell-mode/print | 6 ------ .../emacs/.config/yasnippet/snippets/html-mode/dd | 6 ------ .../emacs/.config/yasnippet/snippets/html-mode/dl | 8 -------- .../.config/yasnippet/snippets/html-mode/doctype | 5 ----- .../yasnippet/snippets/html-mode/doctype.xhml1 | 5 ----- .../yasnippet/snippets/html-mode/doctype.xhtml1_1 | 5 ----- .../snippets/html-mode/doctype.xhtml1_strict | 5 ----- .../snippets/html-mode/doctype.xhtml1_transitional | 5 ----- .../emacs/.config/yasnippet/snippets/html-mode/dt | 6 ------ .../.config/yasnippet/snippets/html-mode/form | 7 ------- .../.config/yasnippet/snippets/html-mode/html | 7 ------- .../yasnippet/snippets/html-mode/html.xmlns | 7 ------- .../.config/yasnippet/snippets/html-mode/link | 6 ------ .../.config/yasnippet/snippets/html-mode/linkie | 6 ------ .../.config/yasnippet/snippets/html-mode/meta | 6 ------ .../yasnippet/snippets/html-mode/meta.http-equiv | 6 ------ .../.config/yasnippet/snippets/html-mode/script | 6 ------ .../.config/yasnippet/snippets/html-mode/scriptsrc | 4 ---- .../.config/yasnippet/snippets/html-mode/textarea | 5 ----- .../emacs/.config/yasnippet/snippets/html-mode/th | 6 ------ .../yasnippet/snippets/java-mode/.yas-parents | 1 - .../.config/yasnippet/snippets/java-mode/@param | 7 ------- .../.config/yasnippet/snippets/java-mode/@return | 7 ------- .../yasnippet/snippets/java-mode/apr_assert | 8 -------- .../.config/yasnippet/snippets/java-mode/class | 8 -------- .../yasnippet/snippets/java-mode/constructor | 8 -------- .../emacs/.config/yasnippet/snippets/java-mode/doc | 9 -------- .../.config/yasnippet/snippets/java-mode/equals | 8 -------- .../yasnippet/snippets/java-mode/file_class | 10 --------- .../emacs/.config/yasnippet/snippets/java-mode/for | 8 -------- .../.config/yasnippet/snippets/java-mode/foreach | 8 -------- .../emacs/.config/yasnippet/snippets/java-mode/if | 9 -------- .../emacs/.config/yasnippet/snippets/java-mode/ife | 10 --------- .../.config/yasnippet/snippets/java-mode/import | 5 ----- .../.config/yasnippet/snippets/java-mode/interface | 8 -------- .../.config/yasnippet/snippets/java-mode/iterator | 8 -------- .../.config/yasnippet/snippets/java-mode/javadoc | 9 -------- .../.config/yasnippet/snippets/java-mode/main | 8 -------- .../.config/yasnippet/snippets/java-mode/method | 9 -------- .../.config/yasnippet/snippets/java-mode/method@ | 9 -------- .../emacs/.config/yasnippet/snippets/java-mode/new | 6 ------ .../yasnippet/snippets/java-mode/paintComponent | 9 -------- .../.config/yasnippet/snippets/java-mode/printf | 6 ------ .../.config/yasnippet/snippets/java-mode/println | 6 ------ .../.config/yasnippet/snippets/java-mode/private | 6 ------ .../.config/yasnippet/snippets/java-mode/protected | 6 ------ .../.config/yasnippet/snippets/java-mode/public | 6 ------ .../.config/yasnippet/snippets/java-mode/return | 7 ------- .../.config/yasnippet/snippets/java-mode/test | 9 -------- .../.config/yasnippet/snippets/java-mode/testClass | 13 ------------ .../.config/yasnippet/snippets/java-mode/this | 6 ------ .../.config/yasnippet/snippets/java-mode/toString | 8 -------- .../emacs/.config/yasnippet/snippets/java-mode/try | 12 ----------- .../emacs/.config/yasnippet/snippets/java-mode/var | 7 ------- .../.config/yasnippet/snippets/java-mode/var= | 7 ------- .../.config/yasnippet/snippets/java-mode/void | 6 ------ .../.config/yasnippet/snippets/java-mode/while | 9 -------- .../yasnippet/snippets/json-mode/eslintConfig | 19 ----------------- .../.config/yasnippet/snippets/latex-mode/acronym | 6 ------ .../yasnippet/snippets/latex-mode/alertblock | 8 -------- .../.config/yasnippet/snippets/latex-mode/alg | 8 -------- .../.config/yasnippet/snippets/latex-mode/axiom | 8 -------- .../.config/yasnippet/snippets/latex-mode/begin | 8 -------- .../.config/yasnippet/snippets/latex-mode/bigcap_^ | 10 --------- .../.config/yasnippet/snippets/latex-mode/bigcup_^ | 10 --------- .../.config/yasnippet/snippets/latex-mode/block | 8 -------- .../.config/yasnippet/snippets/latex-mode/capgls | 7 ------- .../.config/yasnippet/snippets/latex-mode/caption | 6 ------ .../.config/yasnippet/snippets/latex-mode/cite | 7 ------- .../.config/yasnippet/snippets/latex-mode/code | 8 -------- .../.config/yasnippet/snippets/latex-mode/columns | 14 ------------- .../yasnippet/snippets/latex-mode/corollary | 8 -------- .../yasnippet/snippets/latex-mode/definition | 8 -------- .../.config/yasnippet/snippets/latex-mode/emph | 7 ------- .../yasnippet/snippets/latex-mode/enumerate | 8 -------- .../.config/yasnippet/snippets/latex-mode/exercise | 8 -------- .../.config/yasnippet/snippets/latex-mode/figure | 10 --------- .../.config/yasnippet/snippets/latex-mode/frac | 6 ------ .../.config/yasnippet/snippets/latex-mode/frame | 9 -------- .../.config/yasnippet/snippets/latex-mode/gls | 7 ------- .../.config/yasnippet/snippets/latex-mode/glspl | 6 ------ .../emacs/.config/yasnippet/snippets/latex-mode/if | 9 -------- .../yasnippet/snippets/latex-mode/includegraphics | 6 ------ .../.config/yasnippet/snippets/latex-mode/int_^ | 9 -------- .../.config/yasnippet/snippets/latex-mode/item | 7 ------- .../.config/yasnippet/snippets/latex-mode/itemize | 8 -------- .../.config/yasnippet/snippets/latex-mode/label | 6 ------ .../.config/yasnippet/snippets/latex-mode/lemma | 8 -------- .../.config/yasnippet/snippets/latex-mode/lim | 5 ----- .../.config/yasnippet/snippets/latex-mode/liminf | 5 ----- .../.config/yasnippet/snippets/latex-mode/limsup | 5 ----- .../.config/yasnippet/snippets/latex-mode/listing | 8 -------- .../.config/yasnippet/snippets/latex-mode/mathclap | 5 ----- .../.config/yasnippet/snippets/latex-mode/movie | 16 --------------- .../yasnippet/snippets/latex-mode/newcommand | 6 ------ .../yasnippet/snippets/latex-mode/newglossaryentry | 6 ------ .../.config/yasnippet/snippets/latex-mode/note | 6 ------ .../.config/yasnippet/snippets/latex-mode/prod_^ | 9 -------- .../.config/yasnippet/snippets/latex-mode/proof | 8 -------- .../.config/yasnippet/snippets/latex-mode/python | 9 -------- .../.config/yasnippet/snippets/latex-mode/question | 7 ------- .../.config/yasnippet/snippets/latex-mode/remark | 8 -------- .../.config/yasnippet/snippets/latex-mode/root | 5 ----- .../.config/yasnippet/snippets/latex-mode/section | 9 -------- .../.config/yasnippet/snippets/latex-mode/sqrt | 5 ----- .../.config/yasnippet/snippets/latex-mode/subf | 9 -------- .../yasnippet/snippets/latex-mode/subfigure | 14 ------------- .../.config/yasnippet/snippets/latex-mode/subsec | 9 -------- .../.config/yasnippet/snippets/latex-mode/sum_^ | 9 -------- .../.config/yasnippet/snippets/latex-mode/textbf | 7 ------- .../.config/yasnippet/snippets/latex-mode/theorem | 8 -------- .../yasnippet/snippets/latex-mode/usepackage | 6 ------ .../yasnippet/snippets/lisp-interaction-mode/defun | 8 -------- .../.config/yasnippet/snippets/lisp-mode/class | 8 -------- .../.config/yasnippet/snippets/lisp-mode/cond | 4 ---- .../yasnippet/snippets/lisp-mode/defpackage | 11 ---------- .../emacs/.config/yasnippet/snippets/lisp-mode/do | 10 --------- .../.config/yasnippet/snippets/lisp-mode/format | 4 ---- .../.config/yasnippet/snippets/lisp-mode/slot | 12 ----------- .../.config/yasnippet/snippets/lisp-mode/typecast | 5 ----- .../snippets/makefile-automake-mode/noinst_HEADERS | 6 ------ .../yasnippet/snippets/makefile-bsdmake-mode/PHONY | 6 ------ .../yasnippet/snippets/makefile-bsdmake-mode/echo | 6 ------ .../yasnippet/snippets/makefile-bsdmake-mode/gen | 12 ----------- .../yasnippet/snippets/makefile-bsdmake-mode/if | 8 -------- .../yasnippet/snippets/makefile-bsdmake-mode/var | 6 ------ .../snippets/makefile-gmake-mode/patsubst | 4 ---- .../yasnippet/snippets/makefile-gmake-mode/phony | 4 ---- .../snippets/makefile-gmake-mode/wildcard | 4 ---- .../.config/yasnippet/snippets/makefile-mode/all | 7 ------- .../.config/yasnippet/snippets/markdown-mode/code | 6 ------ .../.config/yasnippet/snippets/markdown-mode/h1 | 6 ------ .../.config/yasnippet/snippets/markdown-mode/h2 | 6 ------ .../.config/yasnippet/snippets/markdown-mode/h3 | 6 ------ .../.config/yasnippet/snippets/markdown-mode/h4 | 6 ------ .../.config/yasnippet/snippets/markdown-mode/h5 | 6 ------ .../.config/yasnippet/snippets/markdown-mode/h6 | 6 ------ .../.config/yasnippet/snippets/markdown-mode/hr | 7 ------- .../.config/yasnippet/snippets/markdown-mode/img | 4 ---- .../.config/yasnippet/snippets/markdown-mode/kbd | 4 ---- .../.config/yasnippet/snippets/markdown-mode/link | 4 ---- .../.config/yasnippet/snippets/markdown-mode/ol | 5 ----- .../.config/yasnippet/snippets/markdown-mode/rimg | 4 ---- .../.config/yasnippet/snippets/markdown-mode/rlb | 6 ------ .../.config/yasnippet/snippets/markdown-mode/rlink | 4 ---- .../.config/yasnippet/snippets/markdown-mode/utf8 | 5 ----- .../.config/yasnippet/snippets/org-mode/no-tangle | 7 +++++++ .../.config/yasnippet/snippets/org-mode/src_block | 7 +++++++ .../yasnippet/snippets/python-mode/__contains__ | 8 -------- .../yasnippet/snippets/python-mode/__enter__ | 10 --------- .../yasnippet/snippets/python-mode/__exit__ | 8 -------- .../yasnippet/snippets/python-mode/__getitem__ | 8 -------- .../yasnippet/snippets/python-mode/__init__ | 8 ++++++++ .../.config/yasnippet/snippets/python-mode/__len__ | 8 -------- .../.config/yasnippet/snippets/python-mode/__new__ | 9 -------- .../yasnippet/snippets/python-mode/__setitem__ | 8 -------- .../.config/yasnippet/snippets/python-mode/all | 6 ------ .../.config/yasnippet/snippets/python-mode/arg | 8 -------- .../yasnippet/snippets/python-mode/arg_positional | 7 ------- .../.config/yasnippet/snippets/python-mode/assert | 5 ----- .../yasnippet/snippets/python-mode/assertEqual | 7 ------- .../yasnippet/snippets/python-mode/assertFalse | 7 ------- .../yasnippet/snippets/python-mode/assertIn | 7 ------- .../yasnippet/snippets/python-mode/assertNotEqual | 7 ------- .../yasnippet/snippets/python-mode/assertRaises | 5 ----- .../snippets/python-mode/assertRaises.with | 7 ------- .../yasnippet/snippets/python-mode/assertTrue | 7 ------- .../yasnippet/snippets/python-mode/celery_pdb | 7 ------- .../.config/yasnippet/snippets/python-mode/class | 8 -------- .../yasnippet/snippets/python-mode/classmethod | 9 -------- .../.config/yasnippet/snippets/python-mode/dec | 15 -------------- .../.config/yasnippet/snippets/python-mode/def | 2 +- .../.config/yasnippet/snippets/python-mode/defm | 8 -------- .../.config/yasnippet/snippets/python-mode/doc | 7 ------- .../.config/yasnippet/snippets/python-mode/doctest | 9 -------- .../.config/yasnippet/snippets/python-mode/eq | 8 -------- .../.config/yasnippet/snippets/python-mode/for | 2 +- .../.config/yasnippet/snippets/python-mode/from | 7 ------- .../snippets/python-mode/function_docstring | 11 ---------- .../.config/yasnippet/snippets/python-mode/if | 8 -------- .../.config/yasnippet/snippets/python-mode/ife | 10 --------- .../.config/yasnippet/snippets/python-mode/ifmain | 2 +- .../.config/yasnippet/snippets/python-mode/import | 8 -------- .../.config/yasnippet/snippets/python-mode/init | 8 -------- .../yasnippet/snippets/python-mode/init_docstring | 11 ---------- .../yasnippet/snippets/python-mode/interact | 6 ------ .../yasnippet/snippets/python-mode/ipdbdebug | 7 ------- .../.config/yasnippet/snippets/python-mode/iter | 8 -------- .../.config/yasnippet/snippets/python-mode/lambda | 6 ------ .../.config/yasnippet/snippets/python-mode/list | 2 +- .../yasnippet/snippets/python-mode/logger_name | 6 ------ .../.config/yasnippet/snippets/python-mode/logging | 7 ------- .../.config/yasnippet/snippets/python-mode/main | 7 ------- .../yasnippet/snippets/python-mode/metaclass | 7 ------- .../.config/yasnippet/snippets/python-mode/method | 6 ------ .../snippets/python-mode/method_docstring | 11 ---------- .../yasnippet/snippets/python-mode/not_impl | 6 ------ .../.config/yasnippet/snippets/python-mode/np | 8 -------- .../yasnippet/snippets/python-mode/parse_args | 10 --------- .../.config/yasnippet/snippets/python-mode/parser | 8 -------- .../.config/yasnippet/snippets/python-mode/pass | 6 ------ .../.config/yasnippet/snippets/python-mode/print | 6 ------ .../.config/yasnippet/snippets/python-mode/prop | 18 ---------------- .../.config/yasnippet/snippets/python-mode/reg | 8 -------- .../.config/yasnippet/snippets/python-mode/repr | 8 -------- .../.config/yasnippet/snippets/python-mode/return | 6 ------ .../.config/yasnippet/snippets/python-mode/script | 12 ----------- .../.config/yasnippet/snippets/python-mode/self | 7 ------- .../snippets/python-mode/self_without_dot | 7 ------- .../yasnippet/snippets/python-mode/selfassign | 7 ------- .../.config/yasnippet/snippets/python-mode/setdef | 6 ------ .../.config/yasnippet/snippets/python-mode/setup | 15 -------------- .../.config/yasnippet/snippets/python-mode/size | 6 ------ .../.config/yasnippet/snippets/python-mode/static | 8 -------- .../.config/yasnippet/snippets/python-mode/str | 8 -------- .../.config/yasnippet/snippets/python-mode/super | 7 ------- .../yasnippet/snippets/python-mode/test_class | 8 -------- .../yasnippet/snippets/python-mode/test_file | 13 ------------ .../.config/yasnippet/snippets/python-mode/trace | 7 ------- .../.config/yasnippet/snippets/python-mode/try | 2 +- .../.config/yasnippet/snippets/python-mode/tryelse | 6 +++--- .../.config/yasnippet/snippets/python-mode/unicode | 8 -------- .../.config/yasnippet/snippets/python-mode/utf8 | 6 ------ .../.config/yasnippet/snippets/python-mode/while | 8 -------- .../yasnippet/snippets/python-mode/with_statement | 7 ------- .../.config/yasnippet/snippets/rust-mode/File-open | 6 ------ .../.config/yasnippet/snippets/rust-mode/None | 6 ------ .../.config/yasnippet/snippets/rust-mode/Result | 6 ------ .../.config/yasnippet/snippets/rust-mode/Some | 6 ------ .../yasnippet/snippets/rust-mode/String_from | 6 ------ .../yasnippet/snippets/rust-mode/Vec-with_capacity | 6 ------ .../.config/yasnippet/snippets/rust-mode/allow | 5 ----- .../.config/yasnippet/snippets/rust-mode/allow! | 5 ----- .../.config/yasnippet/snippets/rust-mode/arrow | 6 ------ .../.config/yasnippet/snippets/rust-mode/asref | 10 --------- .../.config/yasnippet/snippets/rust-mode/assert | 6 ------ .../.config/yasnippet/snippets/rust-mode/assert_eq | 6 ------ .../.config/yasnippet/snippets/rust-mode/assert_ne | 6 ------ .../yasnippet/snippets/rust-mode/assignment | 6 ------ .../.config/yasnippet/snippets/rust-mode/case | 5 ----- .../emacs/.config/yasnippet/snippets/rust-mode/cfg | 4 ---- .../.config/yasnippet/snippets/rust-mode/cfg= | 4 ---- .../.config/yasnippet/snippets/rust-mode/const | 6 ------ .../yasnippet/snippets/rust-mode/debug_assert | 6 ------ .../.config/yasnippet/snippets/rust-mode/deref | 11 ---------- .../.config/yasnippet/snippets/rust-mode/deref_mut | 10 --------- .../.config/yasnippet/snippets/rust-mode/derive | 6 ------ .../.config/yasnippet/snippets/rust-mode/disperror | 16 --------------- .../.config/yasnippet/snippets/rust-mode/display | 9 -------- .../.config/yasnippet/snippets/rust-mode/else | 8 -------- .../.config/yasnippet/snippets/rust-mode/elseif | 8 -------- .../.config/yasnippet/snippets/rust-mode/enum | 8 -------- .../.config/yasnippet/snippets/rust-mode/env-args | 6 ------ .../.config/yasnippet/snippets/rust-mode/env-var | 6 ------ .../.config/yasnippet/snippets/rust-mode/eprintln | 6 ------ .../.config/yasnippet/snippets/rust-mode/error | 11 ---------- .../.config/yasnippet/snippets/rust-mode/extern | 8 -------- .../yasnippet/snippets/rust-mode/extern-crate | 6 ------ .../emacs/.config/yasnippet/snippets/rust-mode/fn | 8 -------- .../emacs/.config/yasnippet/snippets/rust-mode/for | 8 -------- .../.config/yasnippet/snippets/rust-mode/format | 6 ------ .../.config/yasnippet/snippets/rust-mode/from | 10 --------- .../.config/yasnippet/snippets/rust-mode/fromstr | 12 ----------- .../emacs/.config/yasnippet/snippets/rust-mode/if | 8 -------- .../.config/yasnippet/snippets/rust-mode/if-let | 8 -------- .../.config/yasnippet/snippets/rust-mode/ignore | 6 ------ .../.config/yasnippet/snippets/rust-mode/impl | 6 ------ .../yasnippet/snippets/rust-mode/inline-if-else | 6 ------ .../.config/yasnippet/snippets/rust-mode/iterator | 11 ---------- .../.config/yasnippet/snippets/rust-mode/lambda | 6 ------ .../emacs/.config/yasnippet/snippets/rust-mode/let | 6 ------ .../.config/yasnippet/snippets/rust-mode/letm | 6 ------ .../yasnippet/snippets/rust-mode/lifetime-static | 6 ------ .../.config/yasnippet/snippets/rust-mode/macro | 8 -------- .../.config/yasnippet/snippets/rust-mode/main | 8 -------- .../.config/yasnippet/snippets/rust-mode/match | 8 -------- .../.config/yasnippet/snippets/rust-mode/match-ok | 9 -------- .../emacs/.config/yasnippet/snippets/rust-mode/mod | 8 -------- .../emacs/.config/yasnippet/snippets/rust-mode/new | 6 ------ .../.config/yasnippet/snippets/rust-mode/panic | 6 ------ .../.config/yasnippet/snippets/rust-mode/partial | 10 --------- .../.config/yasnippet/snippets/rust-mode/println | 6 ------ .../.config/yasnippet/snippets/rust-mode/pub_fn | 8 -------- .../.config/yasnippet/snippets/rust-mode/pub_mod | 8 -------- .../emacs/.config/yasnippet/snippets/rust-mode/ret | 6 ------ .../.config/yasnippet/snippets/rust-mode/static | 6 ------ .../.config/yasnippet/snippets/rust-mode/struct | 8 -------- .../yasnippet/snippets/rust-mode/struct_alias | 7 ------- .../.config/yasnippet/snippets/rust-mode/test | 9 -------- .../.config/yasnippet/snippets/rust-mode/testmod | 13 ------------ .../.config/yasnippet/snippets/rust-mode/trait | 8 -------- .../.config/yasnippet/snippets/rust-mode/type | 6 ------ .../.config/yasnippet/snippets/rust-mode/union | 7 ------- .../emacs/.config/yasnippet/snippets/rust-mode/use | 6 ------ .../.config/yasnippet/snippets/rust-mode/use-File | 6 ------ .../yasnippet/snippets/rust-mode/use-HashMap | 6 ------ .../emacs/.config/yasnippet/snippets/rust-mode/vec | 6 ------ .../.config/yasnippet/snippets/rust-mode/warn | 5 ----- .../.config/yasnippet/snippets/rust-mode/warn! | 5 ----- .../.config/yasnippet/snippets/rust-mode/while-let | 8 -------- .../emacs/.config/yasnippet/snippets/scss-mode/@if | 8 -------- .../.config/yasnippet/snippets/scss-mode/@mixin | 8 -------- .../.config/yasnippet/snippets/scss-mode/@while | 8 -------- .../emacs/.config/yasnippet/snippets/scss-mode/abs | 5 ----- .../yasnippet/snippets/scss-mode/adjust-color | 5 ----- .../yasnippet/snippets/scss-mode/adjust-hue | 5 ----- .../.config/yasnippet/snippets/scss-mode/alpha | 5 ----- .../.config/yasnippet/snippets/scss-mode/append | 5 ----- .../.config/yasnippet/snippets/scss-mode/blue | 5 ----- .../.config/yasnippet/snippets/scss-mode/call | 5 ----- .../.config/yasnippet/snippets/scss-mode/ceil | 5 ----- .../yasnippet/snippets/scss-mode/change-color | 5 ----- .../yasnippet/snippets/scss-mode/comparable | 5 ----- .../yasnippet/snippets/scss-mode/complement | 5 ----- .../.config/yasnippet/snippets/scss-mode/darken | 5 ----- .../yasnippet/snippets/scss-mode/desaturate | 5 ----- .../.config/yasnippet/snippets/scss-mode/each | 6 ------ .../.config/yasnippet/snippets/scss-mode/else | 6 ------ .../.config/yasnippet/snippets/scss-mode/elseif | 6 ------ .../.config/yasnippet/snippets/scss-mode/fade-in | 5 ----- .../.config/yasnippet/snippets/scss-mode/fade-out | 5 ----- .../yasnippet/snippets/scss-mode/feature-exists | 5 ----- .../.config/yasnippet/snippets/scss-mode/floor | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/for | 6 ------ .../yasnippet/snippets/scss-mode/function-exists | 5 ----- .../snippets/scss-mode/global-variable-exists | 5 ----- .../.config/yasnippet/snippets/scss-mode/grayscale | 5 ----- .../.config/yasnippet/snippets/scss-mode/green | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/hsl | 5 ----- .../.config/yasnippet/snippets/scss-mode/hsla | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/hue | 5 ----- .../yasnippet/snippets/scss-mode/ie-hex-str | 5 ----- .../.config/yasnippet/snippets/scss-mode/index | 5 ----- .../.config/yasnippet/snippets/scss-mode/inspect | 5 ----- .../.config/yasnippet/snippets/scss-mode/invert | 5 ----- .../.config/yasnippet/snippets/scss-mode/join | 5 ----- .../.config/yasnippet/snippets/scss-mode/keywords | 5 ----- .../.config/yasnippet/snippets/scss-mode/length | 5 ----- .../.config/yasnippet/snippets/scss-mode/lighten | 5 ----- .../.config/yasnippet/snippets/scss-mode/lightness | 5 ----- .../yasnippet/snippets/scss-mode/list-separator | 5 ----- .../.config/yasnippet/snippets/scss-mode/map-get | 5 ----- .../yasnippet/snippets/scss-mode/map-has-key | 5 ----- .../.config/yasnippet/snippets/scss-mode/map-keys | 5 ----- .../.config/yasnippet/snippets/scss-mode/map-merge | 5 ----- .../yasnippet/snippets/scss-mode/map-remove | 5 ----- .../yasnippet/snippets/scss-mode/map-values | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/max | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/min | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/mix | 5 ----- .../yasnippet/snippets/scss-mode/mixin-exists | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/nth | 5 ----- .../.config/yasnippet/snippets/scss-mode/opacify | 5 ----- .../.config/yasnippet/snippets/scss-mode/opacity | 5 ----- .../yasnippet/snippets/scss-mode/percentage | 5 ----- .../.config/yasnippet/snippets/scss-mode/quote | 5 ----- .../.config/yasnippet/snippets/scss-mode/random | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/red | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/rgb | 5 ----- .../.config/yasnippet/snippets/scss-mode/rgba | 5 ----- .../.config/yasnippet/snippets/scss-mode/rgbao | 7 ------- .../.config/yasnippet/snippets/scss-mode/round | 5 ----- .../.config/yasnippet/snippets/scss-mode/saturate | 5 ----- .../yasnippet/snippets/scss-mode/saturation | 5 ----- .../yasnippet/snippets/scss-mode/scale-color | 5 ----- .../.config/yasnippet/snippets/scss-mode/set-nth | 5 ----- .../.config/yasnippet/snippets/scss-mode/str-index | 5 ----- .../yasnippet/snippets/scss-mode/str-insert | 5 ----- .../yasnippet/snippets/scss-mode/str-length | 5 ----- .../.config/yasnippet/snippets/scss-mode/str-slice | 5 ----- .../yasnippet/snippets/scss-mode/to-lower-case | 5 ----- .../yasnippet/snippets/scss-mode/to-upper-case | 5 ----- .../yasnippet/snippets/scss-mode/transparentize | 5 ----- .../.config/yasnippet/snippets/scss-mode/type-of | 5 ----- .../.config/yasnippet/snippets/scss-mode/unique-id | 5 ----- .../.config/yasnippet/snippets/scss-mode/unit | 5 ----- .../.config/yasnippet/snippets/scss-mode/unitless | 5 ----- .../.config/yasnippet/snippets/scss-mode/unquote | 5 ----- .../yasnippet/snippets/scss-mode/variable-exists | 5 ----- .../emacs/.config/yasnippet/snippets/scss-mode/zip | 5 ----- .../emacs/.config/yasnippet/snippets/sh-mode/args | 6 ------ .../emacs/.config/yasnippet/snippets/sh-mode/bang | 4 ++-- .../emacs/.config/yasnippet/snippets/sh-mode/case | 8 -------- .../emacs/.config/yasnippet/snippets/sh-mode/elif | 7 ------- .../emacs/.config/yasnippet/snippets/sh-mode/else | 7 ------- .../emacs/.config/yasnippet/snippets/sh-mode/f | 8 -------- .../emacs/.config/yasnippet/snippets/sh-mode/for | 3 ++- .../.config/yasnippet/snippets/sh-mode/function | 6 ------ .../emacs/.config/yasnippet/snippets/sh-mode/gt | 6 ------ .../emacs/.config/yasnippet/snippets/sh-mode/if | 3 ++- .../.config/yasnippet/snippets/sh-mode/if-one-line | 6 ------ .../emacs/.config/yasnippet/snippets/sh-mode/ife | 3 ++- .../emacs/.config/yasnippet/snippets/sh-mode/local | 4 ---- .../emacs/.config/yasnippet/snippets/sh-mode/lt | 6 ------ .../emacs/.config/yasnippet/snippets/sh-mode/var | 6 ------ .../.config/yasnippet/snippets/snippet-mode/cont | 6 ------ .../.config/yasnippet/snippets/snippet-mode/elisp | 6 ------ .../.config/yasnippet/snippets/snippet-mode/field | 8 -------- .../.config/yasnippet/snippets/snippet-mode/group | 6 ------ .../.config/yasnippet/snippets/snippet-mode/mirror | 8 -------- .../.config/yasnippet/snippets/snippet-mode/vars | 12 ----------- .../.config/yasnippet/snippets/sql-mode/column | 5 ----- .../.config/yasnippet/snippets/sql-mode/constraint | 5 ----- .../yasnippet/snippets/sql-mode/constraint.1 | 5 ----- .../.config/yasnippet/snippets/sql-mode/create | 11 ---------- .../.config/yasnippet/snippets/sql-mode/create.1 | 13 ------------ .../.config/yasnippet/snippets/sql-mode/references | 5 ----- .../.config/yasnippet/snippets/web-mode/video | 8 -------- .../emacs/.config/yasnippet/snippets/web-mode/vue | 18 ---------------- 454 files changed, 50 insertions(+), 3109 deletions(-) delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/assert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/define delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/packed delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/stdio delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/stdlib delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/string delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/unistd create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/assert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/.yas-parents delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib.1 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib.2 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/class delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.1 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.2 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.3 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/method delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/namespace delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/prop delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/region delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using.1 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using.2 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/importfont delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/margin delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media_orientation delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media_print delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/padding delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/property delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/case delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/data delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/doc delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/function delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/import delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/instance delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/main delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/module delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/new-class delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/pragma delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/print delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dd delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dl delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhml1 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_1 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_strict delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_transitional delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dt delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/form delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/html delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/html.xmlns delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/link delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/linkie delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/meta delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/meta.http-equiv delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/script delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/scriptsrc delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/textarea delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/th delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/.yas-parents delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/@param delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/@return delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/apr_assert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/class delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/constructor delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/doc delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/equals delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/file_class delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/for delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/foreach delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/if delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/ife delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/import delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/interface delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/iterator delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/javadoc delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/main delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/method delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/method@ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/new delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/paintComponent delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/printf delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/println delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/private delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/protected delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/public delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/return delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/test delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/testClass delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/this delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/toString delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/try delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/var delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/var= delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/void delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/while delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/json-mode/eslintConfig delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/acronym delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/alertblock delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/alg delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/axiom delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/begin delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/bigcap_^ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/bigcup_^ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/block delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/capgls delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/caption delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/cite delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/code delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/columns delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/corollary delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/definition delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/emph delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/enumerate delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/exercise delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/figure delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/frac delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/frame delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/gls delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/glspl delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/if delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/includegraphics delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/int_^ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/item delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/itemize delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/label delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/lemma delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/lim delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/liminf delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/limsup delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/listing delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/mathclap delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/movie delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/newcommand delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/newglossaryentry delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/note delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/prod_^ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/proof delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/python delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/question delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/remark delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/root delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/section delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/sqrt delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subf delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subfigure delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subsec delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/sum_^ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/textbf delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/theorem delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/usepackage delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/lisp-interaction-mode/defun delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/class delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/cond delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/defpackage delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/do delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/format delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/slot delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/typecast delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-automake-mode/noinst_HEADERS delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/PHONY delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/echo delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/gen delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/if delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/var delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/patsubst delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/phony delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/wildcard delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/makefile-mode/all delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/code delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h1 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h2 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h3 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h4 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h5 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h6 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/hr delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/img delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/kbd delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/link delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/ol delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rimg delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rlb delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rlink delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/utf8 create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/org-mode/no-tangle create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/org-mode/src_block delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/__contains__ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/__enter__ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/__exit__ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/__getitem__ create mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/__init__ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/__len__ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/__new__ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/__setitem__ delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/all delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/arg delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/arg_positional delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/assert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/assertEqual delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/assertFalse delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/assertIn delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/assertNotEqual delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/assertRaises delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/assertRaises.with delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/assertTrue delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/celery_pdb delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/class delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/classmethod delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/dec delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/defm delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/doc delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/doctest delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/eq delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/from delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/function_docstring delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/if delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ife delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/import delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/init delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/init_docstring delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/interact delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ipdbdebug delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/iter delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/lambda delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/logger_name delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/logging delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/main delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/metaclass delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/method delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/method_docstring delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/not_impl delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/np delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/parse_args delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/parser delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/pass delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/print delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/prop delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/reg delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/repr delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/return delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/script delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/self delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/self_without_dot delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/selfassign delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/setdef delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/setup delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/size delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/static delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/str delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/super delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/test_class delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/test_file delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/trace delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/unicode delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/utf8 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/while delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/with_statement delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/File-open delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/None delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Result delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Some delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/String_from delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Vec-with_capacity delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/allow delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/allow! delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/arrow delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/asref delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert_eq delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert_ne delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assignment delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/case delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/cfg delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/cfg= delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/const delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/debug_assert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/deref delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/deref_mut delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/derive delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/disperror delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/display delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/else delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/elseif delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/enum delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/env-args delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/env-var delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/eprintln delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/error delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/extern delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/extern-crate delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/fn delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/for delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/format delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/from delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/fromstr delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/if delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/if-let delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/ignore delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/impl delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/inline-if-else delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/iterator delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/lambda delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/let delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/letm delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/lifetime-static delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/macro delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/main delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/match delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/match-ok delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/mod delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/new delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/panic delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/partial delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/println delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/pub_fn delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/pub_mod delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/ret delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/static delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/struct delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/struct_alias delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/test delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/testmod delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/trait delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/type delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/union delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use-File delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use-HashMap delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/vec delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/warn delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/warn! delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/while-let delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@if delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@mixin delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@while delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/abs delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/adjust-color delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/adjust-hue delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/alpha delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/append delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/blue delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/call delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/ceil delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/change-color delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/comparable delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/complement delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/darken delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/desaturate delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/each delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/else delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/elseif delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/fade-in delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/fade-out delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/feature-exists delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/floor delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/for delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/function-exists delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/global-variable-exists delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/grayscale delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/green delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hsl delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hsla delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hue delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/ie-hex-str delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/index delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/inspect delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/invert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/join delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/keywords delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/length delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/lighten delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/lightness delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/list-separator delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-get delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-has-key delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-keys delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-merge delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-remove delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-values delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/max delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/min delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/mix delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/mixin-exists delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/nth delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/opacify delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/opacity delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/percentage delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/quote delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/random delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/red delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgb delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgba delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgbao delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/round delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/saturate delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/saturation delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/scale-color delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/set-nth delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-index delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-insert delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-length delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-slice delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/to-lower-case delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/to-upper-case delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/transparentize delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/type-of delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unique-id delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unit delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unitless delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unquote delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/variable-exists delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/zip delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/args delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/case delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/elif delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/else delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/f delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/function delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/gt delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/if-one-line delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/local delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/lt delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/var delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/cont delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/elisp delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/field delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/group delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/mirror delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/vars delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/column delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint.1 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create.1 delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/references delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/web-mode/video delete mode 100644 Emacs/.config/emacs/.config/yasnippet/snippets/web-mode/vue (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/assert b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/assert deleted file mode 100644 index 15dbcc3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/assert +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: assert -# key: ass -# uuid: ass -# -- -#include -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/define b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/define deleted file mode 100644 index d4dc177..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/define +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: define -# key: def -# uuid: def -# -- -#define $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/malloc b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/malloc index 77b7465..af0aa98 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/malloc +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/malloc @@ -3,5 +3,5 @@ # key: malloc # uuid: malloc # -- -malloc(sizeof($1)${2: * ${3:3}}); +malloc(sizeof($1)${2: * ${3:0}}); $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/packed b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/packed deleted file mode 100644 index 1f352fc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/packed +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: packed -# key: packed -# uuid: packed -# -- -__attribute__((__packed__))$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/printf b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/printf index dda7206..1af5fb6 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/printf +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/printf @@ -1,6 +1,6 @@ # -*- mode: snippet -*- # name: printf -# key: p -# uuid: p +# key: printf +# uuid: printf # -- printf("${1:format}"${2:, $3}); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/stdio b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/stdio deleted file mode 100644 index 76618fd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/stdio +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: stdio -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/stdlib b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/stdlib deleted file mode 100644 index d853ac4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/stdlib +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: stdlib -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/string b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/string deleted file mode 100644 index 3240494..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/string +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: string -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/union b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/union index a1c60cb..8f2693c 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/union +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/union @@ -3,6 +3,6 @@ # key: union # uuid: union # -- -typedef union { +union ${1:name} { $0 -} ${1:name}; \ No newline at end of file +}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/unistd b/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/unistd deleted file mode 100644 index de59d9e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/c-mode/unistd +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: unistd -# key: uni -# uuid: uni -# -- -#include \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/assert b/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/assert new file mode 100644 index 0000000..c4538bc --- /dev/null +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/assert @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assert +# key: ass +# uuid: ass +# -- +assert($1 && $2); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/once b/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/once index b982970..f01599f 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/once +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/cc-mode/once @@ -3,7 +3,7 @@ # key: once # uuid: once # -- -#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H} +#ifndef $1 #define $1 $0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/.yas-parents b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/.yas-parents deleted file mode 100644 index 2f29616..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/.yas-parents +++ /dev/null @@ -1 +0,0 @@ -cc-mode text-mode prog-mode \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib deleted file mode 100644 index 3d835f8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: private attribute ....; -# key: attrib -# uuid: attrib -# -- -/// -/// $3 -/// -private $1 $2; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib.1 b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib.1 deleted file mode 100644 index dd7669f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib.1 +++ /dev/null @@ -1,24 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: private attribute ....; public property ... ... { ... } -# key: attrib -# uuid: attrib -# -- -/// -/// $3 -/// -private $1 $2; - -/// -/// $4 -/// -/// $5 -public $1 $2 -{ - get { - return this.$2; - } - set { - this.$2 = value; - } -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib.2 b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib.2 deleted file mode 100644 index b152875..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/attrib.2 +++ /dev/null @@ -1,24 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: private _attribute ....; public Property ... ... { ... } -# key: attrib -# uuid: attrib -# -- -/// -/// $3 -/// -private $1 ${2:$(if (> (length yas-text) 0) (format "_%s%s" (downcase (substring yas-text 0 1)) (substring yas-text 1 (length yas-text))) "")}; - -/// -/// ${3:Description} -/// -/// $1 -public ${1:Type} ${2:Name} -{ - get { - return this.${2:$(if (> (length yas-text) 0) (format "_%s%s" (downcase (substring yas-text 0 1)) (substring yas-text 1 (length yas-text))) "")}; - } - set { - this.${2:$(if (> (length yas-text) 0) (format "_%s%s" (downcase (substring yas-text 0 1)) (substring yas-text 1 (length yas-text))) "")} = value; - } -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/class b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/class deleted file mode 100644 index 8b03934..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/class +++ /dev/null @@ -1,24 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: class ... { ... } -# key: class -# uuid: class -# -- -${5:public} class ${1:Name} -{ - #region Ctor & Destructor - /// - /// ${3:Standard Constructor} - /// - public $1($2) - { - } - - /// - /// ${4:Default Destructor} - /// - public ~$1() - { - } - #endregion -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment deleted file mode 100644 index d4a4712..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: /// ... -# key: comment -# uuid: comment -# -- -/// -/// $1 -/// \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.1 b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.1 deleted file mode 100644 index 202dc4a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.1 +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: /// ... -# key: comment -# uuid: comment -# -- -/// $2 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.2 b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.2 deleted file mode 100644 index a5dd138..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.2 +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: /// ... -# key: comment -# uuid: comment -# -- -/// $1 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.3 b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.3 deleted file mode 100644 index 4a17b61..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/comment.3 +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: /// ... -# key: comment -# uuid: comment -# -- -/// $2 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/method b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/method deleted file mode 100644 index 742ff77..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/method +++ /dev/null @@ -1,13 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: public void Method { ... } -# key: method -# uuid: method -# -- -/// -/// ${5:Description} -/// ${2:$(if (string= (upcase yas-text) "VOID") "" (format "%s%s%s" "\n/// " yas-text ""))} -${1:public} ${2:void} ${3:MethodName}($4) -{ -$0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/namespace b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/namespace deleted file mode 100644 index ac9c143..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/namespace +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: namespace .. { ... } -# key: namespace -# uuid: namespace -# -- -namespace $1 -{ -$0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/prop b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/prop deleted file mode 100644 index 21d89dc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/prop +++ /dev/null @@ -1,19 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: property ... ... { ... } -# key: prop -# uuid: prop -# -- -/// -/// $5 -/// -/// $6 -$1 $2 $3 -{ - get { - return this.$4; - } - set { - this.$4 = value; - } -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/region b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/region deleted file mode 100644 index d92ebd9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/region +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: #region ... #endregion -# key: region -# uuid: region -# -- -#region $1 -$0 -#endregion \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using deleted file mode 100644 index 439c790..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: using ...; -# key: using -# uuid: using -# -- -using $1; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using.1 b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using.1 deleted file mode 100644 index 8799467..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using.1 +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: using System; -# key: using -# uuid: using -# -- -using System; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using.2 b/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using.2 deleted file mode 100644 index f1b12c3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/csharp-mode/using.2 +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: using System....; -# key: using -# uuid: using -# -- -using System.$1; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/importfont b/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/importfont deleted file mode 100644 index 39faa2b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/importfont +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: @import url("//fonts.googleapis...") -# key: impfont -# uuid: impfont -# -- -@import url("http://fonts.googleapis.com/css?family=${1:Open+Sans}"); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/margin b/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/margin deleted file mode 100644 index 6431e56..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/margin +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: margin: ...; -# key: mar -# uuid: mar -# -- -margin: ${1:0 auto}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media b/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media deleted file mode 100644 index f58e11a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: @media -# key: med -# uuid: med -# -- -@media ${1:screen} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media_orientation b/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media_orientation deleted file mode 100644 index 2aea9e0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media_orientation +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: @media (orientation: ?) -# condition: (looking-back "@media " (line-beginning-position)) -# -- -(orientation: ${1:landscape}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media_print b/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media_print deleted file mode 100644 index fdc89a2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/media_print +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: @media print { ... } -# -- -@media print { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/padding b/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/padding deleted file mode 100644 index e667956..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/padding +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: padding: ...; -# key: pad -# uuid: pad -# -- -padding: ${1:10px}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/property b/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/property deleted file mode 100644 index 9bd42a7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/css-mode/property +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: ...: ...; -# key: : -# uuid: : -# -- -${1:prop}: ${2:}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/case b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/case deleted file mode 100644 index 0b2241b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/case +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: case -# key: case -# uuid: case -# -- -case ${1:var} of - ${2:cond} -> ${3:value} - $0 - otherwise -> ${4:other} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/data b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/data deleted file mode 100644 index 98ed8b4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/data +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: data -# key: da -# uuid: da -# -- -data ${1:Type} = $2 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/doc b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/doc deleted file mode 100644 index 390e096..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/doc +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: doc -# key: d -# uuid: d -# -- -{- - $0 --} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/function b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/function deleted file mode 100644 index ba1ebe9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/function +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: Function -# key: :: -# uuid: :: -# -- -${1:fn-name} :: ${2:type} -$1 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/import b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/import deleted file mode 100644 index 2e5913b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/import +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: import -# key: import -# uuid: import -# -- -import${1: qualified} ${2:Module${3:(symbols)}}${4: as ${5:alias}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/instance b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/instance deleted file mode 100644 index e0bf941..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/instance +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: instance -# key: ins -# uuid: ins -# -- -instance ${1:${2:(Show a)} => }${3:Ord} ${4:DataType} where -$0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/main b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/main deleted file mode 100644 index 65f6f06..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/main +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: main -# key: main -# uuid: main -# -- -main = do $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/module b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/module deleted file mode 100644 index 0155fa1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/module +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: module -# key: mod -# uuid: mod -# -- -module ${1:Module} where -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/new-class b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/new-class deleted file mode 100644 index 76c3741..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/new-class +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: new class -# key: class -# uuid: class -# -- -class ${1:Class Name} where - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/pragma b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/pragma deleted file mode 100644 index 0b95488..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/pragma +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: pragma -# key: { -# uuid: { -# -- -{-# ${1:PRAGMA} #-} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/print b/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/print deleted file mode 100644 index db6c70a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/haskell-mode/print +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: print -# key: pr -# uuid: pr -# -- -print $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dd b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dd deleted file mode 100644 index 30cbeb5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dd +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Rodrigo Setti -# name:
...
-# group: list -# -- -
$1
\ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dl b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dl deleted file mode 100644 index 1753361..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dl +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Rodrigo Setti -# name:
...
-# group: list -# -- -
- $0 -
diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype deleted file mode 100644 index 7bffad7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: Doctype HTML 5 -# group: meta -# -- - diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhml1 b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhml1 deleted file mode 100644 index b94dbf4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhml1 +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: DocType XHTML 1.0 frameset -# group: meta -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_1 b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_1 deleted file mode 100644 index 875547d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_1 +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: DocType XHTML 1.1 -# group: meta -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_strict b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_strict deleted file mode 100644 index 8ddc158..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_strict +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: DocType XHTML 1.0 Strict -# group: meta -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_transitional b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_transitional deleted file mode 100644 index 144bc43..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/doctype.xhtml1_transitional +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: DocType XHTML 1.0 Transitional -# group: meta -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dt b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dt deleted file mode 100644 index 7641c8e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/dt +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Rodrigo Setti -# name:
...
-# group: list -# -- -
$1
\ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/form b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/form deleted file mode 100644 index 5511388..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/form +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Jimmy Wu -# name:
-# -- -
- $0 -
\ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/html b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/html deleted file mode 100644 index 8600a33..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/html +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Jimmy Wu -# name: ... -# -- - - $0 - diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/html.xmlns b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/html.xmlns deleted file mode 100644 index a85689b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/html.xmlns +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Jimmy Wu -# name: ... -# -- - - $0 - diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/link b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/link deleted file mode 100644 index 3f97d00..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/link +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: -# key: link -# uuid: link -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/linkie b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/linkie deleted file mode 100644 index 6e2c2ee..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/linkie +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: -# -- - diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/meta b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/meta deleted file mode 100644 index 6cad73a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/meta +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# contributor : Jimmy Wu -# group: meta -# name: -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/meta.http-equiv b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/meta.http-equiv deleted file mode 100644 index a7a5a50..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/meta.http-equiv +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Jimmy Wu -# name: -# group: meta -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/script b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/script deleted file mode 100644 index d36430e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/script +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/scriptsrc b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/scriptsrc deleted file mode 100644 index db4dbe5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/scriptsrc +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/textarea b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/textarea deleted file mode 100644 index d3f5c7a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/textarea +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Jimmy Wu -# name: -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/th b/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/th deleted file mode 100644 index 6d3e21a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/html-mode/th +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Jimmy Wu -# name: ... -# group: table -# -- -$2 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/.yas-parents b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/.yas-parents deleted file mode 100644 index 2f29616..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/.yas-parents +++ /dev/null @@ -1 +0,0 @@ -cc-mode text-mode prog-mode \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/@param b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/@param deleted file mode 100644 index 9c7ed49..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/@param +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: param -# key: @param -# uuid: @param -# condition: (sp-point-in-comment) -# -- -@param ${1:paramater} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/@return b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/@return deleted file mode 100644 index f59a873..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/@return +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: return -# key: @return -# uuid: @return -# condition: (sp-point-in-comment) -# -- -@return ${1:description} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/apr_assert b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/apr_assert deleted file mode 100644 index dca9f95..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/apr_assert +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: apr_assert -# key: apr_assert -# uuid: apr_assert -# -- -if (Globals.useAssertions) { - ${1:assert ..}; -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/class b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/class deleted file mode 100644 index 4b23f00..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/class +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: class -# key: class -# uuid: class -# -- -${1:public }class ${2:`(f-base buffer-file-name)`} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/constructor b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/constructor deleted file mode 100644 index 7a379cd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/constructor +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: constructor -# key: __init__ -# uuid: __init__ -# -- -public ${1:`(f-base buffer-file-name)`}($2) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/doc b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/doc deleted file mode 100644 index 7108ccf..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/doc +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: doc -# key: /* -# uuid: /* -# condition: (not (use-region-p)) -# -- -/** - * $0 - */ \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/equals b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/equals deleted file mode 100644 index 9b66be5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/equals +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: equals -# key: eq -# uuid: eq -# -- -public boolean equals(${1:Class} other) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/file_class b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/file_class deleted file mode 100644 index a0685b3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/file_class +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: file_class -# key: file -# uuid: file -# -- -public class ${1:`(file-name-base - (or (buffer-file-name) - (buffer-name)))`} { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/for b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/for deleted file mode 100644 index 64b99d2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/for +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: for -# key: for -# uuid: for -# -- -for (${1:int i = 0}; ${2:i < N}; ${3:i++}) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/foreach b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/foreach deleted file mode 100644 index 236a446..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/foreach +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: foreach -# key: fore -# uuid: fore -# -- -for (${1:Object} ${2:var} : ${3:iterator}) { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/if b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/if deleted file mode 100644 index bddbdd5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/if +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: if -# key: if -# uuid: if -# condition: (not (sp-point-in-string-or-comment)) -# -- -if (${1:true}) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/ife b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/ife deleted file mode 100644 index 0158f7a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/ife +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: ife -# key: ife -# uuid: ife -# -- -if (${1:true}) { - $2 -} else { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/import b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/import deleted file mode 100644 index f863d97..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/import +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: import -# -- -import ${1:System.}; -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/interface b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/interface deleted file mode 100644 index b5cac51..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/interface +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: interface -# key: interface -# uuid: interface -# -- -interface ${1:`(f-base buffer-file-name)`} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/iterator b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/iterator deleted file mode 100644 index 523310c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/iterator +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: iterator -# key: iterator -# uuid: iterator -# -- -public Iterator<${1:type}> iterator() { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/javadoc b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/javadoc deleted file mode 100644 index af9c339..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/javadoc +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: javadoc -# key: doc -# uuid: doc -# -- -/** - * $0 - * - */ \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/main b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/main deleted file mode 100644 index 7b51d33..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/main +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: main -# key: main -# uuid: main -# -- -public static void main(String[] args) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/method b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/method deleted file mode 100644 index d7159d4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/method +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: method -# key: method -# uuid: method -# condition: (not (sp-point-in-string-or-comment)) -# -- -${1:void} ${2:name}($3) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/method@ b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/method@ deleted file mode 100644 index 697dbcb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/method@ +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: @Override method -# key: method@ -# uuid: method@ -# condition: (not (sp-point-in-string-or-comment)) -# -- -@Override ${1:public} ${2:void} ${3:methodName}($4) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/new b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/new deleted file mode 100644 index 6c811c7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/new +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: new -# key: new -# uuid: new -# -- -${1:Type} ${2:obj} = new ${3:$1}($4);$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/paintComponent b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/paintComponent deleted file mode 100644 index 21770fc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/paintComponent +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: paintComponent (Swing) -# key: paintComponent -# uuid: paintComponent -# condition: (not (sp-point-in-string-or-comment)) -# -- -@Override public void paintComponent(Graphics g) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/printf b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/printf deleted file mode 100644 index 6936057..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/printf +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: printf -# key: printf -# uuid: printf -# -- -System.out.printf("$0%n"); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/println b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/println deleted file mode 100644 index d8e46bc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/println +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: println -# key: println -# uuid: println -# -- -System.out.println("$0"); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/private b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/private deleted file mode 100644 index 32e58fe..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/private +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: private -# key: pri -# uuid: pri -# -- -private $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/protected b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/protected deleted file mode 100644 index cdc4c24..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/protected +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: protected -# key: pr -# uuid: pr -# -- -protected $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/public b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/public deleted file mode 100644 index 378b360..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/public +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: public -# key: p -# uuid: p -# -- -public $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/return b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/return deleted file mode 100644 index 27b6818..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/return +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: return -# key: ret -# uuid: ret -# condition: (not (sp-point-in-string-or-comment)) -# -- -return $0; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/test b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/test deleted file mode 100644 index 2aa4d2d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/test +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: test -# key: test -# uuid: test -# -- -@Test -public void test_${1:Case}() { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/testClass b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/testClass deleted file mode 100644 index 6bdeb91..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/testClass +++ /dev/null @@ -1,13 +0,0 @@ -# -*- mode: snippet -*- -# name: testClass -# key: tc -# uuid: tc -# -- -import junit.framework.*; -import junit.textui.*; - -public class Test${1:Class} extends TestCase { - protected void setUp() { - $0 - } -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/this b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/this deleted file mode 100644 index 2f67688..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/this +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: this -# key: . -# uuid: . -# -- -this.$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/toString b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/toString deleted file mode 100644 index 2e60c9d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/toString +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: toString -# key: toStr -# uuid: toStr -# -- -public String toString() { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/try b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/try deleted file mode 100644 index 3ce4885..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/try +++ /dev/null @@ -1,12 +0,0 @@ -# -*- mode: snippet -*- -# name: try -# key: try -# uuid: try -# condition: (not (sp-point-in-string-or-comment)) -# -- -try { - $0 -} catch (${1:Throwable} e) { - ${2:System.out.println("Error " + e.getMessage()); - e.printStackTrace();} -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/var b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/var deleted file mode 100644 index 7d9a3c6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/var +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: variable declaration -# key: var -# uuid: var -# condition: (not (sp-point-in-string-or-comment)) -# -- -${1:int} ${2:variable} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/var= b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/var= deleted file mode 100644 index 81afb6a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/var= +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: variable declaration & assignment -# key: var= -# uuid: var= -# condition: (not (sp-point-in-string-or-comment)) -# -- -${1:int} ${2:variable} = $0; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/void b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/void deleted file mode 100644 index 71d7e81..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/void +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: void -# key: v -# uuid: v -# -- -void $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/while b/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/while deleted file mode 100644 index 42dbb9b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/java-mode/while +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: while loop -# key: while -# uuid: while -# condition: (not (sp-point-in-string-or-comment)) -# -- -while (${1:true}) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/json-mode/eslintConfig b/Emacs/.config/emacs/.config/yasnippet/snippets/json-mode/eslintConfig deleted file mode 100644 index 8c9d2c4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/json-mode/eslintConfig +++ /dev/null @@ -1,19 +0,0 @@ -# -*- mode: snippet -*- -# name: eslintConfig -# key: eslint -# uuid: eslint -# condition: (equal (file-name-nondirectory buffer-file-name) "package.json") -# -- -"eslintConfig": { - "env": { - "es6": true, - "browser": true, - "commonjs": true, - "node": true - }, - "parserOptions": { - "ecmaFeatures": { - "jsx": true - } - } -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/acronym b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/acronym deleted file mode 100644 index 41fafdd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/acronym +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: acronym -# key: ac -# uuid: ac -# -- -\newacronym{${1:label}}{${1:$(upcase yas-text)}}{${2:Name}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/alertblock b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/alertblock deleted file mode 100644 index c8cfb62..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/alertblock +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: alertblock -# key: al -# uuid: al -# -- -\begin{alertblock}{$2} - ${0:} -\end{alertblock} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/alg b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/alg deleted file mode 100644 index 568cf95..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/alg +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: alg -# key: alg -# uuid: alg -# -- -\begin{algorithmic} -${0:} -\end{algorithmic} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/axiom b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/axiom deleted file mode 100644 index 54d9b83..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/axiom +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: axiom -# key: axm -# group: theorems -# -- -\begin{axiom} -$0 -\end{axiom} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/begin b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/begin deleted file mode 100644 index f998ce3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/begin +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: begin -# key: begin -# uuid: begin -# -- -\begin{${1:environment}} -$0 -\end{$1} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/bigcap_^ b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/bigcap_^ deleted file mode 100644 index b9a8319..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/bigcap_^ +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: bigcap_^ -# key: cap -# -- -\bigcap${1:$(when (> (length yas-text) 0) "_") -}${1:$(when (> (length yas-text) 1) "{") -}${1:i=0}${1:$(when (> (length yas-text) 1) "}") -}${2:$(when (> (length yas-text) 0) "^") -}${2:$(when (> (length yas-text) 1) "{") -}${2:n}${2:$(when (> (length yas-text) 1) "}")} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/bigcup_^ b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/bigcup_^ deleted file mode 100644 index d6c58e5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/bigcup_^ +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: bigcup_^ -# key: cup -# -- -\bigcup${1:$(when (> (length yas-text) 0) "_") -}${1:$(when (> (length yas-text) 1) "{") -}${1:i=0}${1:$(when (> (length yas-text) 1) "}") -}${2:$(when (> (length yas-text) 0) "^") -}${2:$(when (> (length yas-text) 1) "{") -}${2:n}${2:$(when (> (length yas-text) 1) "}")} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/block b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/block deleted file mode 100644 index 7c4ebd6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/block +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: block -# key: bl -# uuid: bl -# -- -\begin{block}{$1} - ${0:} -\end{block} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/capgls b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/capgls deleted file mode 100644 index 5a5d021..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/capgls +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: Gls -# key: G -# uuid: G -# condition: (not (save-restriction (widen) (texmathp))) -# -- -\Gls{${1:label}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/caption b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/caption deleted file mode 100644 index 6d36c67..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/caption +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: caption -# key: ca -# uuid: ca -# -- -\caption{${0:}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/cite b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/cite deleted file mode 100644 index b584ba7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/cite +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: cite -# key: c -# uuid: c -# condition: (not (save-restriction (widen) (texmathp))) -# -- -\cite{$1} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/code b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/code deleted file mode 100644 index 3ebea95..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/code +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: code -# key: code -# uuid: code -# -- -\begin{lstlisting} -${0:} -\end{lstlisting} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/columns b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/columns deleted file mode 100644 index 2d70450..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/columns +++ /dev/null @@ -1,14 +0,0 @@ -# -*- mode: snippet -*- -# name: columns -# key: cols -# uuid: cols -# -- -\begin{columns} - \begin{column}{.${1:5}\textwidth} - $0 - \end{column} - - \begin{column}{.${2:5}\textwidth} - - \end{column} -\end{columns} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/corollary b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/corollary deleted file mode 100644 index f9590bc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/corollary +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: corollary -# key: clr -# group: theorems -# -- -\begin{corollary} -$0 -\end{corollary} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/definition b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/definition deleted file mode 100644 index bf16e98..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/definition +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: definition -# key: def -# group: theorems -# -- -\begin{definition} -$0 -\end{definition} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/emph b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/emph deleted file mode 100644 index 3b091c2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/emph +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: emph -# key: e -# uuid: e -# condition: (not (save-restriction (widen) (texmathp))) -# -- -\emph{${1:}}$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/enumerate b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/enumerate deleted file mode 100644 index 6e38ec9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/enumerate +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: enumerate -# key: en -# uuid: en -# -- -\begin{enumerate} -${0:} -\end{enumerate} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/exercise b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/exercise deleted file mode 100644 index 05b5a48..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/exercise +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: exercise -# key: exc -# group: theorems -# -- -\begin{exercise} -$0 -\end{exercise} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/figure b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/figure deleted file mode 100644 index cd84b8d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/figure +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: figure -# key: fig -# uuid: fig -# -- -\begin{figure}[ht] - \centering - \includegraphics[${1:options}]{figures/${2:path.pdf}} - \caption{\label{fig:${3:label}} $0} -\end{figure} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/frac b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/frac deleted file mode 100644 index 3989e42..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/frac +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: frac -# key: frac -# uuid: frac -# -- -\frac{${1:`(or % "numerator")`}}{${2:denominator}}$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/frame b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/frame deleted file mode 100644 index bc74ffc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/frame +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: frame -# key: fr -# uuid: fr -# -- -\begin{frame}${1:[$2]} - ${3:\frametitle{$4}} - ${0:} -\end{frame} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/gls b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/gls deleted file mode 100644 index d21eb63..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/gls +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: gls -# key: g -# uuid: g -# condition: (not (save-restriction (widen) (texmathp))) -# -- -\gls{${1:label}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/glspl b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/glspl deleted file mode 100644 index 4a613b7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/glspl +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: glspl -# key: gp -# uuid: gp -# -- -\glspl{${1:label}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/if b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/if deleted file mode 100644 index a7a7133..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/if +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: if -# key: if -# uuid: if -# -- -\IF {$${1:cond}$} - $0 -\ELSE -\ENDIF diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/includegraphics b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/includegraphics deleted file mode 100644 index dc290e3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/includegraphics +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: includegraphics -# key: ig -# uuid: ig -# -- -\includegraphics${1:[$2]}{$0} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/int_^ b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/int_^ deleted file mode 100644 index 9edfb61..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/int_^ +++ /dev/null @@ -1,9 +0,0 @@ -# key: int -# name: int_^ -# -- -\int${1:$(when (> (length yas-text) 0) "_") -}${1:$(when (> (length yas-text) 1) "{") -}${1:left}${1:$(when (> (length yas-text) 1) "}") -}${2:$(when (> (length yas-text) 0) "^") -}${2:$(when (> (length yas-text) 1) "{") -}${2:right}${2:$(when (> (length yas-text) 1) "}")} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/item b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/item deleted file mode 100644 index 49d61c7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/item +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: item -# key: - -# uuid: - -# condition: (not (save-restriction (widen) (texmathp))) -# -- -\item ${0:} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/itemize b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/itemize deleted file mode 100644 index dc64b1c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/itemize +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: itemize -# key: it -# uuid: it -# -- -\begin{itemize} -${0:} -\end{itemize} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/label b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/label deleted file mode 100644 index 237ef67..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/label +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: label -# key: lab -# uuid: lab -# -- -\label{$0} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/lemma b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/lemma deleted file mode 100644 index 40aebf8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/lemma +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: lemma -# key: lmm -# group: theorems -# -- -\begin{lemma} -$0 -\end{lemma} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/lim b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/lim deleted file mode 100644 index db43ca3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/lim +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: lim -# key: lim -# -- -\lim_{${1:n} \to ${2:\infty}} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/liminf b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/liminf deleted file mode 100644 index 19ae703..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/liminf +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: liminf -# key: liminf -# -- -\liminf_{${1:n} \to ${2:\infty}} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/limsup b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/limsup deleted file mode 100644 index bdba92b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/limsup +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: limsup -# key: limsup -# -- -\limsup_{${1:n} \to ${2:\infty}} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/listing b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/listing deleted file mode 100644 index 36f34b8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/listing +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: listing -# key: lst -# uuid: lst -# -- -\begin{lstlisting}[float,label=lst:${1:label},caption=nextHopInfo: ${2:caption}] -${0:} -\end{lstlisting} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/mathclap b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/mathclap deleted file mode 100644 index 872794a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/mathclap +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: mathclap -# key: mc -# -- -\mathclap{$0} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/movie b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/movie deleted file mode 100644 index 2047bbf..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/movie +++ /dev/null @@ -1,16 +0,0 @@ -# -*- mode: snippet -*- -# name: movie -# key: movie -# uuid: movie -# -- -\begin{center} -\includemovie[ - label=test, - controls=false, - text={\includegraphics[width=4in]{${1:image.pdf}}} -]{4in}{4in}{${2:video file}} - -\movieref[rate=3]{test}{Play Fast} -\movieref[rate=1]{test}{Play Normal Speed} -\movieref[rate=0.2]{test}{Play Slow} -\movieref[resume]{test}{Pause/Resume} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/newcommand b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/newcommand deleted file mode 100644 index 69da1fd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/newcommand +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: newcommand -# key: cmd -# uuid: cmd -# -- -\newcommand{\\${1:name}}${2:[${3:0}]}{$0} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/newglossaryentry b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/newglossaryentry deleted file mode 100644 index 45fe438..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/newglossaryentry +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: newglossaryentry -# key: gl -# uuid: gl -# -- -\newglossaryentry{${1:AC}}{name=${2:Andrea Crotti}${3:, description=${4:description}}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/note b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/note deleted file mode 100644 index 4e80006..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/note +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: note -# key: no -# uuid: no -# -- -\note{${0:}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/prod_^ b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/prod_^ deleted file mode 100644 index aaa1544..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/prod_^ +++ /dev/null @@ -1,9 +0,0 @@ -# key: prod -# name: prod_^ -# -- -\prod${1:$(when (> (length yas-text) 0) "_") -}${1:$(when (> (length yas-text) 1) "{") -}${1:i=0}${1:$(when (> (length yas-text) 1) "}") -}${2:$(when (> (length yas-text) 0) "^") -}${2:$(when (> (length yas-text) 1) "{") -}${2:n}${2:$(when (> (length yas-text) 1) "}")} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/proof b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/proof deleted file mode 100644 index 37c58d0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/proof +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: proof -# key: prf -# group: theorems -# -- -\begin{proof} -$0 -\end{proof} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/python b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/python deleted file mode 100644 index 2f05399..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/python +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: python -# key: py -# uuid: py -# -- -\lstset{language=python} -\begin[language=python]{lstlisting} -${0:} -\end{lstlisting} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/question b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/question deleted file mode 100644 index 1b41306..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/question +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: question -# key: q -# uuid: q -# condition: (not (save-restriction (widen) (texmathp))) -# -- -\question{${0:}} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/remark b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/remark deleted file mode 100644 index 176ed84..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/remark +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: remark -# key: rmk -# group: theorems -# -- -\begin{remark} -$0 -\end{remark} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/root b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/root deleted file mode 100644 index 55fc666..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/root +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: sqrt[]{} -# key: root -# -- -\sqrt[$1]{$2} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/section b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/section deleted file mode 100644 index c9b7709..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/section +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: section -# key: sec -# uuid: sec -# -- -\section{${1:name}} -\label{sec:${2:label}} - -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/sqrt b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/sqrt deleted file mode 100644 index 705d977..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/sqrt +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: sqrt -# key: sq -# -- -\sqrt{$1}$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subf b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subf deleted file mode 100644 index 58b1853..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subf +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: subf -# key: sf -# uuid: sf -# -- -\subfigure[${1:caption}]{ - \label{fig:${2:label}} - \includegraphics[width=.${3:3}\textwidth]{${4:path}}} -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subfigure b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subfigure deleted file mode 100644 index dc2fe84..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subfigure +++ /dev/null @@ -1,14 +0,0 @@ -# -*- mode: snippet -*- -# name: subfigure -# key: subfig -# uuid: subfig -# -- -\begin{figure}[ht] - \centering - \subfigure[$1] - {\label{fig:${2:label}} - \includegraphics[width=.${3:5}\textwidth]{${4:path}}} - - \caption{${5:caption}} -\label{fig:${6:label}} -\end{figure} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subsec b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subsec deleted file mode 100644 index c716170..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/subsec +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: subsec -# key: sub -# uuid: sub -# -- -\subsection{${1:name}} -\label{subsec:${2:label}} - -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/sum_^ b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/sum_^ deleted file mode 100644 index 4071127..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/sum_^ +++ /dev/null @@ -1,9 +0,0 @@ -# key: sum -# name: sum_^ -# -- -\sum${1:$(when (> (length yas-text) 0) "_") -}${1:$(when (> (length yas-text) 1) "{") -}${1:i=0}${1:$(when (> (length yas-text) 1) "}") -}${2:$(when (> (length yas-text) 0) "^") -}${2:$(when (> (length yas-text) 1) "{") -}${2:n}${2:$(when (> (length yas-text) 1) "}")} $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/textbf b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/textbf deleted file mode 100644 index 8201e09..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/textbf +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: textbf -# key: b -# uuid: b -# condition: (not (save-restriction (widen) (texmathp))) -# -- -\textbf{$1}$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/theorem b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/theorem deleted file mode 100644 index eff29da..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/theorem +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: theorem -# key: thm -# group: theorems -# -- -\begin{theorem} -$0 -\end{theorem} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/usepackage b/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/usepackage deleted file mode 100644 index 67e3758..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/latex-mode/usepackage +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: usepackage -# key: pkg -# uuid: pkg -# -- -\usepackage{$0} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-interaction-mode/defun b/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-interaction-mode/defun deleted file mode 100644 index 4dd266a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-interaction-mode/defun +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: defun -# key: defun -# uuid: defun -# -- -(defun ${1:fun} (${2:args}) - $0 -) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/class b/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/class deleted file mode 100644 index 7f4547f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/class +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: defclass -# key: defc -# uuid: defc -# -- -(defclass ${1:name} (${2:inherits}) - (${4:slots}) - (:documentation "${3:...}")) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/cond b/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/cond deleted file mode 100644 index fe254dc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/cond +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: cond -# -- -(cond ($1)$2) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/defpackage b/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/defpackage deleted file mode 100644 index f1b7fc3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/defpackage +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: defpackage -# key: defp -# uuid: defp -# -- -(defpackage #:${1:name} - (:nicknames #:${2:nick}) - (:use #:cl #:closer-mop #:${3:package}) - (:shadow :${4.symbol}) - (:shadowing-import-from #:${5:package} #:${6:symbol}) - (:export :$0)) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/do b/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/do deleted file mode 100644 index e905a40..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/do +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: do -# key: do -# uuid: do -# -- -(do ((${1:var1} ${2:init-form} ${3:step-form}) - (${4:var2} ${5:init-form} ${6:step-form})) - (${7:condition} ${8:return-value}) - (${9:body})) -$0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/format b/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/format deleted file mode 100644 index 0010752..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/format +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: format -# -- -(format t "~& $0 ~%") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/slot b/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/slot deleted file mode 100644 index 42f0c3b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/slot +++ /dev/null @@ -1,12 +0,0 @@ -# -*- mode: snippet -*- -# name: slot -# -- -(${1:name} :initarg :${1:$(yas/substr yas-text "[^: ]*")} - :initform (error ":${1:$(yas/substr yas-text "[^: ]*")} must be specified") - ;; :accessor ${1:$(yas/substr yas-text "[^: ]*")} - :reader ${1:$(yas/substr yas-text "[^: ]*")}-changed - :writer set-${1:$(yas/substr yas-text "[^: ]*")} - :type - :allocation ${3::class :instance} - :documentation "${2:about-slot}") -$0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/typecast b/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/typecast deleted file mode 100644 index 1b61f47..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/lisp-mode/typecast +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: typecast -# name: cast -# -- -(coerce ${1:object} ${2:type}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-automake-mode/noinst_HEADERS b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-automake-mode/noinst_HEADERS deleted file mode 100644 index 2877a45..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-automake-mode/noinst_HEADERS +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: noinst_HEADERS -# key: noinst -# uuid: noinst -# -- -noinst_HEADERS = $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/PHONY b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/PHONY deleted file mode 100644 index c64a5d9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/PHONY +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: PHONY -# key: phony -# uuid: phony -# -- -.PHONY: $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/echo b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/echo deleted file mode 100644 index d1a288d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/echo +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: echo -# key: echo -# uuid: echo -# -- -@echo ${1:"message to output"} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/gen b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/gen deleted file mode 100644 index 28e2fe5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/gen +++ /dev/null @@ -1,12 +0,0 @@ -# -*- mode: snippet -*- -# name: gen -# key: gen -# uuid: gen -# possibly add some smart control over the list -# -- -all: ${1:targets} - -$0 - -clean: - ${2:clean actions} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/if b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/if deleted file mode 100644 index 89617a8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/if +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: if -# key: if -# uuid: if -# -- -@if [ ${1:cond} ] - then $0 -fi diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/var b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/var deleted file mode 100644 index aeb17b6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-bsdmake-mode/var +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: var -# key: $ -# uuid: $ -# -- -$(${1:VAR})$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/patsubst b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/patsubst deleted file mode 100644 index 902b260..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/patsubst +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: patsubst -# -- -$(patsubst ${1:from},${2:to},${3:src}) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/phony b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/phony deleted file mode 100644 index d11d342..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/phony +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: phony -# -- -.PHONY = $0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/wildcard b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/wildcard deleted file mode 100644 index efa944a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-gmake-mode/wildcard +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: wildcard -# -- -$(wildcard $0) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-mode/all b/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-mode/all deleted file mode 100644 index 7d0b0e6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/makefile-mode/all +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: all -# key: all -# uuid: all -# -- -all: - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/code b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/code deleted file mode 100644 index 453bb40..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/code +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Code block -# -- -\`\`\`${1:lang} -$0 -\`\`\` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h1 b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h1 deleted file mode 100644 index f5c5194..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h1 +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Header 1 (#) -# key: h1 -# uuid: h1 -# -- -# ${1:Header 1}`(unless markdown-asymmetric-header " #")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h2 b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h2 deleted file mode 100644 index f1edaf5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h2 +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Header 2 (##) -# key: h2 -# uuid: h2 -# -- -## ${1:Header 2}`(unless markdown-asymmetric-header " ##")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h3 b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h3 deleted file mode 100644 index 0b36721..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h3 +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Header 3 -# key: h3 -# uuid: h3 -# -- -### ${1:Header 3}`(unless markdown-asymmetric-header " ###")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h4 b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h4 deleted file mode 100644 index df69bfd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h4 +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Header 4 -# key: h4 -# uuid: h4 -# -- -#### ${1:Header 4}`(unless markdown-asymmetric-header " ####")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h5 b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h5 deleted file mode 100644 index 8d5408d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h5 +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Header 5 -# key: h5 -# uuid: h5 -# -- -##### ${1:Header 5}`(unless markdown-asymmetric-header " #####")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h6 b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h6 deleted file mode 100644 index 59ba638..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/h6 +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Header 6 -# key: h6 -# uuid: h6 -# -- -###### ${1:Header 6}`(unless markdown-asymmetric-header " ######")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/hr b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/hr deleted file mode 100644 index a1a48f6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/hr +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: hr -# key: --- -# uuid: --- -# binding: direct-keybinding -# -- -------------------------------------------------------------------------------- \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/img b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/img deleted file mode 100644 index 3f0fb0f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/img +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Image -# -- -![${1:Alt Text}](${2:URL})$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/kbd b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/kbd deleted file mode 100644 index 4817324..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/kbd +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: ... -# -- -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/link b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/link deleted file mode 100644 index 2c12223..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/link +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Link -# -- -[${1:`(or % "text")`}](${2:http://$3})$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/ol b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/ol deleted file mode 100644 index cf8e31a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/ol +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Ordered List -# -- -${1:1}. ${2:Text} -${1:$(number-to-string (1+ (string-to-number %)))}. $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rimg b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rimg deleted file mode 100644 index e14964d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rimg +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Referenced Image -# -- -![${1:Alt Text}][$2]$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rlb b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rlb deleted file mode 100644 index 44b5f5e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rlb +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: Reference Label -# contributor: Peng Deng -# -- -[${1:Reference}]: ${2:URL} $3 -$0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rlink b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rlink deleted file mode 100644 index be20fa4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/rlink +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: Reference Link -# -- -[${1:Link Text}][$2]$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/utf8 b/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/utf8 deleted file mode 100644 index f21e9a6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/markdown-mode/utf8 +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: utf-8 encoding -# -- - -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/org-mode/no-tangle b/Emacs/.config/emacs/.config/yasnippet/snippets/org-mode/no-tangle new file mode 100644 index 0000000..c4bbb93 --- /dev/null +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/org-mode/no-tangle @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: no-tangle +# key: >> ${1:function calls} -${2:desired output} -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/eq b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/eq deleted file mode 100644 index 685506f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/eq +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: __eq__ -# key: eq -# uuid: eq -# group: dunder methods -# -- -def __eq__(self, other): - return self.$1 == other.$1 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/for b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/for index edadb43..e58eb33 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/for +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/for @@ -5,4 +5,4 @@ # group: control structure # -- for ${1:var} in ${2:collection}: - ${3:`(or % "pass")`} \ No newline at end of file + ${3:pass} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/from b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/from deleted file mode 100644 index 52d27c9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/from +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: from -# key: from -# uuid: from -# group: general -# -- -from ${1:lib} import ${2:funs} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/function_docstring b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/function_docstring deleted file mode 100644 index b7f77dc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/function_docstring +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: function_docstring -# key: fd -# uuid: fd -# group: definitions -# -- -def ${1:name}($2): - \"\"\"$3 - ${2:$(python-args-to-docstring)} - \"\"\" - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/if b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/if deleted file mode 100644 index e055028..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/if +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: if -# key: if -# uuid: if -# group: control structure -# -- -if ${1:cond}: - ${2:`(or % "pass")`} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ife b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ife deleted file mode 100644 index 017e88a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ife +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: ife -# key: ife -# uuid: ife -# group: control structure -# -- -if $1: - ${2:`(or % "pass")`} -else: - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ifmain b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ifmain index 29a6650..eee8f0f 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ifmain +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ifmain @@ -2,4 +2,4 @@ # name: ifmain # -- if __name__ == '__main__': - ${1:`(or % "pass")`} \ No newline at end of file + ${1:pass} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/import b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/import deleted file mode 100644 index 2989140..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/import +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: import -# key: imp -# uuid: imp -# group: general -# -- -import ${1:lib}${2: as ${3:alias}} -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/init b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/init deleted file mode 100644 index 4d11fe6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/init +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: init -# key: init -# uuid: init -# group: definitions -# -- -def __init__(self${1:, args}): - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/init_docstring b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/init_docstring deleted file mode 100644 index e3a8509..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/init_docstring +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: init_docstring -# key: initd -# uuid: initd -# group: definitions -# -- -def __init__(self$1): - \"\"\"$2 - ${1:$(python-args-to-docstring)} - \"\"\" - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/interact b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/interact deleted file mode 100644 index 85b0215..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/interact +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: interact -# key: int -# uuid: int -# -- -import code; code.interact(local=locals()) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ipdbdebug b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ipdbdebug deleted file mode 100644 index 6dabcfe..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/ipdbdebug +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: ipdb trace -# key: itr -# uuid: itr -# group: debug -# -- -import ipdb; ipdb.set_trace() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/iter b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/iter deleted file mode 100644 index 83792d7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/iter +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: __iter__ -# key: iter -# uuid: iter -# group: dunder methods -# -- -def __iter__(self): - return ${1:iter($2)} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/lambda b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/lambda deleted file mode 100644 index 302d71c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/lambda +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: lambda -# key: lam -# uuid: lam -# -- -lambda ${1:x}: $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/list b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/list index 6934c76..46099d0 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/list +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/list @@ -4,4 +4,4 @@ # uuid: li # group: definitions # -- -[${1:x} for $1 in ${2:list}] \ No newline at end of file +[${3:$1} for ${1:x} in ${2:list}] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/logger_name b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/logger_name deleted file mode 100644 index ae7d86a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/logger_name +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: logger_name -# key: ln -# uuid: ln -# -- -logger = logging.getLogger(__name__) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/logging b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/logging deleted file mode 100644 index df0a9b4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/logging +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: logging -# key: log -# uuid: log -# -- -logger = logging.getLogger("${1:name}") -logger.setLevel(logging.${2:level}) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/main b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/main deleted file mode 100644 index d835607..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/main +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: main -# key: main -# uuid: main -# -- -def main(): - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/metaclass b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/metaclass deleted file mode 100644 index 9fce8cc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/metaclass +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: metaclass -# key: mt -# uuid: mt -# group: object oriented -# -- -__metaclass__ = type \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/method b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/method deleted file mode 100644 index 9eb1afa..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/method +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: method -# group: object oriented -# -- -def ${1:method_name}(self${2:, $3}): - $0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/method_docstring b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/method_docstring deleted file mode 100644 index 861e276..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/method_docstring +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: method_docstring -# key: defd -# uuid: defd -# group: object oriented -# -- -def ${1:name}(self$2): - \"\"\"$3 - ${2:$(python-args-to-docstring)} - \"\"\" - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/not_impl b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/not_impl deleted file mode 100644 index 00c35d1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/not_impl +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: not_impl -# key: not_impl -# uuid: not_impl -# -- -raise NotImplementedError \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/np b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/np deleted file mode 100644 index 21b05a7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/np +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: np -# key: np -# uuid: np -# group: general -# -- -import numpy as np -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/parse_args b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/parse_args deleted file mode 100644 index dd3636a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/parse_args +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: parse_args -# key: pargs -# uuid: pargs -# group: argparser -# -- -def parse_arguments(): - parser = argparse.ArgumentParser(description='$1') - $0 - return parser.parse_args() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/parser b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/parser deleted file mode 100644 index 4b85de0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/parser +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: parser -# key: pars -# uuid: pars -# group: argparser -# -- -parser = argparse.ArgumentParser(description='$1') -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/pass b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/pass deleted file mode 100644 index c201916..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/pass +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: pass -# key: ps -# uuid: ps -# -- -pass \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/print b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/print deleted file mode 100644 index 867c8fc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/print +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: print -# key: p -# uuid: p -# -- -print($0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/prop b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/prop deleted file mode 100644 index 6ca454a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/prop +++ /dev/null @@ -1,18 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Mads D. Kristensen -# name: prop -# -- -def ${1:foo}(): - doc = """${2:Doc string}""" - def fget(self): - return self._$1 - - def fset(self, value): - self._$1 = value - - def fdel(self): - del self._$1 - return locals() -$1 = property(**$1()) - -$0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/reg b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/reg deleted file mode 100644 index b4c5b60..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/reg +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: reg -# key: reg -# uuid: reg -# group: general -# -- -${1:regexp} = re.compile(r"${2:expr}") -$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/repr b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/repr deleted file mode 100644 index 3aa66b9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/repr +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: __repr__ -# key: repr -# uuid: repr -# group: dunder methods -# -- -def __repr__(self): - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/return b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/return deleted file mode 100644 index 70eda2f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/return +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: return -# key: r -# uuid: r -# -- -return $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/script b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/script deleted file mode 100644 index c08d0bb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/script +++ /dev/null @@ -1,12 +0,0 @@ -# -*- mode: snippet -*- -# name: script -# key: script -# uuid: script -# -- -#!/usr/bin/env python - -def main(): - pass - -if __name__ == '__main__': - main() diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/self b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/self deleted file mode 100644 index abbad8c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/self +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: self -# key: . -# uuid: . -# group: object oriented -# -- -self.$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/self_without_dot b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/self_without_dot deleted file mode 100644 index fd68278..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/self_without_dot +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: self_without_dot -# key: s -# uuid: s -# group: object oriented -# -- -self \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/selfassign b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/selfassign deleted file mode 100644 index 68e2630..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/selfassign +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: selfassign -# key: sn -# uuid: sn -# group: object oriented -# -- -self.$1 = $1 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/setdef b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/setdef deleted file mode 100644 index 6f97f5d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/setdef +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: setdef -# key: setdef -# uuid: setdef -# -- -${1:var}.setdefault(${2:key}, []).append(${3:value}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/setup b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/setup deleted file mode 100644 index 524c4ca..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/setup +++ /dev/null @@ -1,15 +0,0 @@ -# -*- mode: snippet -*- -# name: setup -# key: setup -# uuid: setup -# group: distribute -# -- -from setuptools import setup - -package = '${1:name}' -version = '${2:0.1}' - -setup(name=package, - version=version, - description="${3:description}", - url='${4:url}'$0) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/size b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/size deleted file mode 100644 index abe249f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/size +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: size -# key: size -# uuid: size -# -- -sys.getsizeof($0) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/static b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/static deleted file mode 100644 index 3222c2f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/static +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: static -# key: defs -# uuid: defs -# -- -@staticmethod -def ${1:method_name}($1): - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/str b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/str deleted file mode 100644 index 21f50cd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/str +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: __str__ -# key: str -# uuid: str -# group: dunder methods -# -- -def __str__(self): - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/super b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/super deleted file mode 100644 index 83d98e8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/super +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: super -# key: super -# uuid: super -# group: object oriented -# -- -super(${1:Class}, self).${2:function}(${3:args}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/test_class b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/test_class deleted file mode 100644 index 18b5415..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/test_class +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: test_class -# key: tcs -# uuid: tcs -# group : testing -# -- -class Test${1:toTest}(${2:unittest.TestCase}): - $0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/test_file b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/test_file deleted file mode 100644 index 42911c8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/test_file +++ /dev/null @@ -1,13 +0,0 @@ -# -*- mode: snippet -*- -# name: test_file -# key: tf -# uuid: tf -# group : testing -# -- -import unittest -${1:from ${2:test_file} import *} - -$0 - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/trace b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/trace deleted file mode 100644 index f4e356f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/trace +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: trace -# key: tr -# uuid: tr -# group: debug -# -- -import pdb; pdb.set_trace() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/try b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/try index bc77831..8bf0b8b 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/try +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/try @@ -4,6 +4,6 @@ # uuid: try # -- try: - ${1:`(or % "pass")`} + ${1:pass} except ${2:Exception}: $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/tryelse b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/tryelse index 505dac7..d155184 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/tryelse +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/tryelse @@ -4,8 +4,8 @@ # uuid: try # -- try: - $1 -except $2: - $3 + ${1:pass} +except ${2:Exception}: + ${3:pass} else: $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/unicode b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/unicode deleted file mode 100644 index 9546668..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/unicode +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: __unicode__ -# key: un -# uuid: un -# group: dunder methods -# -- -def __unicode__(self): - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/utf8 b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/utf8 deleted file mode 100644 index 7ab1671..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/utf8 +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: utf-8 encoding -# key: utf8 -# uuid: utf8 -# -- -# -*- coding: utf-8 -*- diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/while b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/while deleted file mode 100644 index 6eb8d34..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/while +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: while -# key: wh -# uuid: wh -# group: control structure -# -- -while ${1:True}: - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/with_statement b/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/with_statement deleted file mode 100644 index 218e7b7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/python-mode/with_statement +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: with_statement -# key: fw -# uuid: fw -# group: future -# -- -from __future__ import with_statement \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/File-open b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/File-open deleted file mode 100644 index cf49c23..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/File-open +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: File::open(...) -# key: fo -# uuid: fo -# -- -File::open(${1:})`(if (eolp) ";" "")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/None b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/None deleted file mode 100644 index 63c3f82..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/None +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: None -# key: no -# uuid: no -# -- -None \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Result b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Result deleted file mode 100644 index 4e3df10..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Result +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: Result -# key: res -# uuid: res -# -- -Result<${1:T}, ${2:()}> \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Some b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Some deleted file mode 100644 index d6de2c3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Some +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: Some(...) -# key: so -# uuid: so -# -- -Some(${1:}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/String_from b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/String_from deleted file mode 100644 index d01f2a6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/String_from +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: String::from(...) -# key: sf -# uuid: sf -# -- -String::from("$0") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Vec-with_capacity b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Vec-with_capacity deleted file mode 100644 index 2eb50ec..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/Vec-with_capacity +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: Vec::with_capacity(...) -# key: vwc -# uuid: vwc -# -- -Vec::with_capacity(${1:n}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/allow b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/allow deleted file mode 100644 index c30c1e8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/allow +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: #[allow(lint)] -# key: allow -# -- -#[allow(${1:lint})] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/allow! b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/allow! deleted file mode 100644 index cfb0c7d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/allow! +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: #![allow(lint)] -# key: allow! -# -- -#![allow(${1:lint})] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/arrow b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/arrow deleted file mode 100644 index 404cf5c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/arrow +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: x => y -# key: => -# uuid: => -# -- -${1:_} => ${0:...} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/asref b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/asref deleted file mode 100644 index 063f82a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/asref +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: impl AsRef for Type -# key: asref -# uuid: asref -# -- -impl std::convert::AsRef<${1:Type}> for ${2:Type} { - fn as_ref(&self) -> &$2 { - $0 - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert deleted file mode 100644 index bbdc741..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: assert!(...) -# key: ass -# uuid: ass -# -- -assert!($0); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert_eq b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert_eq deleted file mode 100644 index 3de462f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert_eq +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: assert_eq!(..., ...) -# key: asse -# uuid: asse -# -- -assert_eq!(${1:}, $2); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert_ne b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert_ne deleted file mode 100644 index 2c83c1a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assert_ne +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: assert_ne!(..., ...) -# key: assn -# uuid: assn -# -- -assert_ne!(${1:}, $2); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assignment b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assignment deleted file mode 100644 index c410d3e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/assignment +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: assignment -# key: = -# uuid: = -# -- -${1:x} = ${2:value}`(if (eolp) ";" "")`$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/case b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/case deleted file mode 100644 index 9ea6609..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/case +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: pattern => expression, -# key: case -# -- -${1:pattern} => ${2:expression}, \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/cfg b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/cfg deleted file mode 100644 index ce00c0a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/cfg +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: #[cfg(...)] -# -- -#[cfg($0)] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/cfg= b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/cfg= deleted file mode 100644 index 588596f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/cfg= +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: #[cfg(option = "value")] -# -- -#[cfg(${1:option} = "${2:value}")] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/const b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/const deleted file mode 100644 index e352aad..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/const +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: const VAR = ... -# key: const -# uuid: const -# -- -const ${1:VARNAME}${2: ${3:i32}} = ${4:value}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/debug_assert b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/debug_assert deleted file mode 100644 index 21ddad4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/debug_assert +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: debug_assert!(...) -# key: dass -# uuid: dass -# -- -debug_assert!($0); \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/deref b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/deref deleted file mode 100644 index 7cf9c02..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/deref +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: impl Deref for Type -# key: deref -# uuid: deref -# -- -impl std::ops::Deref for ${1:Type} { - type Target = ${2:Type}; - fn deref(&self) -> &Self::Target { - &self.$0 - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/deref_mut b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/deref_mut deleted file mode 100644 index 7ea39a0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/deref_mut +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: impl DerefMut for Type -# key: deref_mut -# uuid: deref_mut -# -- -impl std::ops::DerefMut for ${1:Type} { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.$0 - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/derive b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/derive deleted file mode 100644 index cf30bcc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/derive +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: #[derive(...)] -# key: der -# uuid: der -# -- -#[derive($1)] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/disperror b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/disperror deleted file mode 100644 index fd91031..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/disperror +++ /dev/null @@ -1,16 +0,0 @@ -# -*- mode: snippet -*- -# name: Display and Error Traits -# key: disperror -# uuid: disperror -# -- -impl Display for $1 { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", $0) - } -} - -impl std::error::Error for ${1:Type} { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - None - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/display b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/display deleted file mode 100644 index 1764f67..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/display +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: impl Display for Type { fn fmt (...) } -# key: display -# -- -impl Display for ${1:Type} { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "$0") - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/else b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/else deleted file mode 100644 index 4f835c1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/else +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: else { ... } -# key: else -# uuid: else -# -- -else { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/elseif b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/elseif deleted file mode 100644 index 39650b0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/elseif +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: else if ... { ... } -# key: elif -# uuid: elif -# -- -else if ${1:true} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/enum b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/enum deleted file mode 100644 index 25527be..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/enum +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: enum -# key: enum -# uuid: enum -# -- -enum ${1:EnumName} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/env-args b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/env-args deleted file mode 100644 index 2e07306..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/env-args +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: env::args() -# key: argv -# uuid: argv -# -- -env::args() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/env-var b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/env-var deleted file mode 100644 index 1c2fd6c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/env-var +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: env::var(...) -# key: envv -# uuid: envv -# -- -env::var("$1") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/eprintln b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/eprintln deleted file mode 100644 index d4c7d4b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/eprintln +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: eprintln!(...) -# key: ep -# uuid: ep -# -- -eprintln!("$1", ${2:});$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/error b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/error deleted file mode 100644 index fc77089..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/error +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: impl Error for Type { fn source(...) } -# key: error -# uuid: error -# -- -impl std::error::Error for ${1:Type} { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - $0 - None - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/extern b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/extern deleted file mode 100644 index a0dcd68..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/extern +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: extern "C" { ... } -# key: extc -# uuid: extc -# -- -extern "C" { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/extern-crate b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/extern-crate deleted file mode 100644 index d79399e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/extern-crate +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: extern crate ... -# key: ec -# uuid: ec -# -- -extern crate ${1:name}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/fn b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/fn deleted file mode 100644 index a68dad0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/fn +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: function -# key: fn -# uuid: fn -# -- -fn ${1:function_name}($2) ${3:-> ${4:i32} }{ - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/for b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/for deleted file mode 100644 index 7a7df24..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/for +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: for in -# key: for -# uuid: for -# -- -for ${1:x} in ${2:items} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/format b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/format deleted file mode 100644 index f187c86..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/format +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: format!(..., ...) -# key: f -# uuid: f -# -- -format!("$1", ${2:}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/from b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/from deleted file mode 100644 index e04e7f0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/from +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: impl From for Type { fn from(...) } -# key: from -# -- -impl From<${1:From}> for ${2:Type} { - fn from(source: $1) -> Self { - $0 - Self { } - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/fromstr b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/fromstr deleted file mode 100644 index db95288..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/fromstr +++ /dev/null @@ -1,12 +0,0 @@ -# -*- mode: snippet -*- -# name: impl FromStr for Type { fn from_str(...) } -# key: fromstr -# -- -impl FromStr for ${1:Type} { - type Err = ${2:Error}; - - fn from_str(s: &str) -> Result { - - Ok(Self{}) - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/if b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/if deleted file mode 100644 index 1981003..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/if +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: if ... { ... } -# key: if -# uuid: if -# -- -if ${1:x} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/if-let b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/if-let deleted file mode 100644 index 0e2571c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/if-let +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: if let ... -# key: ifl -# uuid: ifl -# -- -if let ${1:Some(${2:x})} = ${3:var} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/ignore b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/ignore deleted file mode 100644 index b2e9013..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/ignore +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: #[ignore] -# key: ign -# uuid: ign -# -- -#[ignore] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/impl b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/impl deleted file mode 100644 index 3f15ec3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/impl +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: impl -# -- -impl ${1:name}${2: for ${3:Type}} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/inline-if-else b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/inline-if-else deleted file mode 100644 index 3672fab..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/inline-if-else +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: inline if-else -# key: ife -# uuid: ife -# -- -if ${1:x} {${2:}}${3: else {$4}}$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/iterator b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/iterator deleted file mode 100644 index 4f026a9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/iterator +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# name: impl Iterator for Type -# key: iterator -# uuid: iterator -# -- -impl Iterator for ${1:Type} { - type Item = ${2:Type}; - fn next(&mut self) -> Option { - $0 - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/lambda b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/lambda deleted file mode 100644 index eced267..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/lambda +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: anonymous function -# key: fn -# uuid: fn -# -- -|${1:x}|${2: -> i32} `(if (> (doom-snippets-count-lines %) 1) "{ " "")``(doom-snippets-format "%n%s%n")`$0`(if (> (doom-snippets-count-lines %) 1) " }" "")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/let b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/let deleted file mode 100644 index a9be8d7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/let +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: let -# key: let -# uuid: let -# -- -let ${1:var} = $0`(if (eolp) ";" "")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/letm b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/letm deleted file mode 100644 index 8cd6c1e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/letm +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: let mut -# key: letm -# uuid: letm -# -- -let mut ${1:var} = $0`(if (eolp) ";" "")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/lifetime-static b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/lifetime-static deleted file mode 100644 index 7c7d140..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/lifetime-static +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: 'static -# key: 's -# uuid: 's -# -- -'static \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/macro b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/macro deleted file mode 100644 index 9ec9d72..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/macro +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: macro_rules! name { (..) => (..); } -# key: macro -# uuid: macro -# -- -macro_rules! ${1:name} { - ($2) => ($3); -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/main b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/main deleted file mode 100644 index d6092bf..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/main +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: main -# key: main -# uuid: main -# -- -fn main() { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/match b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/match deleted file mode 100644 index aa4d1d2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/match +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: match -# uuid: match -# key: match -# -- -match ${1:x} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/match-ok b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/match-ok deleted file mode 100644 index c9762dd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/match-ok +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: match n { Ok(x), Err(y) } -# key: match? -# uuid: match? -# -- -match ${1:x} { - Ok(${2:var}) => $3, - Err(${4:error}) => $5 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/mod b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/mod deleted file mode 100644 index bc8bd61..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/mod +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: mod -# key: mod -# uuid: mod -# -- -mod ${1:name} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/new b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/new deleted file mode 100644 index b7d0def..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/new +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: Type::new(...) -# key: new -# uuid: new -# -- -${1:Vec}::new(${2:})`(if (eolp) ";" "")` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/panic b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/panic deleted file mode 100644 index 74f5384..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/panic +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: panic!(...) -# key: pa -# uuid: pa -# -- -panic!("$1", ${2:});$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/partial b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/partial deleted file mode 100644 index 76c29fe..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/partial +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: impl PartialEq for Type -# key: partial -# uuid: partial -# -- -impl PartialEq for ${1:Type} { - fn eq(&self, other: &Self) -> bool { - $0 - } -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/println b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/println deleted file mode 100644 index df122f2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/println +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: println!(...) -# key: p -# uuid: p -# -- -println!("$1", ${2:});$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/pub_fn b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/pub_fn deleted file mode 100644 index 617e3c3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/pub_fn +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: public function -# key: pfn -# uuid: pfn -# -- -pub fn ${1:function_name}($2) ${3:-> ${4:i32} }{ - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/pub_mod b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/pub_mod deleted file mode 100644 index 9227242..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/pub_mod +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: pub mod -# key: pmod -# uuid: pmod -# -- -pub mod ${1:name} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/ret b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/ret deleted file mode 100644 index 5804823..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/ret +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: return -# key: ret -# uuid: ret -# -- -return ${1:};$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/static b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/static deleted file mode 100644 index 8e66349..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/static +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: static VAR = ... -# key: static -# uuid: static -# -- -static ${1:VARNAME}${2:: ${3:i32}} = ${4:value}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/struct b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/struct deleted file mode 100644 index bce4ff2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/struct +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: struct -# uuid: struct -# key: struct -# -- -struct ${1:Name} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/struct_alias b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/struct_alias deleted file mode 100644 index bb0c2d7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/struct_alias +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: struct -# uuid: struct_alias -# key: st -# type: command -# -- -(doom-snippets-expand :uuid "struct") \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/test b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/test deleted file mode 100644 index 836b057..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/test +++ /dev/null @@ -1,9 +0,0 @@ -# -*- mode: snippet -*- -# name: test function -# key: test -# uuid: test -# -- -#[test] -fn ${1:test_name}() { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/testmod b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/testmod deleted file mode 100644 index f0be987..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/testmod +++ /dev/null @@ -1,13 +0,0 @@ -# -*- mode: snippet -*- -# name: test module -# key: testmod -# -- -#[cfg(test)] -mod ${1:tests} { - use super::*; - - #[test] - fn ${2:test_name}() { - $0 - } -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/trait b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/trait deleted file mode 100644 index 255e4a6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/trait +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: trait ... { ... } -# uuid: trait -# key: trait -# -- -trait ${1:Name} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/type b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/type deleted file mode 100644 index 1b88ffb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/type +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: type Name = ...; -# key: type -# uuid: type -# -- -type ${1:TypeName} = ${2:i32}; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/union b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/union deleted file mode 100644 index bfd93aa..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/union +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: union Type { ... } -# key: union -# -- -union ${1:Type} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use deleted file mode 100644 index 6613f91..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: use ... -# key: use -# uuid: use -# -- -use ${1:std::${2:io}};$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use-File b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use-File deleted file mode 100644 index a8f5700..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use-File +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: use std::fs::File -# key: ufile -# uuid: ufile -# -- -use std::fs::File; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use-HashMap b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use-HashMap deleted file mode 100644 index 339b4f6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/use-HashMap +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: use std::collections::HashMap -# key: uhashmap -# uuid: uhashmap -# -- -use std::collections::HashMap; \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/vec b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/vec deleted file mode 100644 index ea5fcc5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/vec +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: vec![...] -# key: v -# uuid: v -# -- -vec![${1:}] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/warn b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/warn deleted file mode 100644 index acf5c5c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/warn +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: #[warn(lint)] -# key: warn -# -- -#[warn(${1:lint})] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/warn! b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/warn! deleted file mode 100644 index 2f4885d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/warn! +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: #![warn(lint)] -# key: warn! -# -- -#![warn(${1:lint})] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/while-let b/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/while-let deleted file mode 100644 index 4e36327..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/rust-mode/while-let +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: while let PATTERN = EXPR { ... } -# key: whilel -# uuid: whilel -# -- -while let ${1:pattern} = ${2:expression} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@if b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@if deleted file mode 100644 index be5e360..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@if +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: @if -# key: if -# uuid: if -# -- -@if ${1:condition} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@mixin b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@mixin deleted file mode 100644 index 58dc216..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@mixin +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: @mixin -# key: mix -# uuid: mix -# -- -@mixin ${1:mixin-name}($2) { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@while b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@while deleted file mode 100644 index b26a377..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/@while +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: @while -# key: while -# uuid: while -# -- -@while ${1:condition} { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/abs b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/abs deleted file mode 100644 index 7b34ae3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/abs +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: abs($number) -# group: Number functions -# -- -abs(${1:$number}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/adjust-color b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/adjust-color deleted file mode 100644 index 5b55f18..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/adjust-color +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: adjust-color($color, [$r], [$g], [$b], [$hue], [$sat], [$light], [$alpha]) -# group: Other color functions -# -- -adjust-color(${1:$color}, ${2:[$r]}, ${3:[$g]}, ${4:[$b]}, ${5:[$hue]}, ${6:[$sat]}, ${7:[$light]}, ${8:[$alpha]}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/adjust-hue b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/adjust-hue deleted file mode 100644 index ea12152..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/adjust-hue +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: adjust-hue($color, $degree) -# group: HSL functions -# -- -adjust-hue(${1:$color}, ${2:$degree}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/alpha b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/alpha deleted file mode 100644 index 48d6349..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/alpha +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: alpha($color) -# group: Opacity functions -# -- -alpha(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/append b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/append deleted file mode 100644 index 64d8256..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/append +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: append($list, $value, [$separator]) -# group: List functions -# -- -append(${1:$list}, ${2:$value}, ${3:[$sep]}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/blue b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/blue deleted file mode 100644 index 424b39b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/blue +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: blue($color) -# group: RGB functions -# -- -blue(${1:color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/call b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/call deleted file mode 100644 index 1acaea6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/call +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: call($name, ...) -# group: Introspection functions -# -- -call(${1:$name}, ${2:$args...}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/ceil b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/ceil deleted file mode 100644 index c3bbab3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/ceil +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: ceil($number) -# group: Number functions -# -- -ceil(${1:$number}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/change-color b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/change-color deleted file mode 100644 index 4ee4e09..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/change-color +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: change-color($color, [$r], [$g], [$b], [$hue], [$sat], [$light], [$alpha]) -# group: Other color functions -# -- -change-color(${1:$color}, ${2:[$r]}, ${3:[$g]}, ${4:[$b]}, ${5:[$hue]}, ${6:[$sat]}, ${7:[$light]}, ${8:[$alpha]}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/comparable b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/comparable deleted file mode 100644 index 8be68f3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/comparable +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: comparable($number1, $number2) -# group: Introspection functions -# -- -comparable(${1:$number1}, ${2:$number2}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/complement b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/complement deleted file mode 100644 index 11f1892..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/complement +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: complement($color) -# group: HSL functions -# -- -complement(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/darken b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/darken deleted file mode 100644 index b298470..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/darken +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: darken($color, $amount) -# group: HSL functions -# -- -darken(${1:$color}, ${2:$amount}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/desaturate b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/desaturate deleted file mode 100644 index ca7bda5..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/desaturate +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: desaturate($color, $amount) -# group: HSL functions -# -- -desaturate(${1:$color}, ${2:$amount}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/each b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/each deleted file mode 100644 index b54bd9f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/each +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: @each -# -- -@each \$${1:var} in ${2:list, of, things} { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/else b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/else deleted file mode 100644 index f823adb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/else +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: @else -# -- -@else { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/elseif b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/elseif deleted file mode 100644 index 6c9acac..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/elseif +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: @elseif -# -- -@else if ${1:condition} { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/fade-in b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/fade-in deleted file mode 100644 index 0c7dc41..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/fade-in +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: fade-in($color, $amount) -# group: Opacity functions -# -- -fade-in(${1:$color}, ${2:$amount}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/fade-out b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/fade-out deleted file mode 100644 index f9a9e8f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/fade-out +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: fade-out($color, $amount) -# group: Opacity functions -# -- -fade-out(${1:$color}, ${2:$amount}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/feature-exists b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/feature-exists deleted file mode 100644 index bc7f752..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/feature-exists +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: feature-exists($feature) -# group: Introspection functions -# -- -feature-exists(${1:$feature}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/floor b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/floor deleted file mode 100644 index 22acf32..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/floor +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: floor($number) -# group: Number functions -# -- -floor(${1:$number}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/for b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/for deleted file mode 100644 index 63fd434..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/for +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: @for loop -# -- -@for \$i from ${1:1} through ${2:10} { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/function-exists b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/function-exists deleted file mode 100644 index 7916323..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/function-exists +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: function-exists($name) -# group: Introspection functions -# -- -function-exists(${1:$name}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/global-variable-exists b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/global-variable-exists deleted file mode 100644 index b9f6ccc..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/global-variable-exists +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: global-variable-exists($name) -# group: Introspection functions -# -- -global-variable-exists(${1:$name}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/grayscale b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/grayscale deleted file mode 100644 index 5ca9e11..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/grayscale +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: grayscale($color) -# group: HSL functions -# -- -grayscale(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/green b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/green deleted file mode 100644 index 0ed926e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/green +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: green($color) -# group: RGB functions -# -- -green(${1:color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hsl b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hsl deleted file mode 100644 index 6f844fa..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hsl +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: hsl($hue, $saturation, $lightness) -# group: HSL functions -# -- -hsl(${1:$hue}, ${2:$saturation}, ${3:$lightness}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hsla b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hsla deleted file mode 100644 index b7b6cfa..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hsla +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: hsl($hue, $saturation, $lightness, $alpha) -# group: HSL functions -# -- -hsla(${1:$hue}, ${2:$saturation}, ${3:$lightness}, ${4:alpha}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hue b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hue deleted file mode 100644 index 32502e3..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/hue +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: hue($color) -# group: HSL functions -# -- -hue(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/ie-hex-str b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/ie-hex-str deleted file mode 100644 index 51ba7a8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/ie-hex-str +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: ie-hex-str($color) -# group: Other color functions -# -- -ie-hex-str(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/index b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/index deleted file mode 100644 index 3eb78d8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/index +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: index($list, $value) -# group: List functions -# -- -index(${1:$list}, ${2:$value}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/inspect b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/inspect deleted file mode 100644 index aa4bc42..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/inspect +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: inspect($value) -# group: Introspection functions -# -- -inspect(${1:$value}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/invert b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/invert deleted file mode 100644 index e71b78e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/invert +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: invert($color) -# group: HSL functions -# -- -invert(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/join b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/join deleted file mode 100644 index 698e6fd..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/join +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: join($list1, $list2, [$separator]) -# group: List functions -# -- -join(${1:$list1}, ${2:$list2}, ${3:[$sep]}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/keywords b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/keywords deleted file mode 100644 index cfdd889..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/keywords +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: keywords($args) -# group: Map functions -# -- -keywords(${1:$args}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/length b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/length deleted file mode 100644 index 2910f0e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/length +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: length($list) -# group: List functions -# -- -length(${1:$list}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/lighten b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/lighten deleted file mode 100644 index 69385ba..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/lighten +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: lighten($color, $amount) -# group: HSL functions -# -- -lighten(${1:$color}, ${2:$amount}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/lightness b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/lightness deleted file mode 100644 index 4ebd4a1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/lightness +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: lightness($color) -# group: HSL functions -# -- -lightness(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/list-separator b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/list-separator deleted file mode 100644 index b8ef5c9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/list-separator +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: list-separator($list) -# group: List functions -# -- -list-separator(${1:$list}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-get b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-get deleted file mode 100644 index 77d0b96..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-get +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: map-get($map, $key) -# group: Map functions -# -- -map-get(${1:$map}, ${2:$key}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-has-key b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-has-key deleted file mode 100644 index 4ff973e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-has-key +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: map-has-key($map, $key) -# group: Map functions -# -- -map-has-key(${1:$map}, ${2:$key}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-keys b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-keys deleted file mode 100644 index 2b66fd9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-keys +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: map-keys($map) -# group: Map functions -# -- -map-keys(${1:$map}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-merge b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-merge deleted file mode 100644 index 8842417..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-merge +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: map-merge($map1, $map2) -# group: Map functions -# -- -map-merge(${1:$map1}, ${2:$map2}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-remove b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-remove deleted file mode 100644 index 95e9f30..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-remove +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: map-remove($map, $key, ...) -# group: Map functions -# -- -map-remove(${1:$map}, ${2:$key}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-values b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-values deleted file mode 100644 index 7875e70..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/map-values +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: map-values($map) -# group: Map functions -# -- -map-values(${1:$map}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/max b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/max deleted file mode 100644 index 67d013f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/max +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: max($n1, $n2, ...) -# group: Number functions -# -- -max(${1:$n1}, ${2:$n2}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/min b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/min deleted file mode 100644 index beca119..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/min +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: min($n1, $n2, ...) -# group: Number functions -# -- -min(${1:$n1}, ${2:$n2}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/mix b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/mix deleted file mode 100644 index 36dab32..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/mix +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: mix($color1, $color2, [$weight]) -# group: RGB functions -# -- -mix(${1:$color1}, ${2:$color2}${3:, ${4:$weight}}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/mixin-exists b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/mixin-exists deleted file mode 100644 index 12e70a6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/mixin-exists +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: mixin-exists($name) -# group: Introspection functions -# -- -mixin-exists(${1:$name}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/nth b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/nth deleted file mode 100644 index 3dcee5d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/nth +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: nth($list, $n) -# group: List functions -# -- -nth(${1:$list}, ${2:$n}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/opacify b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/opacify deleted file mode 100644 index cc4c397..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/opacify +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: opacify($color, $amount) -# group: Opacity functions -# -- -opacify(${1:$color}, ${2:$amount}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/opacity b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/opacity deleted file mode 100644 index 52319f1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/opacity +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: opacity($color) -# group: Opacity functions -# -- -opacity(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/percentage b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/percentage deleted file mode 100644 index fc4fd56..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/percentage +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: percentage($number) -# group: Number functions -# -- -percentage(${1:$number}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/quote b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/quote deleted file mode 100644 index 1b81e73..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/quote +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: quote($string) -# group: String functions -# -- -quote(${1:$string}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/random b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/random deleted file mode 100644 index 70de049..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/random +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: random([$limit]) -# group: Number functions -# -- -random(${1:[$limit]}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/red b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/red deleted file mode 100644 index fefa406..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/red +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: red($color) -# group: RGB functions -# -- -red(${1:color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgb b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgb deleted file mode 100644 index c5fc5e8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgb +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: rgb($red, $green, $blue) -# group: RGB functions -# -- -rgb(${1:$red}, ${2:$green}, ${3:$blue}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgba b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgba deleted file mode 100644 index 79675f9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgba +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: rgb($red, $green, $blue, $alpha) -# group: RGB functions -# -- -rgba(${1:$red}, ${2:$green}, ${3:$blue}, ${4:alpha}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgbao b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgbao deleted file mode 100644 index e50f565..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/rgbao +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: rgba($color, $alpha) -# key: rgba -# uuid: rgba -# group: Opacity functions -# -- -rgba(${1:$color}, ${2:$alpha}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/round b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/round deleted file mode 100644 index 34299c4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/round +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: round($number) -# group: Number functions -# -- -round(${1:$number}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/saturate b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/saturate deleted file mode 100644 index 73adcac..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/saturate +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: saturate($color, $amount) -# group: HSL functions -# -- -saturate(${1:$color}, ${2:$amount}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/saturation b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/saturation deleted file mode 100644 index 9d8715c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/saturation +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: saturation($color) -# group: HSL functions -# -- -saturation(${1:$color}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/scale-color b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/scale-color deleted file mode 100644 index d5768d9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/scale-color +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: scale-color($color, [$r], [$g], [$b], [$sat], [$light], [$alpha]) -# group: Other color functions -# -- -scale-color(${1:$color}, ${2:[$r]}, ${3:[$g]}, ${4:[$b]}, ${5:[$sat]}, ${6:[$light]}, ${7:[$alpha]}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/set-nth b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/set-nth deleted file mode 100644 index 25b4810..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/set-nth +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: set-nth($list, $n, $value) -# group: List functions -# -- -set-nth(${1:$list}, ${2:$n}, ${3:$value}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-index b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-index deleted file mode 100644 index 567e1d9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-index +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: str-index($string, $substring) -# group: String functions -# -- -str-index(${1:$string}, ${2:$substring}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-insert b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-insert deleted file mode 100644 index 29537a4..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-insert +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: str-insert($string, $insert, $index) -# group: String functions -# -- -str-insert(${1:$string}, ${2:$insert}, ${3:$index}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-length b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-length deleted file mode 100644 index 16268f8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-length +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: str-length($string) -# group: String functions -# -- -str-length(${1:$string}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-slice b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-slice deleted file mode 100644 index b9295b7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/str-slice +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: str-slice($string, $start-at, [$end-at]) -# group: String functions -# -- -str-slice(${1:$string}, ${2:$start-at}${3:, ${4:$end-at}}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/to-lower-case b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/to-lower-case deleted file mode 100644 index 6846d33..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/to-lower-case +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: to-lower-case($string) -# group: String functions -# -- -to-lower-case(${1:$string}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/to-upper-case b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/to-upper-case deleted file mode 100644 index 6281ad1..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/to-upper-case +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: to-upper-case($string) -# group: String functions -# -- -to-upper-case(${1:$string}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/transparentize b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/transparentize deleted file mode 100644 index 260087c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/transparentize +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: transparentize($color, $amount) -# group: Opacity functions -# -- -transparentize(${1:$color}, ${2:$amount}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/type-of b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/type-of deleted file mode 100644 index c810628..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/type-of +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: type-of($value) -# group: Introspection functions -# -- -type-of(${1:$value}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unique-id b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unique-id deleted file mode 100644 index 47e5b80..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unique-id +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: unique-id() -# group: Misc functions -# -- -unique-id() \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unit b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unit deleted file mode 100644 index 5c6aa08..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unit +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: unit($number) -# group: Introspection functions -# -- -unit(${1:$number}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unitless b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unitless deleted file mode 100644 index 318643d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unitless +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: unitless($number) -# group: Introspection functions -# -- -unitless(${1:$number}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unquote b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unquote deleted file mode 100644 index aeb5ba8..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/unquote +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: unquote($string) -# group: String functions -# -- -unquote(${1:$string}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/variable-exists b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/variable-exists deleted file mode 100644 index 1309b67..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/variable-exists +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: variable-exists($name) -# group: Introspection functions -# -- -variable-exists(${1:$name}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/zip b/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/zip deleted file mode 100644 index e24c5e9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/scss-mode/zip +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: zip($list1, $list2, ...) -# group: List functions -# -- -zip(${1:$list1}, ${2:$list2}) \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/args b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/args deleted file mode 100644 index 196973f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/args +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: args -# key: args -# uuid: args -# -- -[ $# -lt ${1:2} ] \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/bang b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/bang index 9c825e4..83c5382 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/bang +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/bang @@ -1,7 +1,7 @@ # -*- mode: snippet -*- # name: bang -# key: #! +# key: bang # uuid: #! # -- -#!${1:/usr/bin/env `(symbol-name sh-shell)`} +#!/usr/bin/env `(symbol-name sh-shell)` $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/case b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/case deleted file mode 100644 index 276cdae..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/case +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet; require-final-newline: nil -*- -# name: case -# key: case -# uuid: case -# -- -case ${1:var} in - ${2:match}) $0 ;; -esac \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/elif b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/elif deleted file mode 100644 index 127e26e..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/elif +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: elif -# key: elif -# uuid: elif -# -- -elif ${1:condition}; then - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/else b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/else deleted file mode 100644 index 974a23d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/else +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: else -# key: else -# uuid: else -# -- -else - $0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/f b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/f deleted file mode 100644 index 749a932..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/f +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: short function -# key: f -# uuid: f -# -- -${1:name}() { - $0 -} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/for b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/for index f990ebf..5f6d615 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/for +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/for @@ -3,6 +3,7 @@ # key: for # uuid: for # -- -for ${1:var} in ${2:stuff}; do +for ${1:var} in ${2:stuff} +do $0 done \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/function b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/function deleted file mode 100644 index 2adefa2..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/function +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: function -# -- -function ${1:name} { - $0 -} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/gt b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/gt deleted file mode 100644 index 0a59165..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/gt +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: Greater than -# key: > -# uuid: > -# -- -"$1" -gt "$2" diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/if b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/if index b832a61..3a20e4f 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/if +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/if @@ -1,6 +1,7 @@ # -*- mode: snippet -*- # name: if # -- -if $1; then +if $1 +then $0 fi diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/if-one-line b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/if-one-line deleted file mode 100644 index 9c038b0..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/if-one-line +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: if ...; then ...; fi -# key: if; -# uuid: if; -# -- -${1:condition} && ${0:echo 1} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/ife b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/ife index ba0c866..832ead8 100644 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/ife +++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/ife @@ -3,7 +3,8 @@ # key: ife # uuid: ife # -- -if ${1:condition}; then +if ${1:condition} +then ${2:# code} else $0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/local b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/local deleted file mode 100644 index cd789e7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/local +++ /dev/null @@ -1,4 +0,0 @@ -# -*- mode: snippet -*- -# name: local var=value -# -- -local ${1:var}=${0:value} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/lt b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/lt deleted file mode 100644 index 22c70eb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/lt +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: Less than -# key: < -# uuid: < -# -- -"$1" -lt "$2" diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/var b/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/var deleted file mode 100644 index 4f803e6..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sh-mode/var +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: VAR=value -# key: = -# uuid: = -# -- -${1:VAR}=${0:VALUE} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/cont b/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/cont deleted file mode 100644 index 4453293..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/cont +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: cont -# key: cont -# uuid: cont -# -- -# contributor: `user-full-name` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/elisp b/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/elisp deleted file mode 100644 index 724cf72..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/elisp +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: elisp -# key: ` -# uuid: ` -# -- -\`$0\` \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/field b/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/field deleted file mode 100644 index e0df7df..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/field +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name : ${ ... } field -# contributor : joaotavora -# key : $f -# key: field -# uuid: field -# -- -\${${1:${2:n}:}$3${4:\$(${5:lisp-fn})}\}$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/group b/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/group deleted file mode 100644 index ab73672..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/group +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name: group -# key: group -# uuid: group -# -- -# group : ${1:group} \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/mirror b/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/mirror deleted file mode 100644 index c09dce9..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/mirror +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name : ${n:$(...)} mirror -# key : $m -# contributor : joaotavora -# key: mirror -# uuid: mirror -# -- -\${${2:n}:${4:\$(${5:reflection-fn})}\}$0 \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/vars b/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/vars deleted file mode 100644 index fae94fb..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/snippet-mode/vars +++ /dev/null @@ -1,12 +0,0 @@ -# -*- mode: snippet -*- -# name: Snippet header -# key:# -# uuid: # -# -- -# -*- mode: snippet -*- -${1:# contributor: `(user-full-name)` -}# name: $2 -# key: ${3:trigger-key}${4: -# condition: t} -# -- -$0 diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/column b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/column deleted file mode 100644 index 849b43d..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/column +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: , ColumnName ColumnType NOT NULL... -# -- - , ${1:Name} ${2:Type} ${3:NOT NULL} diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint deleted file mode 100644 index 312190c..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: CONSTRAINT [..] PRIMARY KEY ... -# -- -CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}]) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint.1 b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint.1 deleted file mode 100644 index f54ea0a..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint.1 +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: CONSTRAINT [..] FOREIGN KEY ... -# -- -CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}]) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create deleted file mode 100644 index 2d0ed21..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: create table ... -# -- -CREATE TABLE [${1:dbo}].[${2:TableName}] -( - ${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL} -$0 - CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3]) -) -GO diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create.1 b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create.1 deleted file mode 100644 index fb8b1ae..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create.1 +++ /dev/null @@ -1,13 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: create procedure ... -# -- -CREATE PROCEDURE [${1:dbo}].[${2:Name}] -( - $3 $4 = ${5:NULL} ${6:OUTPUT} -) -AS -BEGIN -$0 -END -GO diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/references b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/references deleted file mode 100644 index ec3e58f..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/references +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# contributor: Alejandro Espinoza Esparza -# name: REFERENCES ... -# -- -REFERENCES ${1:TableName}([${2:ColumnName}]) diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/web-mode/video b/Emacs/.config/emacs/.config/yasnippet/snippets/web-mode/video deleted file mode 100644 index 5f7193b..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/web-mode/video +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: HTML5 video player -# -- - \ No newline at end of file diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/web-mode/vue b/Emacs/.config/emacs/.config/yasnippet/snippets/web-mode/vue deleted file mode 100644 index aa3d9a7..0000000 --- a/Emacs/.config/emacs/.config/yasnippet/snippets/web-mode/vue +++ /dev/null @@ -1,18 +0,0 @@ -# -*- mode: snippet -*- -# name: Vue Single-File Component -# uuid: vue -# condition: (equal web-mode-engine "vue") -# -- - - - - - -- cgit v1.2.3-13-gbd6f From 88ae6fc2e813147a6ef509a0f500903cf68019cc Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 13:04:07 +0530 Subject: (Emacs/config)~Re-positioned xref and projectile --- Emacs/.config/emacs/config.org | 124 ++++++++++++++++++++--------------------- 1 file changed, 61 insertions(+), 63 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index ae8d3d3..25023e4 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -397,37 +397,6 @@ really need this in my config at all times. Enable when needed. (use-package esup :defer t) #+end_src -** xref -Find definitions, references and general objects using tags without -external packages. Provided by default in Emacs and just requires a -way of generating a =TAGS= file for your project. Helps with minimal -setups for programming without heavier packages like [[*Eglot][Eglot]]. - -[[*Projectile][Projectile]] provides a nice way to generate tags. -#+begin_src emacs-lisp -(use-package xref - :straight nil - :display - ("\\*xref\\*" - (display-buffer-at-bottom) - (inhibit-duplicate-buffer . t) - (window-height . 0.25)) - :general - (code-leader - "t" '(nil :which-key "Tags")) - (code-leader - :infix "t" - "t" #'xref-find-apropos - "d" #'xref-find-definitions - "r" #'xref-find-references) - (nmmap - :keymaps 'xref--xref-buffer-mode-map - "RET" #'xref-goto-xref - "J" #'xref-next-line - "K" #'xref-prev-line - "g" #'xref-revert-buffer - "q" #'quit-window)) -#+end_src ** Hl-line Highlights the current line, much better than a blinking cursor. #+begin_src emacs-lisp @@ -443,38 +412,6 @@ Recentf provides a method of keeping track of recently opened files. :straight nil :hook (emacs-startup-hook . recentf-mode)) #+end_src -** WAIT Projectile -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Projectile is a project management package which integrates with Emacs -very well. It essentially provides alternative Emacs commands scoped -to the current 'project', based on differing signs that a directory is -a 'project'. -#+begin_src emacs-lisp -(use-package projectile - :after evil - :hook (emacs-startup-hook . projectile-mode) - :general - (general-def - :keymaps 'projectile-command-map - "t" #'projectile-test-project - "r" #'projectile-run-project - "q" #'projectile-replace-regexp) - (leader - "p" '(projectile-command-map :which-key "Projectile")) - :init - (setq projectile-tags-command "ctags -Re -f \"%s\" %s \"%s\"" - projectile-enable-caching t)) -#+end_src -*** Counsel projectile -Counsel integration for projectile commands, very nice. -#+begin_src emacs-lisp -(use-package counsel-projectile - :after (projectile counsel) - :config - (counsel-projectile-mode +1)) -#+end_src ** Avy Setup avy with leader. As I use ~avy-goto-char-timer~ a lot, use the ~C-s~ bind which replaces isearch. Switch isearch to M-s in case I @@ -1141,6 +1078,67 @@ Colourising the compilation buffer so ANSI colour codes get computed. (ansi-color-apply-on-region (point-min) (point-max)))) (add-hook 'compilation-filter-hook #'+compile/colourise)) #+end_src +** xref +Find definitions, references and general objects using tags without +external packages. Provided by default in Emacs and just requires a +way of generating a =TAGS= file for your project. Helps with minimal +setups for programming without heavier packages like [[*Eglot][Eglot]]. +#+begin_src emacs-lisp +(use-package xref + :straight nil + :display + ("\\*xref\\*" + (display-buffer-at-bottom) + (inhibit-duplicate-buffer . t) + (window-height . 0.25)) + :general + (code-leader + "t" '(nil :which-key "Tags")) + (code-leader + :infix "t" + "t" #'xref-find-apropos + "d" #'xref-find-definitions + "r" #'xref-find-references) + (nmmap + :keymaps 'xref--xref-buffer-mode-map + "RET" #'xref-goto-xref + "J" #'xref-next-line + "K" #'xref-prev-line + "g" #'xref-revert-buffer + "q" #'quit-window)) +#+end_src +** WAIT Projectile +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Projectile is a project management package which integrates with Emacs +very well. It essentially provides alternative Emacs commands scoped +to the current 'project', based on differing signs that a directory is +a 'project'. +#+begin_src emacs-lisp +(use-package projectile + :after evil + :hook (emacs-startup-hook . projectile-mode) + :general + (general-def + :keymaps 'projectile-command-map + "t" #'projectile-test-project + "r" #'projectile-run-project + "q" #'projectile-replace-regexp) + (leader + "p" '(projectile-command-map :which-key "Projectile")) + :init + (setq projectile-tags-command "ctags -Re -f \"%s\" %s \"%s\"" + projectile-enable-caching t)) +#+end_src +*** Counsel projectile +Counsel integration for projectile commands, very nice. +#+begin_src emacs-lisp +(use-package counsel-projectile + :after (projectile counsel) + :config + (counsel-projectile-mode +1)) +#+end_src * Org mode 2023-03-30: finally decided to give org mode its own section. -- cgit v1.2.3-13-gbd6f From 40240bbfd7d508570856fdaa43274baa31a30e53 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 13:04:45 +0530 Subject: (Emacs/app)~changed project-root function and added aliases project-root now uses project.el. aliases for goto and project-root. --- Emacs/.config/emacs/.config/eshell/aliases | 6 ++++-- Emacs/.config/emacs/app.org | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/eshell/aliases b/Emacs/.config/emacs/.config/eshell/aliases index 17fa780..17b23f2 100644 --- a/Emacs/.config/emacs/.config/eshell/aliases +++ b/Emacs/.config/emacs/.config/eshell/aliases @@ -1,3 +1,5 @@ -alias ff find-file-other-window $1 +alias p~ project-root +alias gt goto +alias clear clear-scrollback alias d dired $1 -alias clear clear-scrollback \ No newline at end of file +alias ff find-file-other-window $1 diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index d4ac94d..6448ea5 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -547,12 +547,12 @@ directory. "Use `read-directory-name' to change directories." (eshell/cd (list (read-directory-name "Directory?: ")))) - (with-eval-after-load "projectile" - (defun eshell/goto-project-root (&rest args) - "Change to directory `projectile-project-root'" - (if (projectile-project-root) - (eshell/cd (list (projectile-project-root))) - (eshell/echo "Projectile not active here...")))) + (defun eshell/project-root (&rest args) + "Change to directory `project-root'" + (if (project-current) + (eshell/cd (list (project-root (project-current)))) + (eshell/echo (format "[%s]: No project in current directory" + (propertize "Error" 'font-lock-face '(:foreground "red")))))) (defun +eshell/current-buffer () (interactive) -- cgit v1.2.3-13-gbd6f From 6aa3c170e93ea9a88b16816a3396778def524a01 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 13:05:41 +0530 Subject: (Emacs/*)~clean up text, change license of elisp packages to GPLv2 strictly --- Emacs/.config/emacs/config.org | 8 ++++---- Emacs/.config/emacs/core.org | 4 ++-- Emacs/.config/emacs/elisp/ada-mode.el | 7 +++---- Emacs/.config/emacs/elisp/haskell-multiedit.el | 7 +++---- Emacs/.config/emacs/elisp/hide-mode-line.el | 15 ++++++--------- Emacs/.config/emacs/elisp/license.el | 9 +++------ Emacs/.config/emacs/elisp/literate.el | 7 +++---- 7 files changed, 24 insertions(+), 33 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 25023e4..235957c 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -363,10 +363,10 @@ info pages so I'd like nice navigation options. "RET" #'Info-follow-nearest-node)) #+end_src ** Display line numbers -I don't really like line numbers, I find them similar to [[*Fringes][fringes]] as -useless space, but at least it provides some information. Sometimes -it can help with doing repeated commands so a toggle option is -necessary. +I don't really like line numbers, I find them similar to +[[*Fringes][fringes]] as useless space, but at least it provides some +information. Sometimes it can help with doing repeated commands so a +toggle option is necessary. #+begin_src emacs-lisp (use-package display-line-numbers :straight nil diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 3902e51..5472ea4 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -7,8 +7,8 @@ #+startup: noindent Packages that are absolutely necessary for the rest of the -configuration. These yield core functionality such as keybinding, -modal editing, completion, auto typing to name a few. +configuration. Window management, Keybindings or completion +frameworks; they're all done here. * General General provides a great solution for binding keys. It has evil and use-package support so it fits nicely into configuration. In this diff --git a/Emacs/.config/emacs/elisp/ada-mode.el b/Emacs/.config/emacs/elisp/ada-mode.el index a789fc2..1d83da9 100644 --- a/Emacs/.config/emacs/elisp/ada-mode.el +++ b/Emacs/.config/emacs/elisp/ada-mode.el @@ -5,10 +5,9 @@ ;; Author: Aryadev Chavali ;; Keywords: faces, languages -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License Version +;; 2 as published by the Free Software Foundation. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/Emacs/.config/emacs/elisp/haskell-multiedit.el b/Emacs/.config/emacs/elisp/haskell-multiedit.el index 96eb19d..81a5338 100644 --- a/Emacs/.config/emacs/elisp/haskell-multiedit.el +++ b/Emacs/.config/emacs/elisp/haskell-multiedit.el @@ -7,10 +7,9 @@ ;; Author: Aryadev Chavali ;; Keywords: -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License version +;; 2 as published by the Free Software Foundation. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/Emacs/.config/emacs/elisp/hide-mode-line.el b/Emacs/.config/emacs/elisp/hide-mode-line.el index a16667d..488bf3f 100644 --- a/Emacs/.config/emacs/elisp/hide-mode-line.el +++ b/Emacs/.config/emacs/elisp/hide-mode-line.el @@ -5,10 +5,9 @@ ;; Author: Aryadev Chavali ;; Keywords: -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License version +;; 2 as published by the Free Software Foundation. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,11 +30,9 @@ "Hides the mode line." :lighter nil (if mode-line-format - (progn - (setq-local hide-mode-line--prev-mode-line mode-line-format) - (setq-local mode-line-format nil)) - (setq-local mode-line-format hide-mode-line--prev-mode-line))) - + (setq-local hide-mode-line--prev-mode-line mode-line-format + mode-line-format nil) + (setq-local mode-line-format hide-mode-line--prev-mode-line))) (provide 'hide-mode-line) ;;; hide-mode-line.el ends here diff --git a/Emacs/.config/emacs/elisp/license.el b/Emacs/.config/emacs/elisp/license.el index 5921d59..a4922ab 100644 --- a/Emacs/.config/emacs/elisp/license.el +++ b/Emacs/.config/emacs/elisp/license.el @@ -5,10 +5,9 @@ ;; Author: Aryadev Chavali ;; Keywords: -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License version +;; 2 as published by the Free Software Foundation. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,9 +18,7 @@ ;; along with this program. If not, see . ;;; Commentary: - ;; - ;;; Code: (defvar +license/license-choice nil) diff --git a/Emacs/.config/emacs/elisp/literate.el b/Emacs/.config/emacs/elisp/literate.el index ffd4963..5039446 100644 --- a/Emacs/.config/emacs/elisp/literate.el +++ b/Emacs/.config/emacs/elisp/literate.el @@ -5,10 +5,9 @@ ;; Author: Aryadev Chavali ;; Keywords: -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License version +;; 2 as published by the Free Software Foundation. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of -- cgit v1.2.3-13-gbd6f From ebf18a5209aaf6f79baa536a0686441b60930d5f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 13:06:08 +0530 Subject: (Emacs/app)+eww bookmark functionality Search and edit bookmarks very quickly. --- Emacs/.config/emacs/app.org | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 6448ea5..e5e8cb8 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -67,7 +67,9 @@ engine, which makes sense as it's primarily a text interface. :defer t :general (app-leader - "w" #'eww) + "ww" #'eww + "wb" #'+eww/bookmarks-search + "we" #'+eww/bookmarks-edit) (nmmap :keymaps 'eww-mode-map "w" #'evil-forward-word-begin @@ -75,7 +77,22 @@ engine, which makes sense as it's primarily a text interface. :straight nil :config (with-eval-after-load "evil-collection" - (evil-collection-eww-setup))) + (evil-collection-eww-setup)) + (defun bookmark->alist (bookmark) + (cons (plist-get bookmark :title) + (plist-get bookmark :url))) + (defun +eww/bookmarks-edit nil + (interactive) + (find-file (concat eww-bookmarks-directory "eww-bookmarks"))) + (defun +eww/bookmarks-search nil + (interactive) + (let ((bookmarks (mapcar #'bookmark->alist eww-bookmarks))) + (eww + (alist-get (completing-read "Bookmark: " (mapcar #'car bookmarks) nil t) + bookmarks + nil + nil + #'string=))))) #+end_src * Calendar Calendar is a simple inbuilt application that helps with date -- cgit v1.2.3-13-gbd6f From 5567f2647d01b78108085aa8eb5ffefc9dd7c119 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 13:06:29 +0530 Subject: (Emacs/core)~tabs now use r as a prefix key --- Emacs/.config/emacs/core.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 5472ea4..1fc4f98 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -33,7 +33,6 @@ code. :states '(normal motion) "SPC" 'nil "\\" '(nil :which-key "Local leader") - "SPC ;" '(nil :which-key "Tabs") "SPC a" '(nil :which-key "Applications") "SPC b" '(nil :which-key "Buffers") "SPC c" '(nil :which-key "Code") @@ -41,6 +40,7 @@ code. "SPC f" '(nil :which-key "Files") "SPC i" '(nil :which-key "Insert") "SPC m" '(nil :which-key "Modes") + "SPC r" '(nil :which-key "Tabs") "SPC s" '(nil :which-key "Search") "SPC t" '(nil :which-key "Shell") "SPC q" '(nil :which-key "Quit/Literate")) @@ -67,12 +67,12 @@ code. (general-create-definer shell-leader :states '(normal motion) :keymaps 'override - :prefix "SPC ;") + :prefix "SPC t") (general-create-definer tab-leader :states '(normal motion) :keymaps 'override - :prefix "SPC t") + :prefix "SPC r") (general-create-definer mode-leader :states '(normal motion) -- cgit v1.2.3-13-gbd6f From eacfab80dd04777650b4ea665c0fb4b3bfae73de Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 13:45:20 +0530 Subject: (Emacs/config)+Custom function to generate tags from project root --- Emacs/.config/emacs/config.org | 35 +++++++++++++++++++++++++++++++++++ Emacs/.config/emacs/core.org | 1 + 2 files changed, 36 insertions(+) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 235957c..2871505 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1107,6 +1107,41 @@ setups for programming without heavier packages like [[*Eglot][Eglot]]. "g" #'xref-revert-buffer "q" #'quit-window)) #+end_src +** Project.el +An inbuilt solution for creating and managing projects that doesn't +require a dependency. Where possible we should try to use Emacs +defaults (admittedly this is a philosophy I've only recently adopted) +so when setting up a new computer it takes a bit less time. + +Here I write a TAGS command, mimicking projectile's one, so I can +quickly generate them in C/C++ projects. + +#+begin_src emacs-lisp +(use-package project + :straight nil + :general + (general-def + :keymaps 'project-prefix-map + "R" #'+project/generate-tags) + :config + (defun +project/generate-tags () + (interactive) + (let ((project (project-current))) + (if (not project) + (message "+project/generate-tags: Not in project.") + (let ((tags-file (concat (project-root project) "TAGS")) + (files (format "%s" (project-files project)))) + (set-process-sentinel + (start-process-shell-command + "PROJECT-GENERATE-TAGS" + "*gen-tags*" + (format "ctags -Re -f %s %s" + tags-file + (substring files 1 (- (length files) 1)))) + (lambda (p event) + (when (string= event "finished\n") + (message "Finished generating tags!"))))))))) +#+end_src ** WAIT Projectile :PROPERTIES: :header-args:emacs-lisp: :tangle no diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org index 1fc4f98..cb9d19f 100644 --- a/Emacs/.config/emacs/core.org +++ b/Emacs/.config/emacs/core.org @@ -783,6 +783,7 @@ for all snippets I've got. :defer t :hook (prog-mode-hook . yas-minor-mode) + (text-mode-hook . yas-minor-mode) :general (insert-leader "i" #'yas-insert-snippet) -- cgit v1.2.3-13-gbd6f From 5fee49b69d6605d3d695f2df56f2139c0b6ef11b Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 12 May 2024 21:12:32 +0530 Subject: (Emacs/elisp)+search.el I can now completing-read search git files from a ton of repositories AND grep them. --- Emacs/.config/emacs/config.org | 12 +++++++ Emacs/.config/emacs/elisp/search.el | 67 +++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 Emacs/.config/emacs/elisp/search.el (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 2871505..45caf0d 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -759,6 +759,18 @@ eating up memory. "C-M-k" #'drag-stuff-up "C-M-l" #'drag-stuff-right)) #+end_src +** Search git directories efficiently +Using [[file:elisp/search.el][search.el]] I can search a set of +directories particularly efficiently. +#+begin_src emacs-lisp +(use-package emacs + :config + (load-file (concat user-emacs-directory "elisp/search.el")) + :general + (leader + "e" #'+search/file-search + "E" #'+search/search-all)) +#+end_src * Applications (loading) Emacs is basically an operating system whose primary datatype is text. Applications are interfaces/environments which serve a variety of diff --git a/Emacs/.config/emacs/elisp/search.el b/Emacs/.config/emacs/elisp/search.el new file mode 100644 index 0000000..8988572 --- /dev/null +++ b/Emacs/.config/emacs/elisp/search.el @@ -0,0 +1,67 @@ +;;; search.el --- Search a list of git directories at once! -*- lexical-binding: t; -*- + +;; Copyright (C) 2024 Aryadev Chavali + +;; Author: Aryadev Chavali +;; Keywords: + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License Version +;; 2 as published by the Free Software Foundation. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Given a list of git source directories, provide a completing-read +;; interface which will narrow and give you a file. + +;;; Code: + +(defvar +search/directories + '("~/Dotfiles/" "~/Text/" "~/.local/src/dwm/" "~/.local/src/dwmblocks/" "~/.local/src/st/") + "List of directories to get candidates from.") + +(defun +search/get-candidates (directory) + "Get files from DIRECTORY using counsel-git-cands. +Returns a list of files with the directory preprended to them." + (let* ((default-directory directory) + (names (split-string + (shell-command-to-string "git ls-files -z --full-name --") + "\0"))) + (mapcar #'(lambda (name) + (concat directory name)) + names))) + +(defun +search/get-all-candidates () + (cl-reduce + #'(lambda (x y) (append x y)) + (mapcar #'(lambda (directory) + (+search/get-candidates (expand-file-name directory))) + +search/directories))) + +(defun +search/find-file () + (interactive) + (find-file + (completing-read "Find file: " + (+search/get-all-candidates) + nil + t))) + +(defun +search/search-all () + (interactive) + (let ((term (read-string "Search for: "))) + (grep (format "grep --color=auto -nH --null -e \"%s\" -- %s" + term + (cl-reduce #'(lambda (x y) (concat x " " y)) + (mapcar #'(lambda (x) (concat "\"" x "\"")) + (cl-remove-if #'directory-name-p (+search/get-all-candidates)))))))) + +(provide 'search) +;;; search.el ends here -- cgit v1.2.3-13-gbd6f From 8fcdfac6614e1ea84f2bfd100b5713ce7dce2db0 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 13 May 2024 16:58:28 +0530 Subject: (Emacs)~Merged app.org, lang.org and core.org back into config.org Just makes it easier to profile and deal with compilation --- Emacs/.config/emacs/app.org | 907 ----------- Emacs/.config/emacs/config.org | 2784 +++++++++++++++++++++++++++++++-- Emacs/.config/emacs/core.org | 808 ---------- Emacs/.config/emacs/elisp/literate.el | 6 +- Emacs/.config/emacs/lang.org | 821 ---------- 5 files changed, 2664 insertions(+), 2662 deletions(-) delete mode 100644 Emacs/.config/emacs/app.org delete mode 100644 Emacs/.config/emacs/core.org delete mode 100644 Emacs/.config/emacs/lang.org (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org deleted file mode 100644 index e5e8cb8..0000000 --- a/Emacs/.config/emacs/app.org +++ /dev/null @@ -1,907 +0,0 @@ -#+title: Applications for Emacs -#+author: Aryadev Chavali -#+description: Applications for my Emacs OS™ -#+date: 2023-09-29 -#+property: header-args:emacs-lisp :tangle app.el :comments link :results none -#+options: toc:nil -#+startup: noindent - -Applications are greater than packages; they provide a set of -functionality to create an interface in Emacs. Emacs comes with -applications and others may be installed. - -* WAIT Dashboard -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Dashboard creates a custom dashboard for Emacs that replaces the -initial startup screen in default Emacs. It has a lot of customising -options. - -Unfortunately not that useful, many things are easier to invoke -directly such as recent files or project changing. -#+begin_src emacs-lisp -(use-package dashboard - :straight t - :demand t - :general - (app-leader - "b" #'dashboard-refresh-buffer) - (:states '(normal motion emacs) - :keymaps 'dashboard-mode-map - "q" (proc (interactive) (kill-this-buffer))) - (nmmap - :keymaps 'dashboard-mode-map - "r" #'dashboard-jump-to-recent-files - "p" #'dashboard-jump-to-projects - "}" #'dashboard-next-section - "{" #'dashboard-previous-section) - :init - (setq initial-buffer-choice nil - dashboard-banner-logo-title "Oreomacs" - dashboard-center-content t - dashboard-set-init-info t - dashboard-startup-banner (no-littering-expand-etc-file-name "dashboard/logo.png") - dashboard-set-footer t - dashboard-set-navigator t - dashboard-items '((projects . 5) - (recents . 5)) - dashboard-footer-messages (list - "Collecting parentheses..." - "Linking 'coffee_machine.o'..." - "Uploading ip to hacker named 4chan..." - "Dividing by zero..." - "Solving 3-sat..." - "Obtaining your health record..." - (format "Recompiling Emacs for the %dth time..." (random 1000)) - "Escaping the cycle of samsara...")) - :config - (dashboard-setup-startup-hook)) -#+end_src -* EWW -Emacs Web Wowser is the inbuilt text based web browser for Emacs. It -can render images and basic CSS styles but doesn't have a JavaScript -engine, which makes sense as it's primarily a text interface. -#+begin_src emacs-lisp -(use-package eww - :defer t - :general - (app-leader - "ww" #'eww - "wb" #'+eww/bookmarks-search - "we" #'+eww/bookmarks-edit) - (nmmap - :keymaps 'eww-mode-map - "w" #'evil-forward-word-begin - "Y" #'shr-probe-and-copy-url) - :straight nil - :config - (with-eval-after-load "evil-collection" - (evil-collection-eww-setup)) - (defun bookmark->alist (bookmark) - (cons (plist-get bookmark :title) - (plist-get bookmark :url))) - (defun +eww/bookmarks-edit nil - (interactive) - (find-file (concat eww-bookmarks-directory "eww-bookmarks"))) - (defun +eww/bookmarks-search nil - (interactive) - (let ((bookmarks (mapcar #'bookmark->alist eww-bookmarks))) - (eww - (alist-get (completing-read "Bookmark: " (mapcar #'car bookmarks) nil t) - bookmarks - nil - nil - #'string=))))) -#+end_src -* Calendar -Calendar is a simple inbuilt application that helps with date -functionalities. I add functionality to copy dates from the calendar -to the kill ring and bind it to "Y". -#+begin_src emacs-lisp -(use-package calendar - :straight nil - :defer t - :commands (+calendar/copy-date +calendar/toggle-calendar) - :display - ("\\*Calendar\\*" - (display-buffer-at-bottom) - (inhibit-duplicate-buffer . t) - (window-height . 0.17)) - :general - (nmmap - :keymaps 'calendar-mode-map - "Y" #'+calendar/copy-date) - (app-leader - "d" #'calendar) - :config - (defun +calendar/copy-date () - "Copy date under cursor into kill ring." - (interactive) - (if (use-region-p) - (call-interactively #'kill-ring-save) - (let ((date (calendar-cursor-to-date))) - (when date - (setq date (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))) - (kill-new (format-time-string "%Y-%m-%d" date))))))) -#+end_src -* Mail -Mail is a funny thing; most people use it just for business or -advertising and it's come out of use in terms of personal -communication in the west for the most part (largely due to "social" -media applications). However, this isn't true for the open source and -free software movement who heavily use mail for communication. - -Integrating mail into Emacs helps as I can send source code and -integrate it into my workflow just a bit better. -** Notmuch -#+begin_src emacs-lisp -(use-package notmuch - :defer t - :commands (notmuch +mail/flag-thread) - :general - (app-leader "m" #'notmuch) - (nmap - :keymaps 'notmuch-search-mode-map - "f" #'+mail/flag-thread) - :init - (defconst +mail/signature "---------------\nAryadev Chavali") - (defconst +mail/local-dir (no-littering-expand-var-file-name "mail/")) - (setq notmuch-show-logo nil - notmuch-search-oldest-first nil - notmuch-hello-sections '(notmuch-hello-insert-saved-searches - notmuch-hello-insert-alltags - notmuch-hello-insert-recent-searches) - notmuch-archive-tags '("-inbox" "-unread" "+archive") - mail-signature +mail/signature - mail-default-directory +mail/local-dir - mail-source-directory +mail/local-dir - message-signature +mail/signature - message-auto-save-directory +mail/local-dir - message-directory +mail/local-dir) - - (defun +mail/sync-mail () - "Sync mail via mbsync." - (interactive) - (start-process-shell-command "" nil "mbsync -a")) - (defun +mail/trash-junk () - "Delete any mail in junk" - (interactive) - (start-process-shell-command "" nil "notmuch search --output=files --format=text0 tag:deleted tag:spam tag:trash tag:junk | xargs -r0 rm")) - :config - (defun +mail/flag-thread (&optional unflag beg end) - (interactive (cons current-prefix-arg (notmuch-interactive-region))) - (notmuch-search-tag - (notmuch-tag-change-list '("-inbox" "+flagged") unflag) beg end) - (when (eq beg end) - (notmuch-search-next-thread))) - - (advice-add #'notmuch-poll-and-refresh-this-buffer :after - #'+mail/trash-junk) - (with-eval-after-load "evil-collection" - (evil-collection-notmuch-setup))) -#+end_src -** Smtpmail -#+begin_src emacs-lisp -(use-package smtpmail - :straight nil - :commands mail-send - :init - (setq-default - smtpmail-smtp-server "mail.aryadevchavali.com" - smtpmail-smtp-user "aryadev" - smtpmail-smtp-service 587 - smtpmail-stream-type 'starttls - send-mail-function #'smtpmail-send-it - message-send-mail-function #'smtpmail-send-it)) -#+end_src -* Dired -Setup for dired. Make dired-hide-details-mode the default mode when -using dired-mode, as it removes the clutter. Setup evil collection -for dired (even though dired doesn't really conflict with evil, there -are some corners I'd like to adjust). -#+begin_src emacs-lisp -(use-package dired - :straight nil - :commands (dired find-dired) - :hook - (dired-mode-hook . auto-revert-mode) - (dired-mode-hook . dired-hide-details-mode) - :init - (setq-default dired-listing-switches "-AFBlu --group-directories-first" - dired-omit-files "^\\." - dired-dwim-target t - image-dired-external-viewer "nsxiv") - (with-eval-after-load "evil-collection" - (evil-collection-dired-setup)) - :general - (nmmap - :keymaps 'dired-mode-map - "SPC" nil - "SPC ," nil - "T" #'dired-create-empty-file - "H" #'dired-up-directory - "L" #'dired-find-file) - (dir-leader - "f" #'find-dired - "d" #'dired - "D" #'dired-other-window - "i" #'image-dired - "p" `(,(proc (interactive) - (dired "~/Text/PDFs/")) - :which-key "Open PDFs")) - (local-leader - :keymaps 'dired-mode-map - "i" #'dired-maybe-insert-subdir - "I" #'+dired/insert-all-subdirectories - "k" #'dired-prev-subdir - "j" #'dired-next-subdir - "K" #'dired-kill-subdir - "m" #'dired-mark-files-regexp - "u" #'dired-undo) - (nmmap - :keymaps 'image-dired-thumbnail-mode-map - "h" #'image-dired-backward-image - "l" #'image-dired-forward-image - "j" #'image-dired-next-line - "k" #'image-dired-previous-line - "H" #'image-dired-display-previous - "L" #'image-dired-display-next - "RET" #'image-dired-display-this - "m" #'image-dired-mark-thumb-original-file - "q" #'quit-window) - :config - (add-to-list 'dired-guess-shell-alist-user '("\\.pdf\\'" "zathura")) - (defun +dired/insert-all-subdirectories () - "Insert all subdirectories currently viewable." - (interactive) - (dired-mark-directories nil) - (mapc #'dired-insert-subdir (dired-get-marked-files)) - (dired-unmark-all-marks))) -#+end_src -** fd-dired -Uses fd for finding file results in a directory: ~find-dired~ -> -~fd-dired~. - -#+begin_src emacs-lisp -(use-package fd-dired - :after dired - :straight t - :general - (dir-leader - "g" #'fd-dired)) -#+end_src -** wdired -Similar to [[file:config.org::*(Rip)grep][wgrep]] =wdired= provides -the ability to use Emacs motions and editing on file names. This -makes stuff like mass renaming and other file management tasks way -easier than even using the mark based system. -#+begin_src emacs-lisp -(use-package wdired - :after dired - :straight t - :general - (nmmap - :keymaps 'dired-mode-map - "W" #'wdired-change-to-wdired-mode) - (nmmap - :keymaps 'wdired-mode-map - "ZZ" #'wdired-finish-edit - "ZQ" #'wdired-abort-changes)) -#+end_src -* WAIT Xwidget -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Xwidget is a package which allows for the insertion of arbitrary -xwidgets into Emacs through buffers. It must be compiled into Emacs -so you might need to customise your install. One of its premier uses -is in navigating the web which it provides through the function -~xwidget-webkit-browse-url~. This renders a fully functional web -browser within Emacs. - -Though I am not to keen on using Emacs to browse the web /via/ xwidget -(EWW does a good job on its own), I am very interested in its -capability to render pages with JavaScript, as it may come of use when -doing web development. I can see the results of work very quickly -without switching windows all within Emacs. - -2023-10-20: Disabled as it didn't seem to work, and honestly wasn't -that useful. -** Xwidget Core -#+begin_src emacs-lisp -(use-package xwidget - :straight nil - :general - (app-leader - "u" #'xwidget-webkit-browse-url) - (nmmap - :keymaps 'xwidget-webkit-mode-map - "q" #'quit-window - "h" #'xwidget-webkit-scroll-backward - "j" #'xwidget-webkit-scroll-up - "k" #'xwidget-webkit-scroll-down - "l" #'xwidget-webkit-scroll-forward - "+" #'xwidget-webkit-zoom-in - "-" #'xwidget-webkit-zoom-out - (kbd "C-f") #'xwidget-webkit-scroll-up - (kbd "C-b") #'xwidget-webkit-scroll-down - "H" #'xwidget-webkit-back - "L" #'xwidget-webkit-forward - "gu" #'xwidget-webkit-browse-url - "gr" #'xwidget-webkit-reload - "gg" #'xwidget-webkit-scroll-top - "G" #'xwidget-webkit-scroll-bottom)) -#+end_src -** Xwidget Extensions -Define a function ~+xwidget/render-file~ that reads a file name and -presents it in an xwidget. If the current file is an HTML file, ask -if user wants to open current file. Bind it to ~aU~ in the leader. - -Also define a function ~+xwidget/search-query~ that first asks the -user what search engine they want to use ([[https://duckduckgo.com][Duck Duck Go]] and [[https://devdocs.io][DevDocs]] -currently) then asks for a query, which it parses then presents in an -xwidget window. Bind to ~as~ in the leader. -#+begin_src emacs-lisp -(use-package xwidget - :straight nil - :commands (+xwidget/render-file +xwidget/search) - :general - (app-leader - "U" #'+xwidget/render-file - "s" #'+xwidget/search) - :config - (setenv "WEBKIT_FORCE_SANDBOX" "0") - (defun +xwidget/render-file (&optional FORCE) - "Find file (or use current file) and render in xwidget." - (interactive) - (cond - ((and (not FORCE) (or (string= (replace-regexp-in-string ".*.html" - "html" (buffer-name)) "html") - (eq major-mode 'web-mode) - (eq major-mode 'html-mode))) ; If in html file - (if (y-or-n-p "Open current file?: ") ; Maybe they want to open a separate file - (xwidget-webkit-browse-url (format "file://%s" (buffer-file-name))) - (+xwidget/render-file t))) ; recurse and open file via prompt - (t - (xwidget-webkit-browse-url - (format "file://%s" (read-file-name "Enter file to open: ")))))) - - (defun +xwidget/search () - "Run a search query on some search engine and display in -xwidget." - (interactive) - (let* ((engine (completing-read "Engine: " '("duckduckgo.com" "devdocs.io") nil t)) - (query-raw (read-string "Enter query: ")) - (query - (cond - ((string= engine "duckduckgo.com") query-raw) - ((string= engine "devdocs.io") (concat "_ " query-raw))))) - (xwidget-webkit-browse-url (concat "https://" engine "/?q=" query))))) -#+end_src -* Eshell -** Why Eshell? -Eshell is an integrated shell environment for Emacs, written in Emacs -Lisp. I argue that it is the best shell/command interpreter to use in -Emacs. - -Eshell is unlike the alternatives in Emacs as it's a /shell/ first, -not a terminal emulator. It has the ability to spoof some aspects of a -terminal emulator (through the shell parser), but it is NOT a terminal -emulator. - -The killer benefits of eshell (which would appeal to Emacs users) are -a direct result of eshell being written in Emacs lisp: -- incredible integration with Emacs utilities (such as ~dired~, - ~find-file~, any read functions, etc) -- very extensible, easy to write new commands which leverage Emacs - commands as well as external utilities -- agnostic of platform: "eshell/cd" will call the underlying change - directory function for you, so commands will (usually) mean the same - thing regardless of platform - - this means as long as Emacs can run on an operating system, one - may run eshell - -However, my favourite feature of eshell is the set of evaluators that -run on command input. Some of the benefits listed above come as a -result of this powerful feature. These evaluators are described below. - -Lisp evaluator: works on braced expressions, evaluating them as Lisp -expressions (e.g. ~(message "Hello, World!\n")~). Any returned -objects are printed. This makes eshell a LISP REPL! - -External evaluator: works within curly braces, evaluating them via -some external shell process (like sh) (e.g. ~{echo "Hello, -world!\n"}~). This makes eshell a (kinda dumb) terminal emulator! - -The alias evaluator is the top level evaluator. It is the main -evaluator for each expression given to eshell. When given an -expression it tries to evaluate it by testing against these conditions: -- it's an alias defined by the user or in the ~eshell/~ namespace of - functions (simplest evaluator) -- it's some form of lisp expression (lisp evaluator) -- it's an external command (bash evaluator) -Essentially, you get the best of both Emacs and external shell -programs *ALL WITHIN* Emacs for free. -** Eshell functionality -Bind some evil-like movements for easy shell usage, and a toggle -function to pull up the eshell quickly. -#+begin_src emacs-lisp -(use-package eshell - :defer t - :general - (shell-leader - "t" #'eshell) - :init - (add-hook - 'eshell-mode-hook - (proc - (interactive) - (general-def - :states '(normal insert) - :keymaps 'eshell-mode-map - "M-j" #'eshell-next-matching-input-from-input - "M-k" #'eshell-previous-matching-input-from-input) - (local-leader - :keymaps 'eshell-mode-map - "c" (proc (interactive) (eshell/clear) - (recenter)) - "k" #'eshell-kill-process)))) -#+end_src -** Eshell pretty symbols and display -Pretty symbols and a display record. -#+begin_src emacs-lisp -(use-package eshell - :defer t - :pretty - (eshell-mode-hook - ("lambda" . "λ") - ("numberp" . "ℤ") - ("t" . "⊨") - ("nil" . "Ø")) - :display - ("\\*e?shell\\*" ; for general shells as well - (display-buffer-at-bottom) - (window-height . 0.33))) -#+end_src -** Eshell variables and aliases -Set some sane defaults, a banner and a prompt. The prompt checks for -a git repo in the current directory and provides some extra -information in that case (in particular, branch name and if there any -changes that haven't been committed). - -#+begin_src emacs-lisp -(use-package eshell - :defer t - :config - (defun +eshell/--git-get-remote-status () - (let* ((branch-status (split-string - (shell-command-to-string "git status | grep 'Your branch is'"))) - (status (nth 3 branch-status)) - (diff (cl-position "by" branch-status :test #'string=))) - (if (null diff) - (propertize "=" 'font-lock-face '(:foreground "green")) - (let ((n (nth (+ 1 diff) branch-status))) - (concat - (cond - ((string= status "ahead") - (propertize "→ " 'font-lock-face '(:foreground "dodger blue"))) - ((string= status "behind") - (propertize "← " 'font-lock-face '(:foreground "orange red")))) - n))))) - - (defun +eshell/--git-get-change-status () - (let ((changed-files (- (length (split-string (shell-command-to-string "git status -s" ) "\n")) 1))) - (if (= changed-files 0) - (propertize "✓" 'font-lock-face '(:foreground "green")) - (propertize (number-to-string changed-files) 'font-lock-face '(:foreground "red"))))) - - (defun +eshell/get-git-properties () - (let ((git-branch (shell-command-to-string "git branch"))) - (if (or (string= git-branch "") - (not (string= "*" (substring git-branch 0 1)))) - "" - (format - "(%s<%s>[%s])" - (nth 2 (split-string git-branch "\n\\|\\*\\| ")) - (+eshell/--git-get-change-status) - (+eshell/--git-get-remote-status))))) - - (defun +eshell/prompt-function () - (let ((git (+eshell/get-git-properties))) - (mapconcat - (lambda (item) - (if (listp item) - (propertize (car item) - 'read-only t - 'font-lock-face (cdr item) - 'front-sticky '(font-lock-face read-only) - 'rear-nonsticky '(font-lock-face read-only)) - item)) - (list - '("[") - `(,(abbreviate-file-name (eshell/pwd)) :foreground "LimeGreen") - '("]") - (if (string= git "") - "" - (concat "-" git "")) - "\n" - `(,(format-time-string "[%H:%M:%S]") :foreground "purple") - "\n" - '("𝜆> " :foreground "DeepSkyBlue"))))) - - (defun +eshell/banner-message () - (concat (shell-command-to-string "~/.local/scripts/cowfortune") - "\n")) - - (setq eshell-cmpl-ignore-case t - eshell-cd-on-directory t - eshell-banner-message '(+eshell/banner-message) - eshell-highlight-prompt nil - eshell-prompt-function #'+eshell/prompt-function - eshell-prompt-regexp "^𝜆> ")) -#+end_src -** Eshell change directory quickly -Add ~eshell/goto~, which is actually a command accessible from within -eshell (this is because ~eshell/*~ creates an accessible function -within eshell with name ~*~). ~eshell/goto~ makes it easier to change -directories by using Emacs' find-file interface (which is much faster -than ~cd ..; ls -l~). - -~eshell/goto~ is a better ~cd~ for eshell. However it is really just -a plaster over a bigger issue for my workflow; many times I want -eshell to be present in the current directory of the buffer I am -using. So here's also a command for opening eshell with the current -directory. -#+begin_src emacs-lisp -(use-package eshell - :defer t - :general - (leader - "T" #'+eshell/current-buffer) - :config - (defun eshell/goto (&rest args) - "Use `read-directory-name' to change directories." - (eshell/cd (list (read-directory-name "Directory?: ")))) - - (defun eshell/project-root (&rest args) - "Change to directory `project-root'" - (if (project-current) - (eshell/cd (list (project-root (project-current)))) - (eshell/echo (format "[%s]: No project in current directory" - (propertize "Error" 'font-lock-face '(:foreground "red")))))) - - (defun +eshell/current-buffer () - (interactive) - (let ((dir (if buffer-file-name - (file-name-directory buffer-file-name) - default-directory)) - (buf (eshell))) - (if dir - (with-current-buffer buf - (eshell/cd dir) - (eshell-send-input)) - (message "Could not switch eshell: buffer is not real file"))))) -#+end_src -* WAIT Elfeed -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Elfeed is the perfect RSS feed reader, integrated into Emacs -perfectly. I've got a set of feeds that I use for a large variety of -stuff, mostly media and entertainment. I've also bound " ar" -to elfeed for loading the system. -#+begin_src emacs-lisp -(use-package elfeed - :general - (app-leader "r" #'elfeed) - (nmmap - :keymaps 'elfeed-search-mode-map - "gr" #'elfeed-update - "s" #'elfeed-search-live-filter - "" #'elfeed-search-show-entry) - :init - (setq elfeed-db-directory (no-littering-expand-var-file-name "elfeed/")) - - (setq +rss/feed-urls - '(("Arch Linux" - "https://www.archlinux.org/feeds/news/" - News Technology) - ("The Onion" - "https://www.theonion.com/rss" - Social) - ("Protesilaos Stavrou" - "https://www.youtube.com/@protesilaos" - YouTube Technology) - ("Tsoding Daily" - "https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg" - YouTube Technology) - ("Tsoding" - "https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg" - YouTube Technology) - ("Nexpo" - "https://www.youtube.com/feeds/videos.xml?channel_id=UCpFFItkfZz1qz5PpHpqzYBw" - YouTube Stories) - ("3B1B" - "https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw" - YouTube) - ("Fredrik Knusden" - "https://www.youtube.com/feeds/videos.xml?channel_id=UCbWcXB0PoqOsAvAdfzWMf0w" - YouTube Stories) - ("Barely Sociable" - "https://www.youtube.com/feeds/videos.xml?channel_id=UC9PIn6-XuRKZ5HmYeu46AIw" - YouTube Stories) - ("Atrocity Guide" - "https://www.youtube.com/feeds/videos.xml?channel_id=UCn8OYopT9e8tng-CGEWzfmw" - YouTube Stories) - ("Hacker News" - "https://news.ycombinator.com/rss" - Social News Technology) - ("Hacker Factor" - "https://www.hackerfactor.com/blog/index.php?/feeds/index.rss2" - Social))) - :config - (with-eval-after-load "evil-collection" - (evil-collection-elfeed-setup)) - - (setq elfeed-feeds (cl-map 'list #'(lambda (item) - (append (list (nth 1 item)) (cdr (cdr item)))) - +rss/feed-urls)) - - (advice-add 'elfeed-search-show-entry :after #'+elfeed/dispatch-entry) - - (defun +elfeed/dispatch-entry (entry) - "Process each type of entry differently. - e.g., you may want to open HN entries in eww." - (let ((url (elfeed-entry-link entry))) - (pcase url - ((pred (string-match-p "https\\:\\/\\/www.youtube.com\\/watch")) - (mpv-play-url url)) - (_ (eww url)))))) -#+end_src -* Magit -Magit is *the* git porcelain for Emacs, which perfectly encapsulates -the git cli. In this case I just need to setup the bindings for it. -As magit will definitely load after evil (as it must be run by a -binding, and evil will load after init), I can use evil-collection -freely. Also, define an auto insert for commit messages so that I -don't need to write everything myself. - -#+begin_src emacs-lisp -(use-package magit - :defer t - :display - ("magit:.*" - (display-buffer-same-window) - (inhibit-duplicate-buffer . t)) - ("magit-diff:.*" - (display-buffer-below-selected)) - ("magit-log:.*" - (display-buffer-same-window)) - :general - (leader - "g" '(magit-dispatch :which-key "Magit")) - (code-leader - "b" #'magit-blame) - :auto-insert - (("COMMIT_EDITMSG" . "Commit skeleton") - "" - "(" (read-string "Enter feature/module: ") ")" - (read-string "Enter simple description: ") "\n\n") - :init - (setq vc-follow-symlinks t - magit-blame-echo-style 'lines - magit-copy-revision-abbreviated t) - :config - (with-eval-after-load "evil" - (evil-set-initial-state 'magit-status-mode 'motion)) - (with-eval-after-load "evil-collection" - (evil-collection-magit-setup))) -#+end_src -* IBuffer -IBuffer is the dired of buffers: providing the ability to mark -buffers, mass rename/delete and just observe stuff. -#+begin_src emacs-lisp -(use-package ibuffer - :general - (buffer-leader - "i" #'ibuffer) - :config - (with-eval-after-load "evil-collection" - (evil-collection-ibuffer-setup))) -#+end_src -* Proced -Emacs has two systems for process management: -+ proced: a general 'top' like interface which allows general - management of linux processes -+ list-processes: a specific Emacs based system that lists processes - spawned by Emacs (similar to a top for Emacs specifically) - -Core proced config, just a few bindings and evil collection setup. -#+begin_src emacs-lisp -(use-package proced - :straight nil - :general - (app-leader - "p" #'proced) - (nmap - :keymaps 'proced-mode-map - "za" #'proced-toggle-auto-update) - :display - ("\\*Proced\\*" - (display-buffer-at-bottom) - (window-height . 0.25)) - :init - (setq proced-auto-update-interval 0.5) - :config - (with-eval-after-load "evil-collection" - (evil-collection-proced-setup))) -#+end_src -* Calculator -Surprise, surprise Emacs comes with a calculator. - -Greater surprise, this thing is over powered. It can perform the -following (and more): -- Matrix calculations -- Generalised calculus operations -- Equation solvers for n-degree multi-variable polynomials -- Embedded mode (check below)! - -~calc-mode~ is a calculator system within Emacs that provides a -diverse array of mathematical operations. It uses reverse polish -notation to do calculations (though there is a standard infix -algebraic notation mode). - -Embedded mode allows computation with the current buffer as the echo -area. This basically means I can compute stuff within a buffer -without invoking calc directly: $1 + 2\rightarrow_{\text{calc-embed}} 3$. - -#+begin_src emacs-lisp -(use-package calc - :straight nil - :display - ("*Calculator*" - (display-buffer-at-bottom) - (window-height . 0.18)) - :general - (app-leader - "c" #'calc-dispatch) - (mode-leader - "c" #'calc-embedded) - :init - (setq calc-algebraic-mode t) - :config - (with-eval-after-load "evil-collection" - (evil-collection-calc-setup))) -#+end_src -** WAIT Calctex -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -~calc-mode~ also has a 3rd party package called ~calctex~. It renders -mathematical expressions within calc as if they were rendered in TeX. -You can also copy the expressions in their TeX forms, which is pretty -useful when writing a paper. I've set a very specific lock on this -repository as it's got quite a messy work-tree and this commit seems to -work for me given the various TeX utilities installed via Arch. - -#+begin_src emacs-lisp -(use-package calctex - :after calc - :straight (calctex :type git :host github :repo "johnbcoughlin/calctex") - :hook (calc-mode-hook . calctex-mode)) -#+end_src -* WAIT Ledger -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -#+begin_src emacs-lisp -(use-package ledger-mode - :defer t) - -(use-package evil-ledger - :after ledger-mode) -#+end_src -* Zone -Of course Emacs has a cool screensaver software. - -#+begin_src emacs-lisp -(use-package zone-matrix - :straight t - :commands (zone) - :general - (leader - "z" #'zone) - :init - (setq zone-programs - [zone-pgm-drip - zone-pgm-drip-fretfully - zone-pgm-martini-swan-dive - zone-pgm-stress - zone-pgm-random-life])) -#+end_src -* (Wo)man -Man pages are the user manuals for most software on Linux. Really -useful when writing code for Un*x systems, though they can be very -verbose. - -2023-08-17: `Man-notify-method' is the reason the `:display' record -doesn't work here. I think it's to do with how Man pages are rendered -or something, but very annoying as it's a break from standards! -#+begin_src emacs-lisp -(use-package man - :demand t - :straight nil - :init - (setq Man-notify-method 'pushy) - :display - ("^\\*Man.*" - (display-buffer-reuse-mode-window display-buffer-same-window)) - :general - (file-leader - "m" #'man) ;; kinda like "find man page" - (nmmap - :keymaps 'Man-mode-map - "RET" #'man-follow)) -#+end_src -* WAIT gif-screencast -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Little application that uses =gifsicle= to make essentially videos of -Emacs. Useful for demonstrating features. -#+begin_src emacs-lisp -(use-package gif-screencast - :straight t - :general - (app-leader - "x" #'gif-screencast-start-or-stop) - :init - (setq gif-screencast-output-directory (expand-file-name "~/Media/emacs/"))) -#+end_src -* Image-mode -Image mode, for viewing images. Supports tons of formats, easy to use -and integrates slickly into image-dired. Of course, -#+begin_src emacs-lisp -(use-package image-mode - :straight nil - :general - (nmmap - :keymaps 'image-mode-map - "+" #'image-increase-size - "-" #'image-decrease-size - "p" #'image-animate - "P" #'image-animate-set-speed - "h" #'image-backward-hscroll - "j" #'image-next-line - "k" #'image-previous-line - "l" #'image-forward-hscroll)) -#+end_src -* WAIT ERC -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -#+begin_src emacs-lisp -(use-package erc - :defer t - :init - (setq erc-server "irc.libera.chat" - erc-nick "oreodave" - erc-buffer-display "current")) -#+end_src -* MPV -Basically a porcelain over mpv via the IPC interface. -#+begin_src emacs-lisp -(use-package mpv - :defer t - :straight t - :config - (with-eval-after-load "org" - (defun org-mpv-complete-link (&optional arg) - (replace-regexp-in-string - "file:" "mpv:" - (org-link-complete-file arg) - t t)) - (org-link-set-parameters "mpv" - :follow #'mpv-play :complete #'org-mpv-complete-link))) -#+end_src diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 45caf0d..115ca07 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -35,7 +35,7 @@ Let's set all yes or no questions to single letter responses. Set the encoding to UTF-8-Unix by default. #+begin_src emacs-lisp (use-package emacs - :straight nil + :demand t :init (setq-default buffer-file-coding-system 'utf-8-unix save-buffer-coding-system 'utf-8-unix)) @@ -47,7 +47,7 @@ underlying file). Along with that, set the custom-file (which holds temporary customisation) in the etc folder. #+begin_src emacs-lisp (use-package emacs - :straight nil + :demand t :init (setq backup-directory-alist `(("." . ,(no-littering-expand-var-file-name "saves/"))) global-auto-revert-non-file-buffers t @@ -110,7 +110,7 @@ Define a macro which creates hooks into the ~after-save-hook~. On certain ~conditions~ being met, ~to-run~ is evaluated. #+begin_src emacs-lisp (use-package simple - :straight nil + :defer t :config (defmacro +oreo/create-auto-save (conditions &rest to-run) "Create a hook for after saves, where (on CONDITIONS being met) @@ -205,7 +205,6 @@ scheme ([[file:elisp/personal-theme.el][this file]]) #+begin_src emacs-lisp (use-package custom :demand t - :straight nil :init (setq custom-theme-directory (concat user-emacs-directory "elisp/")) :config @@ -224,7 +223,6 @@ dark easily, so here's a command to switch between them. #+begin_src emacs-lisp (use-package custom :defer t - :straight nil :commands +oreo/switch-theme :init (defvar +oreo/theme 'dark) @@ -233,62 +231,65 @@ dark easily, so here's a command to switch between them. (interactive) (cond ((eq +oreo/theme 'dark) + (mapc #'disable-theme custom-enabled-themes) (load-theme 'personal-light t) (setq +oreo/theme 'light)) ((eq +oreo/theme 'light) + (mapc #'disable-theme custom-enabled-themes) (load-theme 'personal-primary t) - (setq +oreo/theme 'dark))))) + (setq +oreo/theme 'dark)))) + ) #+end_src ** Font size Set font size to 140 if on my desktop (oldboy) or 175 if on my laptop (spiderboy). #+begin_src emacs-lisp (use-package faces - :straight nil + :defer t :config (+oreo/sys-name-cond ("spiderboy" (set-face-attribute 'default nil :height 145)) ("oldboy" (set-face-attribute 'default nil :height 140)))) #+end_src ** Startup screen -The default startup screen is quite bad in all honesty, great for -first time users who have no idea what is going on but terrible for -regular users. +The default startup screen is quite bad in all honesty. While for a +first time user it can be very helpful in running the tutorial and +finding out more about Emacs, for someone who's already configured it +there isn't much point. The scratch buffer is an interaction buffer made when Emacs is first started, as a way to quickly prototype Emacs Lisp code. When startup screen is disabled, this buffer is the first thing presented on boot for Emacs. So we can use it to store some useful information. - -As I use [[*Org mode][org-mode]] to compile my Emacs, it is available -essentially at startup, so I use it for the scratch buffer. That way, -I can use all the abilities of org-mode (particularly writing a system -of code using =#+RESULTS=) in an ephemeral buffer at startup! #+begin_src emacs-lisp (use-package emacs - :straight nil + :defer t :init (setq inhibit-startup-screen t - initial-major-mode 'org-mode + initial-major-mode 'fundamental-mode initial-scratch-message "" ring-bell-function 'ignore) - (add-hook 'after-init-hook (proc - (with-current-buffer "*scratch*" - (goto-char (point-max)) - (insert (format "#+title: Scratch buffer -,#+author: %s -,#+description: Emacs v%s - -Booted in %s -" user-full-name emacs-version (emacs-init-time))))))) - + :config + (add-hook + 'emacs-startup-hook + (proc + (with-current-buffer "*scratch*" + (goto-char (point-max)) + (insert + (format + "Emacs v%s - %s\n" + emacs-version (emacs-init-time))))))) #+end_src ** Blinking cursor -Turn off blinking-cursor-mode as [[*Hl-line][hl-line]] is better. +Turn on blinking cursor (helps with seeing if Emacs is hanging or not). + +2021-03-15: Turn off blinking-cursor-mode as [[*Hl-line][hl-line]] is better. #+begin_src emacs-lisp (use-package frame - :straight nil + :defer t + :init + (setq blink-cursor-delay 0.2) :config (blink-cursor-mode 0)) #+end_src @@ -297,8 +298,7 @@ Turning off borders in my window manager was a good idea, so turn off the borders for Emacs. #+begin_src emacs-lisp (use-package fringe - :after dashboard - :straight nil + :defer t :config (fringe-mode 0)) #+end_src @@ -328,8 +328,14 @@ simplicity is above all. '(:eval (format "%s" major-mode)) ") " "%I " ;; file size - '(:eval (project-name (project-current))) + '(:eval (if (project-current) + (project-name (project-current)))) '(vc-mode vc-mode) ;; git branch + " " + '(:eval + (with-eval-after-load "eglot" + (if eglot--managed-mode + (eglot--mode-line-format)))) mode-line-misc-info mode-line-end-spaces)) #+end_src @@ -338,12 +344,815 @@ Who uses a mouse? 🤮 #+begin_src emacs-lisp (setq-default use-file-dialog nil) #+end_src -* Core packages (loading) +* Core packages For my core packages, whose configuration doesn't change much anyway, I have a [[file:core.org][separate file]]. Here I'll load it up for usage later on. #+begin_src emacs-lisp -(load-file (concat user-emacs-directory "core.el")) +;; (load-file (concat user-emacs-directory "core.el")) +#+end_src +** General +General provides a great solution for binding keys. It has evil and +use-package support so it fits nicely into configuration. In this +case, I define a "definer" for the "LEADER" keys. Leader is bound to +~SPC~ and it's functionally equivalent to the doom/spacemacs leader. +Local leader is bound to ~SPC ,~ and it's similar to doom/spacemacs +leader but doesn't try to fully assimilate the local-leader map, +instead just picking stuff I think is useful. This forces me to learn +only as many bindings as I find necessary; no more, no less. + +I also define prefix leaders for differing applications. These are +quite self explanatory by their name and provide a nice way to +visualise all bindings under a specific heading just by searching the +code. +#+begin_src emacs-lisp +(use-package general + :straight t + :demand t + :config + ;; General which key definitions for leaders + (general-def + :states '(normal motion) + "SPC" 'nil + "\\" '(nil :which-key "Local leader") + "SPC a" '(nil :which-key "Applications") + "SPC b" '(nil :which-key "Buffers") + "SPC c" '(nil :which-key "Code") + "SPC d" '(nil :which-key "Directories") + "SPC f" '(nil :which-key "Files") + "SPC i" '(nil :which-key "Insert") + "SPC m" '(nil :which-key "Modes") + "SPC r" '(nil :which-key "Tabs") + "SPC s" '(nil :which-key "Search") + "SPC t" '(nil :which-key "Shell") + "SPC q" '(nil :which-key "Quit/Literate")) + + (general-create-definer leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC") + + (general-create-definer local-leader + :states '(normal motion) + :prefix "\\") + + (general-create-definer code-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC c") + + (general-create-definer file-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC f") + + (general-create-definer shell-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC t") + + (general-create-definer tab-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC r") + + (general-create-definer mode-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC m") + + (general-create-definer app-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC a") + + (general-create-definer search-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC s") + + (general-create-definer buffer-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC b") + + (general-create-definer quit-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC q") + + (general-create-definer insert-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC i") + + (general-create-definer dir-leader + :states '(normal motion) + :keymaps 'override + :prefix "SPC d") + + (general-create-definer general-nmmap + :states '(normal motion)) + + (defalias 'nmmap #'general-nmmap) + + (general-evil-setup t)) +#+end_src +*** Some binds for Emacs +Some bindings that I couldn't fit elsewhere easily. +#+begin_src emacs-lisp +(use-package emacs + :after general + :general + ("C-x d" #'delete-frame) + + (nmmap + "M-;" #'eval-expression + "g=" #'align-regexp + "C--" #'text-scale-decrease + "C-=" #'text-scale-increase + "C-+" #'text-scale-adjust) + + (leader + "SPC" '(execute-extended-command :which-key "M-x") + "p" `(,project-prefix-map :which-key "Project") + "'" '(browse-url-emacs :which-key "Download URL to Emacs") + ":" `(,(proc (interactive) (switch-to-buffer "*scratch*")) + :which-key "Switch to *scratch*") + "!" '(async-shell-command :which-key "Async shell command") + "h" '(help-command :which-key "Help")) + + (mode-leader + "T" #'+oreo/switch-theme) + + (code-leader + "F" `(,(proc (interactive) (find-file "~/Code/")) + :which-key "Open ~/Code/")) + + (file-leader + "f" #'find-file + "F" #'find-file-other-window + "s" #'save-buffer) + + (buffer-leader + "b" #'switch-to-buffer + "d" #'kill-current-buffer + "K" #'kill-buffer + "j" #'next-buffer + "k" #'previous-buffer + "D" '(+oreo/clean-buffer-list :which-key "Kill most buffers")) + + (quit-leader + "q" #'save-buffers-kill-terminal + "c" #'+literate/compile-config + "C" #'+literate/clean-config + "l" #'+literate/load-config) + + (search-leader "i" #'imenu)) +#+end_src +** Evil +My editor journey started off with Vim rather than Emacs, so my brain +has imprinted on its style. Thankfully Emacs is super extensible so +there exists a package (more of a supreme system) for porting Vim's +modal editing style to Emacs, called Evil (Emacs Vi Layer). + +However there are a lot of packages in Vim that provide greater +functionality, for example 'vim-surround'. Emacs, by default, has +these capabilities but there are further packages which integrate them +into Evil. +*** Evil core +Setup the evil package, with some opinionated keybindings: +- Switch ~evil-upcase~ and ~evil-downcase~ because I use ~evil-upcase~ + more +- Switch ~evil-goto-mark~ and ~evil-goto-mark-line~ as I'd rather have + the global one closer to the home row +- Use 'T' character as an action for transposing objects +#+begin_src emacs-lisp +(use-package evil + :demand t + :straight t + :general + (leader + "w" '(evil-window-map :which-key "Window") + "wT" #'window-swap-states + "wd" #'evil-window-delete) + + (nmmap + "K" #'man + "TAB" #'evil-jump-item + "r" #'evil-replace-state + "zC" #'hs-hide-level + "zO" #'hs-show-all + "'" #'evil-goto-mark + "`" #'evil-goto-mark-line + "C-w" #'evil-window-map + "gu" #'evil-upcase + "gU" #'evil-downcase + "T" nil) + + (nmmap + :infix "T" + "w" #'transpose-words + "c" #'transpose-chars + "s" #'transpose-sentences + "p" #'transpose-paragraphs + "e" #'transpose-sexps + "l" #'transpose-lines) + :init + (setq evil-want-keybinding nil + evil-split-window-below t + evil-vsplit-window-right t + evil-want-abbrev-expand-on-insert-exit t + evil-undo-system #'undo-tree) + :config + (evil-mode)) +#+end_src +*** Evil surround +Evil surround is a port for vim-surround. +#+begin_src emacs-lisp +(use-package evil-surround + :after evil + :straight t + :config + (global-evil-surround-mode)) +#+end_src +*** Evil commentary +Allows generalised commenting of objects easily. +#+begin_src emacs-lisp +(use-package evil-commentary + :after evil + :straight t + :config + (evil-commentary-mode)) +#+end_src +*** Evil multi cursor +Setup for multi cursors in Evil mode. Don't let evil-mc setup it's own +keymap because it uses 'gr' as its prefix, which I don't like. +#+begin_src emacs-lisp +(use-package evil-mc + :after evil + :straight t + :init + (defvar evil-mc-key-map (make-sparse-keymap)) + :general + (nmap + :infix "gz" + "q" #'evil-mc-undo-all-cursors + "d" #'evil-mc-make-and-goto-next-match + "j" #'evil-mc-make-cursor-move-next-line + "k" #'evil-mc-make-cursor-move-prev-line + "j" #'evil-mc-make-cursor-move-next-line + "m" #'evil-mc-make-all-cursors + "z" #'evil-mc-make-cursor-here + "r" #'evil-mc-resume-cursors + "s" #'evil-mc-pause-cursors + "u" #'evil-mc-undo-last-added-cursor) + :config + (global-evil-mc-mode)) + ;; (evil-mc-define-vars) + ;; (evil-mc-initialize-vars) + ;; (add-hook 'evil-mc-before-cursors-created #'evil-mc-pause-incompatible-modes) + ;; (add-hook 'evil-mc-before-cursors-created #'evil-mc-initialize-active-state) + ;; (add-hook 'evil-mc-after-cursors-deleted #'evil-mc-teardown-active-state) + ;; (add-hook 'evil-mc-after-cursors-deleted #'evil-mc-resume-incompatible-modes) + ;; (advice-add #'evil-mc-initialize-hooks :override #'ignore) + ;; (advice-add #'evil-mc-teardown-hooks :override #'evil-mc-initialize-vars) + ;; (advice-add #'evil-mc-initialize-active-state :before #'turn-on-evil-mc-mode) + ;; (advice-add #'evil-mc-teardown-active-state :after #'turn-off-evil-mc-mode) + ;; (add-hook 'evil-insert-state-entry-hook #'evil-mc-resume-cursors) +#+end_src + +*** Evil collection +Provides a community based set of keybindings for most modes in +Emacs. I don't necessarily like all my modes having these bindings +though, as I may disagree with some. So I use it in a mode to mode basis. +#+begin_src emacs-lisp +(use-package evil-collection + :straight t + :after evil) +#+end_src +*** Evil number +Increment/decrement a number at point like Vim does, but use bindings +that don't conflict with Emacs default. +#+begin_src emacs-lisp +(use-package evil-numbers + :straight t + :defer t + :general + (nmmap + "+" #'evil-numbers/inc-at-pt + "-" #'evil-numbers/dec-at-pt)) +#+end_src +** Completion +Emacs is a text based interface. Completion is its bread and butter +in providing good user experience. By default Emacs provides +'completions-list' which produces a buffer of options which can be +searched and selected. We can take this further though! + +Ido and Icomplete are packages distributed with Emacs to provide +greater completion interfaces. They utilise the minibuffer to create +a more interactive experience, allowing incremental searches and +option selection. + +Ivy and Helm provide more modern interfaces, though Helm is quite +heavy. Ivy, on the other hand, provides an interface similar to Ido +with less clutter and better customisation options. +*** Ivy +Ivy is a completion framework for Emacs, and my preferred one. It has +a great set of features with little to no pain with setting up. +**** Ivy Core +Setup for ivy, in preparation for counsel. Turn on ivy-mode just +after init. + +Setup vim-like bindings for the minibuffer ("M-(j|k)" for down|up the +selection list). +#+begin_src emacs-lisp +(use-package ivy + :demand t + :straight t + :general + (general-def + :keymaps 'ivy-minibuffer-map + "C-j" #'ivy-yank-symbol + "M-j" #'ivy-next-line-or-history + "M-k" #'ivy-previous-line-or-history + "C-SPC" #'ivy-occur) + (general-def + :keymaps 'ivy-switch-buffer-map + "M-j" #'ivy-next-line-or-history + "M-k" #'ivy-previous-line-or-history) + (nmap + :keymaps '(ivy-occur-mode-map ivy-occur-grep-mode-map) + "RET" #'ivy-occur-press-and-switch + "J" #'ivy-occur-press + "gr" #'ivy-occur-revert-buffer + "q" #'quit-window + "D" #'ivy-occur-delete-candidate + "W" #'ivy-wgrep-change-to-wgrep-mode + "{" #'compilation-previous-file + "}" #'compilation-next-file) + :init + (with-eval-after-load "evil" + (evil-set-initial-state 'ivy-occur-mode 'normal) + (evil-set-initial-state 'ivy-occur-grep-mode 'normal)) + (setq ivy-height 10 + ivy-wrap t + ivy-fixed-height-minibuffer t + ivy-use-virtual-buffers nil + ivy-virtual-abbreviate 'full + ivy-on-del-error-function #'ignore + ivy-use-selectable-prompt t) + :config + (ivy-mode 1) + (require 'counsel nil t)) +#+end_src +**** Counsel +Setup for counsel. Load after ivy and helpful. +#+begin_src emacs-lisp +(use-package counsel + :straight t + :defer t + :general + (search-leader + "s" #'counsel-grep-or-swiper + "R" #'counsel-rg) + (file-leader + "r" #'counsel-recentf) + (insert-leader + "c" #'counsel-unicode-char) + (general-def + [remap describe-bindings] #'counsel-descbinds + [remap load-theme] #'counsel-load-theme) + :config + (setq ivy-initial-inputs-alist '((org-insert-link . "^")) + counsel-describe-function-function #'helpful-callable + counsel-describe-variable-function #'helpful-variable + counsel-grep-swiper-limit 1500000 + ivy-re-builders-alist '((swiper . ivy--regex-plus) + (counsel-grep-or-swiper . ivy--regex-plus) + (counsel-rg . ivy--regex-plus) + (t . ivy--regex-ignore-order))) + (counsel-mode 1)) +#+end_src +**** WAIT Ivy posframe +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +This makes ivy minibuffer windows use child frames. +Very nice eyecandy, but can get kinda annoying. +#+begin_src emacs-lisp +(use-package ivy-posframe + :hook (ivy-mode-hook . ivy-posframe-mode) + :straight t + :init + (setq ivy-posframe-parameters + '((left-fringe . 0) + (right-fringe . 0) + (background-color . "grey7"))) + + (setq ivy-posframe-display-functions-alist + '((t . ivy-posframe-display-at-window-center)))) +#+end_src +**** WAIT Counsel etags +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Counsel etags allows me to search generated tag files for tags. I +already have a function defined to generate the tags, so it's just +searching them which I find to be a bit of a hassle, and where this +package comes in. + +This has been replaced by [[*xref][xref]] which is inbuilt. +#+begin_src emacs-lisp +(use-package counsel-etags + :after counsel + :general + (search-leader + "t" #'counsel-etags-find-tag)) +#+end_src +*** WAIT Ido +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Ido is a very old completion package that still works great to this +day. Though it is limited in its scope (and may thus be called a +completion add-on rather than a full on framework), it is still a very +powerful package. With the use of ido-completing-read+, it may be used +similarly to a fully fledged completion framework. + +#+begin_src emacs-lisp +(use-package ido + :demand t + :general + (general-def + :keymaps '(ido-buffer-completion-map + ido-file-completion-map + ido-file-dir-completion-map + ido-common-completion-map) + (kbd "M-j") #'ido-next-match + (kbd "M-k") #'ido-prev-match + (kbd "C-x o") #'evil-window-up) + :init + (setq ido-decorations + (list "{" "}" " \n" " ..." "[" "]" " [No match]" " [Matched]" + " [Not readable]" " [Too big]" " [Confirm]") + completion-styles '(flex partial-completion intials emacs22)) + (setq-default ido-enable-flex-matching t + ido-enable-dot-prefix t + ido-enable-regexp nil) + (with-eval-after-load "magit" + (setq magit-completing-read-function 'magit-ido-completing-read)) + :config + (ido-mode) + (ido-everywhere)) +#+end_src +**** Ido ubiquitous +Ido completing-read+ is a package that extends the ido package to work +with more text based functions. +#+begin_src emacs-lisp +(use-package ido-completing-read+ + :after ido + :config + (ido-ubiquitous-mode +1)) +#+end_src +*** Amx +Amx is a fork of Smex that works to enhance the +execute-extended-command interface. It also provides support for ido +or ivy (though I'm likely to use ido here) and allows you to switch +between them. + +It provides a lot of niceties such as presenting the key bind when +looking for a command. + +#+begin_src emacs-lisp +(use-package amx + :straight t + :defer t + :init + (setq amx-backend 'ivy) + :config + (amx-mode)) +#+end_src +*** Orderless +Orderless sorting method for completion, probably one of the best +things ever. +#+begin_src emacs-lisp +(use-package orderless + :straight t + :after (ivy ido) + :config + (setf (alist-get t ivy-re-builders-alist) 'orderless-ivy-re-builder)) +#+end_src +*** Completions-list +In case I ever use the completions list, some basic commands to look +around. +#+begin_src emacs-lisp +(use-package simple + :defer t + :general + (nmmap + :keymaps 'completion-list-mode-map + "l" #'next-completion + "h" #'previous-completion + "ESC" #'delete-completion-window + "q" #'quit-window + "RET" #'choose-completion) + :config + (with-eval-after-load "evil" + (setq evil-emacs-state-modes (cl-remove-if + #'(lambda (x) (eq 'completions-list-mode x)) + evil-emacs-state-modes)) + (add-to-list 'evil-normal-state-modes 'completions-list-mode))) +#+end_src +*** Company +Company is the auto complete system I use. I don't like having heavy +setups for company as it only makes it slower to use. In this case, +just setup some evil binds for company. +#+begin_src emacs-lisp +(use-package company + :defer t + :straight t + :hook + (prog-mode-hook . company-mode) + (eshell-mode-hook . company-mode) + :general + (imap + "C-SPC" #'company-complete + "M-j" #'company-select-next + "M-k" #'company-select-previous)) +#+end_src +** Pretty symbols +Prettify symbols mode allows for users to declare 'symbols' that +replace text within certain modes. Though this may seem like useless +eye candy, it has aided my comprehension and speed of recognition +(recognising symbols is easier than words). + +Essentially a use-package keyword which makes declaring pretty symbols +for language modes incredibly easy. Checkout my [[C/C++][C/C++]] configuration +for an example. +#+begin_src emacs-lisp +(use-package prog-mode + :demand t + :init + (setq prettify-symbols-unprettify-at-point t) + :config + (with-eval-after-load "use-package-core" + (add-to-list 'use-package-keywords ':pretty) + (defun use-package-normalize/:pretty (_name-symbol _keyword args) + args) + + (defun use-package-handler/:pretty (name _keyword args rest state) + (use-package-concat + (use-package-process-keywords name rest state) + (mapcar + #'(lambda (arg) + (let ((mode (car arg)) + (rest (cdr arg))) + `(add-hook + ',mode + #'(lambda nil + (setq prettify-symbols-alist ',rest) + (prettify-symbols-mode))))) + args))))) +#+end_src + +Here's a collection of keywords and possible associated symbols for +any prog language of choice. Mostly for reference and copying. +#+begin_example +("null" . "Ø") +("list" . "ℓ") +("string" . "𝕊") +("true" . "⊤") +("false" . "⊥") +("char" . "ℂ") +("int" . "ℤ") +("float" . "ℝ") +("!" . "¬") +("&&" . "∧") +("||" . "∨") +("for" . "∀") +("return" . "⟼") +("print" . "ℙ") +("lambda" . "λ") +#+end_example +** Window management +Emacs' default window management is quite bad, eating other windows on +a whim and not particularly caring for the current window setup. +Thankfully you can change this via the ~display-buffer-alist~ which +matches buffer names with how the window for the buffer should be +displayed. I add a use-package keyword to make ~display-buffer-alist~ +records within a use-package call. + +I have no idea whether it's optimal AT ALL, but it works for me. + +2024-04-23: Found this option ~switch-to-buffer-obey-display-actions~ +which makes manual buffer switches obey the same constraints via +~display-buffer-alist~ as creating the buffer automatically. +#+begin_src emacs-lisp +(use-package window + :demand t + :general + :init + (setq switch-to-buffer-obey-display-actions t) + (with-eval-after-load "use-package-core" + (add-to-list 'use-package-keywords ':display) + (defun use-package-normalize/:display (_name-symbol _keyword args) + args) + + (defun use-package-handler/:display (name _keyword args rest state) + (use-package-concat + (use-package-process-keywords name rest state) + (mapcar + #'(lambda (arg) + `(add-to-list 'display-buffer-alist + ',arg)) + args))))) +#+end_src +*** Some display records +Using the ~:display~ keyword, setup up some ~display-buffer-alist~ +records. This is mostly for packages that aren't really configured +(like [[info:woman][woman]]) or packages that were configured before +(like [[Ivy][Ivy]]). +#+begin_src emacs-lisp +(use-package window + :defer t + :display + ("\\*Process List\\*" + (display-buffer-at-bottom) + (window-height . 0.25)) + + ("\\*\\(Ido \\)?Completions\\*" + (display-buffer-in-side-window) + (window-height . 0.25) + (side . bottom)) + + ("\\*ivy-occur.*" + (display-buffer-at-bottom) + (window-height . 0.25)) + + ("\\*Async Shell Command\\*" + (display-buffer-at-bottom) + (window-height . 0.25))) +#+end_src +** Tabs +Tabs in vscode are just like buffers in Emacs but way slower and +harder to use. Tabs in Emacs are essentially window layouts, similar +to instances in Tmux. With this setup I can use tabs quite +effectively. + +#+begin_src emacs-lisp +(use-package tab-bar + :defer t + :init + (setq tab-bar-show 1) + :config + (tab-bar-mode) + :general + (tab-leader + "t" #'tab-switch + "j" #'tab-next + "k" #'tab-previous + "h" #'tab-move-to + "l" #'tab-move + "n" #'tab-new + "c" #'tab-close + "d" #'tab-close + "f" #'tab-detach + "w" #'tab-window-detach + "r" #'tab-rename) + (mode-leader + "t" #'toggle-tab-bar-mode-from-frame)) +#+end_src +** Auto typing +Snippets are a pretty nice way of automatically inserting code. Emacs +provides a ton of packages by default to do this, but there are great +packages to install as well. + +Abbrevs and skeletons make up a popular solution within Emacs default. +Abbrevs are for simple expressions wherein the only input is the key, +and the output is some Elisp function. They provide a lot of inbuilt +functionality and are quite useful. Skeletons, on the other hand, are +for higher level insertions + +The popular external solution is Yasnippet. Yasnippet is a great +package for snippets, which I use heavily in programming and org-mode. +I setup here the global mode for yasnippet and a collection of +snippets for ease of use. +*** Abbrevs +Just define a few abbrevs for various date-time operations. Also +define a macro that will assume a function for the expansion, helping +with abstracting a few things away. +#+begin_src emacs-lisp +(use-package abbrev + :defer t + :hook + (prog-mode-hook . abbrev-mode) + (text-mode-hook . abbrev-mode) + :init + (defmacro +abbrev/define-abbrevs (abbrev-table &rest abbrevs) + `(progn + ,@(mapcar #'(lambda (abbrev) + `(define-abbrev + ,abbrev-table + ,(car abbrev) + "" + (proc (insert ,(cadr abbrev))))) + abbrevs))) + (setq save-abbrevs nil) + :config + (+abbrev/define-abbrevs + global-abbrev-table + ("sdate" + (format-time-string "%Y-%m-%d" (current-time))) + ("stime" + (format-time-string "%H:%M:%S" (current-time))) + ("sday" + (format-time-string "%A" (current-time))) + ("smon" + (format-time-string "%B" (current-time))))) +#+end_src +*** WAIT Skeletons +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Defines a macro for generating a skeleton + abbrev for a given mode. +Doesn't sanitise inputs because I assume callers are /rational/ actors +who would *only* use this for their top level Emacs config. + +Honestly didn't find much use for this currently, so disabled. +#+begin_src emacs-lisp +(use-package skeleton + :after abbrev + :config + (defmacro +autotyping/gen-skeleton-abbrev (mode abbrev &rest skeleton) + (let* ((table (intern (concat (symbol-name mode) "-abbrev-table"))) + (skeleton-name (intern (concat "+skeleton/" (symbol-name mode) "/" abbrev)))) + `(progn + (define-skeleton + ,skeleton-name + "" + ,@skeleton) + (define-abbrev ,table + ,abbrev + "" + ',skeleton-name))))) +#+end_src +*** Auto insert +Allows inserting text immediately upon creating a new buffer with a +given name. Supports skeletons for inserting text. To make it easier +for later systems to define their own auto inserts, I define a +~use-package~ keyword ~auto-insert~ which allows one to define an +entry for ~auto-insert-alist~. +#+begin_src emacs-lisp +(use-package autoinsert + :demand t + :hook (emacs-startup-hook . auto-insert-mode) + :config + (with-eval-after-load "use-package-core" + (add-to-list 'use-package-keywords ':auto-insert) + (defun use-package-normalize/:auto-insert (_name-symbol _keyword args) + args) + (defun use-package-handler/:auto-insert (name _keyword args rest state) + (use-package-concat + (use-package-process-keywords name rest state) + (mapcar + #'(lambda (arg) + `(add-to-list + 'auto-insert-alist + ',arg)) + args))))) +#+end_src +*** Yasnippet +Look at the snippets [[file:../.config/yasnippet/snippets/][folder]] +for all snippets I've got. +#+begin_src emacs-lisp +(use-package yasnippet + :straight t + :defer t + :hook + (prog-mode-hook . yas-minor-mode) + (text-mode-hook . yas-minor-mode) + :general + (insert-leader + "i" #'yas-insert-snippet) + :config + (yas-load-directory (no-littering-expand-etc-file-name "yasnippet/snippets"))) +#+end_src +*** WAIT Hydra +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Hydra is a great package by =abo-abo= (yes the same guy who made ivy +and swiper) and I hope to use it later on in the config. There are +two use-package declarations here: one for ~hydra~ itself, and the +other for ~use-package-hydra~ which provides the keyword ~:hydra~ in +use-package declarations. +#+begin_src emacs-lisp +(use-package hydra + :straight t) + +(use-package use-package-hydra + :straight t) #+end_src * Small packages ** Info @@ -351,7 +1160,7 @@ Info is GNU's attempt at better man pages. Most Emacs packages have info pages so I'd like nice navigation options. #+begin_src emacs-lisp (use-package info - :straight nil + :defer t :general (nmmap :keymaps 'Info-mode-map @@ -369,7 +1178,7 @@ information. Sometimes it can help with doing repeated commands so a toggle option is necessary. #+begin_src emacs-lisp (use-package display-line-numbers - :straight nil + :defer t :commands display-line-numbers-mode :general (mode-leader @@ -395,13 +1204,15 @@ current instance to test it immediately. really need this in my config at all times. Enable when needed. #+begin_src emacs-lisp (use-package esup + :straight t :defer t) #+end_src ** Hl-line -Highlights the current line, much better than a blinking cursor. +Highlights the current line. #+begin_src emacs-lisp (use-package hl-line :straight t + :defer t :hook (text-mode-hook . hl-line-mode) :hook (prog-mode-hook . hl-line-mode)) #+end_src @@ -409,7 +1220,7 @@ Highlights the current line, much better than a blinking cursor. Recentf provides a method of keeping track of recently opened files. #+begin_src emacs-lisp (use-package recentf - :straight nil + :defer t :hook (emacs-startup-hook . recentf-mode)) #+end_src ** Avy @@ -418,7 +1229,8 @@ Setup avy with leader. As I use ~avy-goto-char-timer~ a lot, use the need to use it. #+begin_src emacs-lisp (use-package avy - :after evil + :straight t + :defer t :general (nmmap :keymaps 'override @@ -435,7 +1247,8 @@ management of windows (closing, switching, etc). #+begin_src emacs-lisp (use-package ace-window - :after evil + :straight t + :defer t :custom (aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)) :general @@ -447,6 +1260,7 @@ Avy-style link following! #+begin_src emacs-lisp (use-package ace-link :straight t + :defer t :general (nmmap :keymaps 'override @@ -458,7 +1272,8 @@ commands. I replace ~describe-function~, ~describe-variable~ and ~describe-key~ by their helpful counterparts. #+begin_src emacs-lisp (use-package helpful - :after ivy + :straight t + :defer t :commands (helpful-callable helpful-variable) :general (general-def @@ -478,22 +1293,11 @@ Which key uses the minibuffer when performing a keybind to provide possible options for the next key. #+begin_src emacs-lisp (use-package which-key + :straight t + :defer t :config (which-key-mode)) #+end_src -** WAIT Keychord -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Keychord is only really here for this one chord I wish to define: "jk" -for exiting insert state. -#+begin_src emacs-lisp -(use-package key-chord - :after evil - :config - (key-chord-define evil-insert-state-map "jk" #'evil-normal-state) - (key-chord-mode)) -#+end_src ** (Rip)grep Grep is a great piece of software, a necessary tool in any Linux user's inventory. By default Emacs has a family of functions to use @@ -518,8 +1322,7 @@ I have no use for standard 'grep'; ~counsel-swiper~ does the same thing faster and within Emacs lisp. ~rgrep~ is useful though. #+begin_src emacs-lisp (use-package grep - :after evil - :straight nil + :defer t :display ("^\\*grep.*" (display-buffer-at-bottom display-buffer-reuse-window) @@ -546,6 +1349,8 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. *** rg #+begin_src emacs-lisp (use-package rg + :straight t + :defer t :display ("^\\*\\*ripgrep\\*\\*" (display-buffer-at-bottom display-buffer-reuse-window) @@ -573,26 +1378,6 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though. :config (evil-set-initial-state 'rg-mode 'normal)) #+end_src -*** Searching Lisp config -Using grep search all the elisp files. With ~wgrep~ this provides -another method of refactoring. -#+begin_src emacs-lisp -(use-package grep - :general - (search-leader - "c" #'+grep/search-config) - :config - (defun +grep/grep-cmd-str (str files) - (cl-reduce - #'concat - (append (list grep-command "\"" str "\" ") - (mapcar (lambda (x) (concat x " ")) files)))) - - (defun +grep/search-config () - (interactive) - (grep (+grep/grep-cmd-str (read-string "Search?: ") - +literate/el-files)))) -#+end_src ** Olivetti Olivetti provides a focus mode for Emacs, which makes it look a bit nicer with fringes. I also define ~+olivetti-mode~ which will @@ -601,6 +1386,8 @@ when turned off will reinsert them - provides a nice way to quickly focus on a buffer. #+begin_src emacs-lisp (use-package olivetti + :straight t + :defer t :commands (+olivetti-mode) :general (mode-leader @@ -686,7 +1473,6 @@ Custom minor mode to toggle the mode line. Check it out at [[file:elisp/hide-mode-line.el][elisp/hide-mode-line.el]]. #+begin_src emacs-lisp (use-package hide-mode-line - :straight nil :load-path "elisp/" :defer t :general @@ -699,7 +1485,7 @@ Saves current place in a buffer permanently, so on revisiting the file at last. #+begin_src emacs-lisp (use-package saveplace - :straight nil + :defer t :config (save-place-mode)) #+end_src @@ -711,7 +1497,7 @@ text. That's what this is mainly for. #+begin_src emacs-lisp (use-package rot13 - :straight nil + :defer t :general (mode-leader "r" #'toggle-rot13-mode)) @@ -722,9 +1508,8 @@ Licenses are important for distribution and attribution to be defined clearly. #+begin_src emacs-lisp (use-package license - :straight nil + :defer t :load-path "elisp/" - :demand t :general (insert-leader "l" #'+license/insert-copyright-notice @@ -736,7 +1521,7 @@ some details. Useful to know on a long Emacs instance what could be eating up memory. #+begin_src emacs-lisp (use-package memory-report - :straight nil + :defer t :general (leader "qm" #'memory-report)) @@ -744,7 +1529,7 @@ eating up memory. ** Save minibuffer history #+begin_src emacs-lisp (use-package savehist - :straight nil + :defer t :config (savehist-mode t)) #+end_src @@ -752,6 +1537,7 @@ eating up memory. #+begin_src emacs-lisp (use-package drag-stuff :straight t + :defer t :general (nmmap "C-M-h" #'drag-stuff-left @@ -759,19 +1545,19 @@ eating up memory. "C-M-k" #'drag-stuff-up "C-M-l" #'drag-stuff-right)) #+end_src -** Search git directories efficiently +** Searching git directories efficiently Using [[file:elisp/search.el][search.el]] I can search a set of directories particularly efficiently. #+begin_src emacs-lisp -(use-package emacs - :config - (load-file (concat user-emacs-directory "elisp/search.el")) +(use-package search + :defer t + :load-path "elisp/" :general - (leader - "e" #'+search/file-search - "E" #'+search/search-all)) + (file-leader + "P" #'+search/find-file + "S" #'+search/search-all)) #+end_src -* Applications (loading) +* Applications Emacs is basically an operating system whose primary datatype is text. Applications are interfaces/environments which serve a variety of purposes, but provide a lot of capability. I have a @@ -779,7 +1565,904 @@ purposes, but provide a lot of capability. I have a mainly because it was so goddamn huge). #+begin_src emacs-lisp -(load-file (concat user-emacs-directory "app.el")) +;; (load-file (concat user-emacs-directory "app.el")) +#+end_src +** WAIT Dashboard +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Dashboard creates a custom dashboard for Emacs that replaces the +initial startup screen in default Emacs. It has a lot of customising +options. + +Unfortunately not that useful, many things are easier to invoke +directly such as recent files or project changing. +#+begin_src emacs-lisp +(use-package dashboard + :straight t + :demand t + :general + (app-leader + "b" #'dashboard-refresh-buffer) + (:states '(normal motion emacs) + :keymaps 'dashboard-mode-map + "q" (proc (interactive) (kill-this-buffer))) + (nmmap + :keymaps 'dashboard-mode-map + "r" #'dashboard-jump-to-recent-files + "p" #'dashboard-jump-to-projects + "}" #'dashboard-next-section + "{" #'dashboard-previous-section) + :init + (setq initial-buffer-choice nil + dashboard-banner-logo-title "Oreomacs" + dashboard-center-content t + dashboard-set-init-info t + dashboard-startup-banner (no-littering-expand-etc-file-name "dashboard/logo.png") + dashboard-set-footer t + dashboard-set-navigator t + dashboard-items '((projects . 5) + (recents . 5)) + dashboard-footer-messages (list + "Collecting parentheses..." + "Linking 'coffee_machine.o'..." + "Uploading ip to hacker named 4chan..." + "Dividing by zero..." + "Solving 3-sat..." + "Obtaining your health record..." + (format "Recompiling Emacs for the %dth time..." (random 1000)) + "Escaping the cycle of samsara...")) + :config + (dashboard-setup-startup-hook)) +#+end_src +** EWW +Emacs Web Wowser is the inbuilt text based web browser for Emacs. It +can render images and basic CSS styles but doesn't have a JavaScript +engine, which makes sense as it's primarily a text interface. +#+begin_src emacs-lisp +(use-package eww + :defer t + :general + (app-leader + "ww" #'eww + "wb" #'+eww/bookmarks-search + "we" #'+eww/bookmarks-edit) + (nmmap + :keymaps 'eww-mode-map + "w" #'evil-forward-word-begin + "Y" #'shr-probe-and-copy-url) + :config + (with-eval-after-load "evil-collection" + (evil-collection-eww-setup)) + (defun bookmark->alist (bookmark) + (cons (plist-get bookmark :title) + (plist-get bookmark :url))) + (defun +eww/bookmarks-edit nil + (interactive) + (find-file (concat eww-bookmarks-directory "eww-bookmarks"))) + (defun +eww/bookmarks-search nil + (interactive) + (let ((bookmarks (mapcar #'bookmark->alist eww-bookmarks))) + (eww + (alist-get (completing-read "Bookmark: " (mapcar #'car bookmarks) nil t) + bookmarks + nil + nil + #'string=))))) +#+end_src +** Calendar +Calendar is a simple inbuilt application that helps with date +functionalities. I add functionality to copy dates from the calendar +to the kill ring and bind it to "Y". +#+begin_src emacs-lisp +(use-package calendar + :defer t + :commands (+calendar/copy-date +calendar/toggle-calendar) + :display + ("\\*Calendar\\*" + (display-buffer-at-bottom) + (inhibit-duplicate-buffer . t) + (window-height . 0.17)) + :general + (nmmap + :keymaps 'calendar-mode-map + "Y" #'+calendar/copy-date) + (app-leader + "d" #'calendar) + :config + (defun +calendar/copy-date () + "Copy date under cursor into kill ring." + (interactive) + (if (use-region-p) + (call-interactively #'kill-ring-save) + (let ((date (calendar-cursor-to-date))) + (when date + (setq date (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))) + (kill-new (format-time-string "%Y-%m-%d" date))))))) +#+end_src +** Mail +Mail is a funny thing; most people use it just for business or +advertising and it's come out of use in terms of personal +communication in the west for the most part (largely due to "social" +media applications). However, this isn't true for the open source and +free software movement who heavily use mail for communication. + +Integrating mail into Emacs helps as I can send source code and +integrate it into my workflow just a bit better. +*** Notmuch +#+begin_src emacs-lisp +(use-package notmuch + :straight t + :defer t + :commands (notmuch +mail/flag-thread) + :general + (app-leader "m" #'notmuch) + (nmap + :keymaps 'notmuch-search-mode-map + "f" #'+mail/flag-thread) + :init + (defconst +mail/signature "---------------\nAryadev Chavali") + (defconst +mail/local-dir (no-littering-expand-var-file-name "mail/")) + (setq notmuch-show-logo nil + notmuch-search-oldest-first nil + notmuch-hello-sections '(notmuch-hello-insert-saved-searches + notmuch-hello-insert-alltags + notmuch-hello-insert-recent-searches) + notmuch-archive-tags '("-inbox" "-unread" "+archive") + mail-signature +mail/signature + mail-default-directory +mail/local-dir + mail-source-directory +mail/local-dir + message-signature +mail/signature + message-auto-save-directory +mail/local-dir + message-directory +mail/local-dir) + + (defun +mail/sync-mail () + "Sync mail via mbsync." + (interactive) + (start-process-shell-command "" nil "mbsync -a")) + (defun +mail/trash-junk () + "Delete any mail in junk" + (interactive) + (start-process-shell-command "" nil "notmuch search --output=files --format=text0 tag:deleted tag:spam tag:trash tag:junk | xargs -r0 rm")) + :config + (defun +mail/flag-thread (&optional unflag beg end) + (interactive (cons current-prefix-arg (notmuch-interactive-region))) + (notmuch-search-tag + (notmuch-tag-change-list '("-inbox" "+flagged") unflag) beg end) + (when (eq beg end) + (notmuch-search-next-thread))) + + (advice-add #'notmuch-poll-and-refresh-this-buffer :after + #'+mail/trash-junk) + (with-eval-after-load "evil-collection" + (evil-collection-notmuch-setup))) +#+end_src +*** Smtpmail +#+begin_src emacs-lisp +(use-package smtpmail + :defer t + :commands mail-send + :init + (setq-default + smtpmail-smtp-server "mail.aryadevchavali.com" + smtpmail-smtp-user "aryadev" + smtpmail-smtp-service 587 + smtpmail-stream-type 'starttls + send-mail-function #'smtpmail-send-it + message-send-mail-function #'smtpmail-send-it)) +#+end_src +** Dired +Setup for dired. Make dired-hide-details-mode the default mode when +using dired-mode, as it removes the clutter. Setup evil collection +for dired (even though dired doesn't really conflict with evil, there +are some corners I'd like to adjust). +#+begin_src emacs-lisp +(use-package dired + :demand t + :commands (dired find-dired) + :hook + (dired-mode-hook . auto-revert-mode) + (dired-mode-hook . dired-hide-details-mode) + :init + (setq-default dired-listing-switches "-AFBlu --group-directories-first" + dired-omit-files "^\\." + dired-dwim-target t + image-dired-external-viewer "nsxiv") + (with-eval-after-load "evil-collection" + (evil-collection-dired-setup)) + :general + (nmmap + :keymaps 'dired-mode-map + "SPC" nil + "SPC ," nil + "T" #'dired-create-empty-file + "H" #'dired-up-directory + "L" #'dired-find-file) + (dir-leader + "f" #'find-dired + "d" #'dired + "D" #'dired-other-window + "i" #'image-dired + "p" `(,(proc (interactive) + (dired "~/Text/PDFs/")) + :which-key "Open PDFs")) + (local-leader + :keymaps 'dired-mode-map + "i" #'dired-maybe-insert-subdir + "I" #'+dired/insert-all-subdirectories + "k" #'dired-prev-subdir + "j" #'dired-next-subdir + "K" #'dired-kill-subdir + "m" #'dired-mark-files-regexp + "u" #'dired-undo) + (nmmap + :keymaps 'image-dired-thumbnail-mode-map + "h" #'image-dired-backward-image + "l" #'image-dired-forward-image + "j" #'image-dired-next-line + "k" #'image-dired-previous-line + "H" #'image-dired-display-previous + "L" #'image-dired-display-next + "RET" #'image-dired-display-this + "m" #'image-dired-mark-thumb-original-file + "q" #'quit-window) + :config + (add-to-list 'dired-guess-shell-alist-user '("\\.pdf\\'" "zathura")) + (defun +dired/insert-all-subdirectories () + "Insert all subdirectories currently viewable." + (interactive) + (dired-mark-directories nil) + (mapc #'dired-insert-subdir (dired-get-marked-files)) + (dired-unmark-all-marks))) +#+end_src +*** fd-dired +Uses fd for finding file results in a directory: ~find-dired~ -> +~fd-dired~. + +#+begin_src emacs-lisp +(use-package fd-dired + :straight t + :after dired + :general + (dir-leader + "g" #'fd-dired)) +#+end_src +*** wdired +Similar to [[file:config.org::*(Rip)grep][wgrep]] =wdired= provides +the ability to use Emacs motions and editing on file names. This +makes stuff like mass renaming and other file management tasks way +easier than even using the mark based system. +#+begin_src emacs-lisp +(use-package wdired + :straight t + :after dired + :general + (nmmap + :keymaps 'dired-mode-map + "W" #'wdired-change-to-wdired-mode) + (nmmap + :keymaps 'wdired-mode-map + "ZZ" #'wdired-finish-edit + "ZQ" #'wdired-abort-changes)) +#+end_src +** WAIT Xwidget +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Xwidget is a package which allows for the insertion of arbitrary +xwidgets into Emacs through buffers. It must be compiled into Emacs +so you might need to customise your install. One of its premier uses +is in navigating the web which it provides through the function +~xwidget-webkit-browse-url~. This renders a fully functional web +browser within Emacs. + +Though I am not to keen on using Emacs to browse the web /via/ xwidget +(EWW does a good job on its own), I am very interested in its +capability to render pages with JavaScript, as it may come of use when +doing web development. I can see the results of work very quickly +without switching windows all within Emacs. + +2023-10-20: Disabled as it didn't seem to work, and honestly wasn't +that useful. +*** Xwidget Core +#+begin_src emacs-lisp +(use-package xwidget + :general + (app-leader + "u" #'xwidget-webkit-browse-url) + (nmmap + :keymaps 'xwidget-webkit-mode-map + "q" #'quit-window + "h" #'xwidget-webkit-scroll-backward + "j" #'xwidget-webkit-scroll-up + "k" #'xwidget-webkit-scroll-down + "l" #'xwidget-webkit-scroll-forward + "+" #'xwidget-webkit-zoom-in + "-" #'xwidget-webkit-zoom-out + (kbd "C-f") #'xwidget-webkit-scroll-up + (kbd "C-b") #'xwidget-webkit-scroll-down + "H" #'xwidget-webkit-back + "L" #'xwidget-webkit-forward + "gu" #'xwidget-webkit-browse-url + "gr" #'xwidget-webkit-reload + "gg" #'xwidget-webkit-scroll-top + "G" #'xwidget-webkit-scroll-bottom)) +#+end_src +*** Xwidget Extensions +Define a function ~+xwidget/render-file~ that reads a file name and +presents it in an xwidget. If the current file is an HTML file, ask +if user wants to open current file. Bind it to ~aU~ in the leader. + +Also define a function ~+xwidget/search-query~ that first asks the +user what search engine they want to use ([[https://duckduckgo.com][Duck Duck Go]] and [[https://devdocs.io][DevDocs]] +currently) then asks for a query, which it parses then presents in an +xwidget window. Bind to ~as~ in the leader. +#+begin_src emacs-lisp +(use-package xwidget + :commands (+xwidget/render-file +xwidget/search) + :general + (app-leader + "U" #'+xwidget/render-file + "s" #'+xwidget/search) + :config + (setenv "WEBKIT_FORCE_SANDBOX" "0") + (defun +xwidget/render-file (&optional FORCE) + "Find file (or use current file) and render in xwidget." + (interactive) + (cond + ((and (not FORCE) (or (string= (replace-regexp-in-string ".*.html" + "html" (buffer-name)) "html") + (eq major-mode 'web-mode) + (eq major-mode 'html-mode))) ; If in html file + (if (y-or-n-p "Open current file?: ") ; Maybe they want to open a separate file + (xwidget-webkit-browse-url (format "file://%s" (buffer-file-name))) + (+xwidget/render-file t))) ; recurse and open file via prompt + (t + (xwidget-webkit-browse-url + (format "file://%s" (read-file-name "Enter file to open: ")))))) + + (defun +xwidget/search () + "Run a search query on some search engine and display in +xwidget." + (interactive) + (let* ((engine (completing-read "Engine: " '("duckduckgo.com" "devdocs.io") nil t)) + (query-raw (read-string "Enter query: ")) + (query + (cond + ((string= engine "duckduckgo.com") query-raw) + ((string= engine "devdocs.io") (concat "_ " query-raw))))) + (xwidget-webkit-browse-url (concat "https://" engine "/?q=" query))))) +#+end_src +** Eshell +*** Why Eshell? +Eshell is an integrated shell environment for Emacs, written in Emacs +Lisp. I argue that it is the best shell/command interpreter to use in +Emacs. + +Eshell is unlike the alternatives in Emacs as it's a /shell/ first, +not a terminal emulator. It has the ability to spoof some aspects of a +terminal emulator (through the shell parser), but it is NOT a terminal +emulator. + +The killer benefits of eshell (which would appeal to Emacs users) are +a direct result of eshell being written in Emacs lisp: +- incredible integration with Emacs utilities (such as ~dired~, + ~find-file~, any read functions, etc) +- very extensible, easy to write new commands which leverage Emacs + commands as well as external utilities +- agnostic of platform: "eshell/cd" will call the underlying change + directory function for you, so commands will (usually) mean the same + thing regardless of platform + - this means as long as Emacs can run on an operating system, one + may run eshell + +However, my favourite feature of eshell is the set of evaluators that +run on command input. Some of the benefits listed above come as a +result of this powerful feature. These evaluators are described below. + +Lisp evaluator: works on braced expressions, evaluating them as Lisp +expressions (e.g. ~(message "Hello, World!\n")~). Any returned +objects are printed. This makes eshell a LISP REPL! + +External evaluator: works within curly braces, evaluating them via +some external shell process (like sh) (e.g. ~{echo "Hello, +world!\n"}~). This makes eshell a (kinda dumb) terminal emulator! + +The alias evaluator is the top level evaluator. It is the main +evaluator for each expression given to eshell. When given an +expression it tries to evaluate it by testing against these conditions: +- it's an alias defined by the user or in the ~eshell/~ namespace of + functions (simplest evaluator) +- it's some form of lisp expression (lisp evaluator) +- it's an external command (bash evaluator) +Essentially, you get the best of both Emacs and external shell +programs *ALL WITHIN* Emacs for free. +*** Eshell functionality +Bind some evil-like movements for easy shell usage, and a toggle +function to pull up the eshell quickly. +#+begin_src emacs-lisp +(use-package eshell + :defer t + :general + (shell-leader + "t" #'eshell) + :init + (add-hook + 'eshell-mode-hook + (proc + (interactive) + (general-def + :states '(normal insert) + :keymaps 'eshell-mode-map + "M-j" #'eshell-next-matching-input-from-input + "M-k" #'eshell-previous-matching-input-from-input) + (local-leader + :keymaps 'eshell-mode-map + "c" (proc (interactive) (eshell/clear) + (recenter)) + "k" #'eshell-kill-process)))) +#+end_src +*** Eshell pretty symbols and display +Pretty symbols and a display record. +#+begin_src emacs-lisp +(use-package eshell + :defer t + :pretty + (eshell-mode-hook + ("lambda" . "λ") + ("numberp" . "ℤ") + ("t" . "⊨") + ("nil" . "Ø")) + :display + ("\\*e?shell\\*" ; for general shells as well + (display-buffer-at-bottom) + (window-height . 0.33))) +#+end_src +*** Eshell variables and aliases +Set some sane defaults, a banner and a prompt. The prompt checks for +a git repo in the current directory and provides some extra +information in that case (in particular, branch name and if there any +changes that haven't been committed). + +#+begin_src emacs-lisp +(use-package eshell + :defer t + :config + (defun +eshell/--git-get-remote-status () + (let* ((branch-status (split-string + (shell-command-to-string "git status | grep 'Your branch is'"))) + (status (nth 3 branch-status)) + (diff (cl-position "by" branch-status :test #'string=))) + (if (null diff) + (propertize "=" 'font-lock-face '(:foreground "green")) + (let ((n (nth (+ 1 diff) branch-status))) + (concat + (cond + ((string= status "ahead") + (propertize "→ " 'font-lock-face '(:foreground "dodger blue"))) + ((string= status "behind") + (propertize "← " 'font-lock-face '(:foreground "orange red")))) + n))))) + + (defun +eshell/--git-get-change-status () + (let ((changed-files (- (length (split-string (shell-command-to-string "git status -s" ) "\n")) 1))) + (if (= changed-files 0) + (propertize "✓" 'font-lock-face '(:foreground "green")) + (propertize (number-to-string changed-files) 'font-lock-face '(:foreground "red"))))) + + (defun +eshell/get-git-properties () + (let ((git-branch (shell-command-to-string "git branch"))) + (if (or (string= git-branch "") + (not (string= "*" (substring git-branch 0 1)))) + "" + (format + "(%s<%s>[%s])" + (nth 2 (split-string git-branch "\n\\|\\*\\| ")) + (+eshell/--git-get-change-status) + (+eshell/--git-get-remote-status))))) + + (defun +eshell/prompt-function () + (let ((git (+eshell/get-git-properties))) + (mapconcat + (lambda (item) + (if (listp item) + (propertize (car item) + 'read-only t + 'font-lock-face (cdr item) + 'front-sticky '(font-lock-face read-only) + 'rear-nonsticky '(font-lock-face read-only)) + item)) + (list + '("[") + `(,(abbreviate-file-name (eshell/pwd)) :foreground "LimeGreen") + '("]") + (if (string= git "") + "" + (concat "-" git "")) + "\n" + `(,(format-time-string "[%H:%M:%S]") :foreground "purple") + "\n" + '("𝜆> " :foreground "DeepSkyBlue"))))) + + (defun +eshell/banner-message () + (concat (shell-command-to-string "~/.local/scripts/cowfortune") + "\n")) + + (setq eshell-cmpl-ignore-case t + eshell-cd-on-directory t + eshell-banner-message '(+eshell/banner-message) + eshell-highlight-prompt nil + eshell-prompt-function #'+eshell/prompt-function + eshell-prompt-regexp "^𝜆> ")) +#+end_src +*** Eshell change directory quickly +Add ~eshell/goto~, which is actually a command accessible from within +eshell (this is because ~eshell/*~ creates an accessible function +within eshell with name ~*~). ~eshell/goto~ makes it easier to change +directories by using Emacs' find-file interface (which is much faster +than ~cd ..; ls -l~). + +~eshell/goto~ is a better ~cd~ for eshell. However it is really just +a plaster over a bigger issue for my workflow; many times I want +eshell to be present in the current directory of the buffer I am +using. So here's also a command for opening eshell with the current +directory. +#+begin_src emacs-lisp +(use-package eshell + :defer t + :general + (leader + "T" #'+eshell/current-buffer) + :config + (defun eshell/goto (&rest args) + "Use `read-directory-name' to change directories." + (eshell/cd (list (read-directory-name "Directory?: ")))) + + (defun eshell/project-root (&rest args) + "Change to directory `project-root'" + (if (project-current) + (eshell/cd (list (project-root (project-current)))) + (eshell/echo (format "[%s]: No project in current directory" + (propertize "Error" 'font-lock-face '(:foreground "red")))))) + + (defun +eshell/current-buffer () + (interactive) + (let ((dir (if buffer-file-name + (file-name-directory buffer-file-name) + default-directory)) + (buf (eshell))) + (if dir + (with-current-buffer buf + (eshell/cd dir) + (eshell-send-input)) + (message "Could not switch eshell: buffer is not real file"))))) +#+end_src +** WAIT Elfeed +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Elfeed is the perfect RSS feed reader, integrated into Emacs +perfectly. I've got a set of feeds that I use for a large variety of +stuff, mostly media and entertainment. I've also bound " ar" +to elfeed for loading the system. +#+begin_src emacs-lisp +(use-package elfeed + :general + (app-leader "r" #'elfeed) + (nmmap + :keymaps 'elfeed-search-mode-map + "gr" #'elfeed-update + "s" #'elfeed-search-live-filter + "" #'elfeed-search-show-entry) + :init + (setq elfeed-db-directory (no-littering-expand-var-file-name "elfeed/")) + + (setq +rss/feed-urls + '(("Arch Linux" + "https://www.archlinux.org/feeds/news/" + News Technology) + ("The Onion" + "https://www.theonion.com/rss" + Social) + ("Protesilaos Stavrou" + "https://www.youtube.com/@protesilaos" + YouTube Technology) + ("Tsoding Daily" + "https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg" + YouTube Technology) + ("Tsoding" + "https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg" + YouTube Technology) + ("Nexpo" + "https://www.youtube.com/feeds/videos.xml?channel_id=UCpFFItkfZz1qz5PpHpqzYBw" + YouTube Stories) + ("3B1B" + "https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw" + YouTube) + ("Fredrik Knusden" + "https://www.youtube.com/feeds/videos.xml?channel_id=UCbWcXB0PoqOsAvAdfzWMf0w" + YouTube Stories) + ("Barely Sociable" + "https://www.youtube.com/feeds/videos.xml?channel_id=UC9PIn6-XuRKZ5HmYeu46AIw" + YouTube Stories) + ("Atrocity Guide" + "https://www.youtube.com/feeds/videos.xml?channel_id=UCn8OYopT9e8tng-CGEWzfmw" + YouTube Stories) + ("Hacker News" + "https://news.ycombinator.com/rss" + Social News Technology) + ("Hacker Factor" + "https://www.hackerfactor.com/blog/index.php?/feeds/index.rss2" + Social))) + :config + (with-eval-after-load "evil-collection" + (evil-collection-elfeed-setup)) + + (setq elfeed-feeds (cl-map 'list #'(lambda (item) + (append (list (nth 1 item)) (cdr (cdr item)))) + +rss/feed-urls)) + + (advice-add 'elfeed-search-show-entry :after #'+elfeed/dispatch-entry) + + (defun +elfeed/dispatch-entry (entry) + "Process each type of entry differently. + e.g., you may want to open HN entries in eww." + (let ((url (elfeed-entry-link entry))) + (pcase url + ((pred (string-match-p "https\\:\\/\\/www.youtube.com\\/watch")) + (mpv-play-url url)) + (_ (eww url)))))) +#+end_src +** Magit +Magit is *the* git porcelain for Emacs, which perfectly encapsulates +the git cli. In this case I just need to setup the bindings for it. +As magit will definitely load after evil (as it must be run by a +binding, and evil will load after init), I can use evil-collection +freely. Also, define an auto insert for commit messages so that I +don't need to write everything myself. + +#+begin_src emacs-lisp +(use-package magit + :straight t + :defer t + :display + ("magit:.*" + (display-buffer-same-window) + (inhibit-duplicate-buffer . t)) + ("magit-diff:.*" + (display-buffer-below-selected)) + ("magit-log:.*" + (display-buffer-same-window)) + :general + (leader + "g" '(magit-dispatch :which-key "Magit")) + (code-leader + "b" #'magit-blame) + :auto-insert + (("COMMIT_EDITMSG" . "Commit skeleton") + "" + "(" (read-string "Enter feature/module: ") ")" + (read-string "Enter simple description: ") "\n\n") + :init + (setq vc-follow-symlinks t + magit-blame-echo-style 'lines + magit-copy-revision-abbreviated t) + :config + (with-eval-after-load "evil" + (evil-set-initial-state 'magit-status-mode 'motion)) + (with-eval-after-load "evil-collection" + (evil-collection-magit-setup))) +#+end_src +** IBuffer +IBuffer is the dired of buffers: providing the ability to mark +buffers, mass rename/delete and just observe stuff. +#+begin_src emacs-lisp +(use-package ibuffer + :defer t + :general + (buffer-leader + "i" #'ibuffer) + :config + (with-eval-after-load "evil-collection" + (evil-collection-ibuffer-setup))) +#+end_src +** Proced +Emacs has two systems for process management: ++ proced: a general 'top' like interface which allows general + management of linux processes ++ list-processes: a specific Emacs based system that lists processes + spawned by Emacs (similar to a top for Emacs specifically) + +Core proced config, just a few bindings and evil collection setup. +#+begin_src emacs-lisp +(use-package proced + :defer t + :general + (app-leader + "p" #'proced) + (nmap + :keymaps 'proced-mode-map + "za" #'proced-toggle-auto-update) + :display + ("\\*Proced\\*" + (display-buffer-at-bottom) + (window-height . 0.25)) + :init + (setq proced-auto-update-interval 0.5) + :config + (with-eval-after-load "evil-collection" + (evil-collection-proced-setup))) +#+end_src +** Calculator +Surprise, surprise Emacs comes with a calculator. + +Greater surprise, this thing is over powered. It can perform the +following (and more): +- Matrix calculations +- Generalised calculus operations +- Equation solvers for n-degree multi-variable polynomials +- Embedded mode (check below)! + +~calc-mode~ is a calculator system within Emacs that provides a +diverse array of mathematical operations. It uses reverse polish +notation to do calculations (though there is a standard infix +algebraic notation mode). + +Embedded mode allows computation with the current buffer as the echo +area. This basically means I can compute stuff within a buffer +without invoking calc directly: $1 + 2\rightarrow_{\text{calc-embed}} 3$. + +#+begin_src emacs-lisp +(use-package calc + :defer t + :display + ("*Calculator*" + (display-buffer-at-bottom) + (window-height . 0.18)) + :general + (app-leader + "c" #'calc-dispatch) + (mode-leader + "c" #'calc-embedded) + :init + (setq calc-algebraic-mode t) + :config + (with-eval-after-load "evil-collection" + (evil-collection-calc-setup))) +#+end_src +*** WAIT Calctex +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +~calc-mode~ also has a 3rd party package called ~calctex~. It renders +mathematical expressions within calc as if they were rendered in TeX. +You can also copy the expressions in their TeX forms, which is pretty +useful when writing a paper. I've set a very specific lock on this +repository as it's got quite a messy work-tree and this commit seems to +work for me given the various TeX utilities installed via Arch. + +#+begin_src emacs-lisp +(use-package calctex + :after calc + :straight (calctex :type git :host github :repo "johnbcoughlin/calctex") + :hook (calc-mode-hook . calctex-mode)) +#+end_src +** WAIT Ledger +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +#+begin_src emacs-lisp +(use-package ledger-mode + :defer t) + +(use-package evil-ledger + :after ledger-mode) +#+end_src +** Zone +Of course Emacs has a cool screensaver software. + +#+begin_src emacs-lisp +(use-package zone-matrix + :straight t + :defer t + :commands (zone) + :general + (leader + "z" #'zone) + :init + (setq zone-programs + [zone-pgm-drip + zone-pgm-drip-fretfully + zone-pgm-martini-swan-dive + zone-pgm-stress + zone-pgm-random-life])) +#+end_src +** (Wo)man +Man pages are the user manuals for most software on Linux. Really +useful when writing code for Un*x systems, though they can be very +verbose. + +2023-08-17: `Man-notify-method' is the reason the `:display' record +doesn't work here. I think it's to do with how Man pages are rendered +or something, but very annoying as it's a break from standards! +#+begin_src emacs-lisp +(use-package man + :defer t + :init + (setq Man-notify-method 'pushy) + :display + ("^\\*Man.*" + (display-buffer-reuse-mode-window display-buffer-same-window)) + :general + (file-leader + "m" #'man) ;; kinda like "find man page" + (nmmap + :keymaps 'Man-mode-map + "RET" #'man-follow)) +#+end_src +** WAIT gif-screencast +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Little application that uses =gifsicle= to make essentially videos of +Emacs. Useful for demonstrating features. +#+begin_src emacs-lisp +(use-package gif-screencast + :straight t + :general + (app-leader + "x" #'gif-screencast-start-or-stop) + :init + (setq gif-screencast-output-directory (expand-file-name "~/Media/emacs/"))) +#+end_src +** Image-mode +Image mode, for viewing images. Supports tons of formats, easy to use +and integrates slickly into image-dired. Of course, +#+begin_src emacs-lisp +(use-package image-mode + :defer t + :general + (nmmap + :keymaps 'image-mode-map + "+" #'image-increase-size + "-" #'image-decrease-size + "p" #'image-animate + "P" #'image-animate-set-speed + "h" #'image-backward-hscroll + "j" #'image-next-line + "k" #'image-previous-line + "l" #'image-forward-hscroll)) +#+end_src +** WAIT ERC +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +#+begin_src emacs-lisp +(use-package erc + :defer t + :init + (setq erc-server "irc.libera.chat" + erc-nick "oreodave" + erc-buffer-display "current")) +#+end_src +** WAIT MPV +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Basically a porcelain over mpv via the IPC interface. +#+begin_src emacs-lisp +(use-package mpv + :defer t + :straight t + :config + (with-eval-after-load "org" + (defun org-mpv-complete-link (&optional arg) + (replace-regexp-in-string + "file:" "mpv:" + (org-link-complete-file arg) + t t)) + (org-link-set-parameters "mpv" + :follow #'mpv-play :complete #'org-mpv-complete-link))) #+end_src * Text modes Standard packages and configurations for text-mode and its derived @@ -791,6 +2474,8 @@ software, but I also need it in commit messages and so on. So flyspell-mode should be hooked to text-mode. #+begin_src emacs-lisp (use-package flyspell + :straight t + :defer t :hook (text-mode-hook . flyspell-mode) :general (nmmap @@ -808,23 +2493,26 @@ version control system in and of itself! The only extra necessary would be describing changes... #+begin_src emacs-lisp (use-package undo-tree + :demand t :straight t - :hook (after-init-hook . global-undo-tree-mode) + :general + (leader + "u" #'undo-tree-visualize) :init (setq undo-tree-auto-save-history t undo-tree-history-directory-alist backup-directory-alist) - :general - (leader - "u" #'undo-tree-visualize)) + :config + (global-undo-tree-mode)) #+end_src ** Whitespace Deleting whitespace, highlighting when going beyond the 80th character limit, all good stuff. I don't want to highlight whitespace for general mode categories (Lisp shouldn't really have an 80 character limit), so set it for specific modes need the help. + #+begin_src emacs-lisp (use-package whitespace - :straight nil + :defer t :general (nmmap "M--" #'whitespace-cleanup) @@ -839,7 +2527,9 @@ limit), so set it for specific modes need the help. (org-mode-hook . whitespace-mode) (text-mode-hook . whitespace-mode) :init - (setq whitespace-style '(face lines-tail spaces tabs tab-mark trailing newline) + (setq whitespace-style '(face empty lines-tail + spaces tabs tab-mark + trailing newline) whitespace-line-column 80)) #+end_src ** Set auto-fill-mode for all text-modes @@ -859,10 +2549,11 @@ Smartparens is a smarter electric-parens, it's much more aware of context and easier to use. #+begin_src emacs-lisp (use-package smartparens + :straight t + :defer t :hook (prog-mode-hook . smartparens-mode) (text-mode-hook . smartparens-mode) - :after evil :config (setq sp-highlight-pair-overlay nil sp-highlight-wrap-overlay t @@ -883,6 +2574,7 @@ keymaps. Same with dictionary searching. #+begin_src emacs-lisp (use-package le-thesaurus :straight t + :defer t :display ("\\*Dictionary\\*" (display-buffer-reuse-window display-buffer-same-window) @@ -909,7 +2601,7 @@ Eldoc box makes the help buffer a hovering box instead of printing it in the minibuffer. A lot cleaner. #+begin_src emacs-lisp (use-package eldoc - :straight nil + :defer t :hook (prog-mode-hook . eldoc-mode) :init (global-eldoc-mode 1) @@ -918,6 +2610,8 @@ in the minibuffer. A lot cleaner. "h>" #'eldoc-doc-buffer)) (use-package eldoc-box + :straight t + :defer t :hook (eldoc-mode-hook . eldoc-box-hover-mode) :init (setq eldoc-box-position-function #'eldoc-box--default-upper-corner-position-function @@ -936,6 +2630,8 @@ I've added it to C/C++ mode because I use them regularly and flycheck has very little overhead to work there. #+begin_src emacs-lisp (use-package flycheck + :straight t + :defer t :commands (flycheck-mode flycheck-list-errors) :hook (c-mode-hook . flycheck-mode) @@ -951,6 +2647,8 @@ has very little overhead to work there. ("\\*Flycheck.*" (display-buffer-at-bottom) (window-height . 0.25)) + :init + (setq-default flycheck-check-syntax-automatically '(save new-line mode-enabled)) :config (with-eval-after-load "evil-collection" (evil-collection-flycheck-setup))) @@ -970,7 +2668,6 @@ by default I've disabled it, using =M-x eglot= to startup the LSP server when I need it. #+begin_src emacs-lisp (use-package eglot - :after project :defer t :general (code-leader @@ -1024,6 +2721,7 @@ I hook it to prog-mode. #+begin_src emacs-lisp (use-package hl-todo + :straight t :after prog-mode :hook (prog-mode-hook . hl-todo-mode) :init @@ -1038,7 +2736,7 @@ Turn on ~hs-minor-mode~ for all prog-mode. This provides folds for free. #+begin_src emacs-lisp (use-package hideshow - :straight nil + :defer t :hook (prog-mode-hook . hs-minor-mode)) #+end_src ** Aggressive indenting @@ -1064,7 +2762,7 @@ description I give won't do it justice. Colourising the compilation buffer so ANSI colour codes get computed. #+begin_src emacs-lisp (use-package compile - :straight nil + :defer t :general (code-leader "j" #'next-error @@ -1097,7 +2795,7 @@ way of generating a =TAGS= file for your project. Helps with minimal setups for programming without heavier packages like [[*Eglot][Eglot]]. #+begin_src emacs-lisp (use-package xref - :straight nil + :defer t :display ("\\*xref\\*" (display-buffer-at-bottom) @@ -1130,7 +2828,7 @@ quickly generate them in C/C++ projects. #+begin_src emacs-lisp (use-package project - :straight nil + :defer t :general (general-def :keymaps 'project-prefix-map @@ -1164,7 +2862,6 @@ to the current 'project', based on differing signs that a directory is a 'project'. #+begin_src emacs-lisp (use-package projectile - :after evil :hook (emacs-startup-hook . projectile-mode) :general (general-def @@ -1186,6 +2883,15 @@ Counsel integration for projectile commands, very nice. :config (counsel-projectile-mode +1)) #+end_src +** devdocs +#+begin_src emacs-lisp +(use-package devdocs + :straight t + :defer t + :general + (nmmap + "K" #'devdocs-lookup)) +#+end_src * Org mode 2023-03-30: finally decided to give org mode its own section. @@ -1233,8 +2939,8 @@ I'm not very bothered. #+begin_src emacs-lisp (use-package org - :defer t :straight t + :defer t :init (setq org-directory "~/Text" org-adapt-indentation nil @@ -1259,6 +2965,7 @@ pdf-process, code listing options via minted and the format options for latex fragments. #+begin_src emacs-lisp (use-package org + :straight t :defer t :init (setq org-format-latex-options @@ -1294,6 +3001,7 @@ copy pasted the majority of this, tweaking it till it felt good. Doom Emacs was very helpful here. #+begin_src emacs-lisp (use-package org + :straight t :defer t :init (setq org-edit-src-content-indentation 0 @@ -1320,6 +3028,8 @@ Emacs was very helpful here. Hooks, prettify-symbols and records for auto insertion. #+begin_src emacs-lisp (use-package org + :straight t + :defer t :hook (org-mode-hook . prettify-symbols-mode) :display @@ -1329,20 +3039,21 @@ Hooks, prettify-symbols and records for auto insertion. (org-mode-hook ("#+begin_src" . "≫") ("#+end_src" . "≪")) - :init - (with-eval-after-load "autoinsert" - (define-auto-insert '("\\.org\\'" . "Org skeleton") - '("Enter title: " - "#+title: " str | (buffer-file-name) "\n" - "#+author: " (read-string "Enter author: ") | user-full-name "\n" - "#+description: " (read-string "Enter description: ") | "Description" "\n" - "#+date: " (format-time-string "%Y-%m-%d" (current-time)) "\n" - "* " _)))) + :auto-insert + (("\\.org\\'" . "Org skeleton") + "Enter title: " + "#+title: " str | (buffer-file-name) "\n" + "#+author: " (read-string "Enter author: ") | user-full-name "\n" + "#+description: " (read-string "Enter description: ") | "Description" "\n" + "#+date: " (format-time-string "%Y-%m-%d" (current-time)) "\n" + "* " _)) #+end_src ** Org Core Bindings Some bindings for org mode. #+begin_src emacs-lisp (use-package org + :straight t + :defer t :general (file-leader "l" #'org-store-link @@ -1398,6 +3109,7 @@ org files in ~user-emacs-directory~ and provides the headings for them. This allows me to search my configuration pretty quickly. #+begin_src emacs-lisp (use-package org + :straight t :after counsel :config (defun +org/swiper-goto () @@ -1425,7 +3137,6 @@ them. This allows me to search my configuration pretty quickly. (nmmap :keymaps 'org-mode-map [remap imenu] #'+org/swiper-goto)) - #+end_src ** Org Agenda Org agenda provides a nice viewing for schedules. With org mode it's @@ -1433,7 +3144,6 @@ a very tidy way to manage your time. #+begin_src emacs-lisp (use-package org-agenda :after org - :straight nil :init (defconst +org/agenda-root "~/Text" "Root directory for all agenda files") @@ -1474,7 +3184,7 @@ a very tidy way to manage your time. what org-capture does. #+begin_src emacs-lisp (use-package org-capture - :straight nil + :after org :init (setq org-capture-templates @@ -1495,7 +3205,6 @@ system to see how much time you spend on specific tasks or overall. #+begin_src emacs-lisp (use-package org-clock :after org - :straight nil :init (defvar +org/clock-out-toggle-report nil "Non-nil means update the first clock report in the file every @@ -1577,6 +3286,8 @@ learnt the basics of org). #+begin_src emacs-lisp (use-package org-msg + :straight t + :defer t :hook (message-mode-hook . org-msg-mode) (notmuch-message-mode-hook . org-msg-mode) @@ -1595,6 +3306,8 @@ learnt the basics of org). Evil org for some nice bindings. #+begin_src emacs-lisp (use-package evil-org + :straight t + :defer t :hook (org-mode-hook . evil-org-mode)) #+end_src ** Org reveal @@ -1602,6 +3315,7 @@ Org reveal allows one to export org files as HTML presentations via reveal.js. Pretty nifty and it's easy to use. #+begin_src emacs-lisp (use-package ox-reveal + :straight t :defer t :init (setq org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js" @@ -1631,13 +3345,839 @@ Org superstar adds unicode symbols for headers, much better than the default asterisks. #+begin_src emacs-lisp (use-package org-superstar + :straight t + :defer t :hook (org-mode-hook . org-superstar-mode)) #+end_src -* Languages (loading) +* Languages For a variety of (programming) languages Emacs comes with default modes but this configures them as well as pulls any modes Emacs doesn't come with. I have a [[file:lang.org][separate file]] for this configuration as it's quite large. #+begin_src emacs-lisp -(load-file (concat user-emacs-directory "lang.el")) +;;(load-file (concat user-emacs-directory "lang.el")) +#+end_src + +** Makefile +Defines an auto-insert for Makefiles. Assumes C but it's very easy to +change it for C++. +#+begin_src emacs-lisp +(use-package make-mode + :defer t + :auto-insert + (("[mM]akefile\\'" . "Makefile skeleton") + "" + "CC=gcc +GFLAGS=-Wall -Wextra -Werror -Wswitch-enum -std=c11 +DFLAGS=-ggdb -fsanitize=address -fsanitize=undefined +RFLAGS=-O3 +ifdef RELEASE +CFLAGS=$(GFLAGS) $(RFLAGS) +else +CFLAGS=$(GFLAGS) $(DFLAGS) +endif +LIBS= + +ARGS= +OUT=main.out + +SRC=src +DIST=build +CODE=$(addprefix $(SRC)/, ) # add source files here +OBJECTS=$(CODE:$(SRC)/%.c=$(DIST)/%.o) +DEPDIR:=$(DIST)/dependencies +DEPFLAGS=-MT $@ -MMD -MP -MF +DEPS:=$(CODE:$(SRC)/%.c=$(DEPDIR):%.d) $(DEPDIR)/main.d + +.PHONY: all +all: $(OUT) + +$(OUT): $(DIST)/$(OUT) + +$(DIST)/$(OUT): $(OBJECTS) $(DIST)/main.o | $(DIST) + $(CC) $(CFLAGS) $^ -o $@ $(LIBS) + +$(DIST)/%.o: $(SRC)/%.c | $(DIST) $(DEPDIR) + $(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS) + +.PHONY: run +run: $(DIST)/$(OUT) + ./$^ $(ARGS) + +.PHONY: +clean: + rm -rfv $(DIST)/* + +$(DIST): + mkdir -p $(DIST) + +$(DEPDIR): + mkdir -p $(DEPDIR) + +-include $(DEPS) +" + _)) +#+end_src +** PDF +I use PDFs mostly for reading reports or papers. Though Emacs isn't +my preferred application for viewing PDFs (I highly recommend +[[https://pwmt.org/projects/zathura/][Zathura]]), similar to most +things with Emacs, having a PDF viewer builtin can be a very useful +asset. + +For example if I were editing an org document which I was eventually +compiling into a PDF, my workflow would be much smoother with a PDF +viewer within Emacs that I can open on another pane. +*** WAIT PDF tools +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +~pdf-tools~ provides the necessary functionality for viewing PDFs. +There is no proper PDF viewing without this package. +~evil-collection~ provides a setup for this mode, so use that. +#+begin_src emacs-lisp +(use-package pdf-tools + :mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode) + :straight t + :display + ("^.*pdf$" + (display-buffer-same-window) + (inhibit-duplicate-buffer . t)) + :config + (pdf-tools-install-noverify) + (with-eval-after-load "evil-collection" + (evil-collection-pdf-setup))) +#+end_src +*** WAIT PDF grep +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +PDF grep is a Linux tool that allows for searches against the text +inside of PDFs similar to standard grep. This cannot be performed by +standard grep due to how PDFs are encoded; they are not a clear text +format. +#+begin_src emacs-lisp +(use-package pdfgrep + :after pdf-tools + :hook (pdf-view-mode-hook . pdfgrep-mode) + :general + (nmap + :keymaps 'pdf-view-mode-map + "M-g" #'pdfgrep)) +#+end_src +** WAIT SQL +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +The default SQL package provides support for connecting to common +database types (sqlite, mysql, etc) for auto completion and query +execution. I don't use SQL currently but whenever I need it it's +there. +#+begin_src emacs-lisp +(use-package sql + :defer t + :init + (setq sql-display-sqli-buffer-function nil)) +#+end_src +** WAIT Ada +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Check out [[file:elisp/ada-mode.el][ada-mode]], my custom ~ada-mode~ +that replaces the default one. This mode just colourises stuff, and +uses eglot and a language server to do the hard work. + +#+begin_src emacs-lisp +(use-package ada-mode + :load-path "elisp/" + :defer t + :config + (with-eval-after-load "eglot" + (add-hook 'ada-mode-hook #'eglot))) +#+end_src +** NHexl +Hexl-mode is the inbuilt package within Emacs to edit hex and binary +format buffers. There are a few problems with hexl-mode though, +including an annoying prompt on /revert-buffer/. + +Thus, nhexl-mode! It comes with a few other improvements. Check out +the [[https://elpa.gnu.org/packages/nhexl-mode.html][page]] yourself. +#+begin_src emacs-lisp +(use-package nhexl-mode + :straight t + :defer t + :mode ("\\.bin" "\\.out")) +#+end_src +** C/C++ +Setup for C and C++ modes, using Emacs' default package: cc-mode. +*** cc-mode +Tons of stuff, namely: ++ ~auto-fill-mode~ for 80 char limit ++ Some keybindings to make evil statement movement is easy ++ Lots of pretty symbols ++ Indenting options and a nice (for me) code style for C (though + aggressive indent screws with this a bit) ++ Auto inserts to get a C file going +#+begin_src emacs-lisp +(use-package cc-mode + :defer t + :hook + (c-mode-hook . auto-fill-mode) + (c++-mode-hook . auto-fill-mode) + :general + (:keymaps '(c-mode-map c++-mode-map) + :states '(normal motion visual) + "(" #'c-beginning-of-statement + ")" #'c-end-of-statement) + :pretty + (c-mode-hook + ("puts" . "φ") + ("fputs" . "ϕ") + ("printf" . "ω") + ("fprintf" . "Ω") + ("NULL" . "Ø") + ("true" . "⊨") + ("false" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼")) + (c++-mode-hook + ("nullptr" . "Ø") + ("string" . "𝕊") + ("vector" . "ℓ") + ("puts" . "φ") + ("fputs" . "ϕ") + ("printf" . "ω") + ("fprintf" . "Ω") + ("NULL" . "Ø") + ("true" . "⊨") + ("false" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼")) + :init + (setq-default c-basic-offset 2) + (setq-default c-auto-newline nil) + (setq-default c-default-style '((other . "user"))) + (defun +cc/copyright-notice () + (let* ((lines (split-string (+license/copyright-notice) "\n")) + (copyright-line (car lines)) + (rest (cdr lines))) + (concat + "* " + copyright-line + "\n" + (mapconcat + #'(lambda (x) + (if (string= x "") + "" + (concat " * " x))) + rest + "\n")))) + + :auto-insert + (("\\.c\\'" . "C skeleton") + "" + "/" (+cc/copyright-notice) "\n\n" + " * Created: " (format-time-string "%Y-%m-%d") "\n" + " * Author: " user-full-name "\n" + " * Description: " _ "\n" + " */\n" + "\n") + (("\\.cpp\\'" "C++ skeleton") + "" + "/" (+cc/copyright-notice) "\n\n" + " * Created: " (format-time-string "%Y-%m-%d") "\n" + " * Author: " user-full-name "\n" + " * Description: " _ "\n" + " */\n" + "\n") + (("\\.\\([Hh]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'" . "C / C++ header") + (replace-regexp-in-string "[^A-Z0-9]" "_" + (string-replace "+" "P" + (upcase + (file-name-nondirectory buffer-file-name)))) + "/" (+cc/copyright-notice) "\n\n" + " * Created: " (format-time-string "%Y-%m-%d") "\n" + " * Author: " user-full-name "\n" + " * Description: " _ "\n" + " */\n\n" + "#ifndef " str n "#define " str "\n\n" "\n\n#endif") + :config + (c-add-style + "user" + '((c-basic-offset . 2) + (c-comment-only-line-offset . 0) + (c-hanging-braces-alist (brace-list-open) + (brace-entry-open) + (substatement-open after) + (block-close . c-snug-do-while) + (arglist-cont-nonempty)) + (c-cleanup-list brace-else-brace) + (c-offsets-alist + (statement-block-intro . +) + (substatement-open . 0) + (access-label . -) + (inline-open . 0) + (label . 0) + (statement-cont . +))))) +#+end_src +*** Clang format +Clang format comes inbuilt with clang, so download that before using +this. Formats C/C++ files depending on a format (checkout the Clang +format [[file:~/Dotfiles/ClangFormat/.clang-format][config file]] in +my dotfiles). + +#+begin_src emacs-lisp +(use-package clang-format + :load-path "/usr/share/clang/" + :defer t + :after cc-mode + :commands (+code/clang-format-region-or-buffer + clang-format-mode) + ;;; 2024-04-24: disabled as it's annoying on projects where a + ;;; .clang-format isn't defined. Furthermore, does it make sense + ;;; for *every* file you open and edit to have a format function run + ;;; right after? seems a bit slow. + ;; :hook + ;; (c-mode-hook . clang-format-mode) + ;; (c++-mode-hook . clang-format-mode) + :general + (code-leader + :keymaps '(c-mode-map c++-mode-map) + "f" #'+code/clang-format-region-or-buffer) + :config + (define-minor-mode clang-format-mode + "On save formats the current buffer via clang-format." + :lighter nil + (let ((save-func (proc (interactive) + (clang-format-buffer)))) + (if clang-format-mode + (add-hook 'after-save-hook save-func nil t) + (remove-hook 'after-save-hook save-func t)))) + (defun +code/clang-format-region-or-buffer () + (interactive) + (if (mark) + (clang-format-region (region-beginning) (region-end)) + (clang-format-buffer)))) +#+end_src +*** cc org babel +To ensure org-babel executes language blocks of C/C++, I need to load +it as an option in ~org-babel-load-languages~. +#+begin_src emacs-lisp +(use-package org + :after cc-mode + :init + (org-babel-do-load-languages + 'org-babel-load-languages + '((C . t)))) +#+end_src +** WAIT D +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +D is a systems level programming language with C-style syntax. I +think it has some interesting ideas such as a toggleable garbage +collector. Here I just install the D-mode package, enable ~org-babel~ +execution of d-mode blocks and alias ~D-mode~ with ~d-mode~. + +#+begin_src emacs-lisp +(use-package d-mode + :defer t + :straight t + :config + (fset 'D-mode 'd-mode) + (with-eval-after-load "org-mode" + (setf (alist-get 'd org-babel-load-languages) t))) +#+end_src +** Rust +#+begin_src emacs-lisp +(use-package rust-mode + :straight t + :defer t + :general + (code-leader + :keymaps 'rust-mode-map + "f" #'rust-format-buffer) + (local-leader + :keymaps 'rust-mode-map + "c" #'rust-run-clippy) + :init + (setq rust-format-on-save t) + (with-eval-after-load "eglot" + (add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer")))) +#+end_src +** WAIT Racket +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +A scheme with lots of stuff inside it. Using it for a language design +book so it's useful to have some Emacs binds for it. +#+begin_src emacs-lisp +(use-package racket-mode + :straight t + :hook (racket-mode-hook . racket-xp-mode) + :display + ("\\*Racket.*" + (display-buffer-at-bottom) + (window-height . 0.25)) + :init + (setq racket-documentation-search-location 'local) + :general + (nmap + :keymaps 'racket-describe-mode-map + "q" #'quit-window) + (nmap + :keymaps 'racket-mode-map + "gr" #'racket-eval-last-sexp) + (local-leader + :keymaps '(racket-mode-map racket-repl-mode-map) + "d" #'racket-repl-describe) + (local-leader + :keymaps 'racket-mode-map + "r" #'racket-run + "i" #'racket-repl + "e" #'racket-send-definition + "sr" #'racket-send-region + "sd" #'racket-send-definition)) +#+end_src +** WAIT CSharp +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +Haven't used C# in a while, but Emacs is alright for it with +omnisharp. +#+begin_src emacs-lisp +(use-package csharp-mode + :defer t + :pretty + (csharp-mode-hook + ("null" . "∅") + ("string" . "𝕊") + ("List" . "ℓ") + ("WriteLine" . "φ") + ("Write" . "ω") + ("true" . "⊨") + ("false" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼"))) +#+end_src +** WAIT Java +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +I kinda dislike Java, but if necessary I will code in it. Just setup +a style and some pretty symbols. You can use LSP to get cooler +features to be fair. +#+begin_src emacs-lisp +(use-package ob-java + :defer t + :pretty + (java-mode-hook + ("println" . "φ") + ("printf" . "ω") + ("null" . "Ø") + ("true" . "⊨") + ("false" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼")) + :config + (with-eval-after-load "cc-mode" + (c-add-style + "java" + '((c-basic-offset . 4) + (c-comment-only-line-offset 0 . 0) + (c-offsets-alist + (inline-open . 0) + (topmost-intro-cont . +) + (statement-block-intro . +) + (knr-argdecl-intro . 5) + (substatement-open . 0) + (substatement-label . +) + (label . +) + (statement-case-open . +) + (statement-cont . +) + (arglist-intro . c-lineup-arglist-intro-after-paren) + (arglist-close . c-lineup-arglist) + (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ +) + (access-label . 0) + (inher-cont . c-lineup-java-inher) + (func-decl-cont . c-lineup-java-throws)))) + (add-to-list 'c-default-style '(java-mode . "java"))) + + (with-eval-after-load "abbrev" + (define-abbrev-table 'java-mode-abbrev-table nil) + (add-hook 'java-mode-hook + (proc (setq-local local-abbrev-table java-mode-abbrev-table))))) +#+end_src +** Haskell +Haskell is a static lazy functional programming language (what a +mouthful). It's quite a beautiful language and really learning it will +change the way you think about programming. However, my preferred +functional language is still unfortunately Lisp so no extra brownie +points there. + +Here I configure the REPL for Haskell via the +~haskell-interactive-mode~. I also load my custom package +[[file:elisp/haskell-multiedit.el][haskell-multiedit]] which allows a +user to create temporary ~haskell-mode~ buffers that, upon completion, +will run in the REPL. Even easier than making your own buffer. +#+begin_src emacs-lisp +(use-package haskell-mode + :straight t + :defer t + :hook + (haskell-mode-hook . haskell-indentation-mode) + (haskell-mode-hook . interactive-haskell-mode) + :custom + (haskell-interactive-prompt "[λ] ") + (haskell-interactive-prompt-cont "{λ} ") + (haskell-interactive-popup-errors nil) + (haskell-stylish-on-save nil) + (haskell-process-type 'auto) + :general + (shell-leader + "h" #'haskell-interactive-bring) + (local-leader + :keymaps 'haskell-mode-map + "l" #'haskell-process-load-or-reload + "t" #'haskell-process-do-type) + (local-leader + :keymaps 'haskell-interactive-mode-map + "c" #'haskell-interactive-mode-clear) + (imap + :keymaps 'haskell-interactive-mode-map + "M-k" #'haskell-interactive-mode-history-previous + "M-j" #'haskell-interactive-mode-history-next) + :display + ("\\*haskell.**\\*" + (display-buffer-at-bottom) + (window-height . 0.25)) + :config + (load (concat user-emacs-directory "elisp/haskell-multiedit.el"))) +#+end_src +** Python +Works well for python. If you have ~pyls~ it should be on your path, so +just run eglot if you need. But an LSP server is not necessary for a +lot of my time in python. Here I also setup org-babel for python +source code blocks. +#+begin_src emacs-lisp +(use-package python + :defer t + :pretty + (python-mode-hook + ("None" . "Ø") + ("list" . "ℓ") + ("List" . "ℓ") + ("str" . "𝕊") + ("True" . "⊨") + ("False" . "⊭") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("print" . "φ") + ("lambda" . "λ") + ("return" . "⟼") + ("yield" . "⟻")) + :init + (setq python-indent-offset 4) + :config + (with-eval-after-load "org-mode" + (setf (alist-get 'python org-babel-load-languages) t))) +#+end_src +*** Python shell +Setup for python shell, including a toggle option +#+begin_src emacs-lisp +(use-package python + :defer t + :commands +python/toggle-repl + :general + (shell-leader + "p" #'run-python) + :display + ("\\*Python\\*" + (display-buffer-at-bottom) + (window-height . 0.25))) +#+end_src +** YAML +YAML is a data language which is useful for config files. +#+begin_src emacs-lisp +(use-package yaml-mode + :straight t) +#+end_src +** HTML/CSS/JS +Firstly, web mode for consistent colouring of syntax. +#+begin_src emacs-lisp +(use-package web-mode + :straight t + :defer t + :mode ("\\.html" . web-mode) + :mode ("\\.js" . web-mode) + :mode ("\\.css" . web-mode) + :custom + ((web-mode-code-indent-offset 2) + (web-mode-markup-indent-offset 2) + (web-mode-css-indent-offset 2))) +#+end_src +*** Emmet +Emmet for super speed code writing. +#+begin_src emacs-lisp +(use-package emmet-mode + :straight t + :hook (web-mode-hook . emmet-mode) + :general + (imap + :keymaps 'emmet-mode-keymap + "TAB" #'emmet-expand-line + "M-j" #'emmet-next-edit-point + "M-k" #'emmet-prev-edit-point)) +#+end_src +*** HTML Auto insert +#+begin_src emacs-lisp +(use-package web-mode + :defer t + :auto-insert + (("\\.html\\'" . "HTML Skeleton") + "" + " + + + + + "(read-string "Enter title: ") | """ + + + + + + + + + + + +" + _ + " +")) +#+end_src +*** WAIT Typescript +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +A child language of javascript which compiles to it. +#+begin_src emacs-lisp +(use-package typescript-mode + :straight t + :defer t + :init + (setq typescript-indent-level 2)) +#+end_src +** Common Lisp +Common Lisp is a dialect of Lisp, the most /common/ one around. Emacs +comes with builtin Lisp support of course, but a REPL would be nice. + +*** WAIT Sly +Enter /SLY/. Sly is a fork of /SLIME/ and is *mandatory* for lisp +development on Emacs. + +#+begin_src emacs-lisp +(use-package sly + :defer t + :straight t + :init + (setq inferior-lisp-program "sbcl") + :display + ("\\*sly-db" + (display-buffer-at-bottom) + (window-height . 0.5)) + ("\\*sly-" + (display-buffer-at-bottom) + (window-height . 0.25)) + :config + (evil-set-initial-state 'sly-db-mode 'emacs) + (with-eval-after-load "org" + (setq-default org-babel-lisp-eval-fn #'sly-eval)) + (with-eval-after-load "company" + (add-hook 'sly-mrepl-hook #'company-mode)) + :general + (shell-leader + "s" #'sly-mrepl) + (nmap + :keymaps '(lisp-mode-map sly-mrepl-mode-map) + "gr" #'sly-eval-buffer + "gd" #'sly-edit-definition + "gR" #'sly-who-calls) + (local-leader + :keymaps '(lisp-mode-map sly-mrepl-mode-map) + "s" #'+shell/toggle-sly + "c" #'sly-compile-file + "a" #'sly-apropos + "d" #'sly-describe-symbol + "D" #'sly-documentation-lookup + "S" #'sly-mrepl-sync + "E" #'sly-eval-defun) + (local-leader + :keymaps 'lisp-mode-map + :infix "e" + "b" #'sly-eval-buffer + "e" #'sly-eval-last-expression + "f" #'sly-eval-defun + "r" #'sly-eval-region) + (nmap + :keymaps 'sly-inspector-mode-map + "q" #'sly-inspector-quit)) +#+end_src +*** Emacs lisp +#+begin_src emacs-lisp +(use-package elisp-mode + :defer t + :pretty + (lisp-mode-hook + ("lambda" . "λ") + ("t" . "⊨") + ("nil" . "Ø") + ("and" . "∧") + ("or" . "∨") + ("defun" . "ƒ") + ("for" . "∀") + ("mapc" . "∀") + ("mapcar" . "∀")) + (emacs-lisp-mode-hook + ("lambda" . "λ") + ("t" . "⊨") + ("nil" . "Ø") + ("and" . "∧") + ("or" . "∨") + ("defun" . "ƒ") + ("for" . "∀") + ("mapc" . "∀") + ("mapcar" . "∀")) + :general + (:states '(normal motion visual) + :keymaps '(emacs-lisp-mode-map lisp-mode-map) + ")" #'sp-next-sexp + "(" #'sp-previous-sexp) + (nmmap + :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) + "gr" #'eval-last-sexp) + (vmap + :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) + "gr" #'eval-region)) +#+end_src +*** WIP Hydra like Lispy +:PROPERTIES: +:header-args:emacs-lisp: :tangle no +:END: +A [[file:core.org::*Hydra][Hydra]] which uses the ~Lispy~ package (by +abo-abo) to create a set of motions that allow movement around a lisp +file easily. + +2024-04-18: Still working on this, quite rough around the edges. +#+begin_src emacs-lisp +(use-package lispy + :after (lisp-mode elisp-mode) + :hydra + (hydra-lispy + nil "Move around quickly in Lisp" + ("h" #'lispy-left) + ("j" ("t" #'lispy-teleport) + #'lispy-down) + ("k" #'lispy-up) + ("l" #'lispy-right) + ("d" #'lispy-different) + ("u" #'lispy-flow) + ("o" #'lispy-oneline) + ("m" #'lispy-multiline) + ("N" #'lispy-narrow) + ("W" #'lispy-widen) + ("c" #'lispy-clone) + ("fp" #'lispy-ace-paren) + ("fs" #'lispy-ace-symbol :exit t) + ("H" #'lispy-slurp) + ("L" #'lispy-barf) + ("M-h" #'lispy-move-left) + ("M-j" #'lispy-move-down) + ("M-k" #'lispy-move-up) + ("M-l" #'lispy-move-right) + ("C-g" nil)) + :general + (nmmap + :keymaps '(emacs-lisp-mode-map lisp-mode-map) + "." #'hydra-lispy/body)) +#+end_src +*** Lisp indent function +Add a new lisp indent function which indents newline lists more +appropriately. +#+begin_src emacs-lisp +(use-package lisp-mode + :defer t + :config + (defun +oreo/lisp-indent-function (indent-point state) + (let ((normal-indent (current-column)) + (orig-point (point))) + (goto-char (1+ (elt state 1))) + (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) + (cond + ;; car of form doesn't seem to be a symbol, or is a keyword + ((and (elt state 2) + (or (not (looking-at "\\sw\\|\\s_")) + (looking-at ":"))) + (if (not (> (save-excursion (forward-line 1) (point)) + calculate-lisp-indent-last-sexp)) + (progn (goto-char calculate-lisp-indent-last-sexp) + (beginning-of-line) + (parse-partial-sexp (point) + calculate-lisp-indent-last-sexp 0 t))) + ;; Indent under the list or under the first sexp on the same + ;; line as calculate-lisp-indent-last-sexp. Note that first + ;; thing on that line has to be complete sexp since we are + ;; inside the innermost containing sexp. + (backward-prefix-chars) + (current-column)) + ((and (save-excursion + (goto-char indent-point) + (skip-syntax-forward " ") + (not (looking-at ":"))) + (save-excursion + (goto-char orig-point) + (looking-at ":"))) + (save-excursion + (goto-char (+ 2 (elt state 1))) + (current-column))) + (t + (let ((function (buffer-substring (point) + (progn (forward-sexp 1) (point)))) + method) + (setq method (or (function-get (intern-soft function) + 'lisp-indent-function) + (get (intern-soft function) 'lisp-indent-hook))) + (cond ((or (eq method 'defun) + (and (null method) + (> (length function) 3) + (string-match "\\`def" function))) + (lisp-indent-defform state indent-point)) + ((integerp method) + (lisp-indent-specform method state + indent-point normal-indent)) + (method + (funcall method indent-point state)))))))) + (setq-default lisp-indent-function #'+oreo/lisp-indent-function)) #+end_src diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org deleted file mode 100644 index cb9d19f..0000000 --- a/Emacs/.config/emacs/core.org +++ /dev/null @@ -1,808 +0,0 @@ -#+title: Core packages -#+author: Aryadev Chavali -#+description: The core components of my configuration -#+date: 2023-09-29 -#+property: header-args:emacs-lisp :tangle core.el :comments link :results none -#+options: toc:nil -#+startup: noindent - -Packages that are absolutely necessary for the rest of the -configuration. Window management, Keybindings or completion -frameworks; they're all done here. -* General -General provides a great solution for binding keys. It has evil and -use-package support so it fits nicely into configuration. In this -case, I define a "definer" for the "LEADER" keys. Leader is bound to -~SPC~ and it's functionally equivalent to the doom/spacemacs leader. -Local leader is bound to ~SPC ,~ and it's similar to doom/spacemacs -leader but doesn't try to fully assimilate the local-leader map, -instead just picking stuff I think is useful. This forces me to learn -only as many bindings as I find necessary; no more, no less. - -I also define prefix leaders for differing applications. These are -quite self explanatory by their name and provide a nice way to -visualise all bindings under a specific heading just by searching the -code. -#+begin_src emacs-lisp -(use-package general - :straight t - :demand t - :config - ;; General which key definitions for leaders - (general-def - :states '(normal motion) - "SPC" 'nil - "\\" '(nil :which-key "Local leader") - "SPC a" '(nil :which-key "Applications") - "SPC b" '(nil :which-key "Buffers") - "SPC c" '(nil :which-key "Code") - "SPC d" '(nil :which-key "Directories") - "SPC f" '(nil :which-key "Files") - "SPC i" '(nil :which-key "Insert") - "SPC m" '(nil :which-key "Modes") - "SPC r" '(nil :which-key "Tabs") - "SPC s" '(nil :which-key "Search") - "SPC t" '(nil :which-key "Shell") - "SPC q" '(nil :which-key "Quit/Literate")) - - (general-create-definer leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC") - - (general-create-definer local-leader - :states '(normal motion) - :prefix "\\") - - (general-create-definer code-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC c") - - (general-create-definer file-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC f") - - (general-create-definer shell-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC t") - - (general-create-definer tab-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC r") - - (general-create-definer mode-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC m") - - (general-create-definer app-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC a") - - (general-create-definer search-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC s") - - (general-create-definer buffer-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC b") - - (general-create-definer quit-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC q") - - (general-create-definer insert-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC i") - - (general-create-definer dir-leader - :states '(normal motion) - :keymaps 'override - :prefix "SPC d") - - (general-create-definer general-nmmap - :states '(normal motion)) - - (defalias 'nmmap #'general-nmmap) - - (general-evil-setup t)) -#+end_src -** Some binds for Emacs -Some bindings that I couldn't fit elsewhere easily. -#+begin_src emacs-lisp -(use-package emacs - :straight nil - :general - ("C-x d" #'delete-frame) - - (nmmap - "M-;" #'eval-expression - "g=" #'align-regexp - "C--" #'text-scale-decrease - "C-=" #'text-scale-increase - "C-+" #'text-scale-adjust) - - (leader - "SPC" '(execute-extended-command :which-key "M-x") - "p" `(,project-prefix-map :which-key "Project") - "'" '(browse-url-emacs :which-key "Download URL to Emacs") - ":" `(,(proc (interactive) (switch-to-buffer "*scratch*")) - :which-key "Switch to *scratch*") - "!" '(async-shell-command :which-key "Async shell command") - "h" '(help-command :which-key "Help")) - - (mode-leader - "T" #'+oreo/switch-theme) - - (code-leader - "F" `(,(proc (interactive) (find-file "~/Code/")) - :which-key "Open ~/Code/")) - - (file-leader - "f" #'find-file - "F" #'find-file-other-frame - "s" #'save-buffer) - - (quit-leader - "q" #'save-buffers-kill-terminal - "c" #'+literate/compile-config - "C" #'+literate/clean-config - "l" #'+literate/load-config) - - (search-leader "i" #'imenu)) -#+end_src -* Evil -My editor journey started off with Vim rather than Emacs, so my brain -has imprinted on its style. Thankfully Emacs is super extensible so -there exists a package (more of a supreme system) for porting Vim's -modal editing style to Emacs, called Evil (Emacs Vi Layer). - -However there are a lot of packages in Vim that provide greater -functionality, for example 'vim-surround'. Emacs, by default, has -these capabilities but there are further packages which integrate them -into Evil. -** Evil core -Setup the evil package, with some opinionated keybindings: -- Switch ~evil-upcase~ and ~evil-downcase~ because I use ~evil-upcase~ - more -- Switch ~evil-goto-mark~ and ~evil-goto-mark-line~ as I'd rather have - the global one closer to the home row -- Use 'T' character as an action for transposing objects -#+begin_src emacs-lisp -(use-package evil - :defer t - :hook (after-init-hook . evil-mode) - :general - (leader - "w" '(evil-window-map :which-key "Window") - "wT" #'window-swap-states - "wd" #'evil-window-delete) - - (nmmap - "K" #'man - "TAB" #'evil-jump-item - "r" #'evil-replace-state - "zC" #'hs-hide-level - "zO" #'hs-show-all - "'" #'evil-goto-mark - "`" #'evil-goto-mark-line - "C-w" #'evil-window-map - "gu" #'evil-upcase - "gU" #'evil-downcase - "T" nil) - - (nmmap - :infix "T" - "w" #'transpose-words - "c" #'transpose-chars - "s" #'transpose-sentences - "p" #'transpose-paragraphs - "e" #'transpose-sexps - "l" #'transpose-lines) - :init - (setq evil-want-keybinding nil - evil-split-window-below t - evil-vsplit-window-right t - evil-want-abbrev-expand-on-insert-exit t - evil-undo-system #'undo-tree)) -#+end_src -** Evil surround -Evil surround is a port for vim-surround. -#+begin_src emacs-lisp -(use-package evil-surround - :after evil - :config - (global-evil-surround-mode)) -#+end_src -** Evil commentary -Allows generalised commenting of objects easily. -#+begin_src emacs-lisp -(use-package evil-commentary - :after evil - :config - (evil-commentary-mode)) -#+end_src -** Evil multi cursor -Setup for multi cursors in Evil mode. Don't let evil-mc setup it's own -keymap because it uses 'gr' as its prefix, which I don't like. -#+begin_src emacs-lisp -(use-package evil-mc - :after evil - :init - (defvar evil-mc-key-map (make-sparse-keymap)) - :general - (nmap - :infix "gz" - "q" #'evil-mc-undo-all-cursors - "d" #'evil-mc-make-and-goto-next-match - "j" #'evil-mc-make-cursor-move-next-line - "k" #'evil-mc-make-cursor-move-prev-line - "j" #'evil-mc-make-cursor-move-next-line - "m" #'evil-mc-make-all-cursors - "z" #'evil-mc-make-cursor-here - "r" #'evil-mc-resume-cursors - "s" #'evil-mc-pause-cursors - "u" #'evil-mc-undo-last-added-cursor) - :config - ;; (evil-mc-define-vars) - ;; (evil-mc-initialize-vars) - ;; (add-hook 'evil-mc-before-cursors-created #'evil-mc-pause-incompatible-modes) - ;; (add-hook 'evil-mc-before-cursors-created #'evil-mc-initialize-active-state) - ;; (add-hook 'evil-mc-after-cursors-deleted #'evil-mc-teardown-active-state) - ;; (add-hook 'evil-mc-after-cursors-deleted #'evil-mc-resume-incompatible-modes) - ;; (advice-add #'evil-mc-initialize-hooks :override #'ignore) - ;; (advice-add #'evil-mc-teardown-hooks :override #'evil-mc-initialize-vars) - ;; (advice-add #'evil-mc-initialize-active-state :before #'turn-on-evil-mc-mode) - ;; (advice-add #'evil-mc-teardown-active-state :after #'turn-off-evil-mc-mode) - ;; (add-hook 'evil-insert-state-entry-hook #'evil-mc-resume-cursors) - (global-evil-mc-mode)) -#+end_src - -** Evil collection -Provides a community based set of keybindings for most modes in -Emacs. I don't necessarily like all my modes having these bindings -though, as I may disagree with some. So I use it in a mode to mode basis. -#+begin_src emacs-lisp -(use-package evil-collection - :after evil) -#+end_src -** Evil number -Increment/decrement a number at point like Vim does, but use bindings -that don't conflict with Emacs default. -#+begin_src emacs-lisp -(use-package evil-numbers - :after evil - :general - (nmmap - "+" #'evil-numbers/inc-at-pt - "-" #'evil-numbers/dec-at-pt)) -#+end_src -* Completion -Emacs is a text based interface. Completion is its bread and butter -in providing good user experience. By default Emacs provides -'completions-list' which produces a buffer of options which can be -searched and selected. We can take this further though! - -Ido and Icomplete are packages distributed with Emacs to provide -greater completion interfaces. They utilise the minibuffer to create -a more interactive experience, allowing incremental searches and -option selection. - -Ivy and Helm provide more modern interfaces, though Helm is quite -heavy. Ivy, on the other hand, provides an interface similar to Ido -with less clutter and better customisation options. -** Ivy -Ivy is a completion framework for Emacs, and my preferred one. It has -a great set of features with little to no pain with setting up. -*** Ivy Core -Setup for ivy, in preparation for counsel. Turn on ivy-mode just -after init. - -Setup vim-like bindings for the minibuffer ("M-(j|k)" for down|up the -selection list). -#+begin_src emacs-lisp -(use-package ivy - :defer t - :hook (after-init-hook . ivy-mode) - :general - (general-def - :keymaps 'ivy-minibuffer-map - "C-j" #'ivy-yank-symbol - "M-j" #'ivy-next-line-or-history - "M-k" #'ivy-previous-line-or-history - "C-SPC" #'ivy-occur) - (general-def - :keymaps 'ivy-switch-buffer-map - "M-j" #'ivy-next-line-or-history - "M-k" #'ivy-previous-line-or-history) - (nmap - :keymaps '(ivy-occur-mode-map ivy-occur-grep-mode-map) - "RET" #'ivy-occur-press-and-switch - "J" #'ivy-occur-press - "gr" #'ivy-occur-revert-buffer - "q" #'quit-window - "D" #'ivy-occur-delete-candidate - "W" #'ivy-wgrep-change-to-wgrep-mode - "{" #'compilation-previous-file - "}" #'compilation-next-file) - :init - (with-eval-after-load "evil" - (evil-set-initial-state 'ivy-occur-mode 'normal) - (evil-set-initial-state 'ivy-occur-grep-mode 'normal)) - (with-eval-after-load "amx" - (setq amx-backend 'ivy)) - - (setq ivy-height 10 - ivy-wrap t - ivy-fixed-height-minibuffer t - ivy-use-virtual-buffers nil - ivy-virtual-abbreviate 'full - ivy-on-del-error-function #'ignore - ivy-use-selectable-prompt t) - :config - (require 'counsel nil t)) -#+end_src -*** Counsel -Setup for counsel. Load after ivy and helpful. -#+begin_src emacs-lisp -(use-package counsel - :defer t - :general - (search-leader - "s" #'counsel-grep-or-swiper - "R" #'counsel-rg) - (file-leader - "r" #'counsel-recentf - "P" (proc (interactive) - (with-current-buffer (find-file-noselect - (concat user-emacs-directory "config.org")) - (counsel-git)))) - (insert-leader - "c" #'counsel-unicode-char) - (general-def - [remap describe-bindings] #'counsel-descbinds - [remap load-theme] #'counsel-load-theme) - :config - (setq ivy-initial-inputs-alist '((org-insert-link . "^")) - counsel-describe-function-function #'helpful-callable - counsel-describe-variable-function #'helpful-variable - counsel-grep-swiper-limit 1500000 - ivy-re-builders-alist '((swiper . ivy--regex-plus) - (counsel-grep-or-swiper . ivy--regex-plus) - (counsel-rg . ivy--regex-plus) - (t . ivy--regex-ignore-order))) - (counsel-mode)) -#+end_src -*** WAIT Ivy posframe -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -This makes ivy minibuffer windows use child frames. -Very nice eyecandy, but can get kinda annoying. -#+begin_src emacs-lisp -(use-package ivy-posframe - :hook (ivy-mode-hook . ivy-posframe-mode) - :straight t - :init - (setq ivy-posframe-parameters - '((left-fringe . 0) - (right-fringe . 0) - (background-color . "grey7"))) - - (setq ivy-posframe-display-functions-alist - '((t . ivy-posframe-display-at-window-center)))) -#+end_src -*** WAIT Counsel etags -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Counsel etags allows me to search generated tag files for tags. I -already have a function defined to generate the tags, so it's just -searching them which I find to be a bit of a hassle, and where this -package comes in. - -This has been replaced by [[*xref][xref]] which is inbuilt. -#+begin_src emacs-lisp -(use-package counsel-etags - :after counsel - :general - (search-leader - "t" #'counsel-etags-find-tag)) -#+end_src -** WAIT Ido -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Ido is a very old completion package that still works great to this -day. Though it is limited in its scope (and may thus be called a -completion add-on rather than a full on framework), it is still a very -powerful package. With the use of ido-completing-read+, it may be used -similarly to a fully fledged completion framework. - -#+begin_src emacs-lisp -(use-package ido - :demand t - :general - (general-def - :keymaps '(ido-buffer-completion-map - ido-file-completion-map - ido-file-dir-completion-map - ido-common-completion-map) - (kbd "M-j") #'ido-next-match - (kbd "M-k") #'ido-prev-match - (kbd "C-x o") #'evil-window-up) - :init - (setq ido-decorations - (list "{" "}" " \n" " ..." "[" "]" " [No match]" " [Matched]" - " [Not readable]" " [Too big]" " [Confirm]") - completion-styles '(flex partial-completion intials emacs22)) - (setq-default ido-enable-flex-matching t - ido-enable-dot-prefix t - ido-enable-regexp nil) - (with-eval-after-load "magit" - (setq magit-completing-read-function 'magit-ido-completing-read)) - :config - (ido-mode) - (ido-everywhere)) -#+end_src -*** Ido ubiquitous -Ido completing-read+ is a package that extends the ido package to work -with more text based functions. -#+begin_src emacs-lisp -(use-package ido-completing-read+ - :after ido - :config - (ido-ubiquitous-mode +1)) -#+end_src -** Amx -Amx is a fork of Smex that works to enhance the -execute-extended-command interface. It also provides support for ido -or ivy (though I'm likely to use ido here) and allows you to switch -between them. - -It provides a lot of niceties such as presenting the key bind when -looking for a command. - -#+begin_src emacs-lisp -(use-package amx - :config - (amx-mode)) -#+end_src -** Orderless -Orderless sorting method for completion, probably one of the best -things ever. -#+begin_src emacs-lisp -(use-package orderless - :after (ivy ido) - :config - (setf (alist-get t ivy-re-builders-alist) 'orderless-ivy-re-builder)) -#+end_src -** Completions-list -In case I ever use the completions list, some basic commands to look -around. -#+begin_src emacs-lisp -(use-package simple - :straight nil - :general - (nmmap - :keymaps 'completion-list-mode-map - "l" #'next-completion - "h" #'previous-completion - "ESC" #'delete-completion-window - "q" #'quit-window - "RET" #'choose-completion) - :config - (with-eval-after-load "evil" - (setq evil-emacs-state-modes (cl-remove-if - #'(lambda (x) (eq 'completions-list-mode x)) - evil-emacs-state-modes)) - (add-to-list 'evil-normal-state-modes 'completions-list-mode))) -#+end_src -** Company -Company is the auto complete system I use. I don't like having heavy -setups for company as it only makes it slower to use. In this case, -just setup some evil binds for company. -#+begin_src emacs-lisp -(use-package company - :straight t - :hook - (prog-mode-hook . company-mode) - (eshell-mode-hook . company-mode) - :general - (imap - "C-SPC" #'company-complete - "M-j" #'company-select-next - "M-k" #'company-select-previous)) -#+end_src -* Pretty symbols -Prettify symbols mode allows for users to declare 'symbols' that -replace text within certain modes. Though this may seem like useless -eye candy, it has aided my comprehension and speed of recognition -(recognising symbols is easier than words). - -Essentially a use-package keyword which makes declaring pretty symbols -for language modes incredibly easy. Checkout my [[C/C++][C/C++]] configuration -for an example. -#+begin_src emacs-lisp -(use-package prog-mode - :straight nil - :init - (setq prettify-symbols-unprettify-at-point t) - :config - (with-eval-after-load "use-package-core" - (add-to-list 'use-package-keywords ':pretty) - (defun use-package-normalize/:pretty (_name-symbol _keyword args) - args) - - (defun use-package-handler/:pretty (name _keyword args rest state) - (use-package-concat - (use-package-process-keywords name rest state) - (mapcar - #'(lambda (arg) - (let ((mode (car arg)) - (rest (cdr arg))) - `(add-hook - ',mode - #'(lambda nil - (setq prettify-symbols-alist ',rest) - (prettify-symbols-mode))))) - args))))) -#+end_src - -Here's a collection of keywords and possible associated symbols for -any prog language of choice. Mostly for reference and copying. -#+begin_example -("null" . "Ø") -("list" . "ℓ") -("string" . "𝕊") -("true" . "⊤") -("false" . "⊥") -("char" . "ℂ") -("int" . "ℤ") -("float" . "ℝ") -("!" . "¬") -("&&" . "∧") -("||" . "∨") -("for" . "∀") -("return" . "⟼") -("print" . "ℙ") -("lambda" . "λ") -#+end_example -* Window management -Emacs' default window management is quite bad, eating other windows on -a whim and not particularly caring for the current window setup. -Thankfully you can change this via the ~display-buffer-alist~ which -matches buffer names with how the window for the buffer should be -displayed. I add a use-package keyword to make ~display-buffer-alist~ -records within a use-package call. - -I have no idea whether it's optimal AT ALL, but it works for me. - -2024-04-23: Found this option ~switch-to-buffer-obey-display-actions~ -which makes manual buffer switches obey the same constraints via -~display-buffer-alist~ as creating the buffer automatically. -#+begin_src emacs-lisp -(use-package window - :straight nil - :general - (buffer-leader - "b" #'switch-to-buffer - "d" #'kill-current-buffer - "K" #'kill-buffer - "j" #'next-buffer - "k" #'previous-buffer - "D" '(+oreo/clean-buffer-list :which-key "Kill most buffers")) - :init - (setq switch-to-buffer-obey-display-actions t) - (with-eval-after-load "use-package-core" - (add-to-list 'use-package-keywords ':display) - (defun use-package-normalize/:display (_name-symbol _keyword args) - args) - - (defun use-package-handler/:display (name _keyword args rest state) - (use-package-concat - (use-package-process-keywords name rest state) - (mapcar - #'(lambda (arg) - `(add-to-list 'display-buffer-alist - ',arg)) - args))))) -#+end_src -** Some display records -Using the ~:display~ keyword, setup up some ~display-buffer-alist~ -records. This is mostly for packages that aren't really configured -(like [[info:woman][woman]]) or packages that were configured before -(like [[Ivy][Ivy]]). -#+begin_src emacs-lisp -(use-package window - :straight nil - :defer t - :display - ("\\*Process List\\*" - (display-buffer-at-bottom) - (window-height . 0.25)) - - ("\\*\\(Ido \\)?Completions\\*" - (display-buffer-in-side-window) - (window-height . 0.25) - (side . bottom)) - - ("\\*ivy-occur.*" - (display-buffer-at-bottom) - (window-height . 0.25)) - - ("\\*Async Shell Command\\*" - (display-buffer-at-bottom) - (window-height . 0.25))) -#+end_src -* Tabs -Tabs in vscode are just like buffers in Emacs but way slower and -harder to use. Tabs in Emacs are essentially window layouts, similar -to instances in Tmux. With this setup I can use tabs quite -effectively. - -#+begin_src emacs-lisp -(use-package tab-bar - :defer t - :straight nil - :init - (setq tab-bar-show 1) - :config - (tab-bar-mode) - :general - (tab-leader - "t" #'tab-switch - "j" #'tab-next - "k" #'tab-previous - "h" #'tab-move-to - "l" #'tab-move - "n" #'tab-new - "c" #'tab-close - "d" #'tab-close - "f" #'tab-detach - "w" #'tab-window-detach - "r" #'tab-rename) - (mode-leader - "t" #'toggle-tab-bar-mode-from-frame)) -#+end_src -* Auto typing -Snippets are a pretty nice way of automatically inserting code. Emacs -provides a ton of packages by default to do this, but there are great -packages to install as well. - -Abbrevs and skeletons make up a popular solution within Emacs default. -Abbrevs are for simple expressions wherein the only input is the key, -and the output is some Elisp function. They provide a lot of inbuilt -functionality and are quite useful. Skeletons, on the other hand, are -for higher level insertions - -The popular external solution is Yasnippet. Yasnippet is a great -package for snippets, which I use heavily in programming and org-mode. -I setup here the global mode for yasnippet and a collection of -snippets for ease of use. -** Abbrevs -Just define a few abbrevs for various date-time operations. Also -define a macro that will assume a function for the expansion, helping -with abstracting a few things away. -#+begin_src emacs-lisp -(use-package abbrev - :straight nil - :hook - (prog-mode-hook . abbrev-mode) - (text-mode-hook . abbrev-mode) - :init - (defmacro +abbrev/define-abbrevs (abbrev-table &rest abbrevs) - `(progn - ,@(mapcar #'(lambda (abbrev) - `(define-abbrev - ,abbrev-table - ,(car abbrev) - "" - (proc (insert ,(cadr abbrev))))) - abbrevs))) - (setq save-abbrevs nil) - :config - (+abbrev/define-abbrevs - global-abbrev-table - ("sdate" - (format-time-string "%Y-%m-%d" (current-time))) - ("stime" - (format-time-string "%H:%M:%S" (current-time))) - ("sday" - (format-time-string "%A" (current-time))) - ("smon" - (format-time-string "%B" (current-time))))) -#+end_src -** WAIT Skeletons -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Defines a macro for generating a skeleton + abbrev for a given mode. -Doesn't sanitise inputs because I assume callers are /rational/ actors -who would *only* use this for their top level Emacs config. - -Honestly didn't find much use for this currently, so disabled. -#+begin_src emacs-lisp -(use-package skeleton - :straight nil - :after abbrev - :config - (defmacro +autotyping/gen-skeleton-abbrev (mode abbrev &rest skeleton) - (let* ((table (intern (concat (symbol-name mode) "-abbrev-table"))) - (skeleton-name (intern (concat "+skeleton/" (symbol-name mode) "/" abbrev)))) - `(progn - (define-skeleton - ,skeleton-name - "" - ,@skeleton) - (define-abbrev ,table - ,abbrev - "" - ',skeleton-name))))) -#+end_src -** Auto insert -Allows inserting text immediately upon creating a new buffer with a -given name. Supports skeletons for inserting text. To make it easier -for later systems to define their own auto inserts, I define a -~use-package~ keyword ~auto-insert~ which allows one to define an -entry for ~auto-insert-alist~. -#+begin_src emacs-lisp -(use-package autoinsert - :straight nil - :demand t - :hook (after-init-hook . auto-insert-mode) - :config - (with-eval-after-load "use-package-core" - (add-to-list 'use-package-keywords ':auto-insert) - (defun use-package-normalize/:auto-insert (_name-symbol _keyword args) - args) - (defun use-package-handler/:auto-insert (name _keyword args rest state) - (use-package-concat - (use-package-process-keywords name rest state) - (mapcar - #'(lambda (arg) - `(add-to-list - 'auto-insert-alist - ',arg)) - args))))) -#+end_src -** Yasnippet default -Look at the snippets [[file:../.config/yasnippet/snippets/][folder]] -for all snippets I've got. -#+begin_src emacs-lisp -(use-package yasnippet - :defer t - :hook - (prog-mode-hook . yas-minor-mode) - (text-mode-hook . yas-minor-mode) - :general - (insert-leader - "i" #'yas-insert-snippet) - :config - (yas-load-directory (no-littering-expand-etc-file-name "yasnippet/snippets"))) -#+end_src -** WAIT Hydra -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Hydra is a great package by =abo-abo= (yes the same guy who made ivy -and swiper) and I hope to use it later on in the config. There are -two use-package declarations here: one for ~hydra~ itself, and the -other for ~use-package-hydra~ which provides the keyword ~:hydra~ in -use-package declarations. -#+begin_src emacs-lisp -(use-package hydra - :straight t) - -(use-package use-package-hydra - :straight t) -#+end_src diff --git a/Emacs/.config/emacs/elisp/literate.el b/Emacs/.config/emacs/elisp/literate.el index 5039446..43c39d8 100644 --- a/Emacs/.config/emacs/elisp/literate.el +++ b/Emacs/.config/emacs/elisp/literate.el @@ -55,10 +55,8 @@ ;; Files (defconst +literate/org-files - (+literate/filter - #'+literate/org-p - (mapcar #'(lambda (file) (concat user-emacs-directory file)) - (cddr (directory-files user-emacs-directory))))) + (mapcar #'(lambda (x) (expand-file-name (concat user-emacs-directory x))) + (list "config.org"))) (defconst +literate/el-init-files `(,(concat user-emacs-directory "early-init.el") diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org deleted file mode 100644 index 7242d6c..0000000 --- a/Emacs/.config/emacs/lang.org +++ /dev/null @@ -1,821 +0,0 @@ -#+title: Programming language configuration -#+author: Aryadev Chavali -#+description: Description -#+date: 2024-04-16 -#+property: header-args:emacs-lisp :tangle lang.el :comments link :results none -#+options: toc:nil -#+startup: noindent - -* Makefile -Defines an auto-insert for Makefiles. Assumes C but it's very easy to -change it for C++. -#+begin_src emacs-lisp -(use-package emacs - :auto-insert - (("[mM]akefile\\'" . "Makefile skeleton") - "" - "CC=gcc -CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -fsanitize=undefined -std=c11 -LIBS= - -ARGS= -OUT=main.out - -SRC=src -DIST=build -CODE=$(addprefix $(SRC)/, ) # add source files here -OBJECTS=$(CODE:$(SRC)/%.c=$(DIST)/%.o) -DEPDIR:=$(DIST)/dependencies -DEPFLAGS=-MT $@ -MMD -MP -MF -DEPS:=$(CODE:$(SRC)/%.c=$(DEPDIR):%.d) $(DEPDIR)/main.d - -.PHONY: all -all: $(OUT) - -$(OUT): $(DIST)/$(OUT) - -$(DIST)/$(OUT): $(OBJECTS) $(DIST)/main.o | $(DIST) - $(CC) $(CFLAGS) $^ -o $@ $(LIBS) - -$(DIST)/%.o: $(SRC)/%.c | $(DIST) $(DEPDIR) - $(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS) - -.PHONY: run -run: $(DIST)/$(OUT) - ./$^ $(ARGS) - -.PHONY: -clean: - rm -rfv $(DIST)/* - -$(DIST): - mkdir -p $(DIST) - -$(DEPDIR): - mkdir -p $(DEPDIR) - --include $(DEPS) -" - _)) -#+end_src -* PDF -I use PDFs mostly for reading reports or papers. Though Emacs isn't -my preferred application for viewing PDFs (I highly recommend -[[https://pwmt.org/projects/zathura/][Zathura]]), similar to most -things with Emacs, having a PDF viewer builtin can be a very useful -asset. - -For example if I were editing an org document which I was eventually -compiling into a PDF, my workflow would be much smoother with a PDF -viewer within Emacs that I can open on another pane. -** WAIT PDF tools -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -~pdf-tools~ provides the necessary functionality for viewing PDFs. -There is no proper PDF viewing without this package. -~evil-collection~ provides a setup for this mode, so use that. -#+begin_src emacs-lisp -(use-package pdf-tools - :mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode) - :straight t - :display - ("^.*pdf$" - (display-buffer-same-window) - (inhibit-duplicate-buffer . t)) - :config - (pdf-tools-install-noverify) - (with-eval-after-load "evil-collection" - (evil-collection-pdf-setup))) -#+end_src -** WAIT PDF grep -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -PDF grep is a Linux tool that allows for searches against the text -inside of PDFs similar to standard grep. This cannot be performed by -standard grep due to how PDFs are encoded; they are not a clear text -format. -#+begin_src emacs-lisp -(use-package pdfgrep - :after pdf-tools - :hook (pdf-view-mode-hook . pdfgrep-mode) - :general - (nmap - :keymaps 'pdf-view-mode-map - "M-g" #'pdfgrep)) -#+end_src -* WAIT SQL -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -The default SQL package provides support for connecting to common -database types (sqlite, mysql, etc) for auto completion and query -execution. I don't use SQL currently but whenever I need it it's -there. -#+begin_src emacs-lisp -(use-package sql - :defer t - :straight nil - :init - (setq sql-display-sqli-buffer-function nil)) -#+end_src -* WAIT Ada -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Check out [[file:elisp/ada-mode.el][ada-mode]], my custom ~ada-mode~ -that replaces the default one. This mode just colourises stuff, and -uses eglot and a language server to do the hard work. - -#+begin_src emacs-lisp -(use-package ada-mode - :straight nil - :load-path "elisp/" - :defer t - :config - (with-eval-after-load "eglot" - (add-hook 'ada-mode-hook #'eglot))) -#+end_src -* NHexl -Hexl-mode is the inbuilt package within Emacs to edit hex and binary -format buffers. There are a few problems with hexl-mode though, -including an annoying prompt on /revert-buffer/. - -Thus, nhexl-mode! It comes with a few other improvements. Check out -the [[https://elpa.gnu.org/packages/nhexl-mode.html][page]] yourself. -#+begin_src emacs-lisp -(use-package nhexl-mode - :straight t - :mode ("\\.bin" "\\.out")) -#+end_src -* C/C++ -Setup for C and C++ modes, using Emacs' default package: cc-mode. -** cc-mode -Tons of stuff, namely: -+ ~auto-fill-mode~ for 80 char limit -+ Some keybindings to make evil statement movement is easy -+ Lots of pretty symbols -+ Indenting options and a nice (for me) code style for C (though - aggressive indent screws with this a bit) -+ Auto inserts to get a C file going -#+begin_src emacs-lisp -(use-package cc-mode - :defer t - :hook - (c-mode-hook . auto-fill-mode) - (c++-mode-hook . auto-fill-mode) - :general - (:keymaps '(c-mode-map c++-mode-map) - :states '(normal motion visual) - "(" #'c-beginning-of-statement - ")" #'c-end-of-statement) - :pretty - (c-mode-hook - ("puts" . "φ") - ("fputs" . "ϕ") - ("printf" . "ω") - ("fprintf" . "Ω") - ("NULL" . "Ø") - ("true" . "⊨") - ("false" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("return" . "⟼")) - (c++-mode-hook - ("nullptr" . "Ø") - ("string" . "𝕊") - ("vector" . "ℓ") - ("puts" . "φ") - ("fputs" . "ϕ") - ("printf" . "ω") - ("fprintf" . "Ω") - ("NULL" . "Ø") - ("true" . "⊨") - ("false" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("return" . "⟼")) - :init - (setq-default c-basic-offset 2) - (setq-default c-auto-newline nil) - (setq-default c-default-style '((other . "user"))) - (defun +cc/copyright-notice () - (let* ((lines (split-string (+license/copyright-notice) "\n")) - (copyright-line (car lines)) - (rest (cdr lines))) - (concat - "* " - copyright-line - "\n" - (mapconcat - #'(lambda (x) - (if (string= x "") - "" - (concat " * " x))) - rest - "\n")))) - - :auto-insert - (("\\.c\\'" . "C skeleton") - "" - "/" (+cc/copyright-notice) "\n\n" - " * Created: " (format-time-string "%Y-%m-%d") "\n" - " * Author: " user-full-name "\n" - " * Description: " _ "\n" - " */\n" - "\n") - (("\\.cpp\\'" "C++ skeleton") - "" - "/" (+cc/copyright-notice) "\n\n" - " * Created: " (format-time-string "%Y-%m-%d") "\n" - " * Author: " user-full-name "\n" - " * Description: " _ "\n" - " */\n" - "\n") - (("\\.\\([Hh]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'" . "C / C++ header") - (replace-regexp-in-string "[^A-Z0-9]" "_" - (string-replace "+" "P" - (upcase - (file-name-nondirectory buffer-file-name)))) - "/" (+cc/copyright-notice) "\n\n" - " * Created: " (format-time-string "%Y-%m-%d") "\n" - " * Author: " user-full-name "\n" - " * Description: " _ "\n" - " */\n\n" - "#ifndef " str n "#define " str "\n\n" "\n\n#endif") - :config - (c-add-style - "user" - '((c-basic-offset . 2) - (c-comment-only-line-offset . 0) - (c-hanging-braces-alist (brace-list-open) - (brace-entry-open) - (substatement-open after) - (block-close . c-snug-do-while) - (arglist-cont-nonempty)) - (c-cleanup-list brace-else-brace) - (c-offsets-alist - (statement-block-intro . +) - (substatement-open . 0) - (access-label . -) - (inline-open . 0) - (label . 0) - (statement-cont . +))))) -#+end_src -** Clang format -Clang format comes inbuilt with clang, so download that before using -this. Formats C/C++ files depending on a format (checkout the Clang -format [[file:~/Dotfiles/ClangFormat/.clang-format][config file]] in -my dotfiles). - -#+begin_src emacs-lisp -(use-package clang-format - :straight nil - :load-path "/usr/share/clang/" - :after cc-mode - :commands (+code/clang-format-region-or-buffer - clang-format-mode) - ;;; 2024-04-24: disabled as it's annoying on projects where a - ;;; .clang-format isn't defined. Furthermore, does it make sense - ;;; for *every* file you open and edit to have a format function run - ;;; right after? seems a bit slow. - ;; :hook - ;; (c-mode-hook . clang-format-mode) - ;; (c++-mode-hook . clang-format-mode) - :general - (code-leader - :keymaps '(c-mode-map c++-mode-map) - "f" #'+code/clang-format-region-or-buffer) - :config - (define-minor-mode clang-format-mode - "On save formats the current buffer via clang-format." - :lighter nil - (let ((save-func (proc (interactive) - (clang-format-buffer)))) - (if clang-format-mode - (add-hook 'after-save-hook save-func nil t) - (remove-hook 'after-save-hook save-func t)))) - (defun +code/clang-format-region-or-buffer () - (interactive) - (if (mark) - (clang-format-region (region-beginning) (region-end)) - (clang-format-buffer)))) -#+end_src -** cc org babel -To ensure org-babel executes language blocks of C/C++, I need to load -it as an option in ~org-babel-load-languages~. -#+begin_src emacs-lisp -(use-package org - :after cc-mode - :init - (org-babel-do-load-languages - 'org-babel-load-languages - '((C . t)))) -#+end_src -* WAIT D -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -D is a systems level programming language with C-style syntax. I -think it has some interesting ideas such as a toggleable garbage -collector. Here I just install the D-mode package, enable ~org-babel~ -execution of d-mode blocks and alias ~D-mode~ with ~d-mode~. - -#+begin_src emacs-lisp -(use-package d-mode - :defer t - :straight t - :config - (fset 'D-mode 'd-mode) - (with-eval-after-load "org-mode" - (setf (alist-get 'd org-babel-load-languages) t))) -#+end_src -* WAIT Rust -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -#+begin_src emacs-lisp -(use-package rust-mode - :straight t - :general - (code-leader - :keymaps 'rust-mode-map - "f" #'rust-format-buffer) - (local-leader - :keymaps 'rust-mode-map - "c" #'rust-run-clippy) - :init - (setq rust-format-on-save t) - (with-eval-after-load "eglot" - (add-to-list 'eglot-server-programs '(rust-mode "rust-analyzer")))) -#+end_src -* WAIT Racket -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -A scheme with lots of stuff inside it. Using it for a language design -book so it's useful to have some Emacs binds for it. -#+begin_src emacs-lisp -(use-package racket-mode - :straight t - :hook (racket-mode-hook . racket-xp-mode) - :display - ("\\*Racket.*" - (display-buffer-at-bottom) - (window-height . 0.25)) - :init - (setq racket-documentation-search-location 'local) - :general - (nmap - :keymaps 'racket-describe-mode-map - "q" #'quit-window) - (nmap - :keymaps 'racket-mode-map - "gr" #'racket-eval-last-sexp) - (local-leader - :keymaps '(racket-mode-map racket-repl-mode-map) - "d" #'racket-repl-describe) - (local-leader - :keymaps 'racket-mode-map - "r" #'racket-run - "i" #'racket-repl - "e" #'racket-send-definition - "sr" #'racket-send-region - "sd" #'racket-send-definition)) -#+end_src -* WAIT CSharp -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -Haven't used C# in a while, but Emacs is alright for it with -omnisharp. -#+begin_src emacs-lisp -(use-package csharp-mode - :defer t - :pretty - (csharp-mode-hook - ("null" . "∅") - ("string" . "𝕊") - ("List" . "ℓ") - ("WriteLine" . "φ") - ("Write" . "ω") - ("true" . "⊨") - ("false" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("return" . "⟼"))) -#+end_src -* WAIT Java -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -I kinda dislike Java, but if necessary I will code in it. Just setup -a style and some pretty symbols. You can use LSP to get cooler -features to be fair. -#+begin_src emacs-lisp -(use-package ob-java - :straight nil - :defer t - :pretty - (java-mode-hook - ("println" . "φ") - ("printf" . "ω") - ("null" . "Ø") - ("true" . "⊨") - ("false" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("return" . "⟼")) - :config - (with-eval-after-load "cc-mode" - (c-add-style - "java" - '((c-basic-offset . 4) - (c-comment-only-line-offset 0 . 0) - (c-offsets-alist - (inline-open . 0) - (topmost-intro-cont . +) - (statement-block-intro . +) - (knr-argdecl-intro . 5) - (substatement-open . 0) - (substatement-label . +) - (label . +) - (statement-case-open . +) - (statement-cont . +) - (arglist-intro . c-lineup-arglist-intro-after-paren) - (arglist-close . c-lineup-arglist) - (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ +) - (access-label . 0) - (inher-cont . c-lineup-java-inher) - (func-decl-cont . c-lineup-java-throws)))) - (add-to-list 'c-default-style '(java-mode . "java"))) - - (with-eval-after-load "abbrev" - (define-abbrev-table 'java-mode-abbrev-table nil) - (add-hook 'java-mode-hook - (proc (setq-local local-abbrev-table java-mode-abbrev-table))))) -#+end_src -* Haskell -Haskell is a static lazy functional programming language (what a -mouthful). It's quite a beautiful language and really learning it will -change the way you think about programming. However, my preferred -functional language is still unfortunately Lisp so no extra brownie -points there. - -Here I configure the REPL for Haskell via the -~haskell-interactive-mode~. I also load my custom package -[[file:elisp/haskell-multiedit.el][haskell-multiedit]] which allows a -user to create temporary ~haskell-mode~ buffers that, upon completion, -will run in the REPL. Even easier than making your own buffer. -#+begin_src emacs-lisp -(use-package haskell-mode - :hook - (haskell-mode-hook . haskell-indentation-mode) - (haskell-mode-hook . interactive-haskell-mode) - :custom - (haskell-interactive-prompt "[λ] ") - (haskell-interactive-prompt-cont "{λ} ") - (haskell-interactive-popup-errors nil) - (haskell-stylish-on-save nil) - (haskell-process-type 'auto) - :general - (shell-leader - "h" #'haskell-interactive-bring) - (local-leader - :keymaps 'haskell-mode-map - "l" #'haskell-process-load-or-reload - "t" #'haskell-process-do-type) - (local-leader - :keymaps 'haskell-interactive-mode-map - "c" #'haskell-interactive-mode-clear) - (imap - :keymaps 'haskell-interactive-mode-map - "M-k" #'haskell-interactive-mode-history-previous - "M-j" #'haskell-interactive-mode-history-next) - :display - ("\\*haskell.**\\*" - (display-buffer-at-bottom) - (window-height . 0.25)) - :config - (load (concat user-emacs-directory "elisp/haskell-multiedit.el"))) -#+end_src -* Python -Works well for python. If you have ~pyls~ it should be on your path, so -just run eglot if you need. But an LSP server is not necessary for a -lot of my time in python. Here I also setup org-babel for python -source code blocks. -#+begin_src emacs-lisp -(use-package python - :defer t - :straight nil - :pretty - (python-mode-hook - ("None" . "Ø") - ("list" . "ℓ") - ("List" . "ℓ") - ("str" . "𝕊") - ("True" . "⊨") - ("False" . "⊭") - ("!" . "¬") - ("&&" . "∧") - ("||" . "∨") - ("for" . "∀") - ("print" . "φ") - ("lambda" . "λ") - ("return" . "⟼") - ("yield" . "⟻")) - :init - (setq python-indent-offset 4) - :config - (with-eval-after-load "org-mode" - (setf (alist-get 'python org-babel-load-languages) t))) -#+end_src -** Python shell -Setup for python shell, including a toggle option -#+begin_src emacs-lisp -(use-package python - :straight nil - :commands +python/toggle-repl - :general - (shell-leader - "p" #'run-python) - :display - ("\\*Python\\*" - (display-buffer-at-bottom) - (window-height . 0.25))) -#+end_src -* YAML -YAML is a data language which is useful for config files. -#+begin_src emacs-lisp -(use-package yaml-mode - :straight t) -#+end_src -* HTML/CSS/JS -Firstly, web mode for consistent colouring of syntax. -#+begin_src emacs-lisp -(use-package web-mode - :mode ("\\.html" . web-mode) - :mode ("\\.js" . web-mode) - :mode ("\\.css" . web-mode) - :custom - ((web-mode-code-indent-offset 2) - (web-mode-markup-indent-offset 2) - (web-mode-css-indent-offset 2))) -#+end_src -** Emmet -Emmet for super speed code writing. -#+begin_src emacs-lisp -(use-package emmet-mode - :hook (web-mode-hook . emmet-mode) - :general - (imap - :keymaps 'emmet-mode-keymap - "TAB" #'emmet-expand-line - "M-j" #'emmet-next-edit-point - "M-k" #'emmet-prev-edit-point)) -#+end_src -** HTML Auto insert -#+begin_src emacs-lisp -(use-package web-mode - :defer t - :auto-insert - (("\\.html\\'" . "HTML Skeleton") - "" - " - - - - - "(read-string "Enter title: ") | """ - - - - - - - - - - - -" - _ - " -")) -#+end_src -** WAIT Typescript -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -A child language of javascript which compiles to it. -#+begin_src emacs-lisp -(use-package typescript-mode - :defer t - :init - (setq typescript-indent-level 2)) -#+end_src -* Common Lisp -Common Lisp is a dialect of Lisp, the most /common/ one around. Emacs -comes with builtin Lisp support of course, but a REPL would be nice. - -** WAIT Sly -Enter /SLY/. Sly is a fork of /SLIME/ and is *mandatory* for lisp -development on Emacs. - -#+begin_src emacs-lisp -(use-package sly - :straight t - :init - (setq inferior-lisp-program "sbcl") - :display - ("\\*sly-db" - (display-buffer-at-bottom) - (window-height . 0.5)) - ("\\*sly-" - (display-buffer-at-bottom) - (window-height . 0.25)) - :config - (evil-set-initial-state 'sly-db-mode 'emacs) - (with-eval-after-load "org" - (setq-default org-babel-lisp-eval-fn #'sly-eval)) - (with-eval-after-load "company" - (add-hook 'sly-mrepl-hook #'company-mode)) - :general - (shell-leader - "s" #'sly-mrepl) - (nmap - :keymaps '(lisp-mode-map sly-mrepl-mode-map) - "gr" #'sly-eval-buffer - "gd" #'sly-edit-definition - "gR" #'sly-who-calls) - (local-leader - :keymaps '(lisp-mode-map sly-mrepl-mode-map) - "s" #'+shell/toggle-sly - "c" #'sly-compile-file - "a" #'sly-apropos - "d" #'sly-describe-symbol - "D" #'sly-documentation-lookup - "S" #'sly-mrepl-sync - "E" #'sly-eval-defun) - (local-leader - :keymaps 'lisp-mode-map - :infix "e" - "b" #'sly-eval-buffer - "e" #'sly-eval-last-expression - "f" #'sly-eval-defun - "r" #'sly-eval-region) - (nmap - :keymaps 'sly-inspector-mode-map - "q" #'sly-inspector-quit)) -#+end_src -** Emacs lisp -#+begin_src emacs-lisp -(use-package elisp-mode - :straight nil - :pretty - (lisp-mode-hook - ("lambda" . "λ") - ("t" . "⊨") - ("nil" . "Ø") - ("and" . "∧") - ("or" . "∨") - ("defun" . "ƒ") - ("for" . "∀") - ("mapc" . "∀") - ("mapcar" . "∀")) - (emacs-lisp-mode-hook - ("lambda" . "λ") - ("t" . "⊨") - ("nil" . "Ø") - ("and" . "∧") - ("or" . "∨") - ("defun" . "ƒ") - ("for" . "∀") - ("mapc" . "∀") - ("mapcar" . "∀")) - :general - (:states '(normal motion visual) - :keymaps '(emacs-lisp-mode-map lisp-mode-map) - ")" #'sp-next-sexp - "(" #'sp-previous-sexp) - (nmmap - :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) - "gr" #'eval-last-sexp) - (vmap - :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) - "gr" #'eval-region)) -#+end_src -** WIP Hydra like Lispy -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -A [[file:core.org::*Hydra][Hydra]] which uses the ~Lispy~ package (by -abo-abo) to create a set of motions that allow movement around a lisp -file easily. - -2024-04-18: Still working on this, quite rough around the edges. -#+begin_src emacs-lisp -(use-package lispy - :after (lisp-mode elisp-mode) - :hydra - (hydra-lispy - nil "Move around quickly in Lisp" - ("h" #'lispy-left) - ("j" ("t" #'lispy-teleport) - #'lispy-down) - ("k" #'lispy-up) - ("l" #'lispy-right) - ("d" #'lispy-different) - ("u" #'lispy-flow) - ("o" #'lispy-oneline) - ("m" #'lispy-multiline) - ("N" #'lispy-narrow) - ("W" #'lispy-widen) - ("c" #'lispy-clone) - ("fp" #'lispy-ace-paren) - ("fs" #'lispy-ace-symbol :exit t) - ("H" #'lispy-slurp) - ("L" #'lispy-barf) - ("M-h" #'lispy-move-left) - ("M-j" #'lispy-move-down) - ("M-k" #'lispy-move-up) - ("M-l" #'lispy-move-right) - ("C-g" nil)) - :general - (nmmap - :keymaps '(emacs-lisp-mode-map lisp-mode-map) - "." #'hydra-lispy/body)) -#+end_src -** Lisp indent function -Add a new lisp indent function which indents newline lists more -appropriately. -#+begin_src emacs-lisp -(use-package lisp-mode - :straight nil - :config - (defun +oreo/lisp-indent-function (indent-point state) - (let ((normal-indent (current-column)) - (orig-point (point))) - (goto-char (1+ (elt state 1))) - (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) - (cond - ;; car of form doesn't seem to be a symbol, or is a keyword - ((and (elt state 2) - (or (not (looking-at "\\sw\\|\\s_")) - (looking-at ":"))) - (if (not (> (save-excursion (forward-line 1) (point)) - calculate-lisp-indent-last-sexp)) - (progn (goto-char calculate-lisp-indent-last-sexp) - (beginning-of-line) - (parse-partial-sexp (point) - calculate-lisp-indent-last-sexp 0 t))) - ;; Indent under the list or under the first sexp on the same - ;; line as calculate-lisp-indent-last-sexp. Note that first - ;; thing on that line has to be complete sexp since we are - ;; inside the innermost containing sexp. - (backward-prefix-chars) - (current-column)) - ((and (save-excursion - (goto-char indent-point) - (skip-syntax-forward " ") - (not (looking-at ":"))) - (save-excursion - (goto-char orig-point) - (looking-at ":"))) - (save-excursion - (goto-char (+ 2 (elt state 1))) - (current-column))) - (t - (let ((function (buffer-substring (point) - (progn (forward-sexp 1) (point)))) - method) - (setq method (or (function-get (intern-soft function) - 'lisp-indent-function) - (get (intern-soft function) 'lisp-indent-hook))) - (cond ((or (eq method 'defun) - (and (null method) - (> (length function) 3) - (string-match "\\`def" function))) - (lisp-indent-defform state indent-point)) - ((integerp method) - (lisp-indent-specform method state - indent-point normal-indent)) - (method - (funcall method indent-point state)))))))) - (setq-default lisp-indent-function #'+oreo/lisp-indent-function)) -#+end_src -- cgit v1.2.3-13-gbd6f From 955f2a223ca76fd4c606e1346731ce2b4f6ed5ac Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 13 May 2024 17:01:24 +0530 Subject: (Emacs/config|init)~cut my init time to just a second I had a problem with after-init-hook which would (while supposedly keeping (emacs-init-time) under 1.2 seconds) take ages to start emacs just due to how many things were starting up using it. So I removed all the after-init-hook functions and instead aggressively demand the stuff I need and defer everything else through ":defer", ":after", ":hook" and ":general". Happy to say my boot time is now actually 1.2 seconds without compilation. --- Emacs/.config/emacs/config.org | 128 +++++++++++++++++++---------------------- Emacs/.config/emacs/init.el | 10 +++- 2 files changed, 66 insertions(+), 72 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 115ca07..1061b68 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -313,31 +313,32 @@ simplicity is above all. #+begin_src emacs-lisp (setq-default mode-line-format - (list - "%l:%c " ;; Line and column - "%p[" ;; %into file - '(:eval (with-eval-after-load "evil" ;; Evil state + '("%l:%c " ;; Line and column + "%p[" ;; %into file + (:eval (with-eval-after-load "evil" ;; Evil state (upcase (substring (format "%s" (if (bound-and-true-p evil-state) evil-state " ")) 0 1)))) - "] " - "%+%b(" ;; Buffer name - '(:eval (format "%s" major-mode)) - ") " - "%I " ;; file size - '(:eval (if (project-current) + "] " + "%+" + (-12 "%b") + "(" ;; Buffer name + (:eval (format "%s" major-mode)) + ") " + "%I " ;; file size + (:eval (if (project-current) (project-name (project-current)))) - '(vc-mode vc-mode) ;; git branch - " " - '(:eval + (vc-mode vc-mode) ;; git branch + " " + (:eval (with-eval-after-load "eglot" (if eglot--managed-mode (eglot--mode-line-format)))) - mode-line-misc-info - mode-line-end-spaces)) + mode-line-misc-info + mode-line-end-spaces)) #+end_src ** Mouse Who uses a mouse? 🤮 @@ -492,6 +493,7 @@ Some bindings that I couldn't fit elsewhere easily. (file-leader "f" #'find-file "F" #'find-file-other-window + "t" #'find-file-other-tab "s" #'save-buffer) (buffer-leader @@ -1624,31 +1626,14 @@ engine, which makes sense as it's primarily a text interface. :defer t :general (app-leader - "ww" #'eww - "wb" #'+eww/bookmarks-search - "we" #'+eww/bookmarks-edit) + "w" #'eww) (nmmap :keymaps 'eww-mode-map "w" #'evil-forward-word-begin "Y" #'shr-probe-and-copy-url) :config (with-eval-after-load "evil-collection" - (evil-collection-eww-setup)) - (defun bookmark->alist (bookmark) - (cons (plist-get bookmark :title) - (plist-get bookmark :url))) - (defun +eww/bookmarks-edit nil - (interactive) - (find-file (concat eww-bookmarks-directory "eww-bookmarks"))) - (defun +eww/bookmarks-search nil - (interactive) - (let ((bookmarks (mapcar #'bookmark->alist eww-bookmarks))) - (eww - (alist-get (completing-read "Bookmark: " (mapcar #'car bookmarks) nil t) - bookmarks - nil - nil - #'string=))))) + (evil-collection-eww-setup))) #+end_src ** Calendar Calendar is a simple inbuilt application that helps with date @@ -3098,45 +3083,46 @@ The default ~imenu~ support for Org-mode is god-awful. ~Imenu~ for org-mode should show me a list of headings and provide a completing-read interface to search them. -[[file:core.org::*Counsel][Counsel]] has me covered for this as I can -just provide it a regex as an initial prompt to narrow the candidates -down to just the headings then let the user go from there. I use -~swiper~ when considering just the local file (a la ~imenu~) and -~counsel-rg~ to search multiple org-files. +[[*Counsel][Counsel]] has me covered for this as I can just provide it +a regex as an initial prompt to narrow the candidates down to just the +headings then let the user go from there. I use ~swiper~ when +considering just the local file (a la ~imenu~) and ~counsel-rg~ to +search multiple org-files. The cherry on top is ~+org/search-config-headings~ which searches the org files in ~user-emacs-directory~ and provides the headings for them. This allows me to search my configuration pretty quickly. #+begin_src emacs-lisp -(use-package org - :straight t - :after counsel - :config - (defun +org/swiper-goto () - (interactive) - (swiper "^\\* ")) - - (defun +org/search-headings () - "Searches directory (of buffer) for org headings via counsel-rg" - (interactive) - (counsel-rg "^\\* " (file-name-directory (buffer-file-name)))) - - (defun +org/search-config-headings () - "Searches USER-EMACS-DIRECTORY for org headings via counsel-rg" - (interactive) - (counsel-rg "^\\* " - (substring user-emacs-directory 0 - (- (length user-emacs-directory) 1)) - "--max-depth=1")) - :general - (file-leader - "p" #'+org/search-config-headings) - (search-leader - :keymaps 'org-mode-map - "I" #'+org/search-headings) - (nmmap - :keymaps 'org-mode-map - [remap imenu] #'+org/swiper-goto)) +(with-eval-after-load "counsel" + (use-package org + :straight t + :defer t + :config + (defun +org/swiper-goto () + (interactive) + (swiper "^\\* ")) + + (defun +org/search-headings () + "Searches directory (of buffer) for org headings via counsel-rg" + (interactive) + (counsel-rg "^\\* " (file-name-directory (buffer-file-name)))) + + (defun +org/search-config-headings () + "Searches USER-EMACS-DIRECTORY for org headings via counsel-rg" + (interactive) + (counsel-rg "^\\* " + (substring user-emacs-directory 0 + (- (length user-emacs-directory) 1)) + "--max-depth=1")) + :general + (file-leader + "p" #'+org/search-config-headings) + (search-leader + :keymaps 'org-mode-map + "I" #'+org/search-headings) + (nmmap + :keymaps 'org-mode-map + [remap imenu] #'+org/swiper-goto))) #+end_src ** Org Agenda Org agenda provides a nice viewing for schedules. With org mode it's @@ -3308,7 +3294,11 @@ Evil org for some nice bindings. (use-package evil-org :straight t :defer t - :hook (org-mode-hook . evil-org-mode)) + :hook (org-mode-hook . evil-org-mode) + :general + (nmmap + :keymaps 'org-mode-map + "TAB" #'org-cycle)) #+end_src ** Org reveal Org reveal allows one to export org files as HTML presentations via diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index 6571584..0f7dfe8 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -27,6 +27,10 @@ ;; possible. (let ((gc-cons-threshold most-positive-fixnum)) ;; Straight + (setq straight-disable-native-compile nil + straight-use-package-by-default nil + straight-check-for-modifications 'live) + (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name @@ -43,9 +47,7 @@ (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) - (setq straight-disable-native-compile nil - straight-use-package-by-default t - use-package-enable-imenu-support t + (setq use-package-enable-imenu-support t use-package-always-demand nil use-package-always-defer nil use-package-hook-name-suffix nil @@ -74,6 +76,8 @@ (when (daemonp) (require 'general) (require 'evil) + (require 'ivy) + (require 'counsel) (require 'notmuch) (require 'company) (require 'org) -- cgit v1.2.3-13-gbd6f From ef5ac4371aff99a11e6dfaf016d201707918ff43 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 13 May 2024 17:03:27 +0530 Subject: (Emacs/elisp)~updated themes a bit --- Emacs/.config/emacs/elisp/personal-light-theme.el | 11 +++++-- .../.config/emacs/elisp/personal-primary-theme.el | 35 ++++++++++++---------- 2 files changed, 28 insertions(+), 18 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/elisp/personal-light-theme.el b/Emacs/.config/emacs/elisp/personal-light-theme.el index 94a0a18..3747f05 100644 --- a/Emacs/.config/emacs/elisp/personal-light-theme.el +++ b/Emacs/.config/emacs/elisp/personal-light-theme.el @@ -4,7 +4,14 @@ (custom-theme-set-faces 'personal-light '(button ((t (:inherit (link))))) - '(cursor ((((background light)) (:background "black")) (((background dark)) (:background "white")))) + '(company-preview + ((t (:foreground "black" :background "deepskyblue")))) + '(company-preview-common ((t (:inherit company-preview)))) + '(company-tooltip ((t (:background "white" :foreground "black")))) + '(company-tooltip-annotation ((t (:foreground "grey70" :slant italic)))) + '(company-tooltip-selection ((t (:background "grey80" :slant italic)))) + '(cursor ((t (:background "grey50")))) + '(dired-ignored ((t (:background "grey80" :slant italic :underline t)))) '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) '(fixed-pitch ((t (:family "Monospace")))) '(font-lock-builtin-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold)))) @@ -25,7 +32,7 @@ '(font-lock-warning-face ((t (:inherit (error))))) '(fringe ((((class color) (background light)) (:background "grey95")) (((class color) (background dark)) (:background "grey10")) (t (:background "gray")))) '(header-line ((t (:box nil :foreground "grey20" :background "grey90" :inherit (mode-line))))) - '(highlight ((t (:background "gainsboro")))) + '(highlight ((t (:background "grey90")))) '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) '(isearch ((((class color) (min-colors 88) (background light)) (:foreground "lightskyblue1" :background "magenta3")) (((class color) (min-colors 88) (background dark)) (:foreground "brown4" :background "palevioletred2")) (((class color) (min-colors 16)) (:foreground "cyan1" :background "magenta4")) (((class color) (min-colors 8)) (:foreground "cyan1" :background "magenta4")) (t (:inverse-video t)))) '(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t)))) diff --git a/Emacs/.config/emacs/elisp/personal-primary-theme.el b/Emacs/.config/emacs/elisp/personal-primary-theme.el index 6411f08..07ef4fa 100644 --- a/Emacs/.config/emacs/elisp/personal-primary-theme.el +++ b/Emacs/.config/emacs/elisp/personal-primary-theme.el @@ -4,24 +4,24 @@ (custom-theme-set-faces 'personal-primary '(button ((t (:inherit (link))))) - '(tab-bar ((t (:background "gray13")))) - '(tab-bar-tab ((t (:background "gray20" :foreground "white" :box (:color ))))) - '(tab-bar-tab-inactive ((t (:background "gray13" :foreground "DimGrey")))) + '(tab-bar ((t (:background "grey13")))) + '(tab-bar-tab ((t (:background "grey20" :foreground "white" :box (:color ))))) + '(tab-bar-tab-inactive ((t (:background "grey13" :foreground "DimGrey")))) '(child-frame-border ((t (:background "white")))) '(company-preview ((t (:foreground "wheat" :background "blue4")))) '(company-preview-common ((t (:inherit company-preview :foreground "grey")))) '(company-tooltip ((t (:background "black" :foreground "white")))) '(company-tooltip-annotation ((t (:foreground "grey" :slant italic)))) - '(company-tooltip-selection ((t (:background "gray31" :slant italic)))) + '(company-tooltip-selection ((t (:background "grey31" :slant italic)))) '(cursor ((t (:background "white")))) - '(dired-ignored ((t (:background "gray10" :slant italic :underline t)))) + '(dired-ignored ((t (:background "grey10" :slant italic :underline t)))) '(escape-glyph ((t (:foreground "cyan")))) '(eshell-ls-directory ((t (:foreground "DeepSkyBlue3" :weight bold)))) '(eshell-prompt ((t (:foreground "turquoise3" :weight bold)))) '(fixed-pitch ((t (:family "Monospace")))) '(font-lock-builtin-face ((t (:foreground "powder blue")))) - '(font-lock-comment-delimiter-face ((t (:slant italic :foreground "gray24")))) + '(font-lock-comment-delimiter-face ((t (:slant italic :foreground "grey24")))) '(font-lock-comment-face ((t (:slant italic :foreground "#868686")))) '(font-lock-constant-face ((t (:foreground "indian red" :weight semi-bold :height 0.99 :family "Source Code Pro")))) '(font-lock-doc-face ((t (:inherit (font-lock-string-face))))) @@ -39,14 +39,14 @@ '(fringe ((t (:background "grey4")))) '(haskell-interactive-face-prompt ((t (:foreground "green")))) '(header-line ((t (:box nil :foreground "grey90" :background "grey20" :inherit (mode-line))))) - '(highlight ((t (:background "gray14")))) + '(highlight ((t (:extend t :background "#222233")))) '(homoglyph ((t (:foreground "cyan")))) '(isearch ((t (:foreground "brown4" :background "white")))) '(isearch-fail ((t (:background "red4")))) '(ivy-current-match ((t (:weight bold :underline t :slant italic)))) '(lazy-highlight ((t (:background "paleturquoise4")))) - '(line-number ((t (:foreground "gray45" :background "gray1" :inherit (default))))) - '(line-number-current-line ((t (:foreground "white" :background "gray1" :inherit (default))))) + '(line-number ((t (:foreground "grey45" :background "grey1" :inherit (default))))) + '(line-number-current-line ((t (:foreground "white" :background "grey1" :inherit (default))))) '(link ((t (:underline (:color foreground-color :style line) :foreground "cyan1")))) '(link-visited ((t (:foreground "violet" :inherit (link))))) '(match ((t (:background "RoyalBlue3")))) @@ -61,14 +61,17 @@ '(orderless-match-face-1 ((t (:weight bold :foreground "light green")))) '(orderless-match-face-2 ((t (:weight bold :foreground "forest green")))) '(orderless-match-face-3 ((t (:weight bold :foreground "dark green")))) - '(org-block ((t (:background "gray3" :inherit shadow)))) + '(org-block ((t (:background "grey3" :inherit shadow)))) '(org-code ((t (:foreground "green3")))) '(org-quote ((t (:slant italic)))) '(org-verbatim ((t (:foreground "red3")))) '(pdf-isearch-batch ((t (:foreground "black" :background "white")))) '(query-replace ((t (:inherit (isearch))))) - '(region ((t (:extend t :background "gray25")))) - '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) + '(region ((t (:extend t :background "grey25")))) + '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) + (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) + (((class color) (min-colors 8) (background light)) (:foreground "green")) + (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) '(secondary-selection ((t (:extend t :background "SkyBlue4")))) '(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch))))) @@ -76,11 +79,11 @@ (((class color) (background dark)) (:background "red1")))) '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) '(whitespace-line ((t (:background "black" :foreground "violet")))) - '(whitespace-space ((t (:background "gray2" :foreground "darkgray")))) - '(whitespace-tab ((t (:background "gray5" :foreground "gray20")))) + '(whitespace-space ((t (:background "grey6" :foreground "black")))) + '(whitespace-tab ((t (:background "grey5" :foreground "grey20")))) '(default ((t (:family "Source Code Pro" :foundry "ADBO" :width normal :weight normal :slant normal :underline nil :overline nil - :extend nil :strike-through nil :box nil :inverse-video nil :foreground "#b6b6b6" - :background "black" :stipple nil :inherit nil))))) + :extend nil :strike-through nil :box nil :inverse-video nil + :foreground "#b6b6b6" :background "black" :stipple nil :inherit nil))))) (provide-theme 'personal-primary) -- cgit v1.2.3-13-gbd6f From ce660d9a2a6bc016a0f9a635dc015b807c9a8f5f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 13 May 2024 17:15:37 +0530 Subject: (Emacs/config)~Fix urls --- Emacs/.config/emacs/config.org | 52 +++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 34 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 1061b68..eb8eb3c 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -17,8 +17,7 @@ some reasoning given. Some sections border on blog posts justifying why I think they're good applications or giving some greater reasoning about my specific configuration of a package. If you don't really want that, you may -tangle this file, [[file:core.org][the core file]] and -[[file:app.org][the app file]] and just read their source code. +tangle this file and just read their source code. * Basics Firstly, set full name and mail address. This is used in encryption and mailing. @@ -347,11 +346,6 @@ Who uses a mouse? 🤮 #+end_src * Core packages For my core packages, whose configuration doesn't change much anyway, -I have a [[file:core.org][separate file]]. Here I'll load it up for -usage later on. -#+begin_src emacs-lisp -;; (load-file (concat user-emacs-directory "core.el")) -#+end_src ** General General provides a great solution for binding keys. It has evil and use-package support so it fits nicely into configuration. In this @@ -974,7 +968,7 @@ which makes manual buffer switches obey the same constraints via Using the ~:display~ keyword, setup up some ~display-buffer-alist~ records. This is mostly for packages that aren't really configured (like [[info:woman][woman]]) or packages that were configured before -(like [[Ivy][Ivy]]). +(like [[*Ivy][Ivy]]). #+begin_src emacs-lisp (use-package window :defer t @@ -1313,7 +1307,7 @@ Ripgrep is a Rust program that attempts to perform better than grep, and it actually does. This is because of a set of optimisations, such as checking the =.gitignore= to exclude certain files from being searched. The ripgrep package provides utilities to ripgrep projects -and files for strings. Though [[file:core.org::*Ivy][ivy]] comes with +and files for strings. Though [[*Ivy][ivy]] comes with ~counsel-rg~, it uses Ivy's completion framework rather than the ~compilation~ style buffers, which sometimes proves very useful. @@ -1562,13 +1556,7 @@ directories particularly efficiently. * Applications Emacs is basically an operating system whose primary datatype is text. Applications are interfaces/environments which serve a variety of -purposes, but provide a lot of capability. I have a -[[file:app.org][separate file]] for such configuration (2023-09-29: -mainly because it was so goddamn huge). - -#+begin_src emacs-lisp -;; (load-file (concat user-emacs-directory "app.el")) -#+end_src +purposes, but provide a lot of capability. ** WAIT Dashboard :PROPERTIES: :header-args:emacs-lisp: :tangle no @@ -1813,7 +1801,7 @@ Uses fd for finding file results in a directory: ~find-dired~ -> "g" #'fd-dired)) #+end_src *** wdired -Similar to [[file:config.org::*(Rip)grep][wgrep]] =wdired= provides +Similar to [[*(Rip)grep][wgrep]] =wdired= provides the ability to use Emacs motions and editing on file names. This makes stuff like mass renaming and other file management tasks way easier than even using the mark based system. @@ -1879,9 +1867,11 @@ presents it in an xwidget. If the current file is an HTML file, ask if user wants to open current file. Bind it to ~aU~ in the leader. Also define a function ~+xwidget/search-query~ that first asks the -user what search engine they want to use ([[https://duckduckgo.com][Duck Duck Go]] and [[https://devdocs.io][DevDocs]] -currently) then asks for a query, which it parses then presents in an -xwidget window. Bind to ~as~ in the leader. +user what search engine they want to use +([[https://duckduckgo.com][Duck Duck Go]] and +[[https://devdocs.io][DevDocs]] currently) then asks for a query, +which it parses then presents in an xwidget window. Bind to ~as~ in +the leader. #+begin_src emacs-lisp (use-package xwidget :commands (+xwidget/render-file +xwidget/search) @@ -2884,7 +2874,7 @@ Org is, at its most basic, a markup language. Files use the ".org" extension and use =org-mode= to write text, with the ability to export to a few formats, all within Emacs. Some other features include: + A complete spreadsheet system, with formulas (including - [[file:app.org::*Calculator][calc-mode]] integration) + [[*Calculator][calc-mode]] integration) + Evaluation of code blocks, even using the results of them in exports (to, say, a $\LaTeX$ or HTML document) + This includes exporting code blocks to a code file. All the @@ -3100,7 +3090,7 @@ them. This allows me to search my configuration pretty quickly. :config (defun +org/swiper-goto () (interactive) - (swiper "^\\* ")) + (counsel-grep-or-swiper "^\\* ")) (defun +org/search-headings () "Searches directory (of buffer) for org headings via counsel-rg" @@ -3108,12 +3098,11 @@ them. This allows me to search my configuration pretty quickly. (counsel-rg "^\\* " (file-name-directory (buffer-file-name)))) (defun +org/search-config-headings () - "Searches USER-EMACS-DIRECTORY for org headings via counsel-rg" + "Searches config.org for org headings via +org/swiper-goto" (interactive) - (counsel-rg "^\\* " - (substring user-emacs-directory 0 - (- (length user-emacs-directory) 1)) - "--max-depth=1")) + (with-current-buffer (find-file-noselect (concat user-emacs-directory "config.org")) + (+org/swiper-goto))) + :general (file-leader "p" #'+org/search-config-headings) @@ -3342,12 +3331,7 @@ default asterisks. * Languages For a variety of (programming) languages Emacs comes with default modes but this configures them as well as pulls any modes Emacs -doesn't come with. I have a [[file:lang.org][separate file]] for this -configuration as it's quite large. -#+begin_src emacs-lisp -;;(load-file (concat user-emacs-directory "lang.el")) -#+end_src - +doesn't come with. ** Makefile Defines an auto-insert for Makefiles. Assumes C but it's very easy to change it for C++. @@ -4076,7 +4060,7 @@ development on Emacs. :PROPERTIES: :header-args:emacs-lisp: :tangle no :END: -A [[file:core.org::*Hydra][Hydra]] which uses the ~Lispy~ package (by +A [[*Hydra][Hydra]] which uses the ~Lispy~ package (by abo-abo) to create a set of motions that allow movement around a lisp file easily. -- cgit v1.2.3-13-gbd6f From ab2742cd3efa28fe3a9c8c58ebabae3e0bac31ae Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 13 May 2024 17:32:38 +0530 Subject: (Emacs/elisp|config)+org-bookmark manager Opens bookmarks from ~/Text/bookmarks.org with a dispatcher. --- Emacs/.config/emacs/config.org | 15 ++++++ Emacs/.config/emacs/elisp/org-bookmark.el | 77 +++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 Emacs/.config/emacs/elisp/org-bookmark.el (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index eb8eb3c..79db252 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1553,6 +1553,21 @@ directories particularly efficiently. "P" #'+search/find-file "S" #'+search/search-all)) #+end_src +** Bookmarks +I maintain a bookmarks file at =~/Text/bookmarks.org=. I would like +the ability to construct new bookmarks and open bookmarks. They may +be either articles I want to read, useful information documents or +just straight up youtube videos. This +[[file:elisp/bookmark.el][library]] does the appropriate dispatching +and work for me. + +#+begin_src emacs-lisp +(use-package org-bookmark + :load-path "elisp/" + :general + (file-leader + "b" #'+bookmark/open-bookmark)) +#+end_src * Applications Emacs is basically an operating system whose primary datatype is text. Applications are interfaces/environments which serve a variety of diff --git a/Emacs/.config/emacs/elisp/org-bookmark.el b/Emacs/.config/emacs/elisp/org-bookmark.el new file mode 100644 index 0000000..6bbad5d --- /dev/null +++ b/Emacs/.config/emacs/elisp/org-bookmark.el @@ -0,0 +1,77 @@ +;;; org-bookmark.el --- Bookmark manager using org-mode -*- lexical-binding: t; -*- + +;; Copyright (C) 2024 Aryadev Chavali + +;; Author: Aryadev Chavali +;; Keywords: + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License Version +;; 2 as published by the Free Software Foundation. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'org) + +(defvar +bookmark/file (expand-file-name "~/Text/bookmarks.org")) +(defvar +bookmark/mpv-args "--ytdl-raw-options=force-ipv4= --ytdl-format=22") + +(defun +bookmark/bookmarks () + (with-current-buffer (find-file-noselect +bookmark/file) + (org-scan-tags + #'(lambda nil + (let ((heading-components (org-heading-components))) + (cons + (concat (nth 4 heading-components) (nth 5 heading-components)) + (substring-no-properties (org-agenda-get-some-entry-text + (point-marker) + most-positive-fixnum))))) + (cdr (org-make-tags-matcher ":bookmark:")) + nil))) + +(defun +bookmark/open-bookmark () + (interactive) + (let* ((bookmarks (+bookmark/bookmarks)) + (choice (completing-read "Choose bookmark: " + (mapcar #'car bookmarks) + nil t)) + (pair (assoc choice bookmarks #'string=))) + (if (null pair) + (error (format "`%s' is not a valid bookmark" choice)) + (message "[bookmark]: Opening `%s`" (car pair)) + (cond + ((or + (string-match-p "^https://\\(www.\\)?youtu\\(.\\)?be" (cdr pair)) + (string-match-p "\\.mp4$" (cdr pair))) + ;; Open MPV + (message "[bookmark]: Starting MPV process") + (with-current-buffer (get-buffer-create "*mpv*") + (ansi-color-for-comint-mode-on) + (comint-mode)) + (set-process-filter (start-process-shell-command + "bookmark-mpv" "*mpv*" + (concat + "mpv " + +bookmark/mpv-args + " \"" + (cdr pair) + "\"")) + #'comint-output-filter)) + (t + (message "[bookmark]: Starting eww") + (eww (cdr pair))))))) + +(provide 'org-bookmark) +;;; bookmark.el ends here -- cgit v1.2.3-13-gbd6f From 97ac65872a1bd9f8b91b50313f840ba57d6b849c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 13 May 2024 17:33:16 +0530 Subject: General commits Cannot be bothered to add message --- Emacs/.config/emacs/config.org | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 79db252..8eb48a3 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -17,7 +17,7 @@ some reasoning given. Some sections border on blog posts justifying why I think they're good applications or giving some greater reasoning about my specific configuration of a package. If you don't really want that, you may -tangle this file and just read their source code. +tangle this file and just read the source code. * Basics Firstly, set full name and mail address. This is used in encryption and mailing. @@ -323,7 +323,7 @@ simplicity is above all. 0 1)))) "] " "%+" - (-12 "%b") + "%b" "(" ;; Buffer name (:eval (format "%s" major-mode)) ") " @@ -3115,7 +3115,7 @@ them. This allows me to search my configuration pretty quickly. (defun +org/search-config-headings () "Searches config.org for org headings via +org/swiper-goto" (interactive) - (with-current-buffer (find-file-noselect (concat user-emacs-directory "config.org")) + (with-current-buffer (find-file (concat user-emacs-directory "config.org")) (+org/swiper-goto))) :general @@ -3178,10 +3178,14 @@ what org-capture does. :init (setq org-capture-templates - '(("t" "A todo" entry + '(("t" "Todo" entry (file "") "* TODO %? %T +%a") + ("b" "Bookmark" entry + (file "bookmarks.org") + "* TODO %? :bookmark: %a")) org-default-notes-file (concat org-directory "/todo.org")) :general -- cgit v1.2.3-13-gbd6f From fdef946d6555b01b33fe496cdcd6fb293ae11eab Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 13 May 2024 17:36:40 +0530 Subject: (Emacs/custom)~clean up some old customisations --- Emacs/.config/emacs/.config/custom.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/.config/custom.el b/Emacs/.config/emacs/.config/custom.el index b23ebcd..36813a8 100644 --- a/Emacs/.config/emacs/.config/custom.el +++ b/Emacs/.config/emacs/.config/custom.el @@ -4,13 +4,10 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(safe-local-variable-values - '((+license/license-choice . "GPLv2") - (+license/license-choice . "MIT") - (projectile-project-configure-cmd . "make clean") - (projectile-project-test-cmd . "make test") - (projectile-project-test-cmd . "make run-test") - (projectile-project-run-cmd . "make run") - (projectile-project-compilation-cmd . "make")))) + '((eval eglot-ensure) + (+license/license-choice . "GPLv2") + (+license/license-choice . "Unlicense") + (+license/license-choice . "MIT")))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. -- cgit v1.2.3-13-gbd6f