From f8cdafbe9d113f64769a22564977520e6f3c3fb3 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 29 Jun 2021 15:07:29 +0200 Subject: [PATCH 01/13] Reverted vim to being a text editor --- nvim/init.vim | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 67ece20..6c47b76 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -27,15 +27,36 @@ if has('syntax') syntax on endif +" Set leader key +let mapleader = " " + " Plugins call plug#begin('~/.vim/plugged') Plug 'itchyny/lightline.vim' Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } -Plug 'Valloric/YouCompleteMe' -Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} +" Plug 'Valloric/YouCompleteMe' +" Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} Plug 'https://github.com/ap/vim-css-color.git' +" Collection of common configurations for the Nvim LSP client +" Plug 'neovim/nvim-lspconfig' + +" Extensions to built-in LSP, for example, providing type inlay hints +" Plug 'nvim-lua/lsp_extensions.nvim' + +" Autocompletion framework for built-in LSP +" Plug 'hrsh7th/nvim-compe' + +" Popup telescope +" Plug 'nvim-lua/popup.nvim' +" Plug 'nvim-lua/plenary.nvim' +" Plug 'nvim-telescope/telescope.nvim' + +" Plug 'joshdick/onedark.vim' + +" Plug 'tpope/vim-commentary' + call plug#end() "------------------------------------------------------------ @@ -173,11 +194,27 @@ map Y y$ nnoremap :nohl " Shortcuts for Ycm -nnoremap :YcmCompleter Format -nnoremap :YcmCompleter GoTo +"nnoremap :YcmCompleter Format +"nnoremap :YcmCompleter GoTo + nnoremap :NERDTreeToggle +nnoremap n :NERDTreeToggle + "------------------------------------------------------------ " use Mouse clipboard instead of vims internal one " use unnamedplus for Keyboard clipboard set clipboard=unnamed + + +" Find files using Telescope command-line sugar. +" nnoremap ff Telescope find_files +"nnoremap fg Telescope live_grep +"nnoremap fb Telescope buffers +"nnoremap fh Telescope help_tags + +" !!! Uncomment the following line to load lsp functionality +" Remember to also uncomment the corresponding plugins at the top of this +" file. +" Maybe use doom emacs instead +" :lua require('lsp') From 3bb80035e658d8c7315cf8e1cac6437aaf8cc28f Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 29 Jun 2021 15:09:08 +0200 Subject: [PATCH 02/13] Added doom config --- .gitignore | 1 + doom/config.el | 66 +++++++++++++++++ doom/custom.el | 13 ++++ doom/init.el | 188 +++++++++++++++++++++++++++++++++++++++++++++++ doom/packages.el | 50 +++++++++++++ 5 files changed, 318 insertions(+) create mode 100644 doom/config.el create mode 100644 doom/custom.el create mode 100644 doom/init.el create mode 100644 doom/packages.el diff --git a/.gitignore b/.gitignore index ba809ca..e36562e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ !/dunst !/mc/mc.keymap !/nvim/init.vim +!/doom diff --git a/doom/config.el b/doom/config.el new file mode 100644 index 0000000..29ea17a --- /dev/null +++ b/doom/config.el @@ -0,0 +1,66 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. +(setq user-full-name "Julian Mutter" + user-mail-address "julian.mutter@comumail.de") + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; +;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd +;; font string. You generally only need these two: +;; (setq doom-font (font-spec :family "monospace" :size 13 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) +(setq doom-font (font-spec :family "Source Code Pro" :size 13)) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme 'doom-one) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type 'relative) + + +;; Here are some additional functions/macros that could help you configure Doom: +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. + +(map! :desc "Increase font size" :n "C-+" #'text-scale-increase) +(map! :desc "Decrease font size" :n "C--" #'text-scale-decrease) +(map! :desc "Reset font size" :n "C-=" #'doom/reset-font-size) + +;; (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t) +;; (add-to-list +;; 'auto-mode-alist +;; '("\\.m$" . matlab-mode)) +;; (setq matlab-indent-function t) +;; (setq matlab-shell-command "/urs/local/bin/matlab") diff --git a/doom/custom.el b/doom/custom.el new file mode 100644 index 0000000..15eebbf --- /dev/null +++ b/doom/custom.el @@ -0,0 +1,13 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(org-agenda-files '("~/org-tests.org")) + '(package-selected-packages '(matlab-mode))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/doom/init.el b/doom/init.el new file mode 100644 index 0000000..4d4b94e --- /dev/null +++ b/doom/init.el @@ -0,0 +1,188 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a "Module Index" link where you'll find +;; a comprehensive list of Doom's modules and what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;chinese + ;;japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + company ; the ultimate code completion backend + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ivy ; a search engine for love and life + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + doom-dashboard ; a nifty splash screen for Emacs + doom-quit ; DOOM quit-message prompts when you quit Emacs + ;;(emoji +unicode) ; 🙂 + ;;fill-column ; a `fill-column' indicator + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + ;;hydra + ;;indent-guides ; highlighted indent columns + ;;ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + ;;nav-flash ; blink cursor line after big motions + neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + ;; treemacs ; a project drawer, like neotree but cooler + ;;unicode ; extended unicode support for various languages + vc-gutter ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + ;;(format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + ;;multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + ;;eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + ;;vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + ;;(spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;debugger ; FIXME stepping through code, to help you add bugs + ;;direnv + ;;docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + lsp + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + ;;pass ; password manager for nerds + ;;pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + ;;rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp + + :os + (:if IS-MAC macos) ; improve compatibility with macOS + ;;tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + (cc +lsp) ; C > C++ == 1 + ;;clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + ;;data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect + ;;(haskell +dante) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + ;;json ; At least it ain't XML + ;;(java +meghanada) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;; julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be + ;;lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + ;;nix ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + org ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + (python +lsp) ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + ;;yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + ;;(mu4e +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + ;;calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking + ;;irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) diff --git a/doom/packages.el b/doom/packages.el new file mode 100644 index 0000000..b80e9cc --- /dev/null +++ b/doom/packages.el @@ -0,0 +1,50 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here and run 'doom sync' +;; on the command line, then restart Emacs for the changes to take effect -- or +;; use 'M-x doom/reload'. + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;(package! some-package) + +;; To install a package directly from a remote git repo, you must specify a +;; `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/raxod502/straight.el#the-recipe-format +;(package! another-package +; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;(package! this-package +; :recipe (:host github :repo "username/repo" +; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, you can do so here +;; with the `:disable' property: +;(package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;(package! builtin-package :recipe (:nonrecursive t)) +;(package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see raxod502/straight.el#279) +;(package! builtin-package :recipe (:branch "develop")) + +;; Use `:pin' to specify a particular commit to install. +;(package! builtin-package :pin "1a2b3c4d5e") + + +;; Doom's packages are pinned to a specific commit and updated from release to +;; release. The `unpin!' macro allows you to unpin single packages... +;(unpin! pinned-package) +;; ...or multiple packages +;(unpin! pinned-package another-pinned-package) +;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) +;(unpin! t) From fc5f4bdc13702ccf20063fb18f48a854ec80a8b2 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 30 Jun 2021 18:05:04 +0200 Subject: [PATCH 03/13] Added org keybindings and spell checking --- doom/config.el | 38 ++++++++++++++++++++++++++++++++++++++ doom/init.el | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/doom/config.el b/doom/config.el index 29ea17a..0a3e47f 100644 --- a/doom/config.el +++ b/doom/config.el @@ -58,6 +58,44 @@ (map! :desc "Decrease font size" :n "C--" #'text-scale-decrease) (map! :desc "Reset font size" :n "C-=" #'doom/reset-font-size) + +;; Org-mode custom keybindings + +(map! :map evil-org-mode-map :nvi "C-k" #'org-backward-element) +(map! :map evil-org-mode-map :nvi "C-j" #'org-forward-element) +(map! :map evil-org-mode-map :nvi "C-h" #'org-up-element) +(map! :map evil-org-mode-map :nvi "C-l" #'org-down-element) + + +;; Spell checking settings +;; TODO make toggling of spell checking ('SPC t s') use flyspell-mode in text modes and flyspell-prog-mode in programming modes (see hooks below) +;; Removing hooks for automatic spell checking set here: https://github.com/hlissner/doom-emacs/blob/develop/modules/checkers/spell/config.el +(remove-hook! '(org-mode-hook + markdown-mode-hook + TeX-mode-hook + rst-mode-hook + mu4e-compose-mode-hook + message-mode-hook + git-commit-mode-hook) + #'flyspell-mode) + +(remove-hook! '(yaml-mode-hook + conf-mode-hook + prog-mode-hook) + #'flyspell-prog-mode) + +(setq ispell-dictionary "english") + +(map! :map doom-leader-toggle-map :desc "Toggle dictionary" "d" #'fd-switch-dictionary) + +(defun fd-switch-dictionary() + (interactive) + (let* ((dic ispell-current-dictionary) + (change (if (string= dic "german") "english" "german"))) + (ispell-change-dictionary change) + (message "Dictionary switched from %s to %s" dic change) + )) + ;; (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t) ;; (add-to-list ;; 'auto-mode-alist diff --git a/doom/init.el b/doom/init.el index 4d4b94e..49f9d98 100644 --- a/doom/init.el +++ b/doom/init.el @@ -80,7 +80,7 @@ :checkers syntax ; tasing you for every semicolon you forget - ;;(spell +flyspell) ; tasing you for misspelling mispelling + (spell +flyspell +everywhere) ; tasing you for misspelling mispelling ;;grammar ; tasing grammar mistake every you make :tools From a9266ff617934d91b01dddeb262188289f45e1b7 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 1 Jul 2021 10:02:22 +0200 Subject: [PATCH 04/13] Fixed org-mode keybindings. Added external terminal --- doom/config.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/doom/config.el b/doom/config.el index 0a3e47f..841dcb9 100644 --- a/doom/config.el +++ b/doom/config.el @@ -54,17 +54,21 @@ ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; they are implemented. +;; Open external terminal +;; (map! :map doom-leader-open-map :desc "Open" "t" (cmd! (call-process-shell-command "terminal&" nil 0))) +(map! :leader :desc "Open external terminal" "o t" (cmd! (call-process-shell-command "terminal&" nil 0))) + +;; Remap font scaling keybindings to make more sense (map! :desc "Increase font size" :n "C-+" #'text-scale-increase) (map! :desc "Decrease font size" :n "C--" #'text-scale-decrease) (map! :desc "Reset font size" :n "C-=" #'doom/reset-font-size) ;; Org-mode custom keybindings - -(map! :map evil-org-mode-map :nvi "C-k" #'org-backward-element) -(map! :map evil-org-mode-map :nvi "C-j" #'org-forward-element) -(map! :map evil-org-mode-map :nvi "C-h" #'org-up-element) -(map! :map evil-org-mode-map :nvi "C-l" #'org-down-element) +(map! :map org-mode-map :nvi "C-k" #'org-backward-element) +(map! :map org-mode-map :nvi "C-j" #'org-forward-element) +(map! :map org-mode-map :nvi "C-h" #'org-up-element) +(map! :map org-mode-map :nvi "C-l" #'org-down-element) ;; Spell checking settings From 0890209060fd7c8169131872f2a18ddb3e08f196 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 1 Jul 2021 10:12:27 +0200 Subject: [PATCH 05/13] Added keybinding for pavucontrol --- i3/config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i3/config b/i3/config index f4106be..e885a28 100644 --- a/i3/config +++ b/i3/config @@ -92,7 +92,7 @@ bindsym $mod+v split v bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking +bindsym $mod+Shift+w layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split @@ -262,6 +262,7 @@ bindsym $mod+t exec thunar bindsym $mod+m exec xfce4-terminal -x mc bindsym $mod+Shift+c exec jupyter-calculator bindsym $mod+b exec firefox +bindsym $mod+s exec pavucontrol workspace_auto_back_and_forth yes From 89bbb4623d4ba34933e664fa5a0752dbbdc9add3 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 5 Jul 2021 10:34:28 +0200 Subject: [PATCH 06/13] Added toggle-case and agenda files --- doom/config.el | 42 +++++++++++++++++++++++++++++++++++++++++- doom/init.el | 2 +- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/doom/config.el b/doom/config.el index 841dcb9..07b20d1 100644 --- a/doom/config.el +++ b/doom/config.el @@ -30,7 +30,7 @@ ;; If you use `org' and don't want your org files in the default location below, ;; change `org-directory'. It must be set before org loads! -(setq org-directory "~/org/") +(setq org-directory "~/org") ;; This determines the style of line numbers in effect. If set to `nil', line ;; numbers are disabled. For relative line numbers, set this to `relative'. @@ -106,3 +106,43 @@ ;; '("\\.m$" . matlab-mode)) ;; (setq matlab-indent-function t) ;; (setq matlab-shell-command "/urs/local/bin/matlab") + +;; (setq org-agenda-files (list "~/org")) +;; (custom-set-variables +;; '(org-directory "~/org") + ;; '(org-agenda-files (list org-directory))) + +;; (add-to-list 'org-agenda-files "~/org/anothertest.org" 'append) + +;; Adding my org-agenda files +;; TODO Maybe only specify one file where all agenda files are listed => Could be edited via commands +(after! org + (setq org-agenda-files + '("/home/julian/Nextcloud/studium/vorlesungen/SS21/luftundraumfahrtlabor/lrl-fragenkatalog.org" + "/home/julian/Nextcloud/studium/vorlesungen/SS21/borddatenverarbeitung/bdv-fragenkatalog.org"))) + +(map! :map cdlatex-mode-map + :i "TAB" #'cdlatex-tab) + +(map! :desc "Open external terminal" :nv "g C" #'toggle-word-case) + +(defun toggle-word-case () + "Toggle the case of current word or text selection." + + (interactive) + (let ( + (deactivate-mark nil) + $p1 $p2) + (if (use-region-p) + (setq $p1 (region-beginning) $p2 (region-end)) + (save-excursion + (skip-chars-backward "[:alpha:]") + (setq $p1 (point)) + (skip-chars-forward "[:alpha:]") + (setq $p2 (point)))) + (let ((first-char-prop (get-char-code-property (char-after (point)) 'general-category))) + (cond ((string= "Ll" first-char-prop) ; Lower case + (upcase-region $p1 (+ $p1 1))) + ((string= "Lu" first-char-prop) ; Upper case + (downcase-region $p1 (+ $p1 1))) + (t (message "Word does not start with a alphabetic character")))))) diff --git a/doom/init.el b/doom/init.el index 49f9d98..284764c 100644 --- a/doom/init.el +++ b/doom/init.el @@ -139,7 +139,7 @@ ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) ;; julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) - latex ; writing papers in Emacs has never been so fun + (latex +cdlatex) ; writing papers in Emacs has never been so fun ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be ;;lua ; one-based indices? one-based indices From f22af7709016783c59f005237a34ad57cc654a82 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 8 Jul 2021 11:36:54 +0200 Subject: [PATCH 07/13] Fixed toggle-word-case --- doom/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doom/config.el b/doom/config.el index 07b20d1..f8e4cf4 100644 --- a/doom/config.el +++ b/doom/config.el @@ -140,7 +140,7 @@ (setq $p1 (point)) (skip-chars-forward "[:alpha:]") (setq $p2 (point)))) - (let ((first-char-prop (get-char-code-property (char-after (point)) 'general-category))) + (let ((first-char-prop (get-char-code-property (char-after $p1) 'general-category))) (cond ((string= "Ll" first-char-prop) ; Lower case (upcase-region $p1 (+ $p1 1))) ((string= "Lu" first-char-prop) ; Upper case From a26e545ccd49ec0f013a2e816bac38cbaa9c4cf5 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 8 Jul 2021 11:58:21 +0200 Subject: [PATCH 08/13] Moved org-agenda-files to separate file --- doom/config.el | 13 +++++-------- doom/org-agenda-files | 3 +++ 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 doom/org-agenda-files diff --git a/doom/config.el b/doom/config.el index f8e4cf4..6d4da9b 100644 --- a/doom/config.el +++ b/doom/config.el @@ -65,10 +65,10 @@ ;; Org-mode custom keybindings -(map! :map org-mode-map :nvi "C-k" #'org-backward-element) -(map! :map org-mode-map :nvi "C-j" #'org-forward-element) -(map! :map org-mode-map :nvi "C-h" #'org-up-element) -(map! :map org-mode-map :nvi "C-l" #'org-down-element) +;; (map! :map org-mode-map :nvi "C-k" #'org-backward-element) +;; (map! :map org-mode-map :nvi "C-j" #'org-forward-element) +;; (map! :map org-mode-map :nvi "C-h" #'org-up-element) +;; (map! :map org-mode-map :nvi "C-l" #'org-down-element) ;; Spell checking settings @@ -115,11 +115,8 @@ ;; (add-to-list 'org-agenda-files "~/org/anothertest.org" 'append) ;; Adding my org-agenda files -;; TODO Maybe only specify one file where all agenda files are listed => Could be edited via commands (after! org - (setq org-agenda-files - '("/home/julian/Nextcloud/studium/vorlesungen/SS21/luftundraumfahrtlabor/lrl-fragenkatalog.org" - "/home/julian/Nextcloud/studium/vorlesungen/SS21/borddatenverarbeitung/bdv-fragenkatalog.org"))) + (setq org-agenda-files "org-agenda-files")) (map! :map cdlatex-mode-map :i "TAB" #'cdlatex-tab) diff --git a/doom/org-agenda-files b/doom/org-agenda-files new file mode 100644 index 0000000..4690396 --- /dev/null +++ b/doom/org-agenda-files @@ -0,0 +1,3 @@ +/home/julian/Nextcloud/studium/vorlesungen/SS21/luftundraumfahrtlabor/lrl-fragenkatalog.org +/home/julian/Nextcloud/studium/vorlesungen/SS21/borddatenverarbeitung/bdv-fragenkatalog.org +/home/julian/Nextcloud/studium/vorlesungen/SS21/raumfahrtbetrieb/rb-vorbereitung.org From ee1c963f54f6df9295dae23e38434be83ba13923 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Thu, 8 Jul 2021 12:10:21 +0200 Subject: [PATCH 09/13] Moved files to .config folder --- {doom => .config/doom}/config.el | 0 {doom => .config/doom}/custom.el | 0 {doom => .config/doom}/init.el | 0 {doom => .config/doom}/org-agenda-files | 0 {doom => .config/doom}/packages.el | 0 {dunst => .config/dunst}/dunstrc | 0 i3-scrot.conf => .config/i3-scrot.conf | 0 {i3 => .config/i3}/config | 0 {i3 => .config/i3}/jupyter-calculator | 0 {i3 => .config/i3}/manjaro-default-config | 0 {i3 => .config/i3}/rofi_calc | 0 {i3 => .config/i3}/setupZoom | 0 {i3 => .config/i3}/workspace-chat.json | 0 {i3 => .config/i3}/workspace-zoom.json | 0 {i3blocks => .config/i3blocks}/activity | 0 {i3blocks => .config/i3blocks}/battery-plus | 0 {i3blocks => .config/i3blocks}/calendar | 0 {i3blocks => .config/i3blocks}/calendar.test | 0 {i3blocks => .config/i3blocks}/config | 0 {i3blocks => .config/i3blocks}/i3b-gate | 0 {i3blocks => .config/i3blocks}/keyboard | 0 {i3blocks => .config/i3blocks}/volume | 0 {mc => .config/mc}/mc.keymap | 0 {nvim => .config/nvim}/init.vim | 0 {rofi => .config/rofi}/config.rasi | 0 .gitignore | 10 ---------- dependencies | 16 ++++++++++++++++ 27 files changed, 16 insertions(+), 10 deletions(-) rename {doom => .config/doom}/config.el (100%) rename {doom => .config/doom}/custom.el (100%) rename {doom => .config/doom}/init.el (100%) rename {doom => .config/doom}/org-agenda-files (100%) rename {doom => .config/doom}/packages.el (100%) rename {dunst => .config/dunst}/dunstrc (100%) rename i3-scrot.conf => .config/i3-scrot.conf (100%) rename {i3 => .config/i3}/config (100%) rename {i3 => .config/i3}/jupyter-calculator (100%) rename {i3 => .config/i3}/manjaro-default-config (100%) rename {i3 => .config/i3}/rofi_calc (100%) rename {i3 => .config/i3}/setupZoom (100%) rename {i3 => .config/i3}/workspace-chat.json (100%) rename {i3 => .config/i3}/workspace-zoom.json (100%) rename {i3blocks => .config/i3blocks}/activity (100%) rename {i3blocks => .config/i3blocks}/battery-plus (100%) rename {i3blocks => .config/i3blocks}/calendar (100%) rename {i3blocks => .config/i3blocks}/calendar.test (100%) rename {i3blocks => .config/i3blocks}/config (100%) rename {i3blocks => .config/i3blocks}/i3b-gate (100%) rename {i3blocks => .config/i3blocks}/keyboard (100%) rename {i3blocks => .config/i3blocks}/volume (100%) rename {mc => .config/mc}/mc.keymap (100%) rename {nvim => .config/nvim}/init.vim (100%) rename {rofi => .config/rofi}/config.rasi (100%) delete mode 100644 .gitignore create mode 100644 dependencies diff --git a/doom/config.el b/.config/doom/config.el similarity index 100% rename from doom/config.el rename to .config/doom/config.el diff --git a/doom/custom.el b/.config/doom/custom.el similarity index 100% rename from doom/custom.el rename to .config/doom/custom.el diff --git a/doom/init.el b/.config/doom/init.el similarity index 100% rename from doom/init.el rename to .config/doom/init.el diff --git a/doom/org-agenda-files b/.config/doom/org-agenda-files similarity index 100% rename from doom/org-agenda-files rename to .config/doom/org-agenda-files diff --git a/doom/packages.el b/.config/doom/packages.el similarity index 100% rename from doom/packages.el rename to .config/doom/packages.el diff --git a/dunst/dunstrc b/.config/dunst/dunstrc similarity index 100% rename from dunst/dunstrc rename to .config/dunst/dunstrc diff --git a/i3-scrot.conf b/.config/i3-scrot.conf similarity index 100% rename from i3-scrot.conf rename to .config/i3-scrot.conf diff --git a/i3/config b/.config/i3/config similarity index 100% rename from i3/config rename to .config/i3/config diff --git a/i3/jupyter-calculator b/.config/i3/jupyter-calculator similarity index 100% rename from i3/jupyter-calculator rename to .config/i3/jupyter-calculator diff --git a/i3/manjaro-default-config b/.config/i3/manjaro-default-config similarity index 100% rename from i3/manjaro-default-config rename to .config/i3/manjaro-default-config diff --git a/i3/rofi_calc b/.config/i3/rofi_calc similarity index 100% rename from i3/rofi_calc rename to .config/i3/rofi_calc diff --git a/i3/setupZoom b/.config/i3/setupZoom similarity index 100% rename from i3/setupZoom rename to .config/i3/setupZoom diff --git a/i3/workspace-chat.json b/.config/i3/workspace-chat.json similarity index 100% rename from i3/workspace-chat.json rename to .config/i3/workspace-chat.json diff --git a/i3/workspace-zoom.json b/.config/i3/workspace-zoom.json similarity index 100% rename from i3/workspace-zoom.json rename to .config/i3/workspace-zoom.json diff --git a/i3blocks/activity b/.config/i3blocks/activity similarity index 100% rename from i3blocks/activity rename to .config/i3blocks/activity diff --git a/i3blocks/battery-plus b/.config/i3blocks/battery-plus similarity index 100% rename from i3blocks/battery-plus rename to .config/i3blocks/battery-plus diff --git a/i3blocks/calendar b/.config/i3blocks/calendar similarity index 100% rename from i3blocks/calendar rename to .config/i3blocks/calendar diff --git a/i3blocks/calendar.test b/.config/i3blocks/calendar.test similarity index 100% rename from i3blocks/calendar.test rename to .config/i3blocks/calendar.test diff --git a/i3blocks/config b/.config/i3blocks/config similarity index 100% rename from i3blocks/config rename to .config/i3blocks/config diff --git a/i3blocks/i3b-gate b/.config/i3blocks/i3b-gate similarity index 100% rename from i3blocks/i3b-gate rename to .config/i3blocks/i3b-gate diff --git a/i3blocks/keyboard b/.config/i3blocks/keyboard similarity index 100% rename from i3blocks/keyboard rename to .config/i3blocks/keyboard diff --git a/i3blocks/volume b/.config/i3blocks/volume similarity index 100% rename from i3blocks/volume rename to .config/i3blocks/volume diff --git a/mc/mc.keymap b/.config/mc/mc.keymap similarity index 100% rename from mc/mc.keymap rename to .config/mc/mc.keymap diff --git a/nvim/init.vim b/.config/nvim/init.vim similarity index 100% rename from nvim/init.vim rename to .config/nvim/init.vim diff --git a/rofi/config.rasi b/.config/rofi/config.rasi similarity index 100% rename from rofi/config.rasi rename to .config/rofi/config.rasi diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e36562e..0000000 --- a/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# write here all files to upload to git - -/* -!.gitignore -!/i3* -!/rofi -!/dunst -!/mc/mc.keymap -!/nvim/init.vim -!/doom diff --git a/dependencies b/dependencies new file mode 100644 index 0000000..a35e154 --- /dev/null +++ b/dependencies @@ -0,0 +1,16 @@ +dunst +element-desktop +feh +firefox +i3exit +i3-scrot +i3-wm +libqalculate +nextcloud +pavucontrol +rofi +stash +telegram-desktop +thunderbird +xclip +xwacomcalibrate From fb116c6f4d9819ab2adeb8b236738af1f5d4c1e0 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Thu, 8 Jul 2021 14:15:30 +0200 Subject: [PATCH 10/13] Made it working with stow --- {.config => all/.config}/doom/config.el | 0 {.config => all/.config}/doom/custom.el | 0 {.config => all/.config}/doom/init.el | 0 {.config => all/.config}/doom/org-agenda-files | 0 {.config => all/.config}/doom/packages.el | 0 {.config => all/.config}/dunst/dunstrc | 0 {.config => all/.config}/i3-scrot.conf | 0 {.config => all/.config}/i3/config | 0 {.config => all/.config}/i3/jupyter-calculator | 0 {.config => all/.config}/i3/manjaro-default-config | 0 {.config => all/.config}/i3/rofi_calc | 0 {.config => all/.config}/i3/setupZoom | 0 {.config => all/.config}/i3/workspace-chat.json | 0 {.config => all/.config}/i3/workspace-zoom.json | 0 {.config => all/.config}/i3blocks/activity | 0 {.config => all/.config}/i3blocks/battery-plus | 0 {.config => all/.config}/i3blocks/calendar | 0 {.config => all/.config}/i3blocks/calendar.test | 0 {.config => all/.config}/i3blocks/config | 0 {.config => all/.config}/i3blocks/i3b-gate | 0 {.config => all/.config}/i3blocks/keyboard | 0 {.config => all/.config}/i3blocks/volume | 0 {.config => all/.config}/mc/mc.keymap | 0 {.config => all/.config}/nvim/init.vim | 0 {.config => all/.config}/rofi/config.rasi | 0 25 files changed, 0 insertions(+), 0 deletions(-) rename {.config => all/.config}/doom/config.el (100%) rename {.config => all/.config}/doom/custom.el (100%) rename {.config => all/.config}/doom/init.el (100%) rename {.config => all/.config}/doom/org-agenda-files (100%) rename {.config => all/.config}/doom/packages.el (100%) rename {.config => all/.config}/dunst/dunstrc (100%) rename {.config => all/.config}/i3-scrot.conf (100%) rename {.config => all/.config}/i3/config (100%) rename {.config => all/.config}/i3/jupyter-calculator (100%) rename {.config => all/.config}/i3/manjaro-default-config (100%) rename {.config => all/.config}/i3/rofi_calc (100%) rename {.config => all/.config}/i3/setupZoom (100%) rename {.config => all/.config}/i3/workspace-chat.json (100%) rename {.config => all/.config}/i3/workspace-zoom.json (100%) rename {.config => all/.config}/i3blocks/activity (100%) rename {.config => all/.config}/i3blocks/battery-plus (100%) rename {.config => all/.config}/i3blocks/calendar (100%) rename {.config => all/.config}/i3blocks/calendar.test (100%) rename {.config => all/.config}/i3blocks/config (100%) rename {.config => all/.config}/i3blocks/i3b-gate (100%) rename {.config => all/.config}/i3blocks/keyboard (100%) rename {.config => all/.config}/i3blocks/volume (100%) rename {.config => all/.config}/mc/mc.keymap (100%) rename {.config => all/.config}/nvim/init.vim (100%) rename {.config => all/.config}/rofi/config.rasi (100%) diff --git a/.config/doom/config.el b/all/.config/doom/config.el similarity index 100% rename from .config/doom/config.el rename to all/.config/doom/config.el diff --git a/.config/doom/custom.el b/all/.config/doom/custom.el similarity index 100% rename from .config/doom/custom.el rename to all/.config/doom/custom.el diff --git a/.config/doom/init.el b/all/.config/doom/init.el similarity index 100% rename from .config/doom/init.el rename to all/.config/doom/init.el diff --git a/.config/doom/org-agenda-files b/all/.config/doom/org-agenda-files similarity index 100% rename from .config/doom/org-agenda-files rename to all/.config/doom/org-agenda-files diff --git a/.config/doom/packages.el b/all/.config/doom/packages.el similarity index 100% rename from .config/doom/packages.el rename to all/.config/doom/packages.el diff --git a/.config/dunst/dunstrc b/all/.config/dunst/dunstrc similarity index 100% rename from .config/dunst/dunstrc rename to all/.config/dunst/dunstrc diff --git a/.config/i3-scrot.conf b/all/.config/i3-scrot.conf similarity index 100% rename from .config/i3-scrot.conf rename to all/.config/i3-scrot.conf diff --git a/.config/i3/config b/all/.config/i3/config similarity index 100% rename from .config/i3/config rename to all/.config/i3/config diff --git a/.config/i3/jupyter-calculator b/all/.config/i3/jupyter-calculator similarity index 100% rename from .config/i3/jupyter-calculator rename to all/.config/i3/jupyter-calculator diff --git a/.config/i3/manjaro-default-config b/all/.config/i3/manjaro-default-config similarity index 100% rename from .config/i3/manjaro-default-config rename to all/.config/i3/manjaro-default-config diff --git a/.config/i3/rofi_calc b/all/.config/i3/rofi_calc similarity index 100% rename from .config/i3/rofi_calc rename to all/.config/i3/rofi_calc diff --git a/.config/i3/setupZoom b/all/.config/i3/setupZoom similarity index 100% rename from .config/i3/setupZoom rename to all/.config/i3/setupZoom diff --git a/.config/i3/workspace-chat.json b/all/.config/i3/workspace-chat.json similarity index 100% rename from .config/i3/workspace-chat.json rename to all/.config/i3/workspace-chat.json diff --git a/.config/i3/workspace-zoom.json b/all/.config/i3/workspace-zoom.json similarity index 100% rename from .config/i3/workspace-zoom.json rename to all/.config/i3/workspace-zoom.json diff --git a/.config/i3blocks/activity b/all/.config/i3blocks/activity similarity index 100% rename from .config/i3blocks/activity rename to all/.config/i3blocks/activity diff --git a/.config/i3blocks/battery-plus b/all/.config/i3blocks/battery-plus similarity index 100% rename from .config/i3blocks/battery-plus rename to all/.config/i3blocks/battery-plus diff --git a/.config/i3blocks/calendar b/all/.config/i3blocks/calendar similarity index 100% rename from .config/i3blocks/calendar rename to all/.config/i3blocks/calendar diff --git a/.config/i3blocks/calendar.test b/all/.config/i3blocks/calendar.test similarity index 100% rename from .config/i3blocks/calendar.test rename to all/.config/i3blocks/calendar.test diff --git a/.config/i3blocks/config b/all/.config/i3blocks/config similarity index 100% rename from .config/i3blocks/config rename to all/.config/i3blocks/config diff --git a/.config/i3blocks/i3b-gate b/all/.config/i3blocks/i3b-gate similarity index 100% rename from .config/i3blocks/i3b-gate rename to all/.config/i3blocks/i3b-gate diff --git a/.config/i3blocks/keyboard b/all/.config/i3blocks/keyboard similarity index 100% rename from .config/i3blocks/keyboard rename to all/.config/i3blocks/keyboard diff --git a/.config/i3blocks/volume b/all/.config/i3blocks/volume similarity index 100% rename from .config/i3blocks/volume rename to all/.config/i3blocks/volume diff --git a/.config/mc/mc.keymap b/all/.config/mc/mc.keymap similarity index 100% rename from .config/mc/mc.keymap rename to all/.config/mc/mc.keymap diff --git a/.config/nvim/init.vim b/all/.config/nvim/init.vim similarity index 100% rename from .config/nvim/init.vim rename to all/.config/nvim/init.vim diff --git a/.config/rofi/config.rasi b/all/.config/rofi/config.rasi similarity index 100% rename from .config/rofi/config.rasi rename to all/.config/rofi/config.rasi From 5af2e567fe7d77e52ff327c847aba5c6e2ba5152 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Fri, 9 Jul 2021 08:18:04 +0200 Subject: [PATCH 11/13] Fixed org-agenda-files location --- all/.config/doom/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/all/.config/doom/config.el b/all/.config/doom/config.el index 6d4da9b..19bb44f 100644 --- a/all/.config/doom/config.el +++ b/all/.config/doom/config.el @@ -116,7 +116,7 @@ ;; Adding my org-agenda files (after! org - (setq org-agenda-files "org-agenda-files")) + (setq org-agenda-files (expand-file-name "org-agenda-files" doom-private-dir))) (map! :map cdlatex-mode-map :i "TAB" #'cdlatex-tab) From 1697b75b8ddad71081945e9c472bf8bd0d0325bc Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Fri, 9 Jul 2021 09:22:21 +0200 Subject: [PATCH 12/13] Fixed dependency --- dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies b/dependencies index a35e154..68c7317 100644 --- a/dependencies +++ b/dependencies @@ -9,7 +9,7 @@ libqalculate nextcloud pavucontrol rofi -stash +stow telegram-desktop thunderbird xclip From a275093d201723155586a33918255b2ce962ae68 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Fri, 9 Jul 2021 09:32:33 +0200 Subject: [PATCH 13/13] Put scripts into scripts folder --- all/.config/i3/{ => scripts}/jupyter-calculator | 0 all/.config/i3/{ => scripts}/rofi_calc | 0 all/.config/i3/{ => scripts}/setupZoom | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename all/.config/i3/{ => scripts}/jupyter-calculator (100%) rename all/.config/i3/{ => scripts}/rofi_calc (100%) rename all/.config/i3/{ => scripts}/setupZoom (100%) diff --git a/all/.config/i3/jupyter-calculator b/all/.config/i3/scripts/jupyter-calculator similarity index 100% rename from all/.config/i3/jupyter-calculator rename to all/.config/i3/scripts/jupyter-calculator diff --git a/all/.config/i3/rofi_calc b/all/.config/i3/scripts/rofi_calc similarity index 100% rename from all/.config/i3/rofi_calc rename to all/.config/i3/scripts/rofi_calc diff --git a/all/.config/i3/setupZoom b/all/.config/i3/scripts/setupZoom similarity index 100% rename from all/.config/i3/setupZoom rename to all/.config/i3/scripts/setupZoom