From e1c6376ae269c0753a4982ae8d1474fd7ef646b9 Mon Sep 17 00:00:00 2001 From: oreodave Date: Mon, 5 Aug 2019 02:45:55 +0100 Subject: ~Way of documenting code in org code blocks This is because when editing code hunks I want clean and usable code. Thus when I'm using the hunk editor, I don't want incomplete hunks (causing possible syntax errors). Instead, documentation comes at the end of the set --- doom.d/config.org | 104 ++++++++++++++++++++---------------------------------- 1 file changed, 38 insertions(+), 66 deletions(-) (limited to 'doom.d') diff --git a/doom.d/config.org b/doom.d/config.org index 16c7ce8..ccf7829 100644 --- a/doom.d/config.org +++ b/doom.d/config.org @@ -30,57 +30,39 @@ I like monokai :) :desc "Indent" "j" 'indent-region :desc "Open calendar" "rc" '(lambda() (interactive) (find-file "~/Text/calendar.org")) :desc "Open project files" "pf" 'projectile-find-file -#+END_SRC -- Redefine as M-x rather than find-file because of my muscle memory - with spacemacs -- General maps like j for indenting because I don't know what else to bind - them to -- pf => project -> find file - -** Searches -#+BEGIN_SRC emacs-lisp -(:prefix "/" ; Search - :desc "Ag!" "a" '+ivy/ag - :desc "FZF!" "f" 'counsel-fzf - :desc "RipGrep!" "r" 'counsel-rg - :desc "Search Tags" "t" 'counsel-etags-list-tag - :desc "Search buffer" "/" 'swiper - ) -#+END_SRC -- I like using / in comparison to s: it's closer together (thus - quicker, I do searches a lot so this is noticeable) and makes more sense -- Ag is actually insanely useful, especially at a quick keybind -- // is quicker to do than /b, for something that is done so often + ; Redefine as M-x rather than find-file because of my muscle memory with spacemacs + ; General maps like j for indenting because I don't know what else to bind them to + ; pf => project -> find file + (:prefix "/" ; Search + :desc "Ag!" "a" '+ivy/ag + :desc "FZF!" "f" 'counsel-fzf + :desc "RipGrep!" "r" 'counsel-rg + :desc "Search Tags" "t" 'counsel-etags-list-tag + :desc "Search buffer" "/" 'swiper + ) + ; I like using / in comparison to s: it's closer together (thus quicker, I do searches a lot so this is noticeable) and makes more sense + ; Ag is actually insanely useful, especially at a quick keybind + ; // is quicker to do than /b, for something that is done so often -** Windows -#+BEGIN_SRC emacs-lisp -(:prefix "w" ; Windows - :desc "Close window" "d" '+workspace/close-window-or-workspace - :desc "Switch window" "W" 'ace-window - ) -#+END_SRC -- wd is slightly closer together than wc - - wd is also used in spacemacs so I'd rather use this -- wW allows me to switch windows more efficiently than before, better than - just motions + (:prefix "w" ; Windows + :desc "Close window" "d" '+workspace/close-window-or-workspace + :desc "Switch window" "W" 'ace-window + ) + ; wd is slightly closer together than wc + ; wd is also used in spacemacs so I'd rather use this + ; wW allows me to switch windows more efficiently than before, better than just motions -** Buffers -#+BEGIN_SRC emacs-lisp -(:prefix "b" - :desc "Close buffer" "d" 'doom/kill-this-buffer-in-all-windows - ) -#+END_SRC -- bd is used for the same reasons as above + (:prefix "b" + :desc "Close buffer" "d" 'doom/kill-this-buffer-in-all-windows + ) + ; bd is used for the same reasons as above -** Projects -#+BEGIN_SRC emacs-lisp -(:prefix "p" - :desc "Regen tags" "g" 'projectile-regenerate-tags - ) -) + (:prefix "p" + :desc "Regen tags" "g" 'projectile-regenerate-tags + ) + ) +; pg for regenning tags is useful when searching them #+END_SRC -- pg for regenning tags is useful when searching them - * Plugins and Packages ** Elcord #+BEGIN_SRC emacs-lisp @@ -88,6 +70,7 @@ I like monokai :) (elcord-mode) ) #+END_SRC + I like displaying that I'm working on discord, though not very useful. May delete. * Languages ** C# @@ -95,13 +78,7 @@ I like displaying that I'm working on discord, though not very useful. May delet (after! csharp-mode (setq omnisharp-server-executable-path "~/bin/omnisharp/run") (add-hook 'csharp-mode-hook '(lambda() (setq c-basic-offset 4))) ; Hook for csharp setting variables -#+END_SRC -- I have custom installed the omnisharp roslyn executable, so I'd rather use - that -- C# code is better at 4 space indents, but I indent most of my C code at 2 - space indents because it looks nicer :) -#+BEGIN_SRC emacs-lisp (map! ; CSharp Keybinds :map csharp-mode-map :localleader @@ -113,11 +90,11 @@ I like displaying that I'm working on discord, though not very useful. May delet ) ) ) -#+END_SRC -- Currently the Doom Emacs keybinds are not working for C# Unit-tests so I had - to do them myself + #+END_SRC +- I have custom installed the omnisharp roslyn executable, so I'd rather use that +- C# code is better at 4 space indents, but I indent most of my C code at 2 space indents because it looks nicer :) +- Currently the Doom Emacs keybinds are not working for C# Unit-tests so I had to do them myself - I find these keybinds to be more mnemonic (,mtt => Test -> This) - ** Python #+BEGIN_SRC emacs-lisp (after! python @@ -125,12 +102,7 @@ I like displaying that I'm working on discord, though not very useful. May delet (setq python-python-command "python3") (setq python-shell-interpreter "python3") (setq flycheck-python-pycompile-executable "python3") -#+END_SRC -I do python development for Python3 (who doesn't?), so I need to set the -flycheck python checker, as well as the interpreter, to be Python3 - -#+BEGIN_SRC emacs-lisp (map! ; Python keybinds :map python-mode-map :localleader @@ -144,10 +116,10 @@ flycheck python checker, as well as the interpreter, to be Python3 ) ) #+END_SRC -- Most of my python work is in scripts or ideas, so I don't need extensive - testing utilities or anything like that -- I run my python code a LOT and thus need commands for sending bits or whole - scripts into the REPL +- I do python development for Python3 (who doesn't?), so I need to set the flycheck python checker, as well as the interpreter, to be Python3 +- Python keybinds +- Most of my python work is in scripts or ideas, so I don't need extensive testing utilities or anything like that +- I run my python code a LOT and thus need commands for sending bits or whole scripts into the REPL ** JavaScript/TypeScript #+BEGIN_SRC emacs-lisp (after! typescript-mode -- cgit v1.2.3-13-gbd6f