emacs.d

bloated emacs configuration
git clone git://git.ckyln.com/~cem/emacs.d.git
Log | Files | Refs | README

commit ec8be5d78faad895dd8cc9b299f1d60b53395d32
parent 0f45b856ddb454cd35dc8d2672d752fa488db0eb
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu,  2 Apr 2020 21:19:22 +0300

remove init.html

Diffstat:
Dinit.html | 1383-------------------------------------------------------------------------------
1 file changed, 0 insertions(+), 1383 deletions(-)

diff --git a/init.html b/init.html @@ -1,1383 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> -<head> -<!-- 2020-04-02 Thu 02:30 --> -<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> -<meta name="viewport" content="width=device-width, initial-scale=1" /> -<title>Emacs Configuration</title> -<meta name="generator" content="Org mode" /> -<meta name="author" content="Cem Keylan" /> -<style type="text/css"> - <!--/*--><![CDATA[/*><!--*/ - .title { text-align: center; - margin-bottom: .2em; } - .subtitle { text-align: center; - font-size: medium; - font-weight: bold; - margin-top:0; } - .todo { font-family: monospace; color: red; } - .done { font-family: monospace; color: green; } - .priority { font-family: monospace; color: orange; } - .tag { background-color: #eee; font-family: monospace; - padding: 2px; font-size: 80%; font-weight: normal; } - .timestamp { color: #bebebe; } - .timestamp-kwd { color: #5f9ea0; } - .org-right { margin-left: auto; margin-right: 0px; text-align: right; } - .org-left { margin-left: 0px; margin-right: auto; text-align: left; } - .org-center { margin-left: auto; margin-right: auto; text-align: center; } - .underline { text-decoration: underline; } - #postamble p, #preamble p { font-size: 90%; margin: .2em; } - p.verse { margin-left: 3%; } - pre { - border: 1px solid #ccc; - box-shadow: 3px 3px 3px #eee; - padding: 8pt; - font-family: monospace; - overflow: auto; - margin: 1.2em; - } - pre.src { - position: relative; - overflow: visible; - padding-top: 1.2em; - } - pre.src:before { - display: none; - position: absolute; - background-color: white; - top: -10px; - right: 10px; - padding: 3px; - border: 1px solid black; - } - pre.src:hover:before { display: inline;} - /* Languages per Org manual */ - pre.src-asymptote:before { content: 'Asymptote'; } - pre.src-awk:before { content: 'Awk'; } - pre.src-C:before { content: 'C'; } - /* pre.src-C++ doesn't work in CSS */ - pre.src-clojure:before { content: 'Clojure'; } - pre.src-css:before { content: 'CSS'; } - pre.src-D:before { content: 'D'; } - pre.src-ditaa:before { content: 'ditaa'; } - pre.src-dot:before { content: 'Graphviz'; } - pre.src-calc:before { content: 'Emacs Calc'; } - pre.src-emacs-lisp:before { content: 'Emacs Lisp'; } - pre.src-fortran:before { content: 'Fortran'; } - pre.src-gnuplot:before { content: 'gnuplot'; } - pre.src-haskell:before { content: 'Haskell'; } - pre.src-hledger:before { content: 'hledger'; } - pre.src-java:before { content: 'Java'; } - pre.src-js:before { content: 'Javascript'; } - pre.src-latex:before { content: 'LaTeX'; } - pre.src-ledger:before { content: 'Ledger'; } - pre.src-lisp:before { content: 'Lisp'; } - pre.src-lilypond:before { content: 'Lilypond'; } - pre.src-lua:before { content: 'Lua'; } - pre.src-matlab:before { content: 'MATLAB'; } - pre.src-mscgen:before { content: 'Mscgen'; } - pre.src-ocaml:before { content: 'Objective Caml'; } - pre.src-octave:before { content: 'Octave'; } - pre.src-org:before { content: 'Org mode'; } - pre.src-oz:before { content: 'OZ'; } - pre.src-plantuml:before { content: 'Plantuml'; } - pre.src-processing:before { content: 'Processing.js'; } - pre.src-python:before { content: 'Python'; } - pre.src-R:before { content: 'R'; } - pre.src-ruby:before { content: 'Ruby'; } - pre.src-sass:before { content: 'Sass'; } - pre.src-scheme:before { content: 'Scheme'; } - pre.src-screen:before { content: 'Gnu Screen'; } - pre.src-sed:before { content: 'Sed'; } - pre.src-sh:before { content: 'shell'; } - pre.src-sql:before { content: 'SQL'; } - pre.src-sqlite:before { content: 'SQLite'; } - /* additional languages in org.el's org-babel-load-languages alist */ - pre.src-forth:before { content: 'Forth'; } - pre.src-io:before { content: 'IO'; } - pre.src-J:before { content: 'J'; } - pre.src-makefile:before { content: 'Makefile'; } - pre.src-maxima:before { content: 'Maxima'; } - pre.src-perl:before { content: 'Perl'; } - pre.src-picolisp:before { content: 'Pico Lisp'; } - pre.src-scala:before { content: 'Scala'; } - pre.src-shell:before { content: 'Shell Script'; } - pre.src-ebnf2ps:before { content: 'ebfn2ps'; } - /* additional language identifiers per "defun org-babel-execute" - in ob-*.el */ - pre.src-cpp:before { content: 'C++'; } - pre.src-abc:before { content: 'ABC'; } - pre.src-coq:before { content: 'Coq'; } - pre.src-groovy:before { content: 'Groovy'; } - /* additional language identifiers from org-babel-shell-names in - ob-shell.el: ob-shell is the only babel language using a lambda to put - the execution function name together. */ - pre.src-bash:before { content: 'bash'; } - pre.src-csh:before { content: 'csh'; } - pre.src-ash:before { content: 'ash'; } - pre.src-dash:before { content: 'dash'; } - pre.src-ksh:before { content: 'ksh'; } - pre.src-mksh:before { content: 'mksh'; } - pre.src-posh:before { content: 'posh'; } - /* Additional Emacs modes also supported by the LaTeX listings package */ - pre.src-ada:before { content: 'Ada'; } - pre.src-asm:before { content: 'Assembler'; } - pre.src-caml:before { content: 'Caml'; } - pre.src-delphi:before { content: 'Delphi'; } - pre.src-html:before { content: 'HTML'; } - pre.src-idl:before { content: 'IDL'; } - pre.src-mercury:before { content: 'Mercury'; } - pre.src-metapost:before { content: 'MetaPost'; } - pre.src-modula-2:before { content: 'Modula-2'; } - pre.src-pascal:before { content: 'Pascal'; } - pre.src-ps:before { content: 'PostScript'; } - pre.src-prolog:before { content: 'Prolog'; } - pre.src-simula:before { content: 'Simula'; } - pre.src-tcl:before { content: 'tcl'; } - pre.src-tex:before { content: 'TeX'; } - pre.src-plain-tex:before { content: 'Plain TeX'; } - pre.src-verilog:before { content: 'Verilog'; } - pre.src-vhdl:before { content: 'VHDL'; } - pre.src-xml:before { content: 'XML'; } - pre.src-nxml:before { content: 'XML'; } - /* add a generic configuration mode; LaTeX export needs an additional - (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */ - pre.src-conf:before { content: 'Configuration File'; } - - table { border-collapse:collapse; } - caption.t-above { caption-side: top; } - caption.t-bottom { caption-side: bottom; } - td, th { vertical-align:top; } - th.org-right { text-align: center; } - th.org-left { text-align: center; } - th.org-center { text-align: center; } - td.org-right { text-align: right; } - td.org-left { text-align: left; } - td.org-center { text-align: center; } - dt { font-weight: bold; } - .footpara { display: inline; } - .footdef { margin-bottom: 1em; } - .figure { padding: 1em; } - .figure p { text-align: center; } - .equation-container { - display: table; - text-align: center; - width: 100%; - } - .equation { - vertical-align: middle; - } - .equation-label { - display: table-cell; - text-align: right; - vertical-align: middle; - } - .inlinetask { - padding: 10px; - border: 2px solid gray; - margin: 10px; - background: #ffffcc; - } - #org-div-home-and-up - { text-align: right; font-size: 70%; white-space: nowrap; } - textarea { overflow-x: auto; } - .linenr { font-size: smaller } - .code-highlighted { background-color: #ffff00; } - .org-info-js_info-navigation { border-style: none; } - #org-info-js_console-label - { font-size: 10px; font-weight: bold; white-space: nowrap; } - .org-info-js_search-highlight - { background-color: #ffff00; color: #000000; font-weight: bold; } - .org-svg { width: 90%; } - /*]]>*/--> -</style> -<script type="text/javascript"> -// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&amp;dn=gpl-3.0.txt GPL-v3-or-Later -<!--/*--><![CDATA[/*><!--*/ - function CodeHighlightOn(elem, id) - { - var target = document.getElementById(id); - if(null != target) { - elem.cacheClassElem = elem.className; - elem.cacheClassTarget = target.className; - target.className = "code-highlighted"; - elem.className = "code-highlighted"; - } - } - function CodeHighlightOff(elem, id) - { - var target = document.getElementById(id); - if(elem.cacheClassElem) - elem.className = elem.cacheClassElem; - if(elem.cacheClassTarget) - target.className = elem.cacheClassTarget; - } - /*]]>*///--> -// @license-end -</script> -</head> -<body> -<div id="content"> -<h1 class="title">Emacs Configuration</h1> - -<div id="outline-container-org50365cc" class="outline-2"> -<h2 id="org50365cc"><span class="section-number-2">1</span> Table of Contents&#xa0;&#xa0;&#xa0;<span class="tag"><span class="TOC_2_org">TOC_2_org</span></span></h2> -<div class="outline-text-2" id="text-1"> -<ul class="org-ul"> -<li><a href="#orgb659ff7">Intro</a> -<ul class="org-ul"> -<li><a href="#org84ae045">Installation Instructions</a></li> -<li><a href="#orgc9dd783">Ignoring init.el changes on Git</a></li> -<li><a href="#orgf8916c9">Meta</a></li> -<li><a href="#orgc172a28">Attribution</a></li> -</ul></li> -<li><a href="#orgc2643ca">Startup Settings</a> -<ul class="org-ul"> -<li><a href="#orgf7cc529">Declutter</a></li> -<li><a href="#org6304d09">Package management</a></li> -<li><a href="#orgbbb5af1">Custom-file</a></li> -<li><a href="#orgeef3089">Private file</a></li> -<li><a href="#orgc2b89e2">Starting the server</a></li> -</ul></li> -<li><a href="#org50c9901">Packages</a> -<ul class="org-ul"> -<li><a href="#orgc23d2c1">Evil-mode</a></li> -<li><a href="#org3e1cd67">Org-mode</a></li> -<li><a href="#orgcdb199b">Magit</a></li> -<li><a href="#org5a6b3d7">Flycheck</a></li> -<li><a href="#orgacdfe4c">Company Mode</a></li> -<li><a href="#org51852e9">Mingus</a></li> -<li><a href="#org0d07e3e">Projectile</a></li> -<li><a href="#org066b3c9">Treemacs</a></li> -<li><a href="#orgc94c71d">emacs-dashboard</a></li> -<li><a href="#orgd98f78e">Extras</a></li> -</ul></li> -<li><a href="#org36c36e0">Themes and Icons</a></li> -<li><a href="#org76777f5">Filetype Configurations</a> -<ul class="org-ul"> -<li><a href="#org4c39c1f">Default Formatting</a></li> -<li><a href="#org53fb562">Markdown</a></li> -<li><a href="#org902b84f">Shell</a></li> -<li><a href="#orgb4ef550">Python</a></li> -</ul></li> -<li><a href="#orge9f0242">Other Settings</a> -<ul class="org-ul"> -<li><a href="#org4e7928f">Dired &#x2013; ls dired</a></li> -<li><a href="#orgfa47051">Coding System for Terminal</a></li> -<li><a href="#org61c6002">Backup Options</a></li> -<li><a href="#org0b55f58">Set Browser</a></li> -</ul></li> -<li><a href="#org9939679">Notes</a> -<ul class="org-ul"> -<li><a href="#orgcf4fd1f">Reverting to package.el</a></li> -</ul></li> -</ul> -</div> -</div> - -<div id="outline-container-orgb659ff7" class="outline-2"> -<h2 id="orgb659ff7"><span class="section-number-2">2</span> Intro</h2> -<div class="outline-text-2" id="text-2"> -<p> -This is my emacs configuration file, I used to have a big -directory of lisp code but it became harder to maintain -and keep track of. That's why I have created this org-mode -init file. -</p> - -<p> -Please note that this init.org does not attempt to be -simplistic and might include lots of things that you -might not want on your own setup. -</p> -</div> - -<div id="outline-container-org84ae045" class="outline-3"> -<h3 id="org84ae045"><span class="section-number-3">2.1</span> Installation Instructions</h3> -<div class="outline-text-3" id="text-2-1"> -<p> -If you want to use my emacs configuration, it is pretty simple -to get started. Simply clone the repository and start emacs! -</p> - -<div class="org-src-container"> -<pre class="src src-sh"><span style="color: #62686E;"># </span><span style="color: #62686E;">Move your old configuration (if you have one)</span> -mv $<span style="color: #DFDFDF;">HOME</span>/.emacs.d $<span style="color: #DFDFDF;">HOME</span>/.emacs.d.bak - -<span style="color: #62686E;"># </span><span style="color: #62686E;">Clone the repository</span> -git clone git://git.ckyln.com/emacs.d $<span style="color: #DFDFDF;">HOME</span>/.emacs.d - -<span style="color: #62686E;"># </span><span style="color: #62686E;">Start emacs</span> -emacs -</pre> -</div> - -<p> -This will probably take a while, especially because it is -setting up for the first time. You might need to restart -emacs after the initial configuration is done. -</p> -</div> -</div> - -<div id="outline-container-orgc9dd783" class="outline-3"> -<h3 id="orgc9dd783"><span class="section-number-3">2.2</span> Ignoring init.el changes on Git</h3> -<div class="outline-text-3" id="text-2-2"> -<p> -It can be annoying to see whenever you change your init.org -and see git wanting to update init.el as well. You can avoid -this by doing -</p> - -<div class="org-src-container"> -<pre class="src src-sh">git update-index --assume-unchanged init.el -</pre> -</div> -</div> -</div> - -<div id="outline-container-orgf8916c9" class="outline-3"> -<h3 id="orgf8916c9"><span class="section-number-3">2.3</span> Meta</h3> -<div class="outline-text-3" id="text-2-3"> -<p> -To load init.el properly we run a function such as this. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">defun</span> <span style="color: #5cEfFF;">tangle-init</span> () - <span style="color: #7e7e87;">"If the current buffer is 'init.org' the code-blocks are</span> -<span style="color: #7e7e87;">tangled, and the tangled file is compiled."</span> - (<span style="color: #51afef;">when</span> (equal (buffer-file-name) - (expand-file-name (concat user-emacs-directory <span style="color: #7bc275;">"init.org"</span>))) - <span style="color: #62686E;">;; </span><span style="color: #62686E;">Avoid running hooks when tangling.</span> - (<span style="color: #51afef;">let</span> ((prog-mode-hook nil)) - (org-babel-tangle) - (byte-compile-file (concat user-emacs-directory <span style="color: #7bc275;">"init.el"</span>))))) - -(add-hook 'after-save-hook 'tangle-init) -</pre> -</div> -</div> -</div> - -<div id="outline-container-orgc172a28" class="outline-3"> -<h3 id="orgc172a28"><span class="section-number-3">2.4</span> Attribution</h3> -<div class="outline-text-3" id="text-2-4"> -<p> -I am still relatively new to the emacs environment myself. These are -the people that I have stolen from. -</p> -<dl class="org-dl"> -<dt>Bernt Hansen</dt><dd>I have got lots of org-mode tweaks from Bernt's -<a href="http://doc.norang.ca/org-mode.html">Guide to Org Mode</a>.</dd> -<dt>Adam Schaefers</dt><dd>While I don't have much code from Adam's Emacs -configuration, I was inspired by his passion towards Emacs to make -the switch from Vim.</dd> -<dt>Gregory J. Stein</dt><dd>I have learned quite a bit from Greg's blog posts -on Emacs. Check out his own <a href="https://github.com/gjstein/emacs.d">Emacs configuration</a>!</dd> -<dt>Lars Tveito</dt><dd>I was totally inspired from Lars to create an init.org -file to manage my Emacs configuration. <a href="https://github.com/larstvei/dot-emacs">Emacs configuration</a></dd> -</dl> -</div> -</div> -</div> - -<div id="outline-container-orgc2643ca" class="outline-2"> -<h2 id="orgc2643ca"><span class="section-number-2">3</span> Startup Settings</h2> -<div class="outline-text-2" id="text-3"> -<p> -The most important stuff are (for me) is <code>use-package</code> and -disabling the clutter as soon as possible. By clutter, I mean -bars and menus. Also let's disable the splash screen. -</p> -</div> - -<div id="outline-container-orgf7cc529" class="outline-3"> -<h3 id="orgf7cc529"><span class="section-number-3">3.1</span> Declutter</h3> -<div class="outline-text-3" id="text-3-1"> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(menu-bar-mode 0) -(<span style="color: #51afef;">setq</span> inhibit-splash-screen t) -</pre> -</div> - -<p> -If you are using emacs-nox, tool-bar-mode (probably) and -scroll-bar-mode will not be defined. This checks if they are -defined, and, if they are, will set them to 0. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">when</span> (fboundp 'tool-bar-mode) (tool-bar-mode 0)) -(<span style="color: #51afef;">when</span> (fboundp 'scroll-bar-mode) (scroll-bar-mode 0)) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org6304d09" class="outline-3"> -<h3 id="org6304d09"><span class="section-number-3">3.2</span> Package management</h3> -<div class="outline-text-3" id="text-3-2"> -<p> -I have switched to straight.el for package management. -It is overall faster than package.el, and I don't want -to use every package that I have tried out. The following -is the one time bootstrapping script that straight.el uses -to install itself. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">bootstrap-version</span>) -(<span style="color: #51afef;">let</span> ((bootstrap-file - (expand-file-name <span style="color: #7bc275;">"straight/repos/straight.el/bootstrap.el"</span> user-emacs-directory)) - (bootstrap-version 5)) - (<span style="color: #51afef;">unless</span> (file-exists-p bootstrap-file) - (<span style="color: #51afef;">with-current-buffer</span> - (url-retrieve-synchronously - <span style="color: #7bc275;">"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"</span> - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) - (load bootstrap-file nil 'nomessage)) -(<span style="color: #51afef;">require</span> '<span style="color: #a991f1;">straight</span>) -</pre> -</div> -</div> - -<div id="outline-container-org6b93d10" class="outline-4"> -<h4 id="org6b93d10"><span class="section-number-4">3.2.1</span> Straight default configurations</h4> -<div class="outline-text-4" id="text-3-2-1"> -<p> -I don't want straight to do complete clones of the package repositories I -am building from. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">setq</span> straight-vc-git-default-clone-depth 1) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org9380eb7" class="outline-4"> -<h4 id="org9380eb7"><span class="section-number-4">3.2.2</span> use-package</h4> -<div class="outline-text-4" id="text-3-2-2"> -<p> -We need use-package for maintaining other packages. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(straight-use-package 'use-package) -(<span style="color: #51afef;">require</span> '<span style="color: #a991f1;">use-package</span>) -</pre> -</div> -</div> -</div> -</div> - -<div id="outline-container-orgbbb5af1" class="outline-3"> -<h3 id="orgbbb5af1"><span class="section-number-3">3.3</span> Custom-file</h3> -<div class="outline-text-3" id="text-3-3"> -<p> -I don't like custom variables on my init.el, I prefer having it on -my cache folder. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">setq</span> custom-file <span style="color: #7bc275;">"~/.cache/emacs-custom.el"</span>) -</pre> -</div> - -<p> -Let's load the custom-file if it is there -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">when</span> (file-exists-p custom-file) -(load custom-file)) -</pre> -</div> -</div> -</div> - -<div id="outline-container-orgeef3089" class="outline-3"> -<h3 id="orgeef3089"><span class="section-number-3">3.4</span> Private file</h3> -<div class="outline-text-3" id="text-3-4"> -<p> -Let's load a private file if it exists -</p> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(add-hook - 'after-init-hook - (<span style="color: #51afef;">lambda</span> () - (<span style="color: #51afef;">let</span> ((private-file (concat user-emacs-directory <span style="color: #7bc275;">"private.el"</span>))) - (<span style="color: #51afef;">when</span> (file-exists-p private-file) - (load-file private-file))))) -</pre> -</div> -</div> -</div> -<div id="outline-container-orgc2b89e2" class="outline-3"> -<h3 id="orgc2b89e2"><span class="section-number-3">3.5</span> Starting the server</h3> -<div class="outline-text-3" id="text-3-5"> -<p> -I used to have an alias for running emacsclient, now I -use a tiny script for it. -</p> -<div class="org-src-container"> -<pre class="src src-sh" id="org020c127"><span style="color: #62686E;">#</span><span style="color: #62686E;">!/bin/</span><span style="color: #51afef;">sh</span> - -<span style="color: #DFDFDF;">EMACSCLIENT_EXTRA_OPTIONS</span>=<span style="color: #7bc275;">"${EMACSCLIENT_EXTRA_OPTIONS}"</span> -tty &gt;/dev/null 2&gt;&amp;1 &amp;&amp; <span style="color: #DFDFDF;">EMACSCLIENT_EXTRA_OPTIONS</span>=<span style="color: #7bc275;">"$EMACSCLIENT_EXTRA_OPTIONS -nw"</span> - -<span style="color: #51afef;">for</span> opt<span style="color: #51afef;"> in</span> <span style="color: #7bc275;">"$@"</span> ; <span style="color: #51afef;">do</span> - <span style="color: #DFDFDF;">EMACSCLIENT_EXTRA_OPTIONS</span>=<span style="color: #7bc275;">"$EMACSCLIENT_EXTRA_OPTIONS $opt"</span> -<span style="color: #51afef;">done</span> - -<span style="color: #62686E;"># </span><span style="color: #62686E;">We want word splitting</span> -<span style="color: #62686E;"># </span><span style="color: #62686E;">shellcheck disable=2086</span> -emacsclient --alternate-editor=<span style="color: #7bc275;">''</span> -c $<span style="color: #DFDFDF;">EMACSCLIENT_EXTRA_OPTIONS</span> -</pre> -</div> - -<p> -You can install the generated emc script by doing -</p> - -<div class="org-src-container"> -<pre class="src src-sh">install -Dm755 -t /usr/local/bin emc -</pre> -</div> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">require</span> '<span style="color: #a991f1;">server</span>) -(<span style="color: #51afef;">or</span> (server-running-p) - (server-start)) -</pre> -</div> -</div> -</div> -</div> - -<div id="outline-container-org50c9901" class="outline-2"> -<h2 id="org50c9901"><span class="section-number-2">4</span> Packages</h2> -<div class="outline-text-2" id="text-4"> -<p> -Now we can continue by loading our packages, those are listed according -to how important they are to me. -</p> -</div> - -<div id="outline-container-orgc23d2c1" class="outline-3"> -<h3 id="orgc23d2c1"><span class="section-number-3">4.1</span> Evil-mode</h3> -<div class="outline-text-3" id="text-4-1"> -<p> -I am an old vim user, and I do not want to miss out on the beauty of vim -while I am using Emacs. Let's begin with the evil-mode itself. -</p> - - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">evil</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:custom</span> - (evil-want-keybinding nil) - (evil-want-C-i-jump nil) - <span style="color: #C57BDB;">:config</span> - (evil-mode 1)) -</pre> -</div> - -<p> -We didn't ask for the keybindings yet, because we are going to get the -<code>evil-collection</code> package now. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">evil-collection</span> - <span style="color: #C57BDB;">:requires</span> evil - <span style="color: #C57BDB;">:after</span> evil - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:config</span> - (evil-collection-init)) -</pre> -</div> -</div> - -<div id="outline-container-orge64d041" class="outline-4"> -<h4 id="orge64d041"><span class="section-number-4">4.1.1</span> evil-surround</h4> -<div class="outline-text-4" id="text-4-1-1"> -<p> -I used to make use of vim-sandwich, but evil-surround will also -do the job well for me. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">evil-surround</span> - <span style="color: #C57BDB;">:requires</span> evil - <span style="color: #C57BDB;">:after</span> evil - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:config</span> - (global-evil-surround-mode 1)) -</pre> -</div> -</div> -</div> -</div> - -<div id="outline-container-org3e1cd67" class="outline-3"> -<h3 id="org3e1cd67"><span class="section-number-3">4.2</span> Org-mode</h3> -<div class="outline-text-3" id="text-4-2"> -<p> -Org mode is one of the biggest reasons I am using Emacs, and it is a must -for me. These are my configurations. Starting with the obvious here. I am -currently trying to tweak portions of it from Bernt's configuration. See -the <a href="#orgc172a28">2.4</a> section. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">org</span> -<span style="color: #C57BDB;">:straight</span> org-plus-contrib -<span style="color: #C57BDB;">:functions</span> org-babel-tangle -<span style="color: #C57BDB;">:after</span> evil -<span style="color: #C57BDB;">:bind</span> ((<span style="color: #7bc275;">"C-c l"</span> . org-store-link) - (<span style="color: #7bc275;">"C-c a"</span> . org-agenda) - (<span style="color: #7bc275;">"C-c c"</span> . org-capture)) -<span style="color: #C57BDB;">:custom</span> -(org-directory <span style="color: #7bc275;">"~/Org/"</span>) -(org-agende-include-diary t) -(org-default-notes-file <span style="color: #7bc275;">"~/Org/refile.org"</span>) -(org-agenda-span 'day) -(org-todo-keywords (<span style="color: #51afef;">quote</span> ((sequence <span style="color: #7bc275;">"TODO(t)"</span> <span style="color: #7bc275;">"NEXT(n)"</span> <span style="color: #7bc275;">"|"</span> <span style="color: #7bc275;">"DONE(d)"</span>) - (sequence <span style="color: #7bc275;">"WAITING(w@/!)"</span> <span style="color: #7bc275;">"HOLD(h@/!)"</span> <span style="color: #7bc275;">"|"</span> <span style="color: #7bc275;">"CANCELLED(c@/!)"</span> <span style="color: #7bc275;">"PHONE"</span> <span style="color: #7bc275;">"MEETING"</span>)))) -(org-use-fast-todo-selection t) -(org-refile-targets (<span style="color: #51afef;">quote</span> ((nil <span style="color: #C57BDB;">:maxlevel</span> . 9) - (org-agenda-files <span style="color: #C57BDB;">:maxlevel</span> . 9)))) -(org-refile-use-outline-path t) -(org-outline-path-complete-in-steps nil) -(org-refile-allow-creating-parent-nodes (<span style="color: #51afef;">quote</span> confirm)) -(org-capture-templates - (<span style="color: #51afef;">quote</span> ((<span style="color: #7bc275;">"t"</span> <span style="color: #7bc275;">"todo"</span> entry (file <span style="color: #7bc275;">"~/Org/refile.org"</span>) - <span style="color: #7bc275;">"* TODO %?\n%U\n%a\n"</span> <span style="color: #C57BDB;">:clock-in</span> t <span style="color: #C57BDB;">:clock-resume</span> t) - (<span style="color: #7bc275;">"r"</span> <span style="color: #7bc275;">"respond"</span> entry (file <span style="color: #7bc275;">"~/Org/refile.org"</span>) - <span style="color: #7bc275;">"* NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n"</span> <span style="color: #C57BDB;">:clock-in</span> t <span style="color: #C57BDB;">:clock-resume</span> t <span style="color: #C57BDB;">:immediate-finish</span> t) - (<span style="color: #7bc275;">"n"</span> <span style="color: #7bc275;">"note"</span> entry (file <span style="color: #7bc275;">"~/Org/refile.org"</span>) - <span style="color: #7bc275;">"* %? :NOTE:\n%U\n%a\n"</span> <span style="color: #C57BDB;">:clock-in</span> t <span style="color: #C57BDB;">:clock-resume</span> t) - (<span style="color: #7bc275;">"j"</span> <span style="color: #7bc275;">"Journal"</span> entry (file+datetree <span style="color: #7bc275;">"~/Org/diary.org"</span>) - <span style="color: #7bc275;">"* %?\n%U\n"</span> <span style="color: #C57BDB;">:clock-in</span> t <span style="color: #C57BDB;">:clock-resume</span> t) - (<span style="color: #7bc275;">"w"</span> <span style="color: #7bc275;">"org-protocol"</span> entry (file <span style="color: #7bc275;">"~/Org/refile.org"</span>) - <span style="color: #7bc275;">"* TODO Review %c\n%U\n"</span> <span style="color: #C57BDB;">:immediate-finish</span> t) - (<span style="color: #7bc275;">"m"</span> <span style="color: #7bc275;">"Meeting"</span> entry (file <span style="color: #7bc275;">"~/Org/refile.org"</span>) - <span style="color: #7bc275;">"* MEETING with %? :MEETING:\n%U"</span> <span style="color: #C57BDB;">:clock-in</span> t <span style="color: #C57BDB;">:clock-resume</span> t) - (<span style="color: #7bc275;">"p"</span> <span style="color: #7bc275;">"Phone call"</span> entry (file <span style="color: #7bc275;">"~/Org/refile.org"</span>) - <span style="color: #7bc275;">"* PHONE %? :PHONE:\n%U"</span> <span style="color: #C57BDB;">:clock-in</span> t <span style="color: #C57BDB;">:clock-resume</span> t) - (<span style="color: #7bc275;">"h"</span> <span style="color: #7bc275;">"Habit"</span> entry (file <span style="color: #7bc275;">"~/Org/refile.org"</span>) - <span style="color: #7bc275;">"* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%&lt;&lt;%Y-%m-%d %a .+1d/3d&gt;&gt;\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n"</span>)))) -(org-todo-keyword-faces - (<span style="color: #51afef;">quote</span> ((<span style="color: #7bc275;">"TODO"</span> <span style="color: #C57BDB;">:foreground</span> <span style="color: #7bc275;">"orange red"</span> <span style="color: #C57BDB;">:weight</span> bold) - (<span style="color: #7bc275;">"NEXT"</span> <span style="color: #C57BDB;">:foreground</span> <span style="color: #7bc275;">"cyan"</span> <span style="color: #C57BDB;">:weight</span> bold) - (<span style="color: #7bc275;">"DONE"</span> <span style="color: #C57BDB;">:foreground</span> <span style="color: #7bc275;">"spring green"</span> <span style="color: #C57BDB;">:weight</span> bold) - (<span style="color: #7bc275;">"WAITING"</span> <span style="color: #C57BDB;">:foreground</span> <span style="color: #7bc275;">"orange"</span> <span style="color: #C57BDB;">:weight</span> bold) - (<span style="color: #7bc275;">"HOLD"</span> <span style="color: #C57BDB;">:foreground</span> <span style="color: #7bc275;">"hot pink"</span> <span style="color: #C57BDB;">:weight</span> bold) - (<span style="color: #7bc275;">"CANCELLED"</span> <span style="color: #C57BDB;">:foreground</span> <span style="color: #7bc275;">"spring green"</span> <span style="color: #C57BDB;">:weight</span> bold) - (<span style="color: #7bc275;">"MEETING"</span> <span style="color: #C57BDB;">:foreground</span> <span style="color: #7bc275;">"spring green"</span> <span style="color: #C57BDB;">:weight</span> bold) - (<span style="color: #7bc275;">"PHONE"</span> <span style="color: #C57BDB;">:foreground</span> <span style="color: #7bc275;">"spring green"</span> <span style="color: #C57BDB;">:weight</span> bold)))) -(org-export-backends - (<span style="color: #51afef;">quote</span> - (ascii beamer html latex man md groff)))) - -</pre> -</div> -</div> - -<div id="outline-container-org629705b" class="outline-4"> -<h4 id="org629705b"><span class="section-number-4">4.2.1</span> evil-org</h4> -<div class="outline-text-4" id="text-4-2-1"> -<p> -I am quite serious on this vim stuff now. I want it everywhere. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">evil-org</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:after</span> (evil org) - <span style="color: #C57BDB;">:functions</span> evil-org-agenda-set-keys - <span style="color: #C57BDB;">:hook</span> (org-mode . evil-org-mode) - <span style="color: #C57BDB;">:config</span> - (<span style="color: #51afef;">require</span> '<span style="color: #a991f1;">evil-org-agenda</span>) - (evil-org-agenda-set-keys)) -</pre> -</div> - -<p> -Now that we have initialized those packages, let's configure them some -further. -</p> -</div> -</div> -</div> - -<div id="outline-container-orgcdb199b" class="outline-3"> -<h3 id="orgcdb199b"><span class="section-number-3">4.3</span> Magit</h3> -<div class="outline-text-3" id="text-4-3"> -<p> -I like magit, it is quite useful when you don't want to leave emacs and -you have to manually edit hunks for specific commits. I use evil-magit -along with it. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">magit</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:bind</span> (<span style="color: #7bc275;">"C-x g"</span> . magit-status)) -</pre> -</div> -</div> - -<div id="outline-container-org69452e5" class="outline-4"> -<h4 id="org69452e5"><span class="section-number-4">4.3.1</span> evil-magit</h4> -<div class="outline-text-4" id="text-4-3-1"> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">evil-magit</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:after</span> (evil magit) - <span style="color: #C57BDB;">:config</span> (evil-magit-init)) -</pre> -</div> -</div> -</div> -</div> - -<div id="outline-container-org5a6b3d7" class="outline-3"> -<h3 id="org5a6b3d7"><span class="section-number-3">4.4</span> Flycheck</h3> -<div class="outline-text-3" id="text-4-4"> -<p> -I use flycheck for async syntax and error checking. It can be really useful -and adds to the IDE-likeness of Emacs. I find things like these to be really -hacky and buggy on Vim. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">flycheck</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:config</span> (global-flycheck-mode)) -</pre> -</div> -</div> -</div> - -<div id="outline-container-orgacdfe4c" class="outline-3"> -<h3 id="orgacdfe4c"><span class="section-number-3">4.5</span> Company Mode</h3> -<div class="outline-text-3" id="text-4-5"> -<p> -Company is a tool that I am still very unfamiliar with. I used to -have completion tools on Vim, but I don't understand company that -much yet. Pretty simple config. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">company</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:custom</span> (company-idle-delay 1) - (company-minimum-prefix-length 1) - <span style="color: #C57BDB;">:config</span> (global-company-mode 1)) -</pre> -</div> -</div> - -<div id="outline-container-orgafab18d" class="outline-4"> -<h4 id="orgafab18d"><span class="section-number-4">4.5.1</span> Company LSP</h4> -<div class="outline-text-4" id="text-4-5-1"> -<p> -I am using Company's own Language Server Protocol. It is good as -far as I can wrap my head-around. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">company-lsp</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:after</span> company - <span style="color: #C57BDB;">:init</span> - (<span style="color: #51afef;">push</span> 'company-lsp company-backends)) -</pre> -</div> -</div> -</div> -</div> - -<div id="outline-container-org51852e9" class="outline-3"> -<h3 id="org51852e9"><span class="section-number-3">4.6</span> Mingus</h3> -<div class="outline-text-3" id="text-4-6"> -<p> -Mingus is an <a href="https://musicpd.org">MPD</a> client for the Emacs operating system. It has a rather -simple, straightforward interface. -</p> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">mingus</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:bind</span> (<span style="color: #7bc275;">"C-c m"</span> . mingus)) -</pre> -</div> -</div> -</div> -<div id="outline-container-org0d07e3e" class="outline-3"> -<h3 id="org0d07e3e"><span class="section-number-3">4.7</span> Projectile</h3> -<div class="outline-text-3" id="text-4-7"> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">projectile</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:bind-keymap</span> (<span style="color: #7bc275;">"C-c p"</span> . projectile-command-map) - <span style="color: #C57BDB;">:config</span> (projectile-mode +1)) -</pre> -</div> -</div> -</div> -<div id="outline-container-org066b3c9" class="outline-3"> -<h3 id="org066b3c9"><span class="section-number-3">4.8</span> Treemacs</h3> -<div class="outline-text-3" id="text-4-8"> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">treemacs</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:bind</span> (<span style="color: #7bc275;">"C-c t"</span> . treemacs) - <span style="color: #C57BDB;">:custom</span> (treemacs-no-png-images t)) - -(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">treemacs-evil</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:requires</span> treemacs - <span style="color: #C57BDB;">:after</span> (treemacs evil)) - -(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">treemacs-magit</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:requires</span> treemacs - <span style="color: #C57BDB;">:after</span> (treemacs magit)) - -(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">treemacs-projectile</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:requires</span> treemacs - <span style="color: #C57BDB;">:after</span> (treemacs projectile)) -</pre> -</div> -</div> - -<ol class="org-ol"> -<li><a id="org402f0e4"></a>Keybindings<br /> -<div class="outline-text-5" id="text-4-8-0-1"> -<p> -These tables are taken from the <a href="https://github.com/Alexander-Miller/treemacs">Treemacs Github page</a> -</p> - - -<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> - - -<colgroup> -<col class="org-left" /> - -<col class="org-left" /> - -<col class="org-left" /> -</colgroup> -<thead> -<tr> -<th scope="col" class="org-left">Key</th> -<th scope="col" class="org-left">Action</th> -<th scope="col" class="org-left">Description</th> -</tr> -</thead> -<tbody> -<tr> -<td class="org-left">C-c C-p a</td> -<td class="org-left">treemacs-add-project-to-workspace</td> -<td class="org-left">Select a new project to add to the treemacs workspace.</td> -</tr> - -<tr> -<td class="org-left">C-c C-p p</td> -<td class="org-left">treemacs-projectile</td> -<td class="org-left">Select a projectile project to add to the workspace.</td> -</tr> - -<tr> -<td class="org-left">C-c C-p d</td> -<td class="org-left">treemacs-remove-project-from-workspace</td> -<td class="org-left">Remove project at point from the workspace.</td> -</tr> - -<tr> -<td class="org-left">C-c C-p r</td> -<td class="org-left">treemacs-rename-project</td> -<td class="org-left">Rename project at point.</td> -</tr> - -<tr> -<td class="org-left">C-c C-p c c</td> -<td class="org-left">treemacs-collapse-project</td> -<td class="org-left">Collapse project at point.</td> -</tr> - -<tr> -<td class="org-left">C-c C-p c o/S-TAB</td> -<td class="org-left">treemacs-collapse-all-projects</td> -<td class="org-left">Collapse all projects.</td> -</tr> - -<tr> -<td class="org-left">C-c C-p c o</td> -<td class="org-left">treemacs-collapse-all-projects</td> -<td class="org-left">Collapse all projects except the project at point.</td> -</tr> - -<tr> -<td class="org-left">C-c C-w r</td> -<td class="org-left">treemacs-rename-workspace</td> -<td class="org-left">Rename a workspace.</td> -</tr> - -<tr> -<td class="org-left">C-c C-w a</td> -<td class="org-left">treemacs-create-workspace</td> -<td class="org-left">Create a new workspace.</td> -</tr> - -<tr> -<td class="org-left">C-c C-w d</td> -<td class="org-left">treemacs-remove-workspace</td> -<td class="org-left">Delete a workspace.</td> -</tr> - -<tr> -<td class="org-left">C-c C-w s</td> -<td class="org-left">treemacs-switch-workspace</td> -<td class="org-left">Switch the current workspace.</td> -</tr> - -<tr> -<td class="org-left">C-c C-w e</td> -<td class="org-left">treemacs-edit-workspaces</td> -<td class="org-left">Edit workspace layout via org-mode.</td> -</tr> - -<tr> -<td class="org-left">C-c C-w f</td> -<td class="org-left">treemacs-set-fallback-workspace</td> -<td class="org-left">Select the default fallback workspace.</td> -</tr> -</tbody> -</table> -</div> -</li> -</ol> -</div> - -<div id="outline-container-orgc94c71d" class="outline-3"> -<h3 id="orgc94c71d"><span class="section-number-3">4.9</span> emacs-dashboard</h3> -<div class="outline-text-3" id="text-4-9"> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">dashboard</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:custom</span> - (dashboard-center-content t) - (show-week-agenda-p nil) - (dashboard-set-footer nil) - (initial-buffer-choice (<span style="color: #51afef;">lambda</span> () (get-buffer <span style="color: #7bc275;">"*dashboard*"</span>))) - (dashboard-items '((agenda . 10) - (projects . 5))) - <span style="color: #C57BDB;">:config</span> (dashboard-setup-startup-hook)) -</pre> -</div> -</div> -</div> -<div id="outline-container-orgd98f78e" class="outline-3"> -<h3 id="orgd98f78e"><span class="section-number-3">4.10</span> Extras</h3> -<div class="outline-text-3" id="text-4-10"> -<p> -These don't really deserve their own sections, but I prefer to use them. -</p> -</div> - -<div id="outline-container-org259aaa5" class="outline-4"> -<h4 id="org259aaa5"><span class="section-number-4">4.10.1</span> sudo-edit</h4> -<div class="outline-text-4" id="text-4-10-1"> -<p> -This is a package for re-initiating a file as root. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">sudo-edit</span> <span style="color: #C57BDB;">:straight</span> t) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org81e9388" class="outline-4"> -<h4 id="org81e9388"><span class="section-number-4">4.10.2</span> linum-relative</h4> -<div class="outline-text-4" id="text-4-10-2"> -<p> -I just like seeing the current line number and the relatives of -the other lines. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">linum-relative</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:bind</span> (<span style="color: #7bc275;">"C-c r"</span> . display-line-numbers-mode) - <span style="color: #C57BDB;">:custom</span> - (linum-relative-current-symbol <span style="color: #7bc275;">""</span>) - (display-line-numbers-type 'visual) - <span style="color: #C57BDB;">:hook</span> (prog-mode . display-line-numbers-mode)) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org5a9e1a0" class="outline-4"> -<h4 id="org5a9e1a0"><span class="section-number-4">4.10.3</span> markdown-mode</h4> -<div class="outline-text-4" id="text-4-10-3"> -<p> -I sometimes use this to test the HTML output of markdown documents -that I write. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">markdown-mode</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:config</span> (<span style="color: #51afef;">setq</span> markdown-command <span style="color: #7bc275;">"/usr/bin/markdown"</span>)) -</pre> -</div> -</div> -</div> - -<div id="outline-container-orgf3e3515" class="outline-4"> -<h4 id="orgf3e3515"><span class="section-number-4">4.10.4</span> htmlize</h4> -<div class="outline-text-4" id="text-4-10-4"> -<p> -I sometimes output html from org-mode as it comes handy. We use htmlize for -that. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">htmlize</span> <span style="color: #C57BDB;">:straight</span> t) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org3758c27" class="outline-4"> -<h4 id="org3758c27"><span class="section-number-4">4.10.5</span> toc-org</h4> -<div class="outline-text-4" id="text-4-10-5"> -<p> -I want to have a basic table-of-contents generation on my org-files -even without exporting the file itself. This is also useful for the -Github README. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">toc-org</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:hook</span> org-mode) -</pre> -</div> -</div> -</div> -</div> -</div> - -<div id="outline-container-org36c36e0" class="outline-2"> -<h2 id="org36c36e0"><span class="section-number-2">5</span> Themes and Icons</h2> -<div class="outline-text-2" id="text-5"> -<p> -I used to make use of my Xresources themes, but I sometimes sadly -need windows, and I actually do want some eye candy from time to -time. -</p> -</div> - -<div id="outline-container-org2f05abb" class="outline-4"> -<h4 id="org2f05abb"><span class="section-number-4">5.0.1</span> Doom themes</h4> -<div class="outline-text-4" id="text-5-0-1"> -<p> -I want to use the default doom-theme (perhaps I can switch to -Dracula someday as well). -</p> - -<p> -The 'if' statement makes sure we have -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">doom-themes</span> - <span style="color: #C57BDB;">:after</span> all-the-icons - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:functions</span> doom-themes-org-config doom-themes-treemacs-config - <span style="color: #C57BDB;">:custom</span> - (doom-themes-enable-bold t) - (doom-themes-enable-italic t) - (doom-themes-treemacs-theme <span style="color: #7bc275;">"doom-colors"</span>) - <span style="color: #C57BDB;">:config</span> - (load-theme 'doom-vibrant t) - (doom-themes-treemacs-config) - (doom-themes-org-config)) -</pre> -</div> -</div> -</div> - -<div id="outline-container-orgaef679f" class="outline-4"> -<h4 id="orgaef679f"><span class="section-number-4">5.0.2</span> All the icons</h4> -<div class="outline-text-4" id="text-5-0-2"> -<p> -All the icons is an icon-pack. I mean it probably isn't hard to -guess. Pretty straightforward. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">all-the-icons</span> - <span style="color: #C57BDB;">:straight</span> t) -</pre> -</div> -</div> -</div> -</div> -<div id="outline-container-org76777f5" class="outline-2"> -<h2 id="org76777f5"><span class="section-number-2">6</span> Filetype Configurations</h2> -<div class="outline-text-2" id="text-6"> -<p> -I would like to have some different configurations for filetypes. Those -are for indents and spaces, mostly. -</p> -</div> - -<div id="outline-container-org4c39c1f" class="outline-3"> -<h3 id="org4c39c1f"><span class="section-number-3">6.1</span> Default Formatting</h3> -<div class="outline-text-3" id="text-6-1"> -<p> -Here is the default formatting for most files. I don't like tabs as indents -so I avoid them wherever I can. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">setq-default</span> indent-tabs-mode nil - tab-width 8 - fill-column 80) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org53fb562" class="outline-3"> -<h3 id="org53fb562"><span class="section-number-3">6.2</span> Markdown</h3> -<div class="outline-text-3" id="text-6-2"> -<p> -For markdown, I want to have 4 spaces as an indentation. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">markdown-mode</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:custom</span> - (md-indent-tabs-mode nil) - (md-tab-width 4)) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org902b84f" class="outline-3"> -<h3 id="org902b84f"><span class="section-number-3">6.3</span> Shell</h3> -<div class="outline-text-3" id="text-6-3"> -<p> -For shell, I want to have 4 spaces as an indentation. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">setq</span> - sh-indent-tabs-mode nil - sh-tab-width 4 -) -</pre> -</div> -</div> -</div> - -<div id="outline-container-orgb4ef550" class="outline-3"> -<h3 id="orgb4ef550"><span class="section-number-3">6.4</span> Python</h3> -<div class="outline-text-3" id="text-6-4"> -<p> -I use the django framework quite frequently at work. So I want a few packages -for that as well. -</p> -</div> - -<div id="outline-container-org560dfba" class="outline-4"> -<h4 id="org560dfba"><span class="section-number-4">6.4.1</span> Company jedi</h4> -<div class="outline-text-4" id="text-6-4-1"> -<p> -Company jedi is for better completion while I am editing python files. Here -is the use-package -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">company-jedi</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:after</span> company - <span style="color: #C57BDB;">:init</span> - (add-to-list 'company-backends 'company-jedi)) -</pre> -</div> -</div> -</div> -</div> -</div> -<div id="outline-container-orge9f0242" class="outline-2"> -<h2 id="orge9f0242"><span class="section-number-2">7</span> Other Settings</h2> -<div class="outline-text-2" id="text-7"> -<p> -Those are small settings for emacs that I cannot categorize but have importance -for me. -</p> -</div> - -<div id="outline-container-org4e7928f" class="outline-3"> -<h3 id="org4e7928f"><span class="section-number-3">7.1</span> Dired &#x2013; ls dired</h3> -<div class="outline-text-3" id="text-7-1"> -<p> -I use suckless.org's <code>sbase</code> as my coreutils. The <code>ls</code> program that I use does -not have a <code>--dired</code> option. Let's disable it. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">dired-explorer</span> - <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:custom</span> (dired-use-ls-dired nil)) -</pre> -</div> -</div> -</div> - -<div id="outline-container-orgfa47051" class="outline-3"> -<h3 id="orgfa47051"><span class="section-number-3">7.2</span> Coding System for Terminal</h3> -<div class="outline-text-3" id="text-7-2"> -<p> -I want emacs to use utf-8 so my terminal isn't filled with '?' characters. -</p> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(set-terminal-coding-system 'utf-8) -</pre> -</div> -</div> -</div> -<div id="outline-container-org61c6002" class="outline-3"> -<h3 id="org61c6002"><span class="section-number-3">7.3</span> Backup Options</h3> -<div class="outline-text-3" id="text-7-3"> -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">setq</span> backup-directory-alist `((<span style="color: #7bc275;">"."</span> . <span style="color: #7bc275;">"~/.cache/emacs/saves"</span>))) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org0b55f58" class="outline-3"> -<h3 id="org0b55f58"><span class="section-number-3">7.4</span> Set Browser</h3> -<div class="outline-text-3" id="text-7-4"> -<p> -I am setting the default browser from the BROWSER environment variable -so that I don't have to keep track of it in case I ever change my browser. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">setq</span> - browse-url-generic-program (executable-find (getenv <span style="color: #7bc275;">"BROWSER"</span>)) - browse-url-browser-function 'browse-url-generic -) -</pre> -</div> -</div> -</div> -</div> -<div id="outline-container-org9939679" class="outline-2"> -<h2 id="org9939679"><span class="section-number-2">8</span> Notes</h2> -<div class="outline-text-2" id="text-8"> -</div> -<div id="outline-container-orgcf4fd1f" class="outline-3"> -<h3 id="orgcf4fd1f"><span class="section-number-3">8.1</span> Reverting to package.el</h3> -<div class="outline-text-3" id="text-8-1"> -<p> -You can always revert back to <code>package.el</code> by replacing the <a href="#org6304d09">3.2</a> -section with the following configuration steps. This can be for many reasons. -For example I have reverted to package.el on my old laptop where I don't want -deal with compilation, and I don't want to keep git repositories of every package -that I use. However, I believe that I can deal with those problems as I learn more -about the internals of straight. -</p> -</div> - -<div id="outline-container-orgfee6cad" class="outline-4"> -<h4 id="orgfee6cad"><span class="section-number-4">8.1.1</span> Replacing the bootstrap command</h4> -<div class="outline-text-4" id="text-8-1-1"> -<p> -You need to replace the <code>straight.el</code> package manager bootstrapper. This is -the first code block in the section. Replace it with the following code block. -</p> - -<p> -Keep in mind that you shouldn't add <code>:tangle no</code>. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">require</span> '<span style="color: #a991f1;">package</span>) -(<span style="color: #51afef;">setq</span> package-archives '( - (<span style="color: #7bc275;">"elpa"</span> . <span style="color: #7bc275;">"https://elpa.gnu.org/packages/"</span>) - (<span style="color: #7bc275;">"melpa"</span> . <span style="color: #7bc275;">"https://melpa.org/packages/"</span>) -)) -(package-initialize) -</pre> -</div> - -<p> -This code block will initialize <code>package.el</code>. Now we need to replace use-package -as it works with package.el -</p> -</div> -</div> - -<div id="outline-container-orga14d8f5" class="outline-4"> -<h4 id="orga14d8f5"><span class="section-number-4">8.1.2</span> Making use-package work with package.el</h4> -<div class="outline-text-4" id="text-8-1-2"> -<p> -Now, replace the second code-block in the section with the following -commands. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">unless</span> (package-installed-p 'use-package) - (package-refresh-contents) - (package-install 'use-package)) - -(<span style="color: #51afef;">require</span> '<span style="color: #a991f1;">use-package</span>) -</pre> -</div> - -<p> -There is also the final step, which is the most important one. Replacing the use-package <code>:straight</code> -calls with <code>:ensure</code>. Keep in mind that doing so will also replace the line below as well. In your shell, -run the following command. -</p> - -<div class="org-src-container"> -<pre class="src src-sh">sed -i <span style="color: #7bc275;">'s/\:straight /\:ensure /g'</span> init.org -</pre> -</div> -</div> -</div> -</div> -</div> -</div> -<div id="postamble" class="status"> -<p class="author">Author: Cem Keylan</p> -<p class="date">Created: 2020-04-02 Thu 02:30</p> -<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p> -</div> -</body> -</html>