Created
September 27, 2018 22:13
-
-
Save alienbogart/19ac0c3b780383cb2925fb5d954cad54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> | |
<!-- 2018-09-27 Thu 19:07 --> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Emacs Init File</title> | |
<meta name="generator" content="Org mode" /> | |
<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; } | |
.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"> | |
/* | |
@licstart The following is the entire license notice for the | |
JavaScript code in this tag. | |
Copyright (C) 2012-2018 Free Software Foundation, Inc. | |
The JavaScript code in this tag is free software: you can | |
redistribute it and/or modify it under the terms of the GNU | |
General Public License (GNU GPL) as published by the Free Software | |
Foundation, either version 3 of the License, or (at your option) | |
any later version. The code is distributed WITHOUT ANY WARRANTY; | |
without even the implied warranty of MERCHANTABILITY or FITNESS | |
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. | |
As additional permission under GNU GPL version 3 section 7, you | |
may distribute non-source (e.g., minimized or compacted) forms of | |
that code without the copy of the GNU GPL normally required by | |
section 4, provided you include this license notice and a URL | |
through which recipients can access the Corresponding Source. | |
@licend The above is the entire license notice | |
for the JavaScript code in this tag. | |
*/ | |
<!--/*--><![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; | |
} | |
/*]]>*///--> | |
</script> | |
</head> | |
<body> | |
<div id="content"> | |
<h1 class="title">Emacs Init File</h1> | |
<div id="table-of-contents"> | |
<h2>Table of Contents</h2> | |
<div id="text-table-of-contents"> | |
<ul> | |
<li><a href="#org2c926bc">1. Init</a></li> | |
<li><a href="#org9e312b6">2. Packages</a> | |
<ul> | |
<li><a href="#org47911f0">2.1. Text</a></li> | |
<li><a href="#org4998322">2.2. Files</a></li> | |
<li><a href="#org3b08370">2.3. Movement</a></li> | |
<li><a href="#org3792bcc">2.4. Utilities</a></li> | |
<li><a href="#orge133750">2.5. Appearance</a></li> | |
<li><a href="#org5505a63">2.6. Programming</a></li> | |
<li><a href="#orga9e9342">2.7. Big Packages</a></li> | |
</ul> | |
</li> | |
<li><a href="#org62d82ce">3. Keybindings</a> | |
<ul> | |
<li><a href="#orgcc08d71">3.1. SPC</a></li> | |
<li><a href="#orgef85e34">3.2. miscelanneous</a></li> | |
<li><a href="#org0651d58">3.3. normal keys</a></li> | |
<li><a href="#orgaa4dbd6">3.4. normal operator</a></li> | |
<li><a href="#org910fd5f">3.5. insert keys</a></li> | |
<li><a href="#org84bf4d4">3.6. visual keys</a></li> | |
<li><a href="#org92b8a22">3.7. other keys</a></li> | |
</ul> | |
</li> | |
<li><a href="#orge4de0fa">4. Hydra</a></li> | |
<li><a href="#org3a3ee7f">5. Variables</a> | |
<ul> | |
<li><a href="#orgaf913b5">5.1. text variables</a></li> | |
<li><a href="#orgc20a403">5.2. other variables</a></li> | |
<li><a href="#org5341e2e">5.3. buffer variables</a></li> | |
<li><a href="#org5819026">5.4. windows variables</a></li> | |
<li><a href="#org689a308">5.5. abbrevs config variables</a></li> | |
<li><a href="#org0f6b4eb">5.6. backup and autosave variables</a></li> | |
</ul> | |
</li> | |
<li><a href="#org4d413ab">6. Hooks</a> | |
<ul> | |
<li><a href="#org7ae7104">6.1. lisp paredit hooks</a></li> | |
<li><a href="#org916ee03">6.2. neotree hook</a></li> | |
<li><a href="#orge821162">6.3. info-mode hook</a></li> | |
<li><a href="#org5bf7aac">6.4. text hook</a></li> | |
<li><a href="#org1ec3b55">6.5. fountain-mode-hook</a></li> | |
<li><a href="#org54faac4">6.6. org-noter-notes-mode-hook</a></li> | |
<li><a href="#org99ac495">6.7. pdf view hook</a></li> | |
<li><a href="#org3446e2d">6.8. yas-after-exit-snippet-hook</a></li> | |
<li><a href="#org01ce20d">6.9. before save hook</a></li> | |
<li><a href="#org5014ea5">6.10. normal entry hook</a></li> | |
<li><a href="#org210dab3">6.11. nov mode hook</a></li> | |
<li><a href="#org18666e4">6.12. prog hook</a></li> | |
<li><a href="#org38f7ee7">6.13. vimrc mode</a></li> | |
<li><a href="#org9e8d372">6.14. undo-tree hook</a></li> | |
<li><a href="#orga1d2388">6.15. org capture hook</a></li> | |
<li><a href="#org4782668">6.16. calendar mode hook</a></li> | |
<li><a href="#orgbd8cc7f">6.17. org-hook</a></li> | |
<li><a href="#orgfbcdd22">6.18. org-agenda-mode-hook</a></li> | |
<li><a href="#org1aafa2d">6.19. python mode jedi hook</a></li> | |
</ul> | |
</li> | |
<li><a href="#orgb260826">7. Modes</a></li> | |
<li><a href="#org424fe01">8. Aliases</a></li> | |
<li><a href="#org6217b28">9. Registers</a></li> | |
<li><a href="#orgeb2abcb">10. Functions</a> | |
<ul> | |
<li><a href="#org94a38fe">10.1. org</a></li> | |
<li><a href="#org17cd711">10.2. org finalize sort</a></li> | |
<li><a href="#org43f9f4e">10.3. title case</a></li> | |
<li><a href="#orgc45f2b8">10.4. text</a></li> | |
<li><a href="#org7f74e03">10.5. pdf occur</a></li> | |
<li><a href="#orgd0af8b6">10.6. elpy insert</a></li> | |
<li><a href="#orgd4a783d">10.7. elpy reload</a></li> | |
<li><a href="#org85698a8">10.8. date</a></li> | |
<li><a href="#orgde4431d">10.9. set fill</a></li> | |
<li><a href="#org8b2a868">10.10. resize</a></li> | |
<li><a href="#org37788dd">10.11. lines</a></li> | |
<li><a href="#org9af49fe">10.12. split</a></li> | |
<li><a href="#org0698635">10.13. ora swiper</a></li> | |
<li><a href="#orgd2b2ca5">10.14. run c</a></li> | |
<li><a href="#orga4597f3">10.15. syntax</a></li> | |
<li><a href="#orgf43c206">10.16. macros</a></li> | |
<li><a href="#org576fd63">10.17. vsplit</a></li> | |
<li><a href="#org1efae81">10.18. xelatex</a></li> | |
<li><a href="#orgd8ed695">10.19. goindex</a></li> | |
<li><a href="#orgbac2207">10.20. backups</a></li> | |
<li><a href="#orgf765241">10.21. buffers</a></li> | |
<li><a href="#org529c3ae">10.22. botright</a></li> | |
<li><a href="#orgeef03b8">10.23. term</a></li> | |
<li><a href="#org105f5af">10.24. term-bpython3</a></li> | |
<li><a href="#org378fb5b">10.25. find files</a></li> | |
<li><a href="#org298bdcc">10.26. show major mode</a></li> | |
<li><a href="#org07fd0ed">10.27. yas comp</a></li> | |
<li><a href="#org723f488">10.28. run file</a></li> | |
<li><a href="#org09c4564">10.29. my-ranger</a></li> | |
<li><a href="#org0d6174e">10.30. my-visualg</a></li> | |
<li><a href="#orgdf55891">10.31. init-reload</a></li> | |
<li><a href="#orga11694a">10.32. delete both</a></li> | |
<li><a href="#org98ec92c">10.33. last-buffer</a></li> | |
<li><a href="#orgfb2cba4">10.34. xmodmap mode</a></li> | |
<li><a href="#org752be41">10.35. agenda enter</a></li> | |
<li><a href="#orgd6cf8f2">10.36. external file</a></li> | |
<li><a href="#org7d3e8ad">10.37. link to other</a></li> | |
<li><a href="#orgbaed844">10.38. xah buffers</a></li> | |
<li><a href="#orgf69e064">10.39. par</a></li> | |
<li><a href="#orgccf5a09">10.40. fountain spell br</a></li> | |
</ul> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<p> | |
This Org file contains all my Emacs configurations. The | |
<a href="https://gitlab.com/mrbig/emacs/blob/master/init.el">actual init file</a> is generated with the command | |
<code>org-tangle-babel</code>. The org format allows for greater | |
organization for both code and comments, nicer appearance | |
and maintainability. | |
</p> | |
<div id="outline-container-org2c926bc" class="outline-2"> | |
<h2 id="org2c926bc"><span class="section-number-2">1</span> Init</h2> | |
<div class="outline-text-2" id="text-1"> | |
</div> | |
<div id="outline-container-org026d2af" class="outline-4"> | |
<h4 id="org026d2af"><span class="section-number-4">1.0.1</span> Melpa</h4> | |
<div class="outline-text-4" id="text-1-0-1"> | |
<p> | |
These settings initialize the package management using Melpa. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">require</span> '<span style="color: #99CC99;">package</span>) | |
(<span style="color: #96CBFE;">let*</span> ((no-ssl (<span style="color: #96CBFE;">and</span> (memq system-type '(windows-nt ms-dos)) | |
(not (gnutls-available-p)))) | |
(proto (<span style="color: #96CBFE;">if</span> no-ssl <span style="color: #8AE234;">"http"</span> <span style="color: #8AE234;">"https"</span>))) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired</span> | |
(add-to-list 'package-archives (cons <span style="color: #8AE234;">"melpa"</span> (concat proto <span style="color: #8AE234;">"://melpa.org/packages/"</span>)) t) | |
<span style="color: #7C7C7C;">;;</span><span style="color: #7C7C7C;">(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)</span> | |
(<span style="color: #96CBFE;">when</span> (< emacs-major-version 24) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">For important compatibility libraries like cl-lib</span> | |
(add-to-list 'package-archives '(<span style="color: #8AE234;">"gnu"</span> . (concat proto <span style="color: #8AE234;">"://elpa.gnu.org/packages/"</span>))))) | |
(package-initialize) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgf0695b9" class="outline-4"> | |
<h4 id="orgf0695b9"><span class="section-number-4">1.0.2</span> Custom</h4> | |
<div class="outline-text-4" id="text-1-0-2"> | |
<p> | |
Emacs customize tool is ugly and unmaitainable, so I try to keep it short. Being | |
isolated in another file also helps debugging, since Emacs messes it up from time. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq</span> custom-file <span style="color: #8AE234;">"~/.emacs.d/custom-settings.el"</span>) | |
(load custom-file t) | |
(<span style="color: #96CBFE;">require</span> '<span style="color: #99CC99;">package</span>) (add-to-list 'package-archives '(<span style="color: #8AE234;">"org"</span> . <span style="color: #8AE234;">"http://orgmode.org/elpa/"</span>) t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org9e312b6" class="outline-2"> | |
<h2 id="org9e312b6"><span class="section-number-2">2</span> Packages</h2> | |
<div class="outline-text-2" id="text-2"> | |
<p> | |
These are all my package declarations and most of the | |
configurations, in the awesome <a href="https://github.com/jwiegley/use-package">use-package</a> format. The | |
keybindings are not here, I use independent <a href="https://github.com/noctuid/general.el">general</a> | |
declarations for that. | |
</p> | |
<ul class="org-ul"> | |
<li>TODO: reorganize these packages</li> | |
</ul> | |
</div> | |
<div id="outline-container-org47911f0" class="outline-3"> | |
<h3 id="org47911f0"><span class="section-number-3">2.1</span> Text</h3> | |
<div class="outline-text-3" id="text-2-1"> | |
</div> | |
<div id="outline-container-orga130784" class="outline-4"> | |
<h4 id="orga130784"><span class="section-number-4">2.1.1</span> hacker typer</h4> | |
<div class="outline-text-4" id="text-2-1-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">hacker-typer</span> | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> hacker-typer-type-rate 192) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgf8adf59" class="outline-4"> | |
<h4 id="orgf8adf59"><span class="section-number-4">2.1.2</span> fountain</h4> | |
<div class="outline-text-4" id="text-2-1-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">fountain-mode</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3145292" class="outline-4"> | |
<h4 id="org3145292"><span class="section-number-4">2.1.3</span> fix-word</h4> | |
<div class="outline-text-4" id="text-2-1-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">fix-word</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org45d4e3d" class="outline-4"> | |
<h4 id="org45d4e3d"><span class="section-number-4">2.1.4</span> pdf-tools</h4> | |
<div class="outline-text-4" id="text-2-1-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">pdf-tools</span> | |
<span style="color: #DAD085;">:init</span> | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\.pdf\\'"</span> . pdf-view-mode)) | |
(<span style="color: #96CBFE;">setq</span> pdf-view-display-size 'fit-height) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org02f671a" class="outline-4"> | |
<h4 id="org02f671a"><span class="section-number-4">2.1.5</span> wordnut</h4> | |
<div class="outline-text-4" id="text-2-1-5"> | |
<p> | |
<a href="https://www.gnu.org/software/auctex/manual/auctex.html">Manual</a> | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">wordnut</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org36766d2" class="outline-4"> | |
<h4 id="org36766d2"><span class="section-number-4">2.1.6</span> auctex</h4> | |
<div class="outline-text-4" id="text-2-1-6"> | |
<p> | |
<a href="https://www.gnu.org/software/auctex/manual/auctex.html">Manual</a> | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">tex</span> | |
<span style="color: #DAD085;">:defer</span> t | |
<span style="color: #DAD085;">:ensure</span> auctex | |
<span style="color: #DAD085;">:config</span> | |
(<span style="color: #96CBFE;">setq-default</span> TeX-master nil) | |
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) | |
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) | |
(<span style="color: #96CBFE;">setq</span> reftex-plug-into-AUCTeX t) | |
(<span style="color: #96CBFE;">setq-default</span> TeX-master nil) | |
(<span style="color: #96CBFE;">setq</span> TeX-parse-self t) | |
(<span style="color: #96CBFE;">setq</span> TeX-auto-save t)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org7699055" class="outline-4"> | |
<h4 id="org7699055"><span class="section-number-4">2.1.7</span> wc-count</h4> | |
<div class="outline-text-4" id="text-2-1-7"> | |
<p> | |
There's probably a simpler way to count words, but I don't know how. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">wc-mode</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgcf912f7" class="outline-4"> | |
<h4 id="orgcf912f7"><span class="section-number-4">2.1.8</span> olivetti</h4> | |
<div class="outline-text-4" id="text-2-1-8"> | |
<p> | |
Kinda like the Goyo plugin for Vim, is creates a better writing environment by | |
centering the text and removing distractions. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">olivetti</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:defer</span> t | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> olivetti-body-width 85)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org4081cfd" class="outline-4"> | |
<h4 id="org4081cfd"><span class="section-number-4">2.1.9</span> adoc-mode</h4> | |
<div class="outline-text-4" id="text-2-1-9"> | |
<p> | |
This is not an awesome Asciidoc mode, but it's the only one there is. | |
</p> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="orgcdf1ac6"></a>declaration<br /> | |
<div class="outline-text-5" id="text-2-1-9-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">adoc-mode</span> | |
<span style="color: #DAD085;">:init</span> | |
(add-to-list 'auto-mode-alist (cons <span style="color: #8AE234;">"\\.adoc\\'"</span> 'adoc-mode)) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-org19003e4" class="outline-4"> | |
<h4 id="org19003e4"><span class="section-number-4">2.1.10</span> markdown</h4> | |
<div class="outline-text-4" id="text-2-1-10"> | |
<p> | |
Awesome mode, with some features similar to Org. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">markdown-mode</span> | |
<span style="color: #DAD085;">:defer</span> t | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> markdown-enable-wiki-links t) | |
(<span style="color: #96CBFE;">setq</span> markdown-hide-urls t) | |
(<span style="color: #96CBFE;">setq</span> markdown-hide-markup nil)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgb77c19f" class="outline-4"> | |
<h4 id="orgb77c19f"><span class="section-number-4">2.1.11</span> math symbols</h4> | |
<div class="outline-text-4" id="text-2-1-11"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">xah-math-input</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org251bdc3" class="outline-4"> | |
<h4 id="org251bdc3"><span class="section-number-4">2.1.12</span> markdown toc</h4> | |
<div class="outline-text-4" id="text-2-1-12"> | |
<p> | |
Automatically generate markdown table of contents. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">markdown-toc</span> | |
<span style="color: #DAD085;">:defer</span> t | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org4998322" class="outline-3"> | |
<h3 id="org4998322"><span class="section-number-3">2.2</span> Files</h3> | |
<div class="outline-text-3" id="text-2-2"> | |
</div> | |
<div id="outline-container-org8982d5a" class="outline-4"> | |
<h4 id="org8982d5a"><span class="section-number-4">2.2.1</span> super-save</h4> | |
<div class="outline-text-4" id="text-2-2-1"> | |
<p> | |
Maybe I need it in the future. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">super-save</span> | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> super-save-auto-save-when-idle t) | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(super-save-mode +1)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5670beb" class="outline-4"> | |
<h4 id="org5670beb"><span class="section-number-4">2.2.2</span> ranger</h4> | |
<div class="outline-text-4" id="text-2-2-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">ranger</span> | |
<span style="color: #DAD085;">:init</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-cleanup-eagerly t)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-parent-depth 2)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-width-parents 0.12)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-max-parent-width 0.12)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-preview-file t)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-show-literal t)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-width-preview 0.55)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-preview-file nil)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-width-preview 0.55)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq ranger-dont-show-binary t)</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">:config</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(ranger-override-dired-mode t)</span> | |
) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org0743c3c" class="outline-4"> | |
<h4 id="org0743c3c"><span class="section-number-4">2.2.3</span> unkillable scratch</h4> | |
<div class="outline-text-4" id="text-2-2-3"> | |
<p> | |
Maybe I need it in the future. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">unkillable-scratch</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> unkillable-scratch-behavior 'bury) | |
<span style="color: #DAD085;">:config</span> | |
(unkillable-scratch)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org92f07e6" class="outline-4"> | |
<h4 id="org92f07e6"><span class="section-number-4">2.2.4</span> recentf</h4> | |
<div class="outline-text-4" id="text-2-2-4"> | |
<p> | |
Records recent files for later. It's not working right now, I don't know why. | |
</p> | |
<ul class="org-ul"> | |
<li>TODO: make this work.</li> | |
</ul> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">recentf</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(<span style="color: #96CBFE;">setq</span> recentf-mode t)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgd4d2c95" class="outline-4"> | |
<h4 id="orgd4d2c95"><span class="section-number-4">2.2.5</span> Midnight</h4> | |
<div class="outline-text-4" id="text-2-2-5"> | |
<p> | |
Make this built-in mode unload old buffers quickly. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">midnight</span> | |
<span style="color: #DAD085;">:ensure</span> nil | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> clean-buffer-list-delay-general 1) | |
<span style="color: #DAD085;">:config</span> | |
(midnight-mode 1)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org9902248" class="outline-4"> | |
<h4 id="org9902248"><span class="section-number-4">2.2.6</span> vimrc-mode</h4> | |
<div class="outline-text-4" id="text-2-2-6"> | |
<p> | |
It's silly that Emacs don't have a built-in *.vim mode. Maybe because of the | |
rivarly? It's stupid either way. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">vimrc-mode</span> | |
<span style="color: #DAD085;">:init</span> | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\.vim\\'"</span> . vimrc-mode)) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3b08370" class="outline-3"> | |
<h3 id="org3b08370"><span class="section-number-3">2.3</span> Movement</h3> | |
<div class="outline-text-3" id="text-2-3"> | |
</div> | |
<div id="outline-container-orgcbcabff" class="outline-4"> | |
<h4 id="orgcbcabff"><span class="section-number-4">2.3.1</span> smooth scrolling</h4> | |
<div class="outline-text-4" id="text-2-3-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">smooth-scrolling</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgb867d2b" class="outline-4"> | |
<h4 id="orgb867d2b"><span class="section-number-4">2.3.2</span> Ivy</h4> | |
<div class="outline-text-4" id="text-2-3-2"> | |
<p> | |
Some people prefer Helm, but I'm happy with Ivy. It's basically a super-launcher for everything. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">ivy</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:init</span> (<span style="color: #96CBFE;">setq</span> ivy-use-virtual-buffers t) | |
(<span style="color: #96CBFE;">setq</span> ivy-count-format <span style="color: #8AE234;">"(%d/%d) "</span>) | |
(<span style="color: #96CBFE;">setq</span> counsel-bookmark-avoid-dired t) | |
(<span style="color: #96CBFE;">setq</span> counsel-find-file-at-point t) | |
(<span style="color: #96CBFE;">setq</span> counsel-org-goto-display-style 'title) | |
<span style="color: #DAD085;">:config</span> | |
(add-to-list 'ivy-ignore-buffers <span style="color: #8AE234;">"\\*helpful"</span>) | |
(counsel-mode 1) | |
(ivy-mode 1)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga9888a0" class="outline-4"> | |
<h4 id="orga9888a0"><span class="section-number-4">2.3.3</span> Avy</h4> | |
<div class="outline-text-4" id="text-2-3-3"> | |
<p> | |
It's like vim-easymotion. <a href="https://github.com/abo-abo/avy/wiki/defcustom">Options</a>. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">avy</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(<span style="color: #96CBFE;">setq</span> avy-background t) | |
(<span style="color: #96CBFE;">setq</span> avy-keys (nconc (number-sequence ?a ?z) | |
(number-sequence ?1 ?9) | |
'(?0))) | |
(<span style="color: #96CBFE;">setq</span> avy-all-windows nil)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org902cf96" class="outline-4"> | |
<h4 id="org902cf96"><span class="section-number-4">2.3.4</span> easymotion</h4> | |
<div class="outline-text-4" id="text-2-3-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">evil-easymotion</span> | |
<span style="color: #DAD085;">:after</span> evil | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org6f4377d" class="outline-4"> | |
<h4 id="org6f4377d"><span class="section-number-4">2.3.5</span> vertigo</h4> | |
<div class="outline-text-4" id="text-2-3-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">vertigo</span> | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> vertigo-cut-off 9) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc81d4ca" class="outline-4"> | |
<h4 id="orgc81d4ca"><span class="section-number-4">2.3.6</span> shackle</h4> | |
<div class="outline-text-4" id="text-2-3-6"> | |
<p> | |
This puts some windows where I want, but it doesn't always org. It think it does | |
nothing to the org buffers, but I'm not sure. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">shackle</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:delight</span> | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> shackle-rules '((compilation-mode <span style="color: #DAD085;">:noselect</span> t) | |
(<span style="color: #8AE234;">"\\`</span><span style="color: #99CC99;">\\*Occur.*?\\*\\</span><span style="color: #8AE234;">'"</span> <span style="color: #DAD085;">:regexp</span> t <span style="color: #DAD085;">:align</span> t <span style="color: #DAD085;">:select</span> t <span style="color: #DAD085;">:size</span> 0.4) | |
(<span style="color: #8AE234;">"\\`</span><span style="color: #99CC99;">\\*Help.*?\\*\\</span><span style="color: #8AE234;">'"</span> <span style="color: #DAD085;">:regexp</span> t <span style="color: #DAD085;">:align</span> t <span style="color: #DAD085;">:select</span> t <span style="color: #DAD085;">:size</span> 0.4) | |
(<span style="color: #8AE234;">"\\`\\*Register Preview.*?\\*\\'"</span> <span style="color: #DAD085;">:regexp</span> t <span style="color: #DAD085;">:align</span> t <span style="color: #DAD085;">:select</span> t <span style="color: #DAD085;">:size</span> 0.4) | |
(<span style="color: #8AE234;">"\\`\\*Org Select.*?\\*\\'"</span> <span style="color: #DAD085;">:regexp</span> t <span style="color: #DAD085;">:align</span> 'bottom <span style="color: #DAD085;">:select</span> t <span style="color: #DAD085;">:size</span> 0.4) | |
(<span style="color: #8AE234;">"\\`</span><span style="color: #99CC99;">\\*Capture.*?\\*\\</span><span style="color: #8AE234;">'"</span> <span style="color: #DAD085;">:regexp</span> t <span style="color: #DAD085;">:align</span> 'bottom <span style="color: #DAD085;">:select</span> t <span style="color: #DAD085;">:size</span> 0.4) | |
(snippet-mode <span style="color: #DAD085;">:align</span> 'bottom <span style="color: #DAD085;">:select</span> t <span style="color: #DAD085;">:size</span> 0.4) | |
(<span style="color: #8AE234;">"\\`\\*Agenda Commands.*?\\*\\'"</span> <span style="color: #DAD085;">:regexp</span> t <span style="color: #DAD085;">:align</span> 'below <span style="color: #DAD085;">:popup</span> t <span style="color: #DAD085;">:select</span> t <span style="color: #DAD085;">:size</span> 0.4) | |
(<span style="color: #8AE234;">"\\`\\*Org Agenda.*?\\*\\'"</span> <span style="color: #DAD085;">:regexp</span> t <span style="color: #DAD085;">:align</span> 'below <span style="color: #DAD085;">:popup</span> t <span style="color: #DAD085;">:select</span> t <span style="color: #DAD085;">:size</span> 0.4)) | |
shackle-default-rule '(<span style="color: #DAD085;">:select</span> t)) | |
<span style="color: #DAD085;">:config</span> | |
(shackle-mode 1)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org8edc147" class="outline-4"> | |
<h4 id="org8edc147"><span class="section-number-4">2.3.7</span> eyebrowse</h4> | |
<div class="outline-text-4" id="text-2-3-7"> | |
<p> | |
Makes it easy to create several workspaces with diferent window configurations. | |
That's an essential package that should be part of Emacs. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">eyebrowse</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> eyebrowse-new-workspace <span style="color: #8AE234;">"empty buffer"</span>) | |
(<span style="color: #96CBFE;">setq</span> eyebrowse-wrap-around t) | |
(<span style="color: #96CBFE;">setq</span> eyebrowse-new-workspace t) | |
(<span style="color: #96CBFE;">setq</span> eyebrowse-mode-line-style 'smart) | |
(<span style="color: #96CBFE;">setq</span> eyebrowse-switch-back-and-forth t) | |
(<span style="color: #96CBFE;">setq</span> eyebrowse-mode-line-left-delimiter <span style="color: #8AE234;">" [ "</span>) | |
(<span style="color: #96CBFE;">setq</span> eyebrowse-mode-line-right-delimiter <span style="color: #8AE234;">" ] "</span>) | |
(<span style="color: #96CBFE;">setq</span> eyebrowse-mode-line-separator <span style="color: #8AE234;">" | "</span>) | |
<span style="color: #DAD085;">:config</span> | |
(eyebrowse-mode t)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org03d1ecb" class="outline-4"> | |
<h4 id="org03d1ecb"><span class="section-number-4">2.3.8</span> link hint</h4> | |
<div class="outline-text-4" id="text-2-3-8"> | |
<p> | |
Some easier ways to follow links. Doesn't work with markdown. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">link-hint</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:bind</span> | |
(<span style="color: #8AE234;">"C-c l o"</span> . link-hint-open-link) | |
(<span style="color: #8AE234;">"C-c l c"</span> . link-hint-copy-link)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org727ee2f" class="outline-4"> | |
<h4 id="org727ee2f"><span class="section-number-4">2.3.9</span> dumb jump</h4> | |
<div class="outline-text-4" id="text-2-3-9"> | |
<p> | |
Never used it. Maybe later. | |
</p> | |
</div> | |
</div> | |
<div id="outline-container-org2ed440f" class="outline-4"> | |
<h4 id="org2ed440f"><span class="section-number-4">2.3.10</span> Ace-window</h4> | |
<div class="outline-text-4" id="text-2-3-10"> | |
<p> | |
Provides several commands for better window navigation and manipulation. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">ace-window</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgba65db0" class="outline-4"> | |
<h4 id="orgba65db0"><span class="section-number-4">2.3.11</span> Winner Mode</h4> | |
<div class="outline-text-4" id="text-2-3-11"> | |
<p> | |
Window configuration undo. Absolutely essential. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">winner</span> | |
<span style="color: #DAD085;">:ensure</span> nil | |
<span style="color: #DAD085;">:config</span> | |
(winner-mode 1)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org1ac26be" class="outline-4"> | |
<h4 id="org1ac26be"><span class="section-number-4">2.3.12</span> zoom</h4> | |
<div class="outline-text-4" id="text-2-3-12"> | |
<p> | |
Resize windows according to a given proportion. In this case, the golden ratio. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">zoom</span> | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> zoom-size '(0.618 . 0.618)) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3792bcc" class="outline-3"> | |
<h3 id="org3792bcc"><span class="section-number-3">2.4</span> Utilities</h3> | |
<div class="outline-text-3" id="text-2-4"> | |
</div> | |
<div id="outline-container-orgce89eb9" class="outline-4"> | |
<h4 id="orgce89eb9"><span class="section-number-4">2.4.1</span> tabbar</h4> | |
<div class="outline-text-4" id="text-2-4-1"> | |
</div> | |
</div> | |
<div id="outline-container-org81d3390" class="outline-4"> | |
<h4 id="org81d3390"><span class="section-number-4">2.4.2</span> maxima</h4> | |
<div class="outline-text-4" id="text-2-4-2"> | |
<div class="org-src-container"> | |
<pre class="src src-shell">(add-to-list <span style="color: #8AE234;">'load-path "/usr/share/emacs/site-lisp/maxima/")</span> | |
<span style="color: #8AE234;">(when (locate-library "maxima")</span> | |
<span style="color: #8AE234;"> (load-library "maxima")</span> | |
<span style="color: #8AE234;"> (load-library "imaxima")</span> | |
<span style="color: #8AE234;"> (autoload '</span>maxima-mode <span style="color: #8AE234;">"maxima"</span> <span style="color: #8AE234;">"Maxima mode"</span> t) | |
(autoload <span style="color: #8AE234;">'imaxima "imaxima" "Frontend for maxima with Image support" t)</span> | |
<span style="color: #8AE234;"> (autoload '</span>maxima <span style="color: #8AE234;">"maxima"</span> <span style="color: #8AE234;">"Maxima interaction"</span> t) | |
(autoload <span style="color: #8AE234;">'imath-mode "imath" "Imath mode for math formula input" t)</span> | |
<span style="color: #8AE234;"> (setq imaxima-use-maxima-mode-flag t)</span> | |
<span style="color: #8AE234;"> (add-to-list '</span>auto-mode-alist <span style="color: #8AE234;">'("\\.ma[cx]" . maxima-mode)))</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org33a58b7" class="outline-4"> | |
<h4 id="org33a58b7"><span class="section-number-4">2.4.3</span> nov.el</h4> | |
<div class="outline-text-4" id="text-2-4-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">nov</span> | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-nov-font-setup</span> () | |
(face-remap-add-relative 'variable-pitch <span style="color: #DAD085;">:family</span> <span style="color: #8AE234;">"Source Code Pro"</span> | |
<span style="color: #DAD085;">:height</span> 1.0)) | |
(add-hook 'nov-mode-hook 'my-nov-font-setup) | |
(<span style="color: #96CBFE;">setq</span> nov-text-width nil) | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\.epub\\'"</span> . nov-mode)) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org107302f" class="outline-4"> | |
<h4 id="org107302f"><span class="section-number-4">2.4.4</span> origami</h4> | |
<div class="outline-text-4" id="text-2-4-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">origami</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org4a528da" class="outline-4"> | |
<h4 id="org4a528da"><span class="section-number-4">2.4.5</span> which key</h4> | |
<div class="outline-text-4" id="text-2-4-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">which-key</span> | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> which-key-idle-delay 0.35) | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(which-key-mode)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5ec8408" class="outline-4"> | |
<h4 id="org5ec8408"><span class="section-number-4">2.4.6</span> caps lock</h4> | |
<div class="outline-text-4" id="text-2-4-6"> | |
<p> | |
Format help content in a nicer way. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">caps-lock</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org65c3560" class="outline-4"> | |
<h4 id="org65c3560"><span class="section-number-4">2.4.7</span> bench init</h4> | |
<div class="outline-text-4" id="text-2-4-7"> | |
<p> | |
Gives a nice breakdown of the packages that are impacting load time. Keep | |
commented, otherwise it will always run. | |
</p> | |
</div> | |
</div> | |
<div id="outline-container-org9118a97" class="outline-4"> | |
<h4 id="org9118a97"><span class="section-number-4">2.4.8</span> helpful</h4> | |
<div class="outline-text-4" id="text-2-4-8"> | |
<p> | |
Format help content in a nicer way. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">helpful</span> | |
<span style="color: #DAD085;">:defer</span> t | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(<span style="color: #96CBFE;">setq</span> helpful-max-buffers 3)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orge133750" class="outline-3"> | |
<h3 id="orge133750"><span class="section-number-3">2.5</span> Appearance</h3> | |
<div class="outline-text-3" id="text-2-5"> | |
</div> | |
<div id="outline-container-orgd0b305b" class="outline-4"> | |
<h4 id="orgd0b305b"><span class="section-number-4">2.5.1</span> all icons</h4> | |
<div class="outline-text-4" id="text-2-5-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">all-the-icons</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3ddab1b" class="outline-4"> | |
<h4 id="org3ddab1b"><span class="section-number-4">2.5.2</span> powerline</h4> | |
<div class="outline-text-4" id="text-2-5-2"> | |
<ul class="org-ul"> | |
<li>TODO: remove this package and create a custom mode-line-format</li> | |
</ul> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="org21019fd"></a>declaration<br /> | |
<div class="outline-text-5" id="text-2-5-2-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">powerline</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgf5b3c8e"></a>my powerline<br /> | |
<div class="outline-text-5" id="text-2-5-2-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-powerline</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">setq-default</span> mode-line-format | |
'(<span style="color: #8AE234;">"%e"</span> | |
(<span style="color: #DAD085;">:eval</span> | |
(<span style="color: #96CBFE;">let*</span> ((active (powerline-selected-window-active)) | |
(face0 (<span style="color: #96CBFE;">if</span> active 'powerline-active0 'powerline-inactive0)) | |
(lhs (list (powerline-raw (eyebrowse-mode-line-indicator) | |
face0 'l))) | |
(rhs (list (<span style="color: #96CBFE;">if</span> (buffer-modified-p) (powerline-raw <span style="color: #8AE234;">"Modified"</span> face0 'r)) | |
(powerline-fill face0 0))) | |
(center (list (powerline-raw <span style="color: #8AE234;">"%b"</span> face0)))) | |
(concat (powerline-render lhs) | |
(powerline-fill-center face0 (/ (powerline-width center) 2.0)) | |
(powerline-render center) | |
(powerline-fill face0 (powerline-width rhs)) | |
(powerline-render rhs))))))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org810d7ef"></a>powerline :config<br /> | |
<div class="outline-text-5" id="text-2-5-2-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #DAD085;">:config</span> | |
(my-powerline)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-orgdb78ad0" class="outline-4"> | |
<h4 id="orgdb78ad0"><span class="section-number-4">2.5.3</span> Atom Dark Theme</h4> | |
<div class="outline-text-4" id="text-2-5-3"> | |
<p> | |
I like this theme because it's dark, it's beautiful and it keeps my Org headings | |
in the same size. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">atom-dark-theme</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> custom-safe-themes t) | |
<span style="color: #DAD085;">:config</span> | |
(load-theme 'atom-dark)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5505a63" class="outline-3"> | |
<h3 id="org5505a63"><span class="section-number-3">2.6</span> Programming</h3> | |
<div class="outline-text-3" id="text-2-6"> | |
</div> | |
<div id="outline-container-org59a8204" class="outline-4"> | |
<h4 id="org59a8204"><span class="section-number-4">2.6.1</span> paredit</h4> | |
<div class="outline-text-4" id="text-2-6-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">paredit</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgeca024f" class="outline-4"> | |
<h4 id="orgeca024f"><span class="section-number-4">2.6.2</span> smartparens</h4> | |
<div class="outline-text-4" id="text-2-6-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">smartparens</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org1902cb8" class="outline-4"> | |
<h4 id="org1902cb8"><span class="section-number-4">2.6.3</span> ivy yasnippet</h4> | |
<div class="outline-text-4" id="text-2-6-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">ivy-yasnippet</span> | |
<span style="color: #DAD085;">:init</span> | |
(add-to-list 'warning-suppress-types '(yasnippet backquote-change)) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc048859" class="outline-4"> | |
<h4 id="orgc048859"><span class="section-number-4">2.6.4</span> aggresive indent</h4> | |
<div class="outline-text-4" id="text-2-6-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">aggressive-indent</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(global-aggressive-indent-mode 1)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgbe67a29" class="outline-4"> | |
<h4 id="orgbe67a29"><span class="section-number-4">2.6.5</span> Python</h4> | |
<div class="outline-text-4" id="text-2-6-5"> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="org3ab9a89"></a>py-autopep8<br /> | |
<div class="outline-text-5" id="text-2-6-5-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">py-autopep8</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org2b70cc7"></a>pyenv mode auto<br /> | |
<div class="outline-text-5" id="text-2-6-5-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">pyenv-mode-auto</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgbb1dd33"></a>elpy<br /> | |
<div class="outline-text-5" id="text-2-6-5-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">elpy</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orga47c40e"></a>company jedi<br /> | |
<div class="outline-text-5" id="text-2-6-5-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">company-jedi</span> | |
<span style="color: #DAD085;">:init</span> | |
(add-hook 'python-mode-hook 'jedi:setup) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-org4e5ea02" class="outline-4"> | |
<h4 id="org4e5ea02"><span class="section-number-4">2.6.6</span> yasnippets</h4> | |
<div class="outline-text-4" id="text-2-6-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">yasnippet</span> | |
<span style="color: #DAD085;">:defer</span> 1 | |
<span style="color: #DAD085;">:diminish</span> yas-minor-mode | |
<span style="color: #DAD085;">:config</span> (yas-global-mode)) | |
(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">yasnippet-snippets</span> | |
<span style="color: #DAD085;">:after</span> yasnippet | |
<span style="color: #DAD085;">:config</span> (yasnippet-snippets-initialize)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org7d7d245" class="outline-4"> | |
<h4 id="org7d7d245"><span class="section-number-4">2.6.7</span> company mode</h4> | |
<div class="outline-text-4" id="text-2-6-7"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">company</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(<span style="color: #96CBFE;">setq</span> company-idle-delay 0) | |
(<span style="color: #96CBFE;">setq</span> company-minimum-prefix-length 3) | |
(global-company-mode t)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga1bd4b9" class="outline-4"> | |
<h4 id="orga1bd4b9"><span class="section-number-4">2.6.8</span> company quick-help</h4> | |
<div class="outline-text-4" id="text-2-6-8"> | |
<p> | |
#+END<sub>SRC</sub> | |
</p> | |
</div> | |
</div> | |
<div id="outline-container-orgfeb8aae" class="outline-4"> | |
<h4 id="orgfeb8aae"><span class="section-number-4">2.6.9</span> indent guides</h4> | |
<div class="outline-text-4" id="text-2-6-9"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">highlight-indent-guides</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga9e9342" class="outline-3"> | |
<h3 id="orga9e9342"><span class="section-number-3">2.7</span> Big Packages</h3> | |
<div class="outline-text-3" id="text-2-7"> | |
<p> | |
These are packages that affect the entire system. | |
</p> | |
</div> | |
<div id="outline-container-org58a9ef3" class="outline-4"> | |
<h4 id="org58a9ef3"><span class="section-number-4">2.7.1</span> Org</h4> | |
<div class="outline-text-4" id="text-2-7-1"> | |
<p> | |
Everything org-related. This is a long configuration because this is my | |
main mode. | |
</p> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="org62bf410"></a>Org Asciidoc<br /> | |
<div class="outline-text-5" id="text-2-7-1-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">ox-asciidoc</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org7acd4f9"></a>Org Main<br /> | |
<ol class="org-ol"> | |
<li><a id="org91a01ba"></a>org declaration<br /> | |
<div class="outline-text-6" id="text-2-7-1-2-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">org</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org15b7ff7"></a>org basic config<br /> | |
<div class="outline-text-6" id="text-2-7-1-2-2"> | |
<p> | |
Too much to document right now. Just <code>C-h v</code> to see what each variable does. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #DAD085;">:config</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">ORG CLOCK</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq org-clock-idle-time 5)</span> | |
(<span style="color: #96CBFE;">setq</span> org-clock-idle-time nil) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Resume clocking task when emacs is restarted</span> | |
(org-clock-persistence-insinuate) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Save the running clock and all clock history when exiting Emacs, load it on startup</span> | |
(<span style="color: #96CBFE;">setq</span> org-clock-persist t) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Resume clocking task on clock-in if the clock is open</span> | |
(<span style="color: #96CBFE;">setq</span> org-clock-in-resume t) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Do not prompt to resume an active clock, just resume it</span> | |
(<span style="color: #96CBFE;">setq</span> org-clock-persist-query-resume nil) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Change tasks to whatever when clocking in</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq org-clock-in-switch-to-state "NEXT")</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Save clock data and state changes and notes in the LOGBOOK drawer</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq org-clock-into-drawer t)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Sometimes I change tasks I'm clocking quickly - this removes clocked tasks</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">with 0:00 duration</span> | |
(<span style="color: #96CBFE;">setq</span> org-clock-out-remove-zero-time-clocks t) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Clock out when moving task to a done state</span> | |
(<span style="color: #96CBFE;">setq</span> org-clock-out-when-done t) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Enable auto clock resolution for finding open clocks</span> | |
(<span style="color: #96CBFE;">setq</span> org-clock-auto-clock-resolution (<span style="color: #96CBFE;">quote</span> when-no-clock-is-running)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Include current clocking task in clock reports</span> | |
(<span style="color: #96CBFE;">setq</span> org-clock-report-include-clocking-task t) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">use pretty things for the clocktable</span> | |
(<span style="color: #96CBFE;">setq</span> org-pretty-entities t) | |
(<span style="color: #96CBFE;">setq</span> org-export-html-postamble nil) | |
(<span style="color: #96CBFE;">setq</span> org-src-preserve-indentation t) | |
(<span style="color: #96CBFE;">setq</span> org-edit-src-content-indentation 0) | |
(<span style="color: #96CBFE;">setq</span> org-indent-mode t) | |
(remove-hook 'org-cycle-hook | |
#'org-optimize-window-after-visibility-change) | |
(<span style="color: #96CBFE;">setq</span> org-link-frame-setup ( quote ((file . find-file)))) | |
(<span style="color: #96CBFE;">setq</span> org-allow-promoting-top-level-subtree t) | |
(<span style="color: #96CBFE;">setq</span> org-image-actual-width nil) | |
(<span style="color: #96CBFE;">setq</span> org-use-speed-commands t) | |
(<span style="color: #96CBFE;">setq</span> org-cycle-level-faces t) | |
(<span style="color: #96CBFE;">setq</span> org-fontify-done-headline t) | |
(<span style="color: #96CBFE;">setq</span> org-return-follows-link t) | |
(<span style="color: #96CBFE;">setq</span> org-fontify-whole-heading-line t) | |
(<span style="color: #96CBFE;">setq</span> org-hide-emphasis-markers t) | |
(<span style="color: #96CBFE;">setq</span> org-startup-indented t) | |
(<span style="color: #96CBFE;">setq</span> org-replace-disputed-keys t) | |
(<span style="color: #96CBFE;">setq</span> org-ellipsis <span style="color: #8AE234;">"."</span>) | |
(<span style="color: #96CBFE;">setq</span> org-babel-temporary-directory <span style="color: #8AE234;">"~/.emacs.d/babel-temp"</span>) | |
(<span style="color: #96CBFE;">setq</span> org-src-tab-acts-natively nil) | |
(<span style="color: #96CBFE;">setq</span> org-src-fontify-natively t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org418a89e"></a>org todo config<br /> | |
<div class="outline-text-6" id="text-2-7-1-2-3"> | |
<p> | |
My todo states. You can have as many as you want. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">setq</span> org-todo-keywords | |
'((sequence <span style="color: #8AE234;">"TODO"</span> <span style="color: #8AE234;">"|"</span> <span style="color: #8AE234;">"DONE"</span> <span style="color: #8AE234;">"MODIFIED"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org2a7124b"></a>org tags config<br /> | |
<div class="outline-text-6" id="text-2-7-1-2-4"> | |
<p> | |
Tag alignment an tag list. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq</span> org-tags-column -90) | |
(<span style="color: #96CBFE;">setq</span> org-agenda-tags-column -80) | |
(<span style="color: #96CBFE;">setq</span> org-tag-alist '((<span style="color: #DAD085;">:startgroup</span>) | |
(<span style="color: #8AE234;">"@org"</span> . ?o) | |
(<span style="color: #8AE234;">"@unif"</span> . ?u) | |
(<span style="color: #8AE234;">"@blog"</span> . ?n) | |
(<span style="color: #8AE234;">"@fami"</span> . ?f) | |
(<span style="color: #8AE234;">"@heal"</span> . ?s) | |
(<span style="color: #8AE234;">"@tech"</span> . ?t) | |
(<span style="color: #8AE234;">"@grph"</span> . ?t) | |
(<span style="color: #8AE234;">"@prog"</span> . ?p) | |
(<span style="color: #8AE234;">"@emcs"</span> . ?e) | |
(<span style="color: #8AE234;">"@home"</span> . ?h) | |
(<span style="color: #DAD085;">:endgroup</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org9763d58"></a>org refile config<br /> | |
<div class="outline-text-6" id="text-2-7-1-2-5"> | |
<p> | |
The targets of the <code>org-refile</code> command. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq</span> org-refile-targets (<span style="color: #96CBFE;">quote</span> ((<span style="color: #8AE234;">"/home/BigHome/Documents/org/Literatura/omeninoinvisivel.org"</span> <span style="color: #DAD085;">:maxlevel</span> . 5)))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org8bd6c15"></a>org file apps<br /> | |
<div class="outline-text-6" id="text-2-7-1-2-6"> | |
<p> | |
The default handlers for different file types. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq</span> org-file-apps (<span style="color: #96CBFE;">quote</span> ((auto-mode . emacs) | |
(<span style="color: #8AE234;">"\\.mm\\'"</span> . default) | |
(<span style="color: #8AE234;">"\\.x?html?\\'"</span> . default) | |
(<span style="color: #8AE234;">"\\.jpg\\'"</span> . <span style="color: #8AE234;">"viewnior %s"</span>) | |
(<span style="color: #8AE234;">"\\.pdf\\'"</span> . <span style="color: #8AE234;">"zathura %s"</span>)))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgbaee899"></a>org easy templates<br /> | |
<div class="outline-text-6" id="text-2-7-1-2-7"> | |
<p> | |
Easy templates | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-to-list 'org-structure-template-alist '(<span style="color: #8AE234;">"cc"</span> <span style="color: #8AE234;">"#+BEGIN_SRC C\n?\n#+END_SRC"</span>)) | |
(add-to-list 'org-structure-template-alist '(<span style="color: #8AE234;">"sh"</span> <span style="color: #8AE234;">"#+BEGIN_SRC shell :tangle yes\n?\n#+END_SRC"</span>)) | |
(add-to-list 'org-structure-template-alist '(<span style="color: #8AE234;">"py"</span> <span style="color: #8AE234;">"#+BEGIN_SRC python :tangle yes\n?\n#+END_SRC"</span>)) | |
(add-to-list 'org-structure-template-alist '(<span style="color: #8AE234;">"ll"</span> <span style="color: #8AE234;">"\\begin{equation*}\n\\begin{split}\n?\n\\end{split}\n\\end{equation*}"</span>)) | |
(add-to-list 'org-structure-template-alist '(<span style="color: #8AE234;">"use"</span> <span style="color: #8AE234;">"#+BEGIN_SRC emacs-lisp :tangle yes\n(use-package ?\n:ensure t)\n#+END_SRC"</span>)) | |
(add-to-list 'org-structure-template-alist '(<span style="color: #8AE234;">"el"</span> <span style="color: #8AE234;">"#+BEGIN_SRC emacs-lisp :tangle yes\n?\n#+END_SRC"</span>)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org7c995c5"></a>org capture templates config<br /> | |
<div class="outline-text-6" id="text-2-7-1-2-8"> | |
<p> | |
These are all my capture templates that are acessed with <code>org-capture</code> (I use <code>counsel-org-capture</code>). | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">org capture templates</span> | |
(<span style="color: #96CBFE;">setq</span> org-capture-templates | |
'((<span style="color: #8AE234;">"s"</span> <span style="color: #8AE234;">"Sistemas"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Estudo/Unifacs/PrimeiroSemestre/Matérias/Sistemas/Notas/NotasDeSistemas.org"</span> <span style="color: #8AE234;">"Notas de Sistemas"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"a"</span> <span style="color: #8AE234;">"Algoritmos"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Estudo/Unifacs/PrimeiroSemestre/Matérias/Algoritmos/Notas/NotasDeAlgoritmos.org"</span> <span style="color: #8AE234;">"Notas de Algoritmos"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"m"</span> <span style="color: #8AE234;">"Matemática"</span> entry(file+headline <span style="color: #8AE234;">"~/org/Estudo/Unifacs/PrimeiroSemestre/Matérias/Matemática/Notas/NotasDeMatemática.org"</span> <span style="color: #8AE234;">"Notas de Matemática"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"c"</span> <span style="color: #8AE234;">"Comunicação"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Estudo/Unifacs/PrimeiroSemestre/Matérias/Comunicação/Notas/NotasDeComunicação.org"</span> <span style="color: #8AE234;">"Notas de Comunicação"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"f"</span> <span style="color: #8AE234;">"Fundamentos"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Estudo/Unifacs/PrimeiroSemestre/Matérias/Fundamentos/Notas/NotasDeFundamentos.org"</span> <span style="color: #8AE234;">"Notas de Fundamentos"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"i"</span> <span style="color: #8AE234;">"Prog Ideas"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Notes/ideias.org"</span> <span style="color: #8AE234;">"Prog Ideas"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"y"</span> <span style="color: #8AE234;">"Story Ideas"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Notes/ideias.org"</span> <span style="color: #8AE234;">"Story Ideas"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"s"</span> <span style="color: #8AE234;">"Miscellaneous Ideas"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Notes/ideias.org"</span> <span style="color: #8AE234;">"Miscellaneous Ideas"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"x"</span> <span style="color: #8AE234;">"Fix Notes"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Notes/tecnologia.org"</span> <span style="color: #8AE234;">"Fix Notes"</span>) <span style="color: #8AE234;">"* %<[%a, %d/%m]> %i%?"</span>) | |
(<span style="color: #8AE234;">"n"</span> <span style="color: #8AE234;">"Todo.i"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Literatura/omeninoinvisivel.org"</span> <span style="color: #8AE234;">"Todo.i"</span>) <span style="color: #8AE234;">"* TODO %i%?\n%^t"</span>) | |
(<span style="color: #8AE234;">"t"</span> <span style="color: #8AE234;">"Todos"</span> entry (file+headline <span style="color: #8AE234;">"~/org/Compromissos/agenda.org"</span> <span style="color: #8AE234;">"Todos"</span>) <span style="color: #8AE234;">"* TODO %i%?\nDEADLINE: %^t"</span>)))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</li> | |
<li><a id="org40cd0c5"></a>Org-bullets<br /> | |
<div class="outline-text-5" id="text-2-7-1-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">org-bullets</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:init</span> | |
(add-hook 'org-mode-hook 'org-bullets-mode) | |
(<span style="color: #96CBFE;">setq</span> org-bullets-bullet-list (<span style="color: #96CBFE;">quote</span> (<span style="color: #8AE234;">"◐"</span> <span style="color: #8AE234;">"◑"</span> <span style="color: #8AE234;">"◒"</span> <span style="color: #8AE234;">"◓"</span> <span style="color: #8AE234;">"☉"</span> <span style="color: #8AE234;">"◎"</span> <span style="color: #8AE234;">"◉"</span>)))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org273226a"></a>Org cliplink<br /> | |
<div class="outline-text-5" id="text-2-7-1-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">org-cliplink</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgb7e5b12"></a>Org drill<br /> | |
<div class="outline-text-5" id="text-2-7-1-5"> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="org10a3c67"></a>Org drill table<br /> | |
<div class="outline-text-6" id="text-2-7-1-5-1"> | |
</div> | |
</li> | |
</ol> | |
</li> | |
<li><a id="orgb3521d8"></a>Org Noter<br /> | |
<div class="outline-text-5" id="text-2-7-1-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">org-noter</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgfeb9efe"></a>Org Wiki<br /> | |
<div class="outline-text-5" id="text-2-7-1-7"> | |
</div> | |
</li> | |
<li><a id="orgea70d0a"></a>Org Web Tools<br /> | |
<div class="outline-text-5" id="text-2-7-1-8"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">org-web-tools</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgc978b9d"></a>outline toc<br /> | |
<div class="outline-text-5" id="text-2-7-1-9"> | |
</div> | |
</li> | |
<li><a id="orga4c89c7"></a>Htmlize<br /> | |
<div class="outline-text-5" id="text-2-7-1-10"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">htmlize</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-org863a304" class="outline-4"> | |
<h4 id="org863a304"><span class="section-number-4">2.7.2</span> Evil</h4> | |
<div class="outline-text-4" id="text-2-7-2"> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="org9fc557e"></a>Evil Main<br /> | |
<div class="outline-text-5" id="text-2-7-2-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">evil</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> evil-want-integration nil) | |
(<span style="color: #96CBFE;">setq</span> evil-want-fine-undo t) | |
<span style="color: #DAD085;">:config</span> | |
(evil-mode 1) | |
(evil-set-initial-state 'lisp-interaction-mode 'normal)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgdf64bcb"></a>Evil Org<br /> | |
<div class="outline-text-5" id="text-2-7-2-2"> | |
<p> | |
Better Org mode evil keys. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">evil-org</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:delight</span> | |
<span style="color: #DAD085;">:after</span> evil | |
<span style="color: #DAD085;">:init</span> | |
(add-hook 'org-mode-hook 'evil-org-mode) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-hook 'evil-org-mode-hook</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(lambda ()</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(evil-org-set-key-theme)))</span> | |
<span style="color: #DAD085;">:config</span> | |
(<span style="color: #96CBFE;">require</span> '<span style="color: #99CC99;">evil-org-agenda</span>) | |
(evil-org-agenda-set-keys)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org249ac62"></a>Evil Commentary<br /> | |
<div class="outline-text-5" id="text-2-7-2-3"> | |
<p> | |
Like the tpop Vim plugin. Very useful. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">evil-commentary</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(evil-commentary-mode 1)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgcb750cb"></a>Evil Collection<br /> | |
<div class="outline-text-5" id="text-2-7-2-4"> | |
<p> | |
This package provides extra Vim-like keybindings for my major modes. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">evil-collection</span> | |
<span style="color: #DAD085;">:after</span> evil | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(global-evil-surround-mode t) | |
(evil-collection-init)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgacdc411"></a>Evil Escape<br /> | |
<div class="outline-text-5" id="text-2-7-2-5"> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-org5976314" class="outline-4"> | |
<h4 id="org5976314"><span class="section-number-4">2.7.3</span> General</h4> | |
<div class="outline-text-4" id="text-2-7-3"> | |
<p> | |
General is one of the most important packages I have. All my keybindings are | |
made trough it. The default Emacs way is extremely cumbersome. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">general</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
(general-evil-setup t)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgaa3dbd9" class="outline-4"> | |
<h4 id="orgaa3dbd9"><span class="section-number-4">2.7.4</span> Auto-Update</h4> | |
<div class="outline-text-4" id="text-2-7-4"> | |
<p> | |
Updates my packages so I don't have to | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">auto-package-update</span> | |
<span style="color: #DAD085;">:init</span> | |
(<span style="color: #96CBFE;">setq</span> auto-package-update-interval 14) | |
(<span style="color: #96CBFE;">setq</span> auto-package-update-prompt-before-update t) | |
(<span style="color: #96CBFE;">setq</span> auto-package-update-delete-old-versions t) | |
(<span style="color: #96CBFE;">setq</span> auto-package-update-hide-results t) | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org62d82ce" class="outline-2"> | |
<h2 id="org62d82ce"><span class="section-number-2">3</span> Keybindings</h2> | |
<div class="outline-text-2" id="text-3"> | |
</div> | |
<div id="outline-container-orgcc08d71" class="outline-3"> | |
<h3 id="orgcc08d71"><span class="section-number-3">3.1</span> SPC</h3> | |
<div class="outline-text-3" id="text-3-1"> | |
<p> | |
I saw that Spacemacs uses <code><space></code> as a leader and I thought it was a good idea, | |
so I took it. | |
</p> | |
</div> | |
<div id="outline-container-org4f6666c" class="outline-4"> | |
<h4 id="org4f6666c"><span class="section-number-4">3.1.1</span> spc pfx</h4> | |
<div class="outline-text-4" id="text-3-1-1"> | |
<p> | |
Here I create my leader key. The "override" bit should make it supersede any | |
mode, but sometimes it fails. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">general-create-definer</span> leader <span style="color: #DAD085;">:prefix</span> <span style="color: #8AE234;">"SPC"</span>) | |
(<span style="color: #96CBFE;">leader</span> | |
<span style="color: #DAD085;">:states</span> '(normal visual) | |
<span style="color: #DAD085;">:keymaps</span> 'override | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org9b55e03" class="outline-4"> | |
<h4 id="org9b55e03"><span class="section-number-4">3.1.2</span> hydras</h4> | |
<div class="outline-text-4" id="text-3-1-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"DEL" 'hydra-fill</span> | |
<span style="color: #8AE234;">"a"</span> 'hydra-org-clock/body | |
<span style="color: #8AE234;">"p"</span> 'hydra-paredit/body | |
<span style="color: #8AE234;">"s"</span> 'hydra-window-resize/body | |
<span style="color: #8AE234;">"DEL"</span> 'hydra-fill/body | |
<span style="color: #8AE234;">"q"</span> 'hydra-master/body | |
<span style="color: #8AE234;">"h"</span> 'hydra-help/body | |
<span style="color: #8AE234;">"x"</span> 'hydra-minor-commands/body | |
<span style="color: #8AE234;">"c"</span> 'hydra-major-commands/body | |
<span style="color: #8AE234;">"F"</span> 'hydra-fountain-export-dispatch/body | |
<span style="color: #8AE234;">"f"</span> 'hydra-fountain/body | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgba41ce0" class="outline-4"> | |
<h4 id="orgba41ce0"><span class="section-number-4">3.1.3</span> text spc keys</h4> | |
<div class="outline-text-4" id="text-3-1-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"r"</span> 'my-ranger | |
<span style="color: #8AE234;">"v"</span> 'my-visualg | |
<span style="color: #8AE234;">"="</span> 'evil-indent | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org0e07aed" class="outline-4"> | |
<h4 id="org0e07aed"><span class="section-number-4">3.1.4</span> windows spc keys</h4> | |
<div class="outline-text-4" id="text-3-1-4"> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="org2fd2bdf"></a>window commands<br /> | |
<div class="outline-text-5" id="text-3-1-4-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"w"</span> 'hydra-window/body | |
<span style="color: #8AE234;">"H"</span> 'evil-window-move-far-left | |
<span style="color: #8AE234;">"K"</span> 'evil-window-move-very-top | |
<span style="color: #8AE234;">"J"</span> 'evil-window-move-very-bottom | |
<span style="color: #8AE234;">"L"</span> 'evil-window-move-far-right | |
<span style="color: #8AE234;">"0"</span> 'delete-window | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"dr" 'recover-session</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"dr" 'desktop-read</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"ds" 'desktop-save-in-desktop-dir</span> | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orge5e598f"></a>eyebrowse commands<br /> | |
<div class="outline-text-5" id="text-3-1-4-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> <span style="color: #8AE234;">"1"</span> 'eyebrowse-switch-to-window-config-1 | |
<span style="color: #8AE234;">"2"</span> 'eyebrowse-switch-to-window-config-2 | |
<span style="color: #8AE234;">"3"</span> 'eyebrowse-switch-to-window-config-3 | |
<span style="color: #8AE234;">"4"</span> 'eyebrowse-switch-to-window-config-4 | |
<span style="color: #8AE234;">"5"</span> 'eyebrowse-switch-to-window-config-5 | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-org169b05e" class="outline-4"> | |
<h4 id="org169b05e"><span class="section-number-4">3.1.5</span> buffer spc keys</h4> | |
<div class="outline-text-4" id="text-3-1-5"> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="org46e28b2"></a>buffer quickies<br /> | |
<div class="outline-text-6" id="text-3-1-5-0-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"e"</span> 'my-term | |
<span style="color: #8AE234;">"y"</span> 'term-bpython3 | |
<span style="color: #8AE234;">"t"</span> 'last-buffer | |
<span style="color: #8AE234;">"k"</span> 'kill-this-buffer | |
<span style="color: #8AE234;">"n"</span> 'ivy-switch-buffer | |
<span style="color: #8AE234;">"q"</span> 'kill-other-buffers | |
<span style="color: #8AE234;">"Q"</span> 'kill-buffer-and-window | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org0d2de3e"></a>buffers and files<br /> | |
<div class="outline-text-6" id="text-3-1-5-0-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"bx"</span> 'cal-c | |
<span style="color: #8AE234;">"bl"</span> 'my-copy-dir | |
<span style="color: #8AE234;">"bw"</span> 'write-file | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"z" 'counsel-fzf</span> | |
<span style="color: #8AE234;">"R"</span> 'rename-buffer | |
<span style="color: #8AE234;">"br"</span> 'counsel-recentf | |
<span style="color: #8AE234;">"bd"</span> 'clean-buffer-list | |
<span style="color: #8AE234;">"bf"</span> 'counsel-find-file | |
<span style="color: #8AE234;">"j"</span> 'counsel-find-file | |
<span style="color: #8AE234;">"bc"</span> 'clone-indirect-buffer | |
<span style="color: #8AE234;">"bC"</span> 'clone-indirect-buffer | |
<span style="color: #8AE234;">"bp"</span> 'my-put-file-name-on-clipboard | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-org33f55b1" class="outline-4"> | |
<h4 id="org33f55b1"><span class="section-number-4">3.1.6</span> bookmarks spc keys</h4> | |
<div class="outline-text-4" id="text-3-1-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org744be04" class="outline-4"> | |
<h4 id="org744be04"><span class="section-number-4">3.1.7</span> setttings spc keys</h4> | |
<div class="outline-text-4" id="text-3-1-7"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"SPC"</span> 'counsel-M-x | |
<span style="color: #8AE234;">"m"</span> 'hydra-modes/body | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgf6479a6" class="outline-4"> | |
<h4 id="orgf6479a6"><span class="section-number-4">3.1.8</span> org spc keys</h4> | |
<div class="outline-text-4" id="text-3-1-8"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"o"</span> 'hydra-org/body | |
[tab] 'outline-hide-subtree | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgef85e34" class="outline-3"> | |
<h3 id="orgef85e34"><span class="section-number-3">3.2</span> miscelanneous</h3> | |
<div class="outline-text-3" id="text-3-2"> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="org73cac02"></a>movement and markdown<br /> | |
<div class="outline-text-5" id="text-3-2-0-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mo" 'init-tangle</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mO" 'init-reload</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mc" 'execute-c-program</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mb" 'markdown-insert-bold</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mj" 'dumb-jump-go</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mi" 'markdown-insert-image</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"me" 'markdown-insert-italic</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mu" 'markdown-toggle-url-hiding</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mh" 'markdown-toggle-markup-hiding</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mt" 'markdown-toggle-inline-images</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"mx" 'flycheck-explain-error-at-point</span> | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
<div id="outline-container-org8cfec4a" class="outline-4"> | |
<h4 id="org8cfec4a"><span class="section-number-4">3.2.1</span> movement</h4> | |
<div class="outline-text-4" id="text-3-2-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">")"</span> 'evilem-motion-forward-sentence-begin | |
<span style="color: #8AE234;">"("</span> 'evilem-motion-backward-sentence-begin | |
<span style="color: #8AE234;">"z"</span> 'counsel-bookmark | |
<span style="color: #8AE234;">"u"</span> 'vertigo-jump-up | |
<span style="color: #8AE234;">"d"</span> 'vertigo-jump-down | |
<span style="color: #8AE234;">"D"</span> 'vertigo-set-digit-argument | |
<span style="color: #8AE234;">"i"</span> 'link-hint-open-link | |
<span style="color: #8AE234;">"I"</span> 'link-to-other) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org0651d58" class="outline-3"> | |
<h3 id="org0651d58"><span class="section-number-3">3.3</span> normal keys</h3> | |
<div class="outline-text-3" id="text-3-3"> | |
<p> | |
These keys are bound only to the Evil normal mode. They won't work without the | |
Evil mode, and won't work on insert, replace or visual. | |
</p> | |
</div> | |
<div id="outline-container-org310576b" class="outline-4"> | |
<h4 id="org310576b"><span class="section-number-4">3.3.1</span> normal mode define key</h4> | |
<div class="outline-text-4" id="text-3-3-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">general-nmap</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org9d5ef38" class="outline-4"> | |
<h4 id="org9d5ef38"><span class="section-number-4">3.3.2</span> normal hydras</h4> | |
<div class="outline-text-4" id="text-3-3-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"m"</span> 'hydra-goto-file/body | |
<span style="color: #8AE234;">";"</span> 'hydra-org-noter/body | |
<span style="color: #8AE234;">"<menu>"</span> 'hydra-master/body | |
<span style="color: #8AE234;">"DEL"</span> 'hydra-text-motions/body | |
<span style="color: #8AE234;">","</span> 'hydra-quick-navigation/body | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgad1ccaf" class="outline-4"> | |
<h4 id="orgad1ccaf"><span class="section-number-4">3.3.3</span> normal mode motion keys</h4> | |
<div class="outline-text-4" id="text-3-3-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"C-l"</span> 'redraw-display | |
<span style="color: #8AE234;">"M-t"</span> 'last-buffer | |
<span style="color: #8AE234;">"gm"</span> 'evil-set-marker | |
<span style="color: #8AE234;">"gM"</span> 'evil-window-middle | |
<span style="color: #8AE234;">"gL"</span> 'evil-window-bottom | |
<span style="color: #8AE234;">"gH"</span> 'evil-window-top | |
<span style="color: #8AE234;">"g9"</span> 'evil-middle-of-visual-line | |
<span style="color: #8AE234;">"}"</span> 'my-paragraph-forward | |
<span style="color: #8AE234;">"{"</span> 'my-paragraph-backwards | |
<span style="color: #8AE234;">"]"</span> 'evil-forward-section-begin | |
<span style="color: #8AE234;">"["</span> 'evil-backward-section-begin | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org6a4d43e" class="outline-4"> | |
<h4 id="org6a4d43e"><span class="section-number-4">3.3.4</span> normal mode text keys</h4> | |
<div class="outline-text-4" id="text-3-3-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"C-;"</span> 'jump-to-point-and-show | |
<span style="color: #8AE234;">"Y"</span> <span style="color: #8AE234;">"yg_"</span> | |
<span style="color: #8AE234;">"ge"</span> <span style="color: #8AE234;">"g_"</span> | |
<span style="color: #8AE234;">"gr"</span> <span style="color: #8AE234;">"vg_"</span> | |
<span style="color: #8AE234;">"zn"</span> 'org-hide-other | |
<span style="color: #8AE234;">"zi"</span> 'outline-show-all | |
<span style="color: #8AE234;">"S"</span> 'evil-destroy-line | |
[?\t] 'evil-toggle-fold | |
<span style="color: #8AE234;">"C-a"</span> 'evil-record-macro | |
<span style="color: #8AE234;">"c"</span> 'evil-destroy-change | |
<span style="color: #8AE234;">"gi"</span> 'my-above-line-macro | |
<span style="color: #8AE234;">"go"</span> 'my-below-line-macro | |
<span style="color: #8AE234;">"j"</span> 'evil-next-visual-line | |
<span style="color: #8AE234;">"k"</span> 'evil-previous-visual-line | |
[escape] 'my-quiet-save-buffer | |
<span style="color: #8AE234;">"gt"</span> 'xah-title-case-region-or-line | |
<span style="color: #8AE234;">"f"</span> 'evilem-motion-forward-word-begin | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"f" 'evil-goto-char</span> | |
<span style="color: #8AE234;">"F"</span> 'evilem-motion-backward-word-begin) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org1b553fd" class="outline-4"> | |
<h4 id="org1b553fd"><span class="section-number-4">3.3.5</span> normal override keys</h4> | |
<div class="outline-text-4" id="text-3-3-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> <span style="color: #DAD085;">:keymaps</span> 'override | |
</pre> | |
</div> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="orga9038fe"></a>Windows<br /> | |
<div class="outline-text-5" id="text-3-3-5-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"ç"</span> 'ace-window | |
<span style="color: #8AE234;">"C-ç"</span> 'ace-window | |
<span style="color: #8AE234;">"M--"</span> 'winner-undo | |
<span style="color: #8AE234;">"M-="</span> 'winner-redo | |
<span style="color: #8AE234;">"M-k"</span> 'windmove-up | |
<span style="color: #8AE234;">"M-h"</span> 'windmove-left | |
<span style="color: #8AE234;">"M-j"</span> 'windmove-down | |
<span style="color: #8AE234;">"M-l"</span> 'windmove-right | |
<span style="color: #8AE234;">"C-."</span> 'evil-window-next | |
<span style="color: #8AE234;">"C-,"</span> 'evil-window-prev | |
<span style="color: #8AE234;">"M-w"</span> 'eyebrowse-next-window-config | |
<span style="color: #8AE234;">"M-q"</span> 'eyebrowse-prev-window-config | |
<span style="color: #8AE234;">"M-e"</span> 'eyebrowse-last-window-config | |
<span style="color: #8AE234;">"M-1"</span> 'eyebrowse-switch-to-window-config-1 | |
<span style="color: #8AE234;">"M-2"</span> 'eyebrowse-switch-to-window-config-2 | |
<span style="color: #8AE234;">"M-3"</span> 'eyebrowse-switch-to-window-config-3 | |
<span style="color: #8AE234;">"M-4"</span> 'eyebrowse-switch-to-window-config-4 | |
<span style="color: #8AE234;">"M-5"</span> 'eyebrowse-switch-to-window-config-5 | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org211b9d1"></a>Buffers<br /> | |
<div class="outline-text-5" id="text-3-3-5-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #8AE234;">"C-j"</span> 'avy-goto-line-below | |
<span style="color: #8AE234;">"C-k"</span> 'avy-goto-line-above | |
<span style="color: #8AE234;">"M-n"</span> 'xah-next-user-buffer | |
<span style="color: #8AE234;">"M-p"</span> 'xah-previous-user-buffer | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org2927e54"></a>Commands<br /> | |
<div class="outline-text-5" id="text-3-3-5-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"C-s" 'ora-swiper</span> | |
<span style="color: #8AE234;">"<XF86Calculator>"</span> 'quick-calc | |
<span style="color: #8AE234;">"C-s"</span> 'counsel-grep-or-swiper | |
<span style="color: #8AE234;">"M-a"</span> 'counsel-grep | |
<span style="color: #8AE234;">"M-s"</span> 'last-buffer | |
<span style="color: #8AE234;">"C-SPC"</span> 'caps-lock-mode | |
<span style="color: #8AE234;">"M-i"</span> 'evil-jump-forward | |
<span style="color: #8AE234;">"M-o"</span> 'evil-jump-backward | |
<span style="color: #8AE234;">"C-="</span> 'evil-numbers/inc-at-pt | |
<span style="color: #8AE234;">"C--"</span> 'evil-numbers/dec-at-pt) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
</div> | |
<div id="outline-container-orgaa4dbd6" class="outline-3"> | |
<h3 id="orgaa4dbd6"><span class="section-number-3">3.4</span> normal operator</h3> | |
<div class="outline-text-3" id="text-3-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">general-omap</span> | |
<span style="color: #8AE234;">"f"</span> 'evilem-motion-forward-word-begin | |
<span style="color: #8AE234;">"F"</span> 'evilem-motion-backward-word-begin) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org910fd5f" class="outline-3"> | |
<h3 id="org910fd5f"><span class="section-number-3">3.5</span> insert keys</h3> | |
<div class="outline-text-3" id="text-3-5"> | |
<p> | |
These keys are bound only to the Evil <code>insert</code> mode. They | |
won't work without the Evil mode, and won't work on normal, | |
replace or visual. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(general-define-key | |
<span style="color: #DAD085;">:states</span> '(insert) | |
<span style="color: #8AE234;">"C-j"</span> 'avy-goto-line-below | |
<span style="color: #8AE234;">"C-k"</span>'avy-goto-line-above | |
<span style="color: #8AE234;">"<XF86Calculator>"</span> 'quick-calc | |
<span style="color: #8AE234;">"C-SPC"</span> 'caps-lock-mode | |
<span style="color: #8AE234;">"C-ç"</span> 'ace-window | |
<span style="color: #8AE234;">"C-d"</span> 'yas-expand | |
<span style="color: #8AE234;">"C-a"</span> 'evil-record-macro | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"C-d" 'company-complete</span> | |
<span style="color: #8AE234;">"C-."</span> 'evil-window-next | |
<span style="color: #8AE234;">"C-,"</span> 'evil-window-prev | |
<span style="color: #8AE234;">"<f6>"</span> 'my-eval-buffer | |
<span style="color: #8AE234;">"M--"</span> 'winner-undo | |
<span style="color: #8AE234;">"M-="</span> 'winner-redo | |
<span style="color: #8AE234;">"M-t"</span> 'last-buffer | |
<span style="color: #8AE234;">"M-1"</span> 'eyebrowse-switch-to-window-config-1 | |
<span style="color: #8AE234;">"M-2"</span> 'eyebrowse-switch-to-window-config-2 | |
<span style="color: #8AE234;">"M-3"</span> 'eyebrowse-switch-to-window-config-3 | |
<span style="color: #8AE234;">"M-4"</span> 'eyebrowse-switch-to-window-config-4 | |
<span style="color: #8AE234;">"M-5"</span> 'eyebrowse-switch-to-window-config-5 | |
<span style="color: #8AE234;">"M-e"</span> 'eyebrowse-last-window-config | |
<span style="color: #8AE234;">"M-w"</span> 'eyebrowse-next-window-config | |
<span style="color: #8AE234;">"M-q"</span> 'eyebrowse-prev-window-config) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org84bf4d4" class="outline-3"> | |
<h3 id="org84bf4d4"><span class="section-number-3">3.6</span> visual keys</h3> | |
<div class="outline-text-3" id="text-3-6"> | |
<p> | |
These keys are bound only to the Evil <code>normal</code> mode. They | |
won't work without the Evil mode, and won't work on insert, | |
replace or visual. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(general-define-key | |
<span style="color: #DAD085;">:states</span> '(visual) | |
<span style="color: #8AE234;">";"</span> 'hydra-text-format/body | |
<span style="color: #8AE234;">"x"</span> 'calc-grab-region | |
<span style="color: #8AE234;">"C-SPC"</span> 'caps-lock-mode | |
<span style="color: #8AE234;">"f"</span> 'evilem-motion-forward-word-begin | |
<span style="color: #8AE234;">"gt"</span> 'xah-title-case-region-or-line | |
<span style="color: #8AE234;">"F"</span> 'evilem-motion-backward-word-begin | |
<span style="color: #8AE234;">"M-"</span> 'winner-undo | |
<span style="color: #8AE234;">"M="</span> 'winner-redo | |
<span style="color: #8AE234;">"M-t"</span> 'last-buffer | |
<span style="color: #8AE234;">"M-1"</span> 'eyebrowse-switch-to-window-config-1 | |
<span style="color: #8AE234;">"M-2"</span> 'eyebrowse-switch-to-window-config-2 | |
<span style="color: #8AE234;">"M-3"</span> 'eyebrowse-switch-to-window-config-3 | |
<span style="color: #8AE234;">"M-4"</span> 'eyebrowse-switch-to-window-config-4 | |
<span style="color: #8AE234;">"M-5"</span> 'eyebrowse-switch-to-window-config-5 | |
<span style="color: #8AE234;">"M-e"</span> 'eyebrowse-last-window-config | |
<span style="color: #8AE234;">"M-w"</span> 'eyebrowse-next-window-config | |
<span style="color: #8AE234;">"M-q"</span> 'eyebrowse-prev-window-config | |
<span style="color: #8AE234;">"C-."</span> 'evil-window-next | |
<span style="color: #8AE234;">"C-,"</span> 'evil-window-prev) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org92b8a22" class="outline-3"> | |
<h3 id="org92b8a22"><span class="section-number-3">3.7</span> other keys</h3> | |
<div class="outline-text-3" id="text-3-7"> | |
<p> | |
These keys are for several specific modes. | |
</p> | |
<ul class="org-ul"> | |
<li>TODO: put most of these keybindings on the larger general declarations above</li> | |
</ul> | |
</div> | |
<div id="outline-container-org5d38a69" class="outline-4"> | |
<h4 id="org5d38a69"><span class="section-number-4">3.7.1</span> inferior-python-mode</h4> | |
<div class="outline-text-4" id="text-3-7-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'inferior-python-mode-map | |
<span style="color: #8AE234;">"M-r"</span> 'elpy-reload | |
<span style="color: #8AE234;">"C-l"</span> 'comint-clear-buffer | |
[escape] 'ignore) | |
(<span style="color: #96CBFE;">imap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'inferior-python-mode-map | |
<span style="color: #8AE234;">"M-r"</span> 'elpy-reload | |
<span style="color: #8AE234;">"C-l"</span> 'comint-clear-buffer) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org9e2e8ed" class="outline-4"> | |
<h4 id="org9e2e8ed"><span class="section-number-4">3.7.2</span> python-mode</h4> | |
<div class="outline-text-4" id="text-3-7-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'python-mode-map | |
<span style="color: #8AE234;">"RET"</span> 'flycheck-display-error-at-point | |
<span style="color: #8AE234;">"<escape>"</span> 'my-quiet-save-buffer | |
<span style="color: #8AE234;">"TAB"</span> 'org-cycle) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgcd1bdd6" class="outline-4"> | |
<h4 id="orgcd1bdd6"><span class="section-number-4">3.7.3</span> company-active-map</h4> | |
<div class="outline-text-4" id="text-3-7-3"> | |
<p> | |
#+END<sub>SRC</sub> | |
</p> | |
</div> | |
</div> | |
<div id="outline-container-orgf78d039" class="outline-4"> | |
<h4 id="orgf78d039"><span class="section-number-4">3.7.4</span> dired-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'dired-mode-map | |
[escape] 'ignore) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org927a207" class="outline-4"> | |
<h4 id="org927a207"><span class="section-number-4">3.7.5</span> elpy-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'elpy-mode-map | |
<span style="color: #8AE234;">"M-r"</span> 'elpy-insert) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org54d15a7" class="outline-4"> | |
<h4 id="org54d15a7"><span class="section-number-4">3.7.6</span> calc-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'calc-mode-map | |
<span style="color: #8AE234;">"C-l"</span> 'calc-reset | |
<span style="color: #8AE234;">"<escape>"</span> 'calc-quit) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org12e8351" class="outline-4"> | |
<h4 id="org12e8351"><span class="section-number-4">3.7.7</span> custom-mode</h4> | |
<div class="outline-text-4" id="text-3-7-7"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'custom-mode-map | |
<span style="color: #8AE234;">"q"</span> 'Custom-buffer-done | |
[escape] 'Custom-save) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org07252b7" class="outline-4"> | |
<h4 id="org07252b7"><span class="section-number-4">3.7.8</span> fountain-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-8"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'fountain-mode-map | |
<span style="color: #8AE234;">"<M-down>"</span> 'fountain-shift-down | |
<span style="color: #8AE234;">"<M-up> "</span> 'fountain-shift-up | |
<span style="color: #8AE234;">"<S-return>"</span> 'fountain-upcase-line-and-newline | |
<span style="color: #8AE234;">"<backtab>"</span> 'fountain-outline-cycle-global | |
<span style="color: #8AE234;">"C-M-a"</span> 'fountain-beginning-of-scene | |
<span style="color: #8AE234;">"C-M-e"</span> 'fountain-end-of-scene | |
<span style="color: #8AE234;">"C-M-h"</span> 'fountain-outline-mark | |
<span style="color: #8AE234;">"C-M-i"</span> 'completion-at-point | |
<span style="color: #8AE234;">"C-M-i"</span> 'ispell-complete-word | |
<span style="color: #8AE234;">"gh"</span> 'fountain-outline-up | |
<span style="color: #8AE234;">"gk"</span> 'fountain-outline-backward | |
<span style="color: #8AE234;">"gj"</span> 'fountain-outline-forward | |
<span style="color: #8AE234;">"]"</span> 'fountain-outline-next | |
<span style="color: #8AE234;">"["</span> 'fountain-outline-previous | |
<span style="color: #8AE234;">"C-c C-a "</span> 'fountain-insert-synopsis | |
<span style="color: #8AE234;">"C-c C-c "</span> 'fountain-upcase-line | |
<span style="color: #8AE234;">"C-c C-d "</span> 'fountain-continued-dialog-refresh | |
<span style="color: #8AE234;">"C-c C-e C-e"</span> 'fountain-export-default | |
<span style="color: #8AE234;">"C-c C-e d"</span> 'fountain-export-buffer-to-fdx | |
<span style="color: #8AE234;">"C-c C-e e"</span> 'fountain-export-buffer | |
<span style="color: #8AE234;">"C-c C-e f"</span> 'fountain-export-buffer-to-fountain | |
<span style="color: #8AE234;">"C-c C-e h"</span> 'fountain-export-buffer-to-html | |
<span style="color: #8AE234;">"C-c C-e l"</span> 'fountain-export-buffer-to-latex | |
<span style="color: #8AE234;">"C-c C-e s"</span> 'fountain-export-shell-command | |
<span style="color: #8AE234;">"C-c C-e t"</span> 'fountain-export-buffer-to-txt | |
<span style="color: #8AE234;">"C-c C-x n"</span> 'fountain-add-scene-numbers | |
<span style="color: #8AE234;">"C-c C-x RET"</span> 'fountain-insert-page-break | |
<span style="color: #8AE234;">"C-c C-x _"</span> 'fountain-remove-scene-numbers | |
<span style="color: #8AE234;">"C-c C-x a"</span> 'fountain-completion-update | |
<span style="color: #8AE234;">"C-c C-x b"</span> 'fountain-outline-to-indirect-buffer | |
<span style="color: #8AE234;">"C-c C-x f"</span> 'fountain-set-font-lock-decoration | |
<span style="color: #8AE234;">"C-c C-x i"</span> 'auto-insert | |
<span style="color: #8AE234;">"C-c C-x p"</span> 'fountain-count-pages | |
<span style="color: #8AE234;">"C-c C-z"</span> 'fountain-insert-note | |
<span style="color: #8AE234;">"C-c RET"</span> 'fountain-upcase-line-and-newline | |
<span style="color: #8AE234;">"C-c TAB"</span> 'fountain-outline-cycle | |
<span style="color: #8AE234;">"ESC <down>"</span> 'fountain-shift-down | |
<span style="color: #8AE234;">"ESC <up>"</span> 'fountain-shift-up | |
<span style="color: #8AE234;">"M-g p"</span> 'fountain-goto-page | |
<span style="color: #8AE234;">"M-g s"</span> 'fountain-goto-scene | |
<span style="color: #8AE234;">"M-n"</span> 'fountain-forward-character | |
<span style="color: #8AE234;">"M-p"</span> 'fountain-backward-character | |
<span style="color: #8AE234;">"S-TAB"</span> 'fountain-outline-cycle-global | |
<span style="color: #8AE234;">"TAB"</span> 'fountain-tab-action) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org6e4a6b7" class="outline-4"> | |
<h4 id="org6e4a6b7"><span class="section-number-4">3.7.9</span> term-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-9"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">imap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'term-raw-map | |
<span style="color: #8AE234;">"M-l"</span> 'py3 | |
<span style="color: #8AE234;">"M-p"</span> 'term-send-up | |
<span style="color: #8AE234;">"M-n"</span> 'term-send-down | |
<span style="color: #8AE234;">"C-ç"</span> 'ace-window | |
<span style="color: #8AE234;">"C-k"</span> 'kill-buffer-and-window | |
<span style="color: #8AE234;">"C-l"</span> 'comint-clear-buffer) | |
(<span style="color: #96CBFE;">imap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'term-mode-map | |
<span style="color: #8AE234;">"M-p"</span> 'term-send-up | |
<span style="color: #8AE234;">"M-n"</span> 'term-send-down | |
<span style="color: #8AE234;">"C-ç"</span> 'ace-window | |
<span style="color: #8AE234;">"C-k"</span> 'kill-buffer-and-window | |
<span style="color: #8AE234;">"C-l"</span> 'comint-clear-buffer) | |
(<span style="color: #96CBFE;">nmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'term-mode-map | |
<span style="color: #8AE234;">"M-l"</span> 'py3-normal | |
<span style="color: #8AE234;">"M-p"</span> 'term-send-up | |
<span style="color: #8AE234;">"M-n"</span> 'term-send-down | |
<span style="color: #8AE234;">"C-l"</span> 'comint-clear-buffer | |
<span style="color: #8AE234;">"ç"</span> 'ace-window | |
<span style="color: #8AE234;">"C-ç"</span> 'ace-window | |
<span style="color: #8AE234;">"C-k"</span> 'kill-buffer-and-window | |
[escape] 'ignore) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org860b5dc" class="outline-4"> | |
<h4 id="org860b5dc"><span class="section-number-4">3.7.10</span> snippet-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-10"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'snippet-mode-map | |
[escape] 'ignore) | |
(<span style="color: #96CBFE;">imap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'snippet-mode-map | |
[escape] 'evil-normal-state) | |
(<span style="color: #96CBFE;">imap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'snippet-mode-map | |
[escape] 'evil-normal-state) | |
yas-keymap | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgd6e16e2" class="outline-4"> | |
<h4 id="orgd6e16e2"><span class="section-number-4">3.7.11</span> nov-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-11"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'nov-mode-map | |
<span style="color: #8AE234;">"RET"</span> 'nov-visit-relative-file | |
<span style="color: #8AE234;">"h"</span> 'evil-backward-char | |
[escape] 'evil-normal-state) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org0e67984" class="outline-4"> | |
<h4 id="org0e67984"><span class="section-number-4">3.7.12</span> pdf-view-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-12"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> <span style="color: #DAD085;">:keymaps</span> 'pdf-view-mode-map | |
<span style="color: #8AE234;">"q"</span> 'last-buffer | |
<span style="color: #8AE234;">"gp"</span> 'pdf-view-goto-page | |
<span style="color: #8AE234;">"<escape>"</span> 'last-buffer | |
<span style="color: #8AE234;">";"</span> 'hydra-org-noter/body | |
<span style="color: #8AE234;">"f"</span> 'pdf-links-action-perform | |
<span style="color: #8AE234;">"S"</span> 'pdf-occur | |
<span style="color: #8AE234;">"TAB"</span> 'pdf-outline | |
<span style="color: #8AE234;">"h"</span> 'pdf-view-next-page | |
<span style="color: #8AE234;">"l"</span> 'pdf-view-previous-page | |
<span style="color: #8AE234;">"w"</span> 'pdf-view-fit-width-to-window | |
<span style="color: #8AE234;">"p"</span> 'pdf-view-fit-page-to-window | |
<span style="color: #8AE234;">"J"</span> 'pdf-view-next-line-or-next-page | |
<span style="color: #8AE234;">"k"</span> 'pdf-view-previous-line-or-previous-page | |
<span style="color: #8AE234;">"j"</span> 'pdf-view-scroll-up-or-next-page | |
<span style="color: #8AE234;">"k"</span> 'pdf-view-scroll-down-or-previous-page) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga3477e7" class="outline-4"> | |
<h4 id="orga3477e7"><span class="section-number-4">3.7.13</span> pdf-outline-buffer-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-13"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'pdf-outline-buffer-mode-map | |
[escape] 'quit-window | |
<span style="color: #8AE234;">"l"</span> 'avy-goto-line | |
<span style="color: #8AE234;">"o"</span> 'quit-window) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3788eb2" class="outline-4"> | |
<h4 id="org3788eb2"><span class="section-number-4">3.7.14</span> pdf-annot-list-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-14"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> <span style="color: #DAD085;">:keymaps</span> 'pdf-annot-list-mode-map | |
<span style="color: #8AE234;">"q"</span> 'quit-window) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orge31cf72" class="outline-4"> | |
<h4 id="orge31cf72"><span class="section-number-4">3.7.15</span> pdf-occur-buffer-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-15"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> <span style="color: #DAD085;">:keymaps</span> 'pdf-occur-buffer-mode-map | |
<span style="color: #8AE234;">"go"</span> 'pdf-occur-goto-occurrence | |
<span style="color: #8AE234;">"<return>"</span> 'pdf-occur-goto-quit) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org4fce05c" class="outline-4"> | |
<h4 id="org4fce05c"><span class="section-number-4">3.7.16</span> agenda mode map</h4> | |
<div class="outline-text-4" id="text-3-7-16"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'org-agenda-mode-map | |
<span style="color: #8AE234;">"-"</span> 'winner-undo | |
<span style="color: #8AE234;">"="</span> 'winner-redo | |
<span style="color: #8AE234;">"SPC"</span> nil | |
<span style="color: #8AE234;">"RET"</span> 'my-agenda-enter) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3592378" class="outline-4"> | |
<h4 id="org3592378"><span class="section-number-4">3.7.17</span> adoc mode map</h4> | |
<div class="outline-text-4" id="text-3-7-17"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">vmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'adoc-mode-map | |
<span style="color: #8AE234;">"C-b"</span> 'adoc-bold | |
<span style="color: #8AE234;">"C-i"</span> 'adoc-italic | |
<span style="color: #8AE234;">"C-l"</span> 'adoc-link) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5a2aae4" class="outline-4"> | |
<h4 id="org5a2aae4"><span class="section-number-4">3.7.18</span> general unbind</h4> | |
<div class="outline-text-4" id="text-3-7-18"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">general-unbind</span> 'global | |
<span style="color: #8AE234;">"<C-next>"</span> | |
<span style="color: #8AE234;">"C-w"</span> | |
<span style="color: #8AE234;">"M-u"</span> | |
<span style="color: #8AE234;">"M-h"</span> | |
<span style="color: #8AE234;">"M-o"</span> | |
<span style="color: #8AE234;">"C-o"</span>) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3b0da0a" class="outline-4"> | |
<h4 id="org3b0da0a"><span class="section-number-4">3.7.19</span> general unbind org</h4> | |
<div class="outline-text-4" id="text-3-7-19"> | |
</div> | |
</div> | |
<div id="outline-container-org95fef1c" class="outline-4"> | |
<h4 id="org95fef1c"><span class="section-number-4">3.7.20</span> messages mode map</h4> | |
<div class="outline-text-4" id="text-3-7-20"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'messages-buffer-mode-map | |
[escape] 'ignore) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga26242e" class="outline-4"> | |
<h4 id="orga26242e"><span class="section-number-4">3.7.21</span> circe keys</h4> | |
<div class="outline-text-4" id="text-3-7-21"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'circe-mode-map | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">[escape] 'ignore</span> | |
<span style="color: #8AE234;">"C-a"</span> 'popwin:close-popup-window | |
<span style="color: #8AE234;">"q"</span> 'popwin:close-popup-window) | |
(<span style="color: #96CBFE;">iemap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'circe-mode-map | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">[escape] 'ignore</span> | |
<span style="color: #8AE234;">"C-a"</span> 'popwin:close-popup-window | |
<span style="color: #8AE234;">"q"</span> 'popwin:close-popup-window) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org8f84a8a" class="outline-4"> | |
<h4 id="org8f84a8a"><span class="section-number-4">3.7.22</span> lisp interaction mode</h4> | |
<div class="outline-text-4" id="text-3-7-22"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'lisp-interaction-mode-map | |
[escape] 'ignore) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgd49ee2d" class="outline-4"> | |
<h4 id="orgd49ee2d"><span class="section-number-4">3.7.23</span> global</h4> | |
<div class="outline-text-4" id="text-3-7-23"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (global-set-key (kbd <span style="color: #8AE234;">"C-x k"</span>) #'kill-buffer-and-window) | |
(global-set-key (kbd <span style="color: #8AE234;">"<f1>"</span>) #'hydra-help/body) | |
(global-set-key (kbd <span style="color: #8AE234;">"C-h"</span>) #'hydra-help/body) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org2edfe2a" class="outline-4"> | |
<h4 id="org2edfe2a"><span class="section-number-4">3.7.24</span> abbrev mode map</h4> | |
<div class="outline-text-4" id="text-3-7-24"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'edit-abbrevs-mode-map | |
[escape] 'abbrev-edit-save-buffer | |
<span style="color: #8AE234;">"q"</span> 'kill-this-buffer) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgdcd6a36" class="outline-4"> | |
<h4 id="orgdcd6a36"><span class="section-number-4">3.7.25</span> md insert</h4> | |
<div class="outline-text-4" id="text-3-7-25"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">imap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'markdown-mode-map | |
<span style="color: #8AE234;">"<insert>"</span> 'markdown-insert-link) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org9b0fffa" class="outline-4"> | |
<h4 id="org9b0fffa"><span class="section-number-4">3.7.26</span> ivy mode map</h4> | |
<div class="outline-text-4" id="text-3-7-26"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(general-define-key | |
<span style="color: #DAD085;">:keymaps</span> 'ivy-mode-map | |
<span style="color: #8AE234;">"C-SPC"</span> 'caps-lock-mode | |
[escape] 'abort-recursive-edit) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org1c1b9ec" class="outline-4"> | |
<h4 id="org1c1b9ec"><span class="section-number-4">3.7.27</span> funtion keys</h4> | |
<div class="outline-text-4" id="text-3-7-27"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(general-define-key "<f2>" 'ignore)</span> | |
(general-define-key <span style="color: #8AE234;">"<f6>"</span> 'my-eval-buffer) | |
(general-define-key <span style="color: #8AE234;">"<f11>"</span> 'eval-last-sexp) | |
(general-define-key <span style="color: #8AE234;">"<f7>"</span> 'emacs-lisp-mode) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(general-define-key "<f5>" 'undo-tree-visualize)</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(general-define-key "<menu>" 'counsel-bookmark)</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc24a14e" class="outline-4"> | |
<h4 id="orgc24a14e"><span class="section-number-4">3.7.28</span> info mode keys</h4> | |
<div class="outline-text-4" id="text-3-7-28"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'Info-mode-map | |
<span style="color: #8AE234;">"b"</span> 'hydra-info-motions/body | |
<span style="color: #8AE234;">"C-b"</span> 'Info-scroll-up | |
<span style="color: #8AE234;">"C-f"</span> 'Info-scroll-down) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orge82908b" class="outline-4"> | |
<h4 id="orge82908b"><span class="section-number-4">3.7.29</span> org-map-mode</h4> | |
<div class="outline-text-4" id="text-3-7-29"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'org-mode-map | |
<span style="color: #8AE234;">"M-t"</span> 'last-buffer | |
<span style="color: #8AE234;">"<insert>"</span> 'org-insert-link | |
<span style="color: #8AE234;">"RET"</span> 'org-open-at-point) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org6b9d37b" class="outline-4"> | |
<h4 id="org6b9d37b"><span class="section-number-4">3.7.30</span> c-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-30"> | |
</div> | |
</div> | |
<div id="outline-container-orgab13add" class="outline-4"> | |
<h4 id="orgab13add"><span class="section-number-4">3.7.31</span> evil-org-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-31"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
keymaps 'evil-org-mode-map | |
<span style="color: #8AE234;">"zm"</span> 'org-hide-all) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org475a5ce" class="outline-4"> | |
<h4 id="org475a5ce"><span class="section-number-4">3.7.32</span> evil-org-mode-map insert</h4> | |
<div class="outline-text-4" id="text-3-7-32"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">imap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'evil-org-mode-map | |
<span style="color: #8AE234;">"C-d"</span> nil) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc00d6a9" class="outline-4"> | |
<h4 id="orgc00d6a9"><span class="section-number-4">3.7.33</span> calendar mode map</h4> | |
<div class="outline-text-4" id="text-3-7-33"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'calendar-mode-map | |
[escape] 'calendar-exit) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org0b163c1" class="outline-4"> | |
<h4 id="org0b163c1"><span class="section-number-4">3.7.34</span> babel-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-34"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'org-babel-map | |
<span style="color: #8AE234;">"M-n"</span> 'org-next-link | |
<span style="color: #8AE234;">"M-p"</span> 'org-previous-link | |
<span style="color: #8AE234;">"M-k"</span> 'buf-move-up | |
<span style="color: #8AE234;">"<insert>"</span> 'org-insert-link | |
<span style="color: #8AE234;">"RET"</span> 'org-open-at-point) | |
</pre> | |
</div> | |
<p> | |
#+END<sub>SRC</sub> | |
</p> | |
</div> | |
</div> | |
<div id="outline-container-org2a82376" class="outline-4"> | |
<h4 id="org2a82376"><span class="section-number-4">3.7.35</span> helpful mode map</h4> | |
<div class="outline-text-4" id="text-3-7-35"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'helpful-mode-map | |
[escape] 'kill-buffer-and-window | |
<span style="color: #8AE234;">"M-p"</span> 'org-previous-link | |
<span style="color: #8AE234;">"M-k"</span> 'buf-move-up | |
<span style="color: #8AE234;">"<insert>"</span> 'org-insert-link | |
<span style="color: #8AE234;">"RET"</span> 'org-open-at-point) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc4c9d9d" class="outline-4"> | |
<h4 id="orgc4c9d9d"><span class="section-number-4">3.7.36</span> md ins, visual</h4> | |
<div class="outline-text-4" id="text-3-7-36"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'markdown-mode-map | |
<span style="color: #8AE234;">"TAB"</span> 'markdown-cycle | |
<span style="color: #8AE234;">"RET"</span> 'markdown-follow-thing-at-point | |
<span style="color: #8AE234;">"<insert>"</span> 'markdown-insert-link) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org34be4af" class="outline-4"> | |
<h4 id="org34be4af"><span class="section-number-4">3.7.37</span> counsel-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-37"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(general-define-key | |
<span style="color: #DAD085;">:keymaps</span> 'counsel-mode-map | |
<span style="color: #8AE234;">"<insert>"</span> 'clipboard-yank) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org4d2b4b8" class="outline-4"> | |
<h4 id="org4d2b4b8"><span class="section-number-4">3.7.38</span> non-general.el keys</h4> | |
<div class="outline-text-4" id="text-3-7-38"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(define-key evil-emacs-state-map [escape] 'evil-normal-state) | |
(global-set-key (kbd <span style="color: #8AE234;">"C-z"</span>) 'evil-normal-state) | |
(global-unset-key (kbd <span style="color: #8AE234;">"C-SPC"</span>)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org59e3044" class="outline-4"> | |
<h4 id="org59e3044"><span class="section-number-4">3.7.39</span> org-capture-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-39"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'org-capture-mode-map | |
<span style="color: #8AE234;">"q"</span> 'org-capture-kill | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">"M-w" 'org-capture-finalize</span> | |
<span style="color: #8AE234;">"M-w"</span> 'org-finalize-sort | |
<span style="color: #8AE234;">"M-e"</span> 'org-capture-kill) | |
(<span style="color: #96CBFE;">imap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'org-capture-mode-map | |
<span style="color: #8AE234;">"M-w"</span> 'org-capture-finalize | |
<span style="color: #8AE234;">"M-w"</span> 'org-capture-finalize | |
<span style="color: #8AE234;">"M-e"</span> 'org-capture-kill) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgea6ee49" class="outline-4"> | |
<h4 id="orgea6ee49"><span class="section-number-4">3.7.40</span> undo tree mode map</h4> | |
<div class="outline-text-4" id="text-3-7-40"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(general-define-key | |
<span style="color: #DAD085;">:keymaps</span> 'undo-tree-visualizer-selection-mode-map | |
<span style="color: #DAD085;">:states</span> '(normal) | |
<span style="color: #8AE234;">"q"</span> 'kill-buffer-and-window) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org95c4cf1" class="outline-4"> | |
<h4 id="org95c4cf1"><span class="section-number-4">3.7.41</span> browse-kill-ring-mode-map</h4> | |
<div class="outline-text-4" id="text-3-7-41"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(general-define-key | |
<span style="color: #DAD085;">:keymaps</span> 'browse-kill-ring-mode-map | |
<span style="color: #DAD085;">:states</span> '(normal) | |
<span style="color: #8AE234;">"q"</span> 'browse-kill-ring-quit | |
<span style="color: #8AE234;">"C-j"</span> 'browse-kill-ring-forward | |
<span style="color: #8AE234;">"C-k"</span> 'browse-kill-ring-previous | |
<span style="color: #8AE234;">"RET"</span> 'browse-kill-ring-insert-and-quit) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgb6772d6" class="outline-4"> | |
<h4 id="orgb6772d6"><span class="section-number-4">3.7.42</span> artist mode</h4> | |
<div class="outline-text-4" id="text-3-7-42"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">nvmap</span> | |
<span style="color: #DAD085;">:keymaps</span> 'artist-mode-map | |
<span style="color: #8AE234;">"M-n"</span> 'org-next-link | |
<span style="color: #8AE234;">"M-p"</span> 'org-previous-link | |
<span style="color: #8AE234;">"M-k"</span> 'buf-move-up | |
<span style="color: #8AE234;">"<insert>"</span> 'org-insert-link | |
<span style="color: #8AE234;">"RET"</span> 'org-open-at-point) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orge4de0fa" class="outline-2"> | |
<h2 id="orge4de0fa"><span class="section-number-2">4</span> Hydra</h2> | |
<div class="outline-text-2" id="text-4"> | |
</div> | |
<div id="outline-container-org6710f4d" class="outline-4"> | |
<h4 id="org6710f4d"><span class="section-number-4">4.0.1</span> main</h4> | |
<div class="outline-text-4" id="text-4-0-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">hydra</span> | |
<span style="color: #DAD085;">:ensure</span> t | |
<span style="color: #DAD085;">:config</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org58d7d82" class="outline-4"> | |
<h4 id="org58d7d82"><span class="section-number-4">4.0.2</span> hydras</h4> | |
<div class="outline-text-4" id="text-4-0-2"> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="orga172247"></a>hydra-master<br /> | |
<div class="outline-text-5" id="text-4-0-2-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-master (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Master Hydra^</span> | |
<span style="color: #8AE234;"> ^─────────^────^─────────────^</span> | |
<span style="color: #8AE234;"> _s_ snippets _o_ org</span> | |
<span style="color: #8AE234;"> _w_ windows _n_ org-noter</span> | |
<span style="color: #8AE234;"> _m_ modes _t_ text motions</span> | |
<span style="color: #8AE234;"> _c_ M cmds</span> | |
<span style="color: #8AE234;"> _C_ m cmds</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<menu>"</span> nil) | |
(<span style="color: #8AE234;">"s"</span> hydra-yasnippet/body) | |
(<span style="color: #8AE234;">"w"</span> hydra-window/body) | |
(<span style="color: #8AE234;">"m"</span> hydra-modes/body) | |
(<span style="color: #8AE234;">"c"</span> hydra-major-commands/body) | |
(<span style="color: #8AE234;">"o"</span> hydra-org/body) | |
(<span style="color: #8AE234;">"a"</span> hydra-org-agenda/body) | |
(<span style="color: #8AE234;">"t"</span> hydra-text-motions/body) | |
(<span style="color: #8AE234;">"C"</span> hydra-minor-commands/body) | |
(<span style="color: #8AE234;">"n"</span> hydra-org-noter/body)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgd5b45b5"></a>hydra snippets<br /> | |
<div class="outline-text-5" id="text-4-0-2-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-yasnippet (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^YASnippet^ ^Do^</span> | |
<span style="color: #8AE234;"> ^─────────^──────────^──^────────</span> | |
<span style="color: #8AE234;"> _q_ quit _i_ insert</span> | |
<span style="color: #8AE234;"> ^^ _m_ mode</span> | |
<span style="color: #8AE234;"> ^^ _n_ new</span> | |
<span style="color: #8AE234;"> ^^ _y_ ivy</span> | |
<span style="color: #8AE234;"> ^^ _v_ visit</span> | |
<span style="color: #8AE234;"> ^^ _f_ finish</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"i"</span> yas-insert-snippet) | |
(<span style="color: #8AE234;">"y"</span> ivy-yasnippet) | |
(<span style="color: #8AE234;">"m"</span> yas-minor-mode) | |
(<span style="color: #8AE234;">"f"</span> yas-load-snippet-buffer-and-close) | |
(<span style="color: #8AE234;">"v"</span> yas-visit-snippet-file) | |
(<span style="color: #8AE234;">"n"</span> yas-new-snippet)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org768f1f5"></a>hydra-window<br /> | |
<div class="outline-text-5" id="text-4-0-2-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-window (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Windows^</span> | |
<span style="color: #8AE234;"> -------------------------------------------</span> | |
<span style="color: #8AE234;"> _k_ buf up _o_ del other _0_ del</span> | |
<span style="color: #8AE234;"> _j_ buf down _n_ new _s_ split</span> | |
<span style="color: #8AE234;"> _l_ buf right _N_ vnew _v_ vsplit</span> | |
<span style="color: #8AE234;"> _h_ buf left _R_ eye ren. _b_ botright</span> | |
<span style="color: #8AE234;"> _c_ eye close _r_esize _=_ text scale</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"r"</span> hydra-window-resize/body) | |
(<span style="color: #8AE234;">"0"</span> delete-window) | |
(<span style="color: #8AE234;">"="</span> text-scale-adjust) | |
(<span style="color: #8AE234;">"-"</span> text-scale-adjust) | |
(<span style="color: #8AE234;">"k"</span> buf-move-up) | |
(<span style="color: #8AE234;">"h"</span> buf-move-left) | |
(<span style="color: #8AE234;">"j"</span> buf-move-down) | |
(<span style="color: #8AE234;">"l"</span> buf-move-right) | |
(<span style="color: #8AE234;">"n"</span> evil-window-new) | |
(<span style="color: #8AE234;">"N"</span> evil-window-vnew) | |
(<span style="color: #8AE234;">"o"</span> delete-other-windows) | |
(<span style="color: #8AE234;">"s"</span> my-evil-window-split) | |
(<span style="color: #8AE234;">"b"</span> my-evil-botright) | |
(<span style="color: #8AE234;">"v"</span> my-evil-window-vsplit) | |
(<span style="color: #8AE234;">"c"</span> eyebrowse-close-window-config) | |
(<span style="color: #8AE234;">"R"</span> eyebrowse-rename-window-config)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org7f1cc55"></a>hydra-window-resize<br /> | |
<div class="outline-text-5" id="text-4-0-2-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-window-resize (<span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> run) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Resize Windows^</span> | |
<span style="color: #8AE234;"> ---------------------------------</span> | |
<span style="color: #8AE234;"> _h_ +width _e_nlarge _b_alance</span> | |
<span style="color: #8AE234;"> _l_ -width _E_nlargeh</span> | |
<span style="color: #8AE234;"> _j_ -height _s_hrink</span> | |
<span style="color: #8AE234;"> _k_ +height _S_hrinkh</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"SPC s"</span> nil) | |
(<span style="color: #8AE234;">"e"</span> my/enlarge-window) | |
(<span style="color: #8AE234;">"E"</span> my/enlarge-window-horizontally) | |
(<span style="color: #8AE234;">"s"</span> my/shrink-window) | |
(<span style="color: #8AE234;">"S"</span> my/shrink-window-horizontally) | |
(<span style="color: #8AE234;">"b"</span> balance-windows) | |
(<span style="color: #8AE234;">"m"</span> maximize-window) | |
(<span style="color: #8AE234;">"h"</span> my/evil-inc-width) | |
(<span style="color: #8AE234;">"l"</span> my/evil-dec-width) | |
(<span style="color: #8AE234;">"j"</span> my/evil-dec-height) | |
(<span style="color: #8AE234;">"k"</span> my/evil-inc-height)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org47f77c6"></a>hydra-modes<br /> | |
<div class="outline-text-5" id="text-4-0-2-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-modes (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Modes^</span> | |
<span style="color: #8AE234;"> ───────────────────────────────────────────────</span> | |
<span style="color: #8AE234;"> _w_ which-key _F_ auto-fill _M_ menu</span> | |
<span style="color: #8AE234;"> _b_ benchmark _n_ nonu _O_rg</span> | |
<span style="color: #8AE234;"> _z_ zoom mode _l_ nu rnu _t_ext</span> | |
<span style="color: #8AE234;"> _c_ commands _h_ line hl f_u_ndamental</span> | |
<span style="color: #8AE234;"> _C_ company _h_ line hl _e_nable cursor</span> | |
<span style="color: #8AE234;"> _f_ flyspell _d_ dumb jump disabl_E_ cursor</span> | |
<span style="color: #8AE234;"> _o_ olivetti _W_ windows</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"m"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"e"</span> enable-cursor) | |
(<span style="color: #8AE234;">"E"</span> disable-cusor) | |
(<span style="color: #8AE234;">"w"</span> which-key-mode) | |
(<span style="color: #8AE234;">"W"</span> hydra-window/body) | |
(<span style="color: #8AE234;">"b"</span> benchmark-init/show-durations-tree) | |
(<span style="color: #8AE234;">"z"</span> zoom-mode) | |
(<span style="color: #8AE234;">"O"</span> org-mode) | |
(<span style="color: #8AE234;">"t"</span> text-mode) | |
(<span style="color: #8AE234;">"u"</span> fundamental-mode) | |
(<span style="color: #8AE234;">"C"</span> company-mode) | |
(<span style="color: #8AE234;">"c"</span> hydra-major-commands/body) | |
(<span style="color: #8AE234;">"f"</span> flyspell-mode) | |
(<span style="color: #8AE234;">"o"</span> olivetti-mode) | |
(<span style="color: #8AE234;">"F"</span> auto-fill-mode) | |
(<span style="color: #8AE234;">"n"</span> line-no-numbers) | |
(<span style="color: #8AE234;">"l"</span> line-numbers) | |
(<span style="color: #8AE234;">"h"</span> global-hl-line-mode) | |
(<span style="color: #8AE234;">"M"</span> menu-bar-mode) | |
(<span style="color: #8AE234;">"d"</span> dumb-jump-mode)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org87f2913"></a>hydra-major-commands<br /> | |
<div class="outline-text-5" id="text-4-0-2-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-major-commands (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Major Commands^</span> | |
<span style="color: #8AE234;"> ^──────────────────────^────────────────────^────────────────</span> | |
<span style="color: #8AE234;"> _R_ refresh packages _k_ kill ring _d_ dup. line</span> | |
<span style="color: #8AE234;"> _q_ major keys _p_ check parens _n_ nar. region</span> | |
<span style="color: #8AE234;"> _i_ package install _r_ eval region _l_ sort lines</span> | |
<span style="color: #8AE234;"> _w_ word count _c_ set fill _k_ q. calcl</span> | |
<span style="color: #8AE234;"> _a_ show date _b_ bug hunt _m_ minor commands</span> | |
<span style="color: #8AE234;"> _y_ ivy resume _t_ toggle truncate _W_hichmajor</span> | |
<span style="color: #8AE234;"> _h_ shell command _M_ bookmark set _H_acker mode</span> | |
<span style="color: #8AE234;"> _o_ org noter</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"SPC c"</span> nil) | |
(<span style="color: #8AE234;">"H"</span> hacker-typer) | |
(<span style="color: #8AE234;">"R"</span> package-refresh-contents) | |
(<span style="color: #8AE234;">"o"</span> org-noter) | |
(<span style="color: #8AE234;">"W"</span> which-key-show-major-mode) | |
(<span style="color: #8AE234;">"i"</span> package-install) | |
(<span style="color: #8AE234;">"w"</span> wc-count) | |
(<span style="color: #8AE234;">"a"</span> my-date) | |
(<span style="color: #8AE234;">"y"</span> ivy-resume) | |
(<span style="color: #8AE234;">"K"</span> browse-kill-ring) | |
(<span style="color: #8AE234;">"p"</span> check-parens) | |
(<span style="color: #8AE234;">"r"</span> eval-region) | |
(<span style="color: #8AE234;">"M"</span> bookmark-set) | |
(<span style="color: #8AE234;">"c"</span> set-fill-column) | |
(<span style="color: #8AE234;">"b"</span> bug-hunter-init-file) | |
(<span style="color: #8AE234;">"t"</span> toggle-truncate-lines) | |
(<span style="color: #8AE234;">"d"</span> duplicate-line) | |
(<span style="color: #8AE234;">"n"</span> narrow-to-region) | |
(<span style="color: #8AE234;">"l"</span> sort-lines-by-length) | |
(<span style="color: #8AE234;">"k"</span> quick-calc) | |
(<span style="color: #8AE234;">"m"</span> hydra-minor-commands/body) | |
(<span style="color: #8AE234;">"h"</span> shell-command))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org84a5669"></a>hydra-minor-commands<br /> | |
<div class="outline-text-5" id="text-4-0-2-7"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-minor-commands (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Minor Commands^</span> | |
<span style="color: #8AE234;"> ^─────────────────────────────────────────────</span> | |
<span style="color: #8AE234;"> _w_ mark buffer _u_ nocursor _c_ode</span> | |
<span style="color: #8AE234;"> _e_mphasis _U_ cursor</span> | |
<span style="color: #8AE234;"> _-_ text small _t_angle/rel</span> | |
<span style="color: #8AE234;"> _=_ text big _T_angler/res</span> | |
<span style="color: #8AE234;"> _a_ define abbrev _o_ tangle</span> | |
<span style="color: #8AE234;"> _s_ change dict. _C_alcregion</span> | |
<span style="color: #8AE234;"> _W_ lookup word _W_opy buffer</span> | |
<span style="color: #8AE234;"> _p_ lipsum paragraph _b_old</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"w"</span> mark-whole-buffer) | |
(<span style="color: #8AE234;">"W"</span> copy-whole-buffer) | |
(<span style="color: #8AE234;">"u"</span> disable-cursor) | |
(<span style="color: #8AE234;">"U"</span> enable-cursor) | |
(<span style="color: #8AE234;">"b"</span> org-bold) | |
(<span style="color: #8AE234;">"c"</span> org-code) | |
(<span style="color: #8AE234;">"e"</span> org-emphasis) | |
(<span style="color: #8AE234;">"C"</span> my-calc-region) | |
(<span style="color: #8AE234;">"-"</span> text-scale-decrease) | |
(<span style="color: #8AE234;">"="</span> text-scale-increase) | |
(<span style="color: #8AE234;">"a"</span> define-global-abbrev) | |
(<span style="color: #8AE234;">"s"</span> ispell-change-dictionary) | |
(<span style="color: #8AE234;">"n"</span> wordnut-lookup-current-word) | |
(<span style="color: #8AE234;">"t"</span> init-tangle) | |
(<span style="color: #8AE234;">"T"</span> tangle-restart) | |
(<span style="color: #8AE234;">"o"</span> org-babel-tangle) | |
(<span style="color: #8AE234;">"p"</span> lorem-ipsum-insert-paragraphs)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgc5a2e7b"></a>hydra-org-noter<br /> | |
<div class="outline-text-5" id="text-4-0-2-8"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-org-noter (<span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:foreign-keys</span> run <span style="color: #DAD085;">:exit</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^PDF Notes^ ^Org Noter^</span> | |
<span style="color: #8AE234;"> ---------------------------------</span> | |
<span style="color: #8AE234;"> _l_s _o_ org noter</span> | |
<span style="color: #8AE234;"> _d_el _i_ insert note</span> | |
<span style="color: #8AE234;"> _u_nder _I_ precise note</span> | |
<span style="color: #8AE234;"> _t_ext _k_ kill session</span> | |
<span style="color: #8AE234;"> _s_trike _s_ sync</span> | |
<span style="color: #8AE234;"> _h_ighlight _w_ windows</span> | |
<span style="color: #8AE234;"> _~_</span> | |
<span style="color: #8AE234;"> _b_ookmark</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">";"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"o"</span> org-noter) | |
(<span style="color: #8AE234;">"i"</span> org-noter-insert-note) | |
(<span style="color: #8AE234;">"I"</span> org-noter-insert-precise-note) | |
(<span style="color: #8AE234;">"k"</span> org-noter-kill-session) | |
(<span style="color: #8AE234;">"s"</span> org-noter-sync-current-note) | |
(<span style="color: #8AE234;">"w"</span> org-noter-set-notes-window-location) | |
(<span style="color: #8AE234;">"l"</span> pdf-annot-list-annotations) | |
(<span style="color: #8AE234;">"d"</span> pdf-annot-delete) | |
(<span style="color: #8AE234;">"u"</span> pdf-annot-add-underline-markup-annotation) | |
(<span style="color: #8AE234;">"t"</span> pdf-annot-add-text-annotation) | |
(<span style="color: #8AE234;">"s"</span> pdf-annot-add-strikeout-markup-annotation) | |
(<span style="color: #8AE234;">"h"</span> pdf-annot-add-highlight-markup-annotation) | |
(<span style="color: #8AE234;">"~"</span> pdf-annot-add-squiggly-markup-annotation) | |
(<span style="color: #8AE234;">"b"</span> bookmark-set)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgd9dec4f"></a><span class="todo TODO">TODO</span> hydra-org-clock<br /> | |
<div class="outline-text-5" id="text-4-0-2-9"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> | |
(<span style="color: #96CBFE;">defhydra</span> hydra-org-clock (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;">^Org Clock^</span> | |
<span style="color: #8AE234;">------------------------------------------------------------------------</span> | |
<span style="color: #8AE234;">clock _i_n _C_hange stamps _p_tart timer _u_pdate</span> | |
<span style="color: #8AE234;">clock _o_ut _a_bort _P_top timer _R_eport</span> | |
<span style="color: #8AE234;">_l_ast _g_oto s_E_t timer</span> | |
<span style="color: #8AE234;">_e_stimate _d_isplay t_i_mer</span> | |
<span style="color: #8AE234;">_r_ange _s_et effor timer_I_tem</span> | |
<span style="color: #8AE234;">_c_clock _h_eading _SPC_ timer p/c</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"u"</span> org-dblock-update) | |
(<span style="color: #8AE234;">"R"</span> org-clock-report) | |
(<span style="color: #8AE234;">"p"</span> org-timer-start) | |
(<span style="color: #8AE234;">"P"</span> org-timer-stop) | |
(<span style="color: #8AE234;">"E"</span> org-timer-set-timer) | |
(<span style="color: #8AE234;">"i"</span> org-timer) | |
(<span style="color: #8AE234;">"I"</span> org-timer-item) | |
(<span style="color: #8AE234;">"h"</span> org-insert-heading) | |
(<span style="color: #8AE234;">"SPC"</span> org-timer-pause-or-continue) | |
(<span style="color: #8AE234;">"s"</span> org-set-effort) | |
(<span style="color: #8AE234;">"i"</span> org-clock-in) | |
(<span style="color: #8AE234;">"o"</span> org-clock-out) | |
(<span style="color: #8AE234;">"l"</span> org-clock-in-last) | |
(<span style="color: #8AE234;">"e"</span> org-clock-modify-effort-estimate) | |
(<span style="color: #8AE234;">"r"</span> org-evaluate-time-range) | |
(<span style="color: #8AE234;">"c"</span> org-clock-timestamps-up/down) | |
(<span style="color: #8AE234;">"C"</span> org-timestamp-up/down) | |
(<span style="color: #8AE234;">"t"</span> org-todo) | |
(<span style="color: #8AE234;">"a"</span> org-clock-cancel) | |
(<span style="color: #8AE234;">"g"</span> org-clock-goto) | |
(<span style="color: #8AE234;">"d"</span> org-clock-display)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org33ec7c5"></a>hydra-org<br /> | |
<div class="outline-text-5" id="text-4-0-2-10"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> | |
(<span style="color: #96CBFE;">defhydra</span> hydra-org (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;">^Org Mode^</span> | |
<span style="color: #8AE234;">------------------------------------------------------------------------</span> | |
<span style="color: #8AE234;">_y_ ivy todo _d_ deadline _t_ tags _e_mphasis-s</span> | |
<span style="color: #8AE234;">_c_ calendar _w_ widen _A_ align tags _E_mphasis-h</span> | |
<span style="color: #8AE234;">_a_ agenda _h_ hide other _o_ goto _j_lock</span> | |
<span style="color: #8AE234;">_r_ refile _l_ store link _g_ goto all _s_chedule</span> | |
<span style="color: #8AE234;">_b_ sw. buffe _S_ sort todos _s_ sync</span> | |
<span style="color: #8AE234;">_i_ cliplink _R_ spart tree _p_ edit special</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"SPC o"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"j"</span> hydra-org-clock/body) | |
(<span style="color: #8AE234;">"E"</span> org-hide-emphasis) | |
(<span style="color: #8AE234;">"e"</span> org-show-emphasis) | |
(<span style="color: #8AE234;">"y"</span> ivy-todo) | |
(<span style="color: #8AE234;">"c"</span> calendar) | |
(<span style="color: #8AE234;">"r"</span> org-refile) | |
(<span style="color: #8AE234;">"b"</span> org-switchb) | |
(<span style="color: #8AE234;">"i"</span> org-cliplink) | |
(<span style="color: #8AE234;">"s"</span> org-schedule) | |
(<span style="color: #8AE234;">"d"</span> org-deadline) | |
(<span style="color: #8AE234;">"w"</span> widenToCenter) | |
(<span style="color: #8AE234;">"h"</span> org-hide-other) | |
(<span style="color: #8AE234;">"l"</span> org-store-link) | |
(<span style="color: #8AE234;">"S"</span> org-sort-todos) | |
(<span style="color: #8AE234;">"R"</span> org-sparse-tree) | |
(<span style="color: #8AE234;">"t"</span> counsel-org-tag) | |
(<span style="color: #8AE234;">"p"</span> org-edit-special) | |
(<span style="color: #8AE234;">"o"</span> counsel-org-goto) | |
(<span style="color: #8AE234;">"g"</span> counsel-org-goto-all) | |
(<span style="color: #8AE234;">"A"</span> org-align-all-tags) | |
(<span style="color: #8AE234;">"T"</span> org-set-tags-command) | |
(<span style="color: #8AE234;">"c"</span> counsel-org-capture) | |
(<span style="color: #8AE234;">"n"</span> org-narrow-to-subtree) | |
(<span style="color: #8AE234;">"x"</span> org-toggle-latex-fragment) | |
(<span style="color: #8AE234;">"u"</span> org-archive-subtree-default) | |
(<span style="color: #8AE234;">"a"</span> hydra-org-agenda/body)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org185bb34"></a>hydra-fountain<br /> | |
<div class="outline-text-5" id="text-4-0-2-11"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-fountain (<span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;">^Fountain Mode^</span> | |
<span style="color: #8AE234;">------------------------------------------------------------------------</span> | |
<span style="color: #8AE234;">shift_u_p out_p_rev _D_crefresh page_B_reak</span> | |
<span style="color: #8AE234;">shift_d_own out_n_extk _s_ add snum no_t_e</span> | |
<span style="color: #8AE234;">upc_a_se out_u_p _r_ rem snum font_l_ock</span> | |
<span style="color: #8AE234;">downc_A_se out_b_ackw goto_P_age _C_lone</span> | |
<span style="color: #8AE234;">e_x_port out_f_orw goto_S_cene</span> | |
<span style="color: #8AE234;"> out_h_mark _c_ount pages</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"SPC o"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"u"</span> fountain-shift-up) | |
(<span style="color: #8AE234;">"d"</span> fountain-shift-down) | |
(<span style="color: #8AE234;">"A"</span> fountain-upcase-line-and-newline) | |
(<span style="color: #8AE234;">"a"</span> fountain-upcase-line) | |
(<span style="color: #8AE234;">"0"</span> 'fountain-beginning-of-scene) | |
(<span style="color: #8AE234;">"4"</span> fountain-end-of-scene) | |
(<span style="color: #8AE234;">"n"</span> fountain-outline-next) | |
(<span style="color: #8AE234;">"p"</span> fountain-outline-previous) | |
(<span style="color: #8AE234;">"u"</span> fountain-outline-up) | |
(<span style="color: #8AE234;">"b"</span> fountain-outline-backward) | |
(<span style="color: #8AE234;">"f"</span> fountain-outline-forward) | |
(<span style="color: #8AE234;">"h"</span> fountain-outline-mark) | |
(<span style="color: #8AE234;">"D"</span> fountain-continued-dialog-refresh) | |
(<span style="color: #8AE234;">"s"</span> fountain-add-scene-numbers) | |
(<span style="color: #8AE234;">"r"</span> fountain-remove-scene-numbers) | |
(<span style="color: #8AE234;">"P"</span> fountain-goto-page) | |
(<span style="color: #8AE234;">"S"</span> fountain-goto-scene) | |
(<span style="color: #8AE234;">"c"</span> fountain-count-pages) | |
(<span style="color: #8AE234;">"B"</span> 'fountain-insert-page-break) | |
(<span style="color: #8AE234;">"t"</span> fountain-insert-note) | |
(<span style="color: #8AE234;">"l"</span> fountain-set-font-lock-decoration) | |
(<span style="color: #8AE234;">"C"</span> fountain-outline-to-indirect-buffer) | |
(<span style="color: #8AE234;">"x"</span> hydra-fountain-export-dispatch/body)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org9c0cdb5"></a>hydra-fountain-export-dispatch<br /> | |
<div class="outline-text-5" id="text-4-0-2-12"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-fountain-export-dispatch (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;">^Fountain Export Dispatch^</span> | |
<span style="color: #8AE234;">------------------------------------------------------------------------</span> | |
<span style="color: #8AE234;">_d_efault shell _c_ommand</span> | |
<span style="color: #8AE234;">fd_x_ _t_xt</span> | |
<span style="color: #8AE234;">_b_uffer</span> | |
<span style="color: #8AE234;">_f_ountain</span> | |
<span style="color: #8AE234;">_h_thml</span> | |
<span style="color: #8AE234;">_l_atex</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"SPC o"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"d"</span> fountain-export-default) | |
(<span style="color: #8AE234;">"x"</span> fountain-export-buffer-to-fdx) | |
(<span style="color: #8AE234;">"b"</span> fountain-export-buffer) | |
(<span style="color: #8AE234;">"f"</span> fountain-export-buffer-to-fountain) | |
(<span style="color: #8AE234;">"h"</span> fountain-export-buffer-to-html) | |
(<span style="color: #8AE234;">"l"</span> fountain-export-buffer-to-latex) | |
(<span style="color: #8AE234;">"c"</span> fountain-export-shell-command) | |
(<span style="color: #8AE234;">"t"</span> fountain-export-buffer-to-txt)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org0b48c05"></a>hydra-org-agenda<br /> | |
<div class="outline-text-5" id="text-4-0-2-13"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-org-agenda (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^Org Agenda^</span> | |
<span style="color: #8AE234;"> ^─^───────────^────────────^─────^───────────────^──</span> | |
<span style="color: #8AE234;"> _a_ agenda _6_ days</span> | |
<span style="color: #8AE234;"> _1_ day _7_ days</span> | |
<span style="color: #8AE234;"> _2_ days _f_ file to agenda</span> | |
<span style="color: #8AE234;"> _3_ days</span> | |
<span style="color: #8AE234;"> _4_ days</span> | |
<span style="color: #8AE234;"> _5_ days</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"a"</span> org-agenda) | |
(<span style="color: #8AE234;">"f"</span> org-agenda-file-to-front) | |
(<span style="color: #8AE234;">"1"</span> org-1-day-agenda) | |
(<span style="color: #8AE234;">"2"</span> org-2-days-agenda) | |
(<span style="color: #8AE234;">"3"</span> org-3-days-agenda) | |
(<span style="color: #8AE234;">"4"</span> org-4-days-agenda) | |
(<span style="color: #8AE234;">"5"</span> org-5-days-agenda) | |
(<span style="color: #8AE234;">"6"</span> org-6-days-agenda) | |
(<span style="color: #8AE234;">"7"</span> org-7-days-agenda)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org2fb268b"></a>hydra-text-motions<br /> | |
<div class="outline-text-5" id="text-4-0-2-14"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-text-motions (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Text Motions^</span> | |
<span style="color: #8AE234;"> ----------------------------------------------------------</span> | |
<span style="color: #8AE234;"> _l_ line _e_ word end → _p_ sipar dl_i_ne</span> | |
<span style="color: #8AE234;"> _w_ word _F_ word beg ← _P_ spar</span> | |
<span style="color: #8AE234;"> _s_ subword _E_ word end ← _y_ yipar</span> | |
<span style="color: #8AE234;"> _u_ word ↑ _b_ sel in. blck _Y_ ypar</span> | |
<span style="color: #8AE234;"> _d_ word ↓ _B_ sel blck dp_a_p</span> | |
<span style="color: #8AE234;"> _f_ word beg → _o_pen link dp_A_ip</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"DEL"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"a"</span> duplicate-inner-paragraph) | |
(<span style="color: #8AE234;">"A"</span> duplicate-a-paragrah) | |
(<span style="color: #8AE234;">"i"</span> duplicate-line) | |
(<span style="color: #8AE234;">"y"</span> yank-paragraph-macro) | |
(<span style="color: #8AE234;">"Y"</span> yank-inner-paragraph) | |
(<span style="color: #8AE234;">"b"</span> org-inner-block) | |
(<span style="color: #8AE234;">"B"</span> org-outer-block) | |
(<span style="color: #8AE234;">"P"</span> select-paragraph) | |
(<span style="color: #8AE234;">"p"</span> select-inner-paragraph) | |
(<span style="color: #8AE234;">"o"</span> link-hint-open-link) | |
(<span style="color: #8AE234;">"l"</span> avy-goto-line) | |
(<span style="color: #8AE234;">"w"</span> avy-goto-word-0) | |
(<span style="color: #8AE234;">"s"</span> avy-goto-subword-0) | |
(<span style="color: #8AE234;">"u"</span> avy-goto-word-0-above) | |
(<span style="color: #8AE234;">"d"</span> avy-goto-word-0-below) | |
(<span style="color: #8AE234;">"f"</span> evilem-motion-forward-word-begin) | |
(<span style="color: #8AE234;">"e"</span> evilem-motion-forward-word-end) | |
(<span style="color: #8AE234;">"F"</span> evilem-motion-backward-word-begin) | |
(<span style="color: #8AE234;">"E"</span> evilem-motion-backward-word-end)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgabec8e5"></a>hydra-paredit<br /> | |
<div class="outline-text-5" id="text-4-0-2-15"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-paredit (<span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> run) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Paredit^</span> | |
<span style="color: #8AE234;"> ----------------------------------------------------------</span> | |
<span style="color: #8AE234;"> w_r_ap _l_</span> | |
<span style="color: #8AE234;"> _0_ slurp forward _h_</span> | |
<span style="color: #8AE234;"> _)_ barf forward _j_</span> | |
<span style="color: #8AE234;"> _9_ slurp backards _l_</span> | |
<span style="color: #8AE234;"> _(_ barf backwards</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"DEL"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Kill Stuff</span> | |
(<span style="color: #8AE234;">"r"</span> paredit-wrap-round) | |
(<span style="color: #8AE234;">"0"</span> paredit-forward-slurp-sexp) | |
(<span style="color: #8AE234;">")"</span> paredit-forward-barf-sexp) | |
(<span style="color: #8AE234;">"9"</span> paredit-backward-slurp-sexp) | |
(<span style="color: #8AE234;">"("</span> paredit-backward-barf-sexp) | |
(<span style="color: #8AE234;">"l"</span> paredit-forward) | |
(<span style="color: #8AE234;">"h"</span> paredit-backward) | |
(<span style="color: #8AE234;">"j"</span> paredit-forward-down) | |
(<span style="color: #8AE234;">"k"</span> paredit-backward-up)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org31a254c"></a>hydra-fill<br /> | |
<div class="outline-text-5" id="text-4-0-2-16"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-fill (<span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> nil <span style="color: #DAD085;">:foreign-keys</span> run) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Fill^</span> | |
<span style="color: #8AE234;"> --------------------------------------------------</span> | |
<span style="color: #8AE234;"> _h_ 59j _j_ 85j _k_ 105j _u_ unfill _p_par</span> | |
<span style="color: #8AE234;"> _H_ 79j _J_ 95j _K_ 125j _i_ fill _n_par</span> | |
<span style="color: #8AE234;"> _a_ 79f _s_ 85f _d_ 105f _t_runcate</span> | |
<span style="color: #8AE234;"> _A_ 59f _S_ 95f _D_ 115f</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"DEL"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"d"</span> hydra-deselect) | |
(<span style="color: #8AE234;">"u"</span> my/unfill-paragraph) | |
(<span style="color: #8AE234;">"h"</span> par-justify-59) | |
(<span style="color: #8AE234;">"H"</span> par-justify-79) | |
(<span style="color: #8AE234;">"j"</span> par-justify-85) | |
(<span style="color: #8AE234;">"J"</span> par-justify-95) | |
(<span style="color: #8AE234;">"k"</span> par-justify-105) | |
(<span style="color: #8AE234;">"K"</span> par-justify-115) | |
(<span style="color: #8AE234;">"a"</span> par-fit-79) | |
(<span style="color: #8AE234;">"A"</span> par-fit-59) | |
(<span style="color: #8AE234;">"s"</span> par-fit-85) | |
(<span style="color: #8AE234;">"S"</span> par-fit-95) | |
(<span style="color: #8AE234;">"d"</span> par-fit-105) | |
(<span style="color: #8AE234;">"D"</span> par-fit-125) | |
(<span style="color: #8AE234;">"i"</span> fill-paragraph) | |
(<span style="color: #8AE234;">"n"</span> my-paragraph-forward) | |
(<span style="color: #8AE234;">"p"</span> my-paragraph-backwards) | |
(<span style="color: #8AE234;">"t"</span> toggle-truncate-lines)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org94a22e0"></a>hydra-quick-navigation<br /> | |
<div class="outline-text-5" id="text-4-0-2-17"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-quick-navigation (<span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:foreign-keys</span> run <span style="color: #DAD085;">:exit</span> nil) | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> ^</span> | |
<span style="color: #8AE234;"> ^Quick Navigation^</span> | |
<span style="color: #8AE234;"> ------------------------------------------------</span> | |
<span style="color: #8AE234;"> _k_ ↑ _n_exth _[_ bpar _t_op</span> | |
<span style="color: #8AE234;"> _j_ ↓ _p_revioush _]_ fparl _m_idlle</span> | |
<span style="color: #8AE234;"> _l_ ↑ _d_ backsect _g_g _o_link _v_down</span> | |
<span style="color: #8AE234;"> _h_ ↓ _a_ forwsect _G_end av_y_line _V_up</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">","</span> nil) | |
(<span style="color: #8AE234;">"t"</span> evil-window-top) | |
(<span style="color: #8AE234;">"m"</span> evil-window-middle) | |
(<span style="color: #8AE234;">"v"</span> vertigo-jump-down) | |
(<span style="color: #8AE234;">"V"</span> vertigo-jump-up) | |
(<span style="color: #8AE234;">"o"</span> link-hint-open-link) | |
(<span style="color: #8AE234;">"y"</span> avy-goto-line) | |
(<span style="color: #8AE234;">"g"</span> evil-goto-first-line) | |
(<span style="color: #8AE234;">"G"</span> evil-goto-line) | |
(<span style="color: #8AE234;">"d"</span> evil-backward-section-begin) | |
(<span style="color: #8AE234;">"a"</span> evil-forward-section-begin) | |
(<span style="color: #8AE234;">"]"</span> my-paragraph-forward) | |
(<span style="color: #8AE234;">"["</span> my-paragraph-backwards) | |
(<span style="color: #8AE234;">"j"</span> scroll-up) | |
(<span style="color: #8AE234;">"k"</span> scroll-down) | |
(<span style="color: #8AE234;">"l"</span> scroll-up-command) | |
(<span style="color: #8AE234;">"h"</span> scroll-down-command) | |
(<span style="color: #8AE234;">"p"</span> org-previous-visible-heading) | |
(<span style="color: #8AE234;">"n"</span> org-next-visible-heading)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgae469a3"></a>hydra-help<br /> | |
<div class="outline-text-5" id="text-4-0-2-18"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-help (<span style="color: #DAD085;">:color</span> blue <span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:exit</span> t <span style="color: #DAD085;">:foreign-keys</span> nil) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Better to exit after any command because otherwise helm gets in a</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">mess, set hint to nil: written out manually.</span> | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> Describe ^^Keys ^^Search ^^Documentation _q_uit</span> | |
<span style="color: #8AE234;"> ---------------------------------------------------------------</span> | |
<span style="color: #8AE234;"> _f_unction _k_eybinding _a_propros _i_nfo</span> | |
<span style="color: #8AE234;"> packag_e_ _K_eybrief _c_ommand _M_an</span> | |
<span style="color: #8AE234;"> _M_ode _w_here-is _d_ocs</span> | |
<span style="color: #8AE234;"> _v_ariable _m_ajor _s_ymbol</span> | |
<span style="color: #8AE234;"> _p_oint</span> | |
<span style="color: #8AE234;"> _v_ariable</span> | |
<span style="color: #8AE234;"> s_y_ntax</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Describe</span> | |
(<span style="color: #8AE234;">"f"</span> helpful-callable) | |
(<span style="color: #8AE234;">"e"</span> describe-package) | |
(<span style="color: #8AE234;">"M"</span> describe-mode) | |
(<span style="color: #8AE234;">"m"</span> show-major-mode) | |
(<span style="color: #8AE234;">"p"</span> helpful-at-point) | |
(<span style="color: #8AE234;">"v"</span> helpful-variable) | |
(<span style="color: #8AE234;">"y"</span> describe-syntax) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Keys</span> | |
(<span style="color: #8AE234;">"k"</span> helpful-key) | |
(<span style="color: #8AE234;">"K"</span> describe-key-briefly) | |
(<span style="color: #8AE234;">"w"</span> where-is) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Search</span> | |
(<span style="color: #8AE234;">"a"</span> counsel-apropos) | |
(<span style="color: #8AE234;">"c"</span> helpful-command) | |
(<span style="color: #8AE234;">"d"</span> apropos-documentation) | |
(<span style="color: #8AE234;">"s"</span> info-lookup-symbol) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Documentation</span> | |
(<span style="color: #8AE234;">"i"</span> info) | |
(<span style="color: #8AE234;">"M"</span> man) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">quit</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org2e40cb8"></a>hydra-info-motions<br /> | |
<div class="outline-text-5" id="text-4-0-2-19"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-info-motions (<span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:foreign-keys</span> run <span style="color: #DAD085;">:exit</span> nil) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Better to exit after any command because otherwise helm gets in a</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">mess, set hint to nil: written out manually.</span> | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> Info Motions</span> | |
<span style="color: #8AE234;"> --------------------------------------------------------------------------</span> | |
<span style="color: #8AE234;"> _K_ info up _p_ prev page _n_ info prev _k_ evil up _b_ bset</span> | |
<span style="color: #8AE234;"> _J_ info down _n_ next page _p_ info next _j_ evil down _z_ bgo</span> | |
<span style="color: #8AE234;"> _l_ UP _u_ info up _h_ hist prev _o_ open links</span> | |
<span style="color: #8AE234;"> _h_ DOWN _t_ info toc _l_ hist next _m_ info menu</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"k"</span> evil-scroll-up) | |
(<span style="color: #8AE234;">"j"</span> evil-scroll-down) | |
(<span style="color: #8AE234;">"l"</span> evil-scroll-page-up) | |
(<span style="color: #8AE234;">"h"</span> evil-scroll-page-down) | |
(<span style="color: #8AE234;">"p"</span> backward-page) | |
(<span style="color: #8AE234;">"n"</span> forward-page) | |
(<span style="color: #8AE234;">"u"</span> Info-up) | |
(<span style="color: #8AE234;">"t"</span> Info-toc) | |
(<span style="color: #8AE234;">"n"</span> Info-next) | |
(<span style="color: #8AE234;">"p"</span> Info-prev) | |
(<span style="color: #8AE234;">"l"</span> Info-history-forward) | |
(<span style="color: #8AE234;">"h"</span> Info-history-back) | |
(<span style="color: #8AE234;">"o"</span> link-hint-open-link) | |
(<span style="color: #8AE234;">"m"</span> Info-menu) | |
(<span style="color: #8AE234;">"b"</span> bookmark-set) | |
(<span style="color: #8AE234;">"z"</span> counsel-bookmark) | |
(<span style="color: #8AE234;">"J"</span> Info-scroll-up) | |
(<span style="color: #8AE234;">"K"</span> Info-scroll-down)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org7096038"></a>hydra-goto-file<br /> | |
<div class="outline-text-5" id="text-4-0-2-20"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defhydra</span> hydra-goto-file (<span style="color: #DAD085;">:hint</span> nil <span style="color: #DAD085;">:foreign-keys</span> nil <span style="color: #DAD085;">:exit</span> t) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Better to exit after any command because otherwise helm gets in a</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">mess, set hint to nil: written out manually.</span> | |
<span style="color: #8AE234;">"</span> | |
<span style="color: #8AE234;"> Files</span> | |
<span style="color: #8AE234;"> ---------------------</span> | |
<span style="color: #8AE234;"> _u_nifacs _c_ustom</span> | |
<span style="color: #8AE234;"> _d_otfiles _a_genda</span> | |
<span style="color: #8AE234;"> _i_nit _m_arkdown</span> | |
<span style="color: #8AE234;"> i_n_dex da_y_</span> | |
<span style="color: #8AE234;"> i_3_</span> | |
<span style="color: #8AE234;"> "</span> | |
(<span style="color: #8AE234;">"q"</span> nil) | |
(<span style="color: #8AE234;">"<escape>"</span> nil) | |
(<span style="color: #8AE234;">"y"</span> find-day) | |
(<span style="color: #8AE234;">"u"</span> find-unifacs) | |
(<span style="color: #8AE234;">"d"</span> find-dotfiles) | |
(<span style="color: #8AE234;">"i"</span> find-init) | |
(<span style="color: #8AE234;">"n"</span> find-index) | |
(<span style="color: #8AE234;">"3"</span> find-i3-config) | |
(<span style="color: #8AE234;">"c"</span> find-custom-settings) | |
(<span style="color: #8AE234;">"a"</span> find-agenda) | |
(<span style="color: #8AE234;">"m"</span> find-scratch-markdown)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org767f070"></a>hydra-org-templates<br /> | |
<div class="outline-text-5" id="text-4-0-2-21"> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-orgc6a3a58" class="outline-4"> | |
<h4 id="orgc6a3a58"><span class="section-number-4">4.0.3</span> ivy-hydra</h4> | |
<div class="outline-text-4" id="text-4-0-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">use-package</span> <span style="color: #99CC99;">ivy-hydra</span> | |
<span style="color: #DAD085;">:ensure</span> t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3a3ee7f" class="outline-2"> | |
<h2 id="org3a3ee7f"><span class="section-number-2">5</span> Variables</h2> | |
<div class="outline-text-2" id="text-5"> | |
<p> | |
Here I put several smaller configurations that don't | |
warrant an entire use-package declaration. Maybe some of those should. | |
</p> | |
</div> | |
<div id="outline-container-orgaf913b5" class="outline-3"> | |
<h3 id="orgaf913b5"><span class="section-number-3">5.1</span> text variables</h3> | |
<div class="outline-text-3" id="text-5-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq</span> word-wrap nil) | |
(<span style="color: #96CBFE;">setq</span> desktop-save nil) | |
(<span style="color: #96CBFE;">setq</span> mouse-yank-at-point t) | |
(<span style="color: #96CBFE;">setq</span> scroll-conservatively 10) | |
(<span style="color: #96CBFE;">setq</span> require-final-newline nil) | |
(<span style="color: #96CBFE;">setq</span> sentence-end-double-space nil) | |
(<span style="color: #96CBFE;">setq</span> global-hl-line-mode t) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq text-scale-mode-step 1.05)</span> | |
(<span style="color: #96CBFE;">setq</span> mode-require-final-newline nil) | |
(<span style="color: #96CBFE;">setq-default</span> display-line-numbers nil) | |
(<span style="color: #96CBFE;">setq</span> evil-respect-visual-line-mode nil) | |
(<span style="color: #96CBFE;">setq</span> save-interprogram-paste-before-kill nil) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-to-list 'default-frame-alist '(font . "Ubuntu Mono-11"))</span> | |
(<span style="color: #96CBFE;">setq</span> org-format-latex-options (plist-put org-format-latex-options <span style="color: #DAD085;">:scale</span> 1.3)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc20a403" class="outline-3"> | |
<h3 id="orgc20a403"><span class="section-number-3">5.2</span> other variables</h3> | |
<div class="outline-text-3" id="text-5-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq</span> calc-display-trail nil) | |
(<span style="color: #96CBFE;">setq</span> comint-prompt-read-only t) | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\.inputrc\\'"</span> . sh-mode)) | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\.bash_aliases\\'"</span> . sh-mode)) | |
(<span style="color: #96CBFE;">setq</span> python-shell-completion-native-enable nil) | |
(<span style="color: #96CBFE;">setq</span> python-shell-prompt-detect-failure-warning nil) | |
(<span style="color: #96CBFE;">setq</span> python-shell-interpreter <span style="color: #8AE234;">"python3"</span>) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq python-shell-interpreter "ipython3"</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">python-shell-interpreter-args "-i --simple-prompt")</span> | |
(<span style="color: #96CBFE;">setq</span> backup-directory-alist '((<span style="color: #8AE234;">"."</span> . <span style="color: #8AE234;">"~/.emacs.d/backups"</span>))) | |
(<span style="color: #96CBFE;">setq</span> version-control t) | |
(<span style="color: #96CBFE;">setq</span> vc-make-backup-files t) | |
(<span style="color: #96CBFE;">setq</span> delete-old-versions -1) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-save-list" t)))</span> | |
(fset 'yes-or-no-p 'y-or-n-p) | |
(<span style="color: #96CBFE;">setq</span> kill-buffer-query-functions (delq 'process-kill-buffer-query-function kill-buffer-query-functions)) | |
(<span style="color: #96CBFE;">setq</span> custom-safe-themes t) | |
(<span style="color: #96CBFE;">setq</span> desktop-dirname <span style="color: #8AE234;">"~/.emacs.d/desktop"</span>) | |
(<span style="color: #96CBFE;">setq</span> initial-buffer-choice nil) | |
(<span style="color: #96CBFE;">setq</span> visible-bell nil) | |
(<span style="color: #96CBFE;">setq</span> tool-bar-mode nil) | |
(<span style="color: #96CBFE;">setq</span> evil-insert-state-message nil) | |
(<span style="color: #96CBFE;">setq</span> frame-title-format '(<span style="color: #8AE234;">"%b %n "</span>)) | |
(<span style="color: #96CBFE;">setq-default</span> fringe-indicator-alist (assq-delete-all 'truncation fringe-indicator-alist)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5341e2e" class="outline-3"> | |
<h3 id="org5341e2e"><span class="section-number-3">5.3</span> buffer variables</h3> | |
<div class="outline-text-3" id="text-5-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">https://stackoverflow.com/questions/1322591/tracking-down-max-specpdl-size-errors-in-emacs</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(setq max-specpdl-size 5)</span> | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\por\\'"</span> . prog-mode)) | |
(<span style="color: #96CBFE;">setq</span> debug-on-error nil) | |
(<span style="color: #96CBFE;">setq</span> frame-title-format | |
'(buffer-file-name <span style="color: #8AE234;">"%f"</span> | |
(dired-directory dired-directory <span style="color: #8AE234;">"%b"</span>))) | |
(<span style="color: #96CBFE;">setq</span> doc-view-continuous t) | |
(<span style="color: #96CBFE;">setq</span> bookmark-save-flag 1) | |
(<span style="color: #96CBFE;">require</span> '<span style="color: #99CC99;">saveplace</span>) | |
(<span style="color: #96CBFE;">setq</span> browse-url-browser-function 'browse-url-generic | |
browse-url-generic-program <span style="color: #8AE234;">"google-chrome"</span>) | |
(<span style="color: #96CBFE;">setq</span> apropos-do-all t) | |
(<span style="color: #96CBFE;">setq</span> load-prefer-newer t) | |
(<span style="color: #96CBFE;">setq</span> vc-follow-symlinks t) | |
(<span style="color: #96CBFE;">setq</span> eshell-banner-message <span style="color: #8AE234;">""</span>) | |
(<span style="color: #96CBFE;">setq</span> inhibit-startup-message t) | |
(<span style="color: #96CBFE;">setq</span> register-preview-delay 0.15) | |
(<span style="color: #96CBFE;">setq</span> browse-kill-ring-highlight-current-entry t) | |
(<span style="color: #96CBFE;">setq</span> browse-kill-ring-highlight-inserted-item 'pulse) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5819026" class="outline-3"> | |
<h3 id="org5819026"><span class="section-number-3">5.4</span> windows variables</h3> | |
<div class="outline-text-3" id="text-5-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq</span> windmove-wrap-around t) | |
(<span style="color: #96CBFE;">setq</span> help-window-select t) | |
(<span style="color: #96CBFE;">setq</span> window-resize-pixelwise t) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org689a308" class="outline-3"> | |
<h3 id="org689a308"><span class="section-number-3">5.5</span> abbrevs config variables</h3> | |
<div class="outline-text-3" id="text-5-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq-default</span> abbrev-mode t) | |
(<span style="color: #96CBFE;">setq</span> save-abbrevs 'silently) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org0f6b4eb" class="outline-3"> | |
<h3 id="org0f6b4eb"><span class="section-number-3">5.6</span> backup and autosave variables</h3> | |
<div class="outline-text-3" id="text-5-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">setq</span> vc-make-backup-files t) | |
(<span style="color: #96CBFE;">setq</span> version-control t) | |
(<span style="color: #96CBFE;">setq-default</span> save-place t) | |
(<span style="color: #96CBFE;">setq</span> auto-save-default t) | |
(<span style="color: #96CBFE;">setq</span> auto-save-visited-file-name t) | |
(<span style="color: #96CBFE;">setq</span> vc-make-backup-files t) | |
(<span style="color: #96CBFE;">setq</span> delete-old-versions -1) | |
(<span style="color: #96CBFE;">setq</span> auto-save-file-name-transforms '((<span style="color: #8AE234;">".*"</span> <span style="color: #8AE234;">"auto-save-list/"</span> t))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org4d413ab" class="outline-2"> | |
<h2 id="org4d413ab"><span class="section-number-2">6</span> Hooks</h2> | |
<div class="outline-text-2" id="text-6"> | |
<p> | |
These hooks provide several mode specific configurations. | |
</p> | |
</div> | |
<div id="outline-container-org7ae7104" class="outline-3"> | |
<h3 id="org7ae7104"><span class="section-number-3">6.1</span> lisp paredit hooks</h3> | |
<div class="outline-text-3" id="text-6-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(autoload 'enable-paredit-mode <span style="color: #8AE234;">"paredit"</span> <span style="color: #8AE234;">"Turn on pseudo-structural editing of Lisp code."</span> t) | |
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) | |
(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode) | |
(add-hook 'ielm-mode-hook #'enable-paredit-mode) | |
(add-hook 'lisp-mode-hook #'enable-paredit-mode) | |
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) | |
(add-hook 'scheme-mode-hook #'enable-paredit-mode) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org916ee03" class="outline-3"> | |
<h3 id="org916ee03"><span class="section-number-3">6.2</span> neotree hook</h3> | |
<div class="outline-text-3" id="text-6-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(remove-hook 'neo-enter-hook 'neotree-hide)</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orge821162" class="outline-3"> | |
<h3 id="orge821162"><span class="section-number-3">6.3</span> info-mode hook</h3> | |
<div class="outline-text-3" id="text-6-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-hook 'Info-mode-hook 'disable-cusor) | |
(add-hook 'Info-mode-hook 'centered-cursor-mode) | |
(add-hook 'Info-mode-hook 'hl-line-mode) | |
(add-hook 'Info-mode-hook 'hydra-info-motions/body) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5bf7aac" class="outline-3"> | |
<h3 id="org5bf7aac"><span class="section-number-3">6.4</span> text hook</h3> | |
<div class="outline-text-3" id="text-6-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-hook 'text-mode-hook 'line-numbers)</span> | |
(add-hook 'text-mode-hook 'subword-mode) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org1ec3b55" class="outline-3"> | |
<h3 id="org1ec3b55"><span class="section-number-3">6.5</span> fountain-mode-hook</h3> | |
<div class="outline-text-3" id="text-6-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-hook 'fountain-mode-hook 'outline-minor-mode) | |
(add-hook 'fountain-mode-hook 'fountain-spell-br) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org54faac4" class="outline-3"> | |
<h3 id="org54faac4"><span class="section-number-3">6.6</span> org-noter-notes-mode-hook</h3> | |
<div class="outline-text-3" id="text-6-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(remove-hook 'org-noter-notes-mode-hook 'org-noter-keys) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org99ac495" class="outline-3"> | |
<h3 id="org99ac495"><span class="section-number-3">6.7</span> pdf view hook</h3> | |
<div class="outline-text-3" id="text-6-7"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-hook 'pdf-view-mode-hook 'pdf-annot-minor-mode) | |
(add-hook 'pdf-view-mode-hook 'pdf-links-minor-mode) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org3446e2d" class="outline-3"> | |
<h3 id="org3446e2d"><span class="section-number-3">6.8</span> yas-after-exit-snippet-hook</h3> | |
<div class="outline-text-3" id="text-6-8"> | |
</div> | |
</div> | |
<div id="outline-container-org01ce20d" class="outline-3"> | |
<h3 id="org01ce20d"><span class="section-number-3">6.9</span> before save hook</h3> | |
<div class="outline-text-3" id="text-6-9"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-hook 'before-save-hook 'delete-trailing-whitespace)</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5014ea5" class="outline-3"> | |
<h3 id="org5014ea5"><span class="section-number-3">6.10</span> normal entry hook</h3> | |
<div class="outline-text-3" id="text-6-10"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-hook 'evil-insert-state-exit-hook 'my-quiet-save-buffer)</span> | |
(remove-hook 'evil-insert-state-exit-hook 'my-quiet-save-buffer) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org210dab3" class="outline-3"> | |
<h3 id="org210dab3"><span class="section-number-3">6.11</span> nov mode hook</h3> | |
<div class="outline-text-3" id="text-6-11"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-hook 'nov-mode-hook 'line-numbers)</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org18666e4" class="outline-3"> | |
<h3 id="org18666e4"><span class="section-number-3">6.12</span> prog hook</h3> | |
<div class="outline-text-3" id="text-6-12"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-hook 'prog-mode-hook 'line-numbers)</span> | |
(add-hook 'prog-mode-hook 'flycheck-mode) | |
(add-hook 'prog-mode-hook 'electric-pair-local-mode) | |
(add-hook 'prog-mode-hook 'outline-minor-mode) | |
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode) | |
(add-hook 'prog-mode-hook 'subword-mode) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org38f7ee7" class="outline-3"> | |
<h3 id="org38f7ee7"><span class="section-number-3">6.13</span> vimrc mode</h3> | |
<div class="outline-text-3" id="text-6-13"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-hook 'vimrc-mode-hook 'hs-minor-mode)</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org9e8d372" class="outline-3"> | |
<h3 id="org9e8d372"><span class="section-number-3">6.14</span> undo-tree hook</h3> | |
<div class="outline-text-3" id="text-6-14"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-hook 'undo-tree-visualizer-mode-hook 'evil-window-move-very-bottom) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga1d2388" class="outline-3"> | |
<h3 id="orga1d2388"><span class="section-number-3">6.15</span> org capture hook</h3> | |
<div class="outline-text-3" id="text-6-15"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-hook 'org-capture-mode-hook (<span style="color: #96CBFE;">lambda</span> () | |
(evil-insert-state) | |
(evil-window-move-very-bottom))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org4782668" class="outline-3"> | |
<h3 id="org4782668"><span class="section-number-3">6.16</span> calendar mode hook</h3> | |
<div class="outline-text-3" id="text-6-16"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-hook 'calendar-mode-hook (<span style="color: #96CBFE;">lambda</span> () | |
(my-evil-window-vsplit) | |
(evil-window-move-very-bottom))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgbd8cc7f" class="outline-3"> | |
<h3 id="orgbd8cc7f"><span class="section-number-3">6.17</span> org-hook</h3> | |
<div class="outline-text-3" id="text-6-17"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(add-hook 'org-mode-hook 'minimap-mode)</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgfbcdd22" class="outline-3"> | |
<h3 id="orgfbcdd22"><span class="section-number-3">6.18</span> org-agenda-mode-hook</h3> | |
<div class="outline-text-3" id="text-6-18"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-hook 'org-agenda-mode-hook | |
(<span style="color: #96CBFE;">lambda</span> () | |
(<span style="color: #96CBFE;">setq</span> display-line-numbers nil) | |
(<span style="color: #96CBFE;">setq</span> truncate-lines t))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org1aafa2d" class="outline-3"> | |
<h3 id="org1aafa2d"><span class="section-number-3">6.19</span> python mode jedi hook</h3> | |
<div class="outline-text-3" id="text-6-19"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(add-hook 'python-mode-hook 'elpy-mode) | |
(add-hook 'python-mode-hook 'fill-79) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgb260826" class="outline-2"> | |
<h2 id="orgb260826"><span class="section-number-2">7</span> Modes</h2> | |
<div class="outline-text-2" id="text-7"> | |
<p> | |
These are some settings or commands that are not variable assignments. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(eldoc-mode -1) | |
(subword-mode) | |
(savehist-mode 1) | |
(menu-bar-mode -1) | |
(tool-bar-mode -1) | |
(show-paren-mode 1) | |
(scroll-bar-mode -1) | |
(blink-cursor-mode 0) | |
(global-eldoc-mode -1) | |
(global-visual-line-mode) | |
(global-auto-revert-mode 1) | |
(horizontal-scroll-bar-mode -1) | |
(put 'erase-buffer 'disabled nil) | |
(put 'narrow-to-region 'disabled nil) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org424fe01" class="outline-2"> | |
<h2 id="org424fe01"><span class="section-number-2">8</span> Aliases</h2> | |
<div class="outline-text-2" id="text-8"> | |
<p> | |
These aliases work similarly to bash aliases, but on <code>M-x</code> instead. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">menu</span> 'menu-bar-mode) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">org</span> 'org-mode) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">evil</span> 'evil-mode) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">par</span> 'package-delete) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">pai</span> 'package-install) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">cug</span> 'customize-group) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">emacs</span> 'evil-emacs-state) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">tangle</span> 'org-babel-tangle) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">pas</span> 'package-list-packages) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">new-frame</span> 'make-frame-command) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">renameBoth</span> 'rename-file-and-buffer) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">agg</span> 'aggressive-fill-paragraph-mode) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">path</span> 'my-put-file-name-on-clipboard) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">changeDict</span> 'ispell-change-dictionary) | |
(<span style="color: #96CBFE;">defalias</span> '<span style="color: #FFD2A7;">lorempar</span> 'Lorem-ipsum-insert-paragraphs) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org6217b28" class="outline-2"> | |
<h2 id="org6217b28"><span class="section-number-2">9</span> Registers</h2> | |
<div class="outline-text-2" id="text-9"> | |
<p> | |
I use these registers to quickly visit files using | |
<code>jump-to-register</code>. | |
</p> | |
</div> | |
</div> | |
<div id="outline-container-orgeb2abcb" class="outline-2"> | |
<h2 id="orgeb2abcb"><span class="section-number-2">10</span> Functions</h2> | |
<div class="outline-text-2" id="text-10"> | |
<p> | |
These functions are mostly adapted from the internet. I | |
created a few after a learned a bit about Elisp. | |
</p> | |
</div> | |
<div id="outline-container-org94a38fe" class="outline-3"> | |
<h3 id="org94a38fe"><span class="section-number-3">10.1</span> org</h3> | |
<div class="outline-text-3" id="text-10-1"> | |
</div> | |
<div id="outline-container-orga38c105" class="outline-4"> | |
<h4 id="orga38c105"><span class="section-number-4">10.1.1</span> tangle</h4> | |
<div class="outline-text-4" id="text-10-1-1"> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="orgca272e6"></a>init tangle<br /> | |
<div class="outline-text-5" id="text-10-1-1-1"> | |
<p> | |
Save current file, tangle it and load. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">setq</span> user-init-file <span style="color: #8AE234;">"~/.emacs.d/init.el"</span>) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">init-tangle</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(my-quiet-save-buffer) | |
(widen) | |
(org-babel-tangle) | |
(load-file user-init-file) | |
(message <span style="color: #8AE234;">"emacs ready"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgf36feb8"></a>init tangle restart<br /> | |
<div class="outline-text-5" id="text-10-1-1-2"> | |
<p> | |
Save, tangle and restart. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">tangle-restart</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(widen) | |
(my-quiet-save-buffer) | |
(org-babel-tangle) | |
(shell-command <span style="color: #8AE234;">"~/.maps/bin/launchers/emacs/rel"</span>)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-org09bfc02" class="outline-4"> | |
<h4 id="org09bfc02"><span class="section-number-4">10.1.2</span> org hide</h4> | |
<div class="outline-text-4" id="text-10-1-2"> | |
<p> | |
Hide everything else but the current heading. Replaced with <code>outline-hide-other</code>. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-hide-other</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(point-to-register 'z) | |
(org-shifttab) | |
(jump-to-register 'z) | |
(org-cycle) | |
(message <span style="color: #8AE234;">""</span>)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgf395c3f" class="outline-4"> | |
<h4 id="orgf395c3f"><span class="section-number-4">10.1.3</span> org agenda</h4> | |
<div class="outline-text-4" id="text-10-1-3"> | |
<p> | |
Shows the agenda for the different days. | |
</p> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="orgb72d141"></a>org 1 day agenda<br /> | |
<div class="outline-text-5" id="text-10-1-3-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-1-day-agenda</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 1)) | |
(org-agenda t <span style="color: #8AE234;">"a"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org6959b45"></a>org 2 days agenda<br /> | |
<div class="outline-text-5" id="text-10-1-3-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-2-days-agenda</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 2)) | |
(org-agenda t <span style="color: #8AE234;">"a"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgbc5c590"></a>org 3 days agenda<br /> | |
<div class="outline-text-5" id="text-10-1-3-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-3-days-agenda</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 3)) | |
(org-agenda t <span style="color: #8AE234;">"a"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org4e69cd1"></a>org 4 days agenda<br /> | |
<div class="outline-text-5" id="text-10-1-3-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-4-days-agenda</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 4)) | |
(org-agenda t <span style="color: #8AE234;">"a"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org5feabd6"></a>org 5 days agenda<br /> | |
<div class="outline-text-5" id="text-10-1-3-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-5-days-agenda</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 5)) | |
(org-agenda t <span style="color: #8AE234;">"a"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org7997ec7"></a>org 6 days agenda<br /> | |
<div class="outline-text-5" id="text-10-1-3-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-6-days-agenda</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 6)) | |
(org-agenda t <span style="color: #8AE234;">"a"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="org3b3179f"></a>org 7 days agenda<br /> | |
<div class="outline-text-5" id="text-10-1-3-7"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-7-days-agenda</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 7)) | |
(org-agenda t <span style="color: #8AE234;">"a"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-orga3e0959" class="outline-4"> | |
<h4 id="orga3e0959"><span class="section-number-4">10.1.4</span> org emphasis markers</h4> | |
<div class="outline-text-4" id="text-10-1-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-hide-emphasis</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">setq</span> org-hide-emphasis-markers t) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) | |
(org-mode-restart))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-show-emphasis</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">setq</span> org-hide-emphasis-markers nil) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) | |
(org-mode-restart))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org825d923" class="outline-4"> | |
<h4 id="org825d923"><span class="section-number-4">10.1.5</span> org jump show</h4> | |
<div class="outline-text-4" id="text-10-1-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">jump-to-point-and-show</span> () | |
<span style="color: #8AE234;">"Switch to a cloned buffer's base buffer and move point to the</span> | |
<span style="color: #8AE234;">cursor position in the clone."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((buf (buffer-base-buffer))) | |
(<span style="color: #96CBFE;">unless</span> buf | |
(<span style="color: #ff982d; font-weight: bold;">error</span> <span style="color: #8AE234;">"You need to be in a cloned buffer!"</span>)) | |
(<span style="color: #96CBFE;">let</span> ((pos (point)) | |
(win (car (get-buffer-window-list buf)))) | |
(<span style="color: #96CBFE;">if</span> win | |
(select-window win) | |
(other-window 1) | |
(switch-to-buffer buf)) | |
(goto-char pos) | |
(<span style="color: #96CBFE;">when</span> (invisible-p (point)) | |
(show-branches))) | |
(org-show-children))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org17cd711" class="outline-3"> | |
<h3 id="org17cd711"><span class="section-number-3">10.2</span> org finalize sort</h3> | |
<div class="outline-text-3" id="text-10-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">org-finalize-sort</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(org-capture-finalize) | |
(org-sort-todos)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org43f9f4e" class="outline-3"> | |
<h3 id="org43f9f4e"><span class="section-number-3">10.3</span> title case</h3> | |
<div class="outline-text-3" id="text-10-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">xah-title-case-region-or-line</span> (@begin @end) | |
<span style="color: #8AE234;">"Title case text between nearest brackets, or current line, or text selection.</span> | |
<span style="color: #8AE234;">Capitalize first letter of each word, except words like {to, of, the, a, in, or, and, …}. If a word already contains cap letters such as HTTP, URL, they are left as is.</span> | |
<span style="color: #8AE234;">When called in a elisp program, *begin *end are region boundaries.</span> | |
<span style="color: #8AE234;">URL `</span><span style="color: #99CC99;">http://ergoemacs.org/emacs/elisp_title_case_text.html</span><span style="color: #8AE234;">'</span> | |
<span style="color: #8AE234;">Version 2017-01-11"</span> | |
(<span style="color: #96CBFE;">interactive</span> | |
(<span style="color: #96CBFE;">if</span> (use-region-p) | |
(list (region-beginning) (region-end)) | |
(<span style="color: #96CBFE;">let</span> ( | |
$p1 | |
$p2 | |
($skipChars <span style="color: #8AE234;">"^\"<>(){}[]“”‘’‹›«»「」『』【】〖〗《》〈〉〔〕"</span>)) | |
(<span style="color: #96CBFE;">progn</span> | |
(skip-chars-backward $skipChars (line-beginning-position)) | |
(<span style="color: #96CBFE;">setq</span> $p1 (point)) | |
(skip-chars-forward $skipChars (line-end-position)) | |
(<span style="color: #96CBFE;">setq</span> $p2 (point))) | |
(list $p1 $p2)))) | |
(<span style="color: #96CBFE;">let*</span> ( | |
($strPairs [ | |
[<span style="color: #8AE234;">" A "</span> <span style="color: #8AE234;">" a "</span>] | |
[<span style="color: #8AE234;">" And "</span> <span style="color: #8AE234;">" and "</span>] | |
[<span style="color: #8AE234;">" At "</span> <span style="color: #8AE234;">" at "</span>] | |
[<span style="color: #8AE234;">" As "</span> <span style="color: #8AE234;">" as "</span>] | |
[<span style="color: #8AE234;">" By "</span> <span style="color: #8AE234;">" by "</span>] | |
[<span style="color: #8AE234;">" Be "</span> <span style="color: #8AE234;">" be "</span>] | |
[<span style="color: #8AE234;">" Into "</span> <span style="color: #8AE234;">" into "</span>] | |
[<span style="color: #8AE234;">" In "</span> <span style="color: #8AE234;">" in "</span>] | |
[<span style="color: #8AE234;">" Is "</span> <span style="color: #8AE234;">" is "</span>] | |
[<span style="color: #8AE234;">" It "</span> <span style="color: #8AE234;">" it "</span>] | |
[<span style="color: #8AE234;">" For "</span> <span style="color: #8AE234;">" for "</span>] | |
[<span style="color: #8AE234;">" Of "</span> <span style="color: #8AE234;">" of "</span>] | |
[<span style="color: #8AE234;">" Or "</span> <span style="color: #8AE234;">" or "</span>] | |
[<span style="color: #8AE234;">" On "</span> <span style="color: #8AE234;">" on "</span>] | |
[<span style="color: #8AE234;">" Via "</span> <span style="color: #8AE234;">" via "</span>] | |
[<span style="color: #8AE234;">" The "</span> <span style="color: #8AE234;">" the "</span>] | |
[<span style="color: #8AE234;">" That "</span> <span style="color: #8AE234;">" that "</span>] | |
[<span style="color: #8AE234;">" To "</span> <span style="color: #8AE234;">" to "</span>] | |
[<span style="color: #8AE234;">" Vs "</span> <span style="color: #8AE234;">" vs "</span>] | |
[<span style="color: #8AE234;">" With "</span> <span style="color: #8AE234;">" with "</span>] | |
[<span style="color: #8AE234;">" From "</span> <span style="color: #8AE234;">" from "</span>] | |
[<span style="color: #8AE234;">"'S "</span> <span style="color: #8AE234;">"'s "</span>] | |
[<span style="color: #8AE234;">"'T "</span> <span style="color: #8AE234;">"'t "</span>] | |
])) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(<span style="color: #96CBFE;">save-restriction</span> | |
(narrow-to-region @begin @end) | |
(upcase-initials-region (point-min) (point-max)) | |
(<span style="color: #96CBFE;">let</span> ((case-fold-search nil)) | |
(mapc | |
(<span style="color: #96CBFE;">lambda</span> ($x) | |
(goto-char (point-min)) | |
(<span style="color: #96CBFE;">while</span> | |
(search-forward (aref $x 0) nil t) | |
(replace-match (aref $x 1) <span style="color: #8AE234;">"FIXEDCASE"</span> <span style="color: #8AE234;">"LITERAL"</span>))) | |
$strPairs)))))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc45f2b8" class="outline-3"> | |
<h3 id="orgc45f2b8"><span class="section-number-3">10.4</span> text</h3> | |
<div class="outline-text-3" id="text-10-4"> | |
</div> | |
<div id="outline-container-orgac3e4dd" class="outline-4"> | |
<h4 id="orgac3e4dd"><span class="section-number-4">10.4.1</span> register</h4> | |
<div class="outline-text-4" id="text-10-4-1"> | |
<p> | |
Prevents some operations to send content to the clipboard. | |
</p> | |
</div> | |
<ol class="org-ol"> | |
<li><a id="orgc966db5"></a>register main<br /> | |
<div class="outline-text-5" id="text-10-4-1-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defmacro</span> <span style="color: #FFD2A7;">without-evil-mode</span> (<span style="color: #CFCB90;">&rest</span> do-this) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Check if evil-mode is on, and disable it temporarily</span> | |
`(<span style="color: #96CBFE;">let</span> ((evil-mode-is-on (<span style="color: #96CBFE;">evil-mode?</span>))) | |
(<span style="color: #96CBFE;">if</span> evil-mode-is-on | |
(<span style="color: #96CBFE;">disable-evil-mode</span>)) | |
(<span style="color: #96CBFE;">ignore-errors</span> | |
,@do-this) | |
(<span style="color: #96CBFE;">if</span> evil-mode-is-on | |
(<span style="color: #96CBFE;">enable-evil-mode</span>)))) | |
(<span style="color: #96CBFE;">defmacro</span> <span style="color: #FFD2A7;">evil-mode?</span> () | |
<span style="color: #8AE234;">"Checks if evil-mode is active. Uses Evil's state to check."</span> | |
`evil-state) | |
(<span style="color: #96CBFE;">defmacro</span> <span style="color: #FFD2A7;">disable-evil-mode</span> () | |
<span style="color: #8AE234;">"Disable evil-mode with visual cues."</span> | |
`(<span style="color: #96CBFE;">progn</span> | |
(evil-mode 0) | |
(message <span style="color: #8AE234;">"Evil mode disabled"</span>))) | |
(<span style="color: #96CBFE;">defmacro</span> <span style="color: #FFD2A7;">enable-evil-mode</span> () | |
<span style="color: #8AE234;">"Enable evil-mode with visual cues."</span> | |
`(<span style="color: #96CBFE;">progn</span> | |
(evil-mode 1) | |
(message <span style="color: #8AE234;">"Evil mode enabled"</span>))) | |
</pre> | |
</div> | |
</div> | |
</li> | |
<li><a id="orgb79f5d2"></a>clipboard bypassing<br /> | |
<div class="outline-text-5" id="text-10-4-1-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">delete: char</span> | |
(<span style="color: #96CBFE;">evil-define-operator</span> <span style="color: #FFD2A7;">evil-destroy-char</span> (beg end type register yank-handler) | |
<span style="color: #DAD085;">:motion</span> evil-forward-char | |
(evil-delete-char beg end type ?_)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">delete: char (backwards)</span> | |
(<span style="color: #96CBFE;">evil-define-operator</span> <span style="color: #FFD2A7;">evil-destroy-backward-char</span> (beg end type register yank-handler) | |
<span style="color: #DAD085;">:motion</span> evil-forward-char | |
(evil-delete-backward-char beg end type ?_)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">delete: text object</span> | |
(<span style="color: #96CBFE;">evil-define-operator</span> <span style="color: #FFD2A7;">evil-destroy</span> (beg end type register yank-handler) | |
<span style="color: #8AE234;">"Vim's 's' without clipboard."</span> | |
(evil-delete beg end type ?_ yank-handler)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">delete: to end of line</span> | |
(<span style="color: #96CBFE;">evil-define-operator</span> <span style="color: #FFD2A7;">evil-destroy-line</span> (beg end type register yank-handler) | |
<span style="color: #DAD085;">:motion</span> nil | |
<span style="color: #DAD085;">:keep-visual</span> t | |
(<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"<R><x>"</span>) | |
(evil-delete-line beg end type ?_ yank-handler)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">delete: whole line</span> | |
(<span style="color: #96CBFE;">evil-define-operator</span> <span style="color: #FFD2A7;">evil-destroy-whole-line</span> (beg end type register yank-handler) | |
<span style="color: #DAD085;">:motion</span> evil-line | |
(<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"<R><x>"</span>) | |
(evil-delete-whole-line beg end type ?_ yank-handler)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">change: text object</span> | |
(<span style="color: #96CBFE;">evil-define-operator</span> <span style="color: #FFD2A7;">evil-destroy-change</span> (beg end type register yank-handler delete-func) | |
(evil-change beg end type ?_ yank-handler delete-func)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">paste: before</span> | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">evil-destroy-paste-before</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">without-evil-mode</span> | |
(delete-region (point) (mark)) | |
(evil-paste-before 1))) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">paste: after</span> | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">evil-destroy-paste-after</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">without-evil-mode</span> | |
(delete-region (point) (mark)) | |
(evil-paste-after 1))) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">paste: text object</span> | |
(<span style="color: #96CBFE;">evil-define-operator</span> <span style="color: #FFD2A7;">evil-destroy-replace</span> (beg end type register yank-handler) | |
(evil-destroy beg end type register yank-handler) | |
(evil-paste-before 1 register)) | |
</pre> | |
</div> | |
</div> | |
</li> | |
</ol> | |
</div> | |
<div id="outline-container-org10ee9ba" class="outline-4"> | |
<h4 id="org10ee9ba"><span class="section-number-4">10.4.2</span> widen to center</h4> | |
<div class="outline-text-4" id="text-10-4-2"> | |
<p> | |
Leave narrowed state and center line on the frame. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">widenToCenter</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(widen) | |
(recenter))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orge6e6423" class="outline-4"> | |
<h4 id="orge6e6423"><span class="section-number-4">10.4.3</span> paragraph motions</h4> | |
<div class="outline-text-4" id="text-10-4-3"> | |
<p> | |
Goes through the start paragraphs instead of blank spaces. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-paragraph-backwards</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(previous-line) | |
(backward-paragraph) | |
(next-line)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-paragraph-forward</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(forward-paragraph) | |
(next-line)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org7f74e03" class="outline-3"> | |
<h3 id="org7f74e03"><span class="section-number-3">10.5</span> pdf occur</h3> | |
<div class="outline-text-3" id="text-10-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">pdf-occur-goto-quit</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(pdf-occur-goto-occurrence) | |
(delete-other-windows)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgd0af8b6" class="outline-3"> | |
<h3 id="orgd0af8b6"><span class="section-number-3">10.6</span> elpy insert</h3> | |
<div class="outline-text-3" id="text-10-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">elpy-insert</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(elpy-shell-send-region-or-buffer) | |
(windmove-down) | |
(comint-clear-buffer) | |
(evil-insert-state)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgd4a783d" class="outline-3"> | |
<h3 id="orgd4a783d"><span class="section-number-3">10.7</span> elpy reload</h3> | |
<div class="outline-text-3" id="text-10-7"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">elpy-reload</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(evil-normal-state) | |
(comint-clear-buffer) | |
(windmove-up) | |
(elpy-shell-send-region-or-buffer) | |
(windmove-down) | |
(comint-clear-buffer) | |
(evil-insert-state)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org85698a8" class="outline-3"> | |
<h3 id="org85698a8"><span class="section-number-3">10.8</span> date</h3> | |
<div class="outline-text-3" id="text-10-8"> | |
<p> | |
Show date. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-date</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(shell-command <span style="color: #8AE234;">"date"</span>))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgde4431d" class="outline-3"> | |
<h3 id="orgde4431d"><span class="section-number-3">10.9</span> set fill</h3> | |
<div class="outline-text-3" id="text-10-9"> | |
<p> | |
Print relative line numbers. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">fill-79</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(set-fill-column '79) | |
(message <span style="color: #8AE234;">""</span>)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org8b2a868" class="outline-3"> | |
<h3 id="org8b2a868"><span class="section-number-3">10.10</span> resize</h3> | |
<div class="outline-text-3" id="text-10-10"> | |
<p> | |
Show date. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my/evil-inc-width</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 6)) | |
(call-interactively 'evil-window-increase-width))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my/evil-dec-width</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 6)) | |
(call-interactively 'evil-window-decrease-width))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my/evil-inc-height</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 6)) | |
(call-interactively 'evil-window-increase-height))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my/enlarge-window</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 10)) | |
(call-interactively 'enlarge-window))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my/enlarge-window-horizontally</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 10)) | |
(call-interactively 'enlarge-window-horizontally))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my/shrink-window</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 10)) | |
(call-interactively 'shrink-window))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my/shrink-window-horizontally</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 10)) | |
(call-interactively 'shrink-window-horizontally))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org37788dd" class="outline-3"> | |
<h3 id="org37788dd"><span class="section-number-3">10.11</span> lines</h3> | |
<div class="outline-text-3" id="text-10-11"> | |
</div> | |
<div id="outline-container-org9eb0c1c" class="outline-4"> | |
<h4 id="org9eb0c1c"><span class="section-number-4">10.11.1</span> line numbers</h4> | |
<div class="outline-text-4" id="text-10-11-1"> | |
<p> | |
Print relative line numbers. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">line-numbers</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">setq</span> display-line-numbers 'visual) | |
(<span style="color: #96CBFE;">setq</span> display-line-numbers-widen nil) | |
(<span style="color: #96CBFE;">setq</span> display-line-numbers-current-absolute nil)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">noct:relative</span> () | |
(<span style="color: #96CBFE;">setq-local</span> display-line-numbers 'visual)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">noct:absolute</span> () | |
(<span style="color: #96CBFE;">setq-local</span> display-line-numbers t)) | |
(custom-set-faces '(line-number-current-line ((t <span style="color: #DAD085;">:weight</span> bold | |
<span style="color: #DAD085;">:foreground</span> <span style="color: #8AE234;">"goldenrod"</span> | |
<span style="color: #DAD085;">:background</span> <span style="color: #8AE234;">"slate gray"</span>)))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgad638d3" class="outline-4"> | |
<h4 id="orgad638d3"><span class="section-number-4">10.11.2</span> line no numbers</h4> | |
<div class="outline-text-4" id="text-10-11-2"> | |
<p> | |
Remove line numbers. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">line-no-numbers</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">setq</span> display-line-numbers nil)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga60aaa1" class="outline-4"> | |
<h4 id="orga60aaa1"><span class="section-number-4">10.11.3</span> cursor</h4> | |
<div class="outline-text-4" id="text-10-11-3"> | |
<p> | |
Remove line numbers. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">enable-cursor</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">setq</span> cursor-type t)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org4816085" class="outline-4"> | |
<h4 id="org4816085"><span class="section-number-4">10.11.4</span> no cursor</h4> | |
<div class="outline-text-4" id="text-10-11-4"> | |
<p> | |
Remove line numbers. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">disable-cusor</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">setq</span> cursor-type nil)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgda03e5c" class="outline-4"> | |
<h4 id="orgda03e5c"><span class="section-number-4">10.11.5</span> sort lines by length</h4> | |
<div class="outline-text-4" id="text-10-11-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">https://stackoverflow.com/a/30697761/9509067</span> | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">sort-lines-by-length</span> (reverse beg end) | |
<span style="color: #8AE234;">"Sort lines by length."</span> | |
(<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"P\nr"</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(<span style="color: #96CBFE;">save-restriction</span> | |
(narrow-to-region beg end) | |
(goto-char (point-min)) | |
(<span style="color: #96CBFE;">let</span> <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">To make `</span><span style="color: #99CC99;">end-of-line</span><span style="color: #7C7C7C;">' and etc. to ignore fields.</span> | |
((inhibit-field-text-motion t)) | |
(sort-subr reverse 'forward-line 'end-of-line nil nil | |
(<span style="color: #96CBFE;">lambda</span> (l1 l2) | |
(apply #'< (mapcar (<span style="color: #96CBFE;">lambda</span> (range) (- (cdr range) (car range))) | |
(list l1 l2))))))))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org9af49fe" class="outline-3"> | |
<h3 id="org9af49fe"><span class="section-number-3">10.12</span> split</h3> | |
<div class="outline-text-3" id="text-10-12"> | |
<p> | |
Split and focus new windows. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-evil-window-split</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(evil-window-split) | |
(windmove-down))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org0698635" class="outline-3"> | |
<h3 id="org0698635"><span class="section-number-3">10.13</span> ora swiper</h3> | |
<div class="outline-text-3" id="text-10-13"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">ora-swiper</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">if</span> (<span style="color: #96CBFE;">and</span> (buffer-file-name) | |
(not (<span style="color: #96CBFE;">ignore-errors</span> | |
(file-remote-p (buffer-file-name)))) | |
(<span style="color: #96CBFE;">if</span> (eq major-mode 'org-mode) | |
(> (buffer-size) 60000) | |
(> (buffer-size) 300000))) | |
(<span style="color: #96CBFE;">progn</span> | |
(save-buffer) | |
(counsel-grep)) | |
(swiper--ivy (swiper--candidates)))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgd2b2ca5" class="outline-3"> | |
<h3 id="orgd2b2ca5"><span class="section-number-3">10.14</span> run c</h3> | |
<div class="outline-text-3" id="text-10-14"> | |
<p> | |
Compile, run and display C code output. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">execute-c-program</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">foo</span>) | |
(<span style="color: #96CBFE;">setq</span> foo (concat <span style="color: #8AE234;">"gcc -w -lm "</span> (buffer-name) <span style="color: #8AE234;">" && ./a.out"</span> )) | |
(shell-command foo)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga4597f3" class="outline-3"> | |
<h3 id="orga4597f3"><span class="section-number-3">10.15</span> syntax</h3> | |
<div class="outline-text-3" id="text-10-15"> | |
</div> | |
<div id="outline-container-orge4b1ce4" class="outline-4"> | |
<h4 id="orge4b1ce4"><span class="section-number-4">10.15.1</span> i3</h4> | |
<div class="outline-text-4" id="text-10-15-1"> | |
<p> | |
Provides a major-mode for the i3/config file. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;;; </span><span style="color: #7C7C7C;">i3wm-emacs.el --- i3wm emacs mode</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Copyright (C) 2014 Steven Knight</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Author: Steven Knight <a href="mailto:steven%40knight.cx"><[email protected]></a></span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">URL: https://github.com/skk/i3wm-emacs</span> | |
(<span style="color: #96CBFE;">define-derived-mode</span> <span style="color: #FFD2A7;">i3wm-emacs</span> text-mode | |
<span style="color: #8AE234;">"i3wm-emacs"</span> <span style="color: #8AE234;">"Major mode for editing configuration files for i3 (http://i3wm.org/)."</span> | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-keywords</span> | |
'(<span style="color: #8AE234;">"set"</span> <span style="color: #8AE234;">"exec"</span> <span style="color: #8AE234;">"exec_alwyas"</span> <span style="color: #8AE234;">"bindsym"</span> <span style="color: #8AE234;">"bindcode"</span> <span style="color: #8AE234;">"font"</span> | |
<span style="color: #8AE234;">"floating_modifier"</span> <span style="color: #8AE234;">"floating_minimum_size"</span> <span style="color: #8AE234;">"floating_maximum_size"</span> | |
<span style="color: #8AE234;">"default_orientation"</span> <span style="color: #8AE234;">"workspace_layout"</span> <span style="color: #8AE234;">"new_window"</span> <span style="color: #8AE234;">"hide_edge_borders"</span> | |
<span style="color: #8AE234;">"for_window"</span> <span style="color: #8AE234;">"assign"</span> <span style="color: #8AE234;">"workspace"</span> <span style="color: #8AE234;">"colorclass"</span> <span style="color: #8AE234;">"ipc-socket"</span> <span style="color: #8AE234;">"focus_follows_mouse"</span> | |
<span style="color: #8AE234;">"popup_during_fullscreen"</span> <span style="color: #8AE234;">"force_focus_wrapping"</span> <span style="color: #8AE234;">"force_xinerama"</span> <span style="color: #8AE234;">"workspace_auto_back_and_forth"</span>) | |
<span style="color: #8AE234;">"i3 Config keywords"</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-types</span> | |
'() | |
<span style="color: #8AE234;">"i3 Config types."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-constants</span> | |
'() | |
<span style="color: #8AE234;">"i3 Config constants."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-events</span> | |
'() | |
<span style="color: #8AE234;">"i3 Config events."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-functions</span> | |
'() | |
<span style="color: #8AE234;">"i3 Config functions."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-keywords-regexp</span> (regexp-opt i3-config-keywords 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-type-regexp</span> (regexp-opt i3-config-types 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-constant-regexp</span> (regexp-opt i3-config-constants 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-event-regexp</span> (regexp-opt i3-config-events 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">i3-config-functions-regexp</span> (regexp-opt i3-config-functions 'words)) | |
(<span style="color: #96CBFE;">setq</span> i3-config-font-lock-keywords | |
`( | |
(,i3-config-type-regexp . font-lock-type-face) | |
(,i3-config-constant-regexp . font-lock-constant-face) | |
(,i3-config-event-regexp . font-lock-builtin-face) | |
(,i3-config-functions-regexp . font-lock-function-name-face) | |
(,i3-config-keywords-regexp . font-lock-keyword-face) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">note: order above matters.</span> | |
)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">code for syntax highlighting</span> | |
(<span style="color: #96CBFE;">setq</span> font-lock-defaults '((i3-config-font-lock-keywords))) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">clear memory</span> | |
(<span style="color: #96CBFE;">setq</span> i3-config-keywords nil) | |
(<span style="color: #96CBFE;">setq</span> i3-config-types nil) | |
(<span style="color: #96CBFE;">setq</span> i3-config-constants nil) | |
(<span style="color: #96CBFE;">setq</span> i3-config-events nil) | |
(<span style="color: #96CBFE;">setq</span> i3-config-functions nil)) | |
(<span style="color: #96CBFE;">provide</span> '<span style="color: #99CC99;">i3wm-emacs</span>) | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\i3/config\\'"</span> . i3wm-emacs)) | |
<span style="color: #7C7C7C;">;;; </span><span style="color: #7C7C7C;">i3wm-emacs.el ends here</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga035e15" class="outline-4"> | |
<h4 id="orga035e15"><span class="section-number-4">10.15.2</span> alg</h4> | |
<div class="outline-text-4" id="text-10-15-2"> | |
<p> | |
Provides a major-mode for the alg/config file. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;;; </span><span style="color: #7C7C7C;">alg-emacs.el --- i3wm emacs mode</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Copyright (C) 2014 Steven Knight</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Author: Steven Knight <a href="mailto:steven%40knight.cx"><[email protected]></a></span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">URL: https://github.com/skk/alg-emacs</span> | |
(<span style="color: #96CBFE;">define-derived-mode</span> <span style="color: #FFD2A7;">alg-emacs</span> prog-mode | |
<span style="color: #8AE234;">"alg-emacs"</span> <span style="color: #8AE234;">"Major mode for editing configuration files for i3 (http://i3wm.org/)."</span> | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-keywords</span> | |
'(<span style="color: #8AE234;">"se"</span> <span style="color: #8AE234;">"fimse"</span> <span style="color: #8AE234;">"entao"</span> <span style="color: #8AE234;">"então"</span> <span style="color: #8AE234;">"senao"</span> <span style="color: #8AE234;">"senão"</span> <span style="color: #8AE234;">"para"</span> <span style="color: #8AE234;">"fimpara"</span> <span style="color: #8AE234;">"faca"</span> <span style="color: #8AE234;">"faça"</span> <span style="color: #8AE234;">"enquanto"</span> <span style="color: #8AE234;">"fimenquanto"</span> <span style="color: #8AE234;">"Var"</span> <span style="color: #8AE234;">"Inicio"</span> <span style="color: #8AE234;">"Fimalgoritmo"</span> <span style="color: #8AE234;">"Algoritmo"</span> <span style="color: #8AE234;">"algoritmo"</span> <span style="color: #8AE234;">"repita"</span> <span style="color: #8AE234;">"ate"</span> <span style="color: #8AE234;">"caractere"</span>) | |
<span style="color: #8AE234;">"alg Config keywords"</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-types</span> | |
'(<span style="color: #8AE234;">"inteiro"</span> <span style="color: #8AE234;">"real"</span>) | |
<span style="color: #8AE234;">"alg Config types."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-constants</span> | |
'() | |
<span style="color: #8AE234;">"alg Config constants."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-events</span> | |
'() | |
<span style="color: #8AE234;">"alg Config events."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-functions</span> | |
'(<span style="color: #8AE234;">"escreva"</span> <span style="color: #8AE234;">"escreval"</span> <span style="color: #8AE234;">"leia"</span>) | |
<span style="color: #8AE234;">"alg Config functions."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-keywords-regexp</span> (regexp-opt alg-config-keywords 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-type-regexp</span> (regexp-opt alg-config-types 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-constant-regexp</span> (regexp-opt alg-config-constants 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-event-regexp</span> (regexp-opt alg-config-events 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">alg-config-functions-regexp</span> (regexp-opt alg-config-functions 'words)) | |
(<span style="color: #96CBFE;">setq</span> alg-config-font-lock-keywords | |
`( | |
(,alg-config-type-regexp . font-lock-type-face) | |
(,alg-config-constant-regexp . font-lock-constant-face) | |
(,alg-config-event-regexp . font-lock-builtin-face) | |
(,alg-config-functions-regexp . font-lock-function-name-face) | |
(,alg-config-keywords-regexp . font-lock-keyword-face) | |
(,alg-config-keywords-regexp . font-lock-keyword-face)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">note: order above matters.</span> | |
) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">code for syntax highlighting</span> | |
(<span style="color: #96CBFE;">setq</span> font-lock-defaults '((alg-config-font-lock-keywords))) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">clear memory</span> | |
(<span style="color: #96CBFE;">setq</span> alg-config-keywords nil) | |
(<span style="color: #96CBFE;">setq</span> alg-config-types nil) | |
(<span style="color: #96CBFE;">setq</span> alg-config-constants nil) | |
(<span style="color: #96CBFE;">setq</span> alg-config-events nil) | |
(<span style="color: #96CBFE;">setq</span> alg-config-functions nil) | |
(<span style="color: #96CBFE;">setq</span> alg-config-operators nil)) | |
(<span style="color: #96CBFE;">provide</span> '<span style="color: #99CC99;">alg-emacs</span>) | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\.alg\\'"</span> . alg-emacs)) | |
<span style="color: #7C7C7C;">;;; </span><span style="color: #7C7C7C;">alg-emacs.el ends here</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga764da0" class="outline-4"> | |
<h4 id="orga764da0"><span class="section-number-4">10.15.3</span> tmux</h4> | |
<div class="outline-text-4" id="text-10-15-3"> | |
<p> | |
Provides a major-mode for the tmux/config file. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;;; </span><span style="color: #7C7C7C;">tmuxconf-emacs.el --- tmux emacs mode</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Copyright (C) 2014 Steven Knight</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Author: Steven Knight <a href="mailto:steven%40knight.cx"><[email protected]></a></span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">URL: https://github.com/skk/i3wm-emacs</span> | |
(<span style="color: #96CBFE;">define-derived-mode</span> <span style="color: #FFD2A7;">tmuxconf-emacs</span> text-mode | |
<span style="color: #8AE234;">"tmuxconf-emacs"</span> <span style="color: #8AE234;">"Major mode for editing configuration files for i3 (http://i3wm.org/)."</span> | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-keywords</span> | |
'(<span style="color: #8AE234;">"set"</span> <span style="color: #8AE234;">"setw"</span> <span style="color: #8AE234;">"set-window-option"</span> <span style="color: #8AE234;">"set-clipboard"</span> <span style="color: #8AE234;">"set-titles"</span> <span style="color: #8AE234;">"set-titles-string"</span> <span style="color: #8AE234;">"bind-key"</span> <span style="color: #8AE234;">"bind"</span> <span style="color: #8AE234;">"unbind"</span>) | |
<span style="color: #8AE234;">"tmux Config keywords"</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-types</span> | |
'() | |
<span style="color: #8AE234;">"tmux Config types."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-constants</span> | |
'() | |
<span style="color: #8AE234;">"tmux Config constants."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-events</span> | |
'(<span style="color: #8AE234;">"-g"</span> <span style="color: #8AE234;">"-n"</span> <span style="color: #8AE234;">"@plugin"</span>) | |
<span style="color: #8AE234;">"tmux Config events."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-functions</span> | |
'() | |
<span style="color: #8AE234;">"tmux Config functions."</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-keywords-regexp</span> (regexp-opt tmux-config-keywords 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-type-regexp</span> (regexp-opt tmux-config-types 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-constant-regexp</span> (regexp-opt tmux-config-constants 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-event-regexp</span> (regexp-opt tmux-config-events 'words)) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">tmux-config-functions-regexp</span> (regexp-opt tmux-config-functions 'words)) | |
(<span style="color: #96CBFE;">setq</span> tmux-config-font-lock-keywords | |
`( | |
(,tmux-config-type-regexp . font-lock-type-face) | |
(,tmux-config-constant-regexp . font-lock-constant-face) | |
(,tmux-config-event-regexp . font-lock-builtin-face) | |
(,tmux-config-functions-regexp . font-lock-function-name-face) | |
(,tmux-config-keywords-regexp . font-lock-keyword-face) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">note: order above matters.</span> | |
)) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">code for syntax highlighting</span> | |
(<span style="color: #96CBFE;">setq</span> font-lock-defaults '((tmux-config-font-lock-keywords))) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">clear memory</span> | |
(<span style="color: #96CBFE;">setq</span> tmux-config-keywords nil) | |
(<span style="color: #96CBFE;">setq</span> tmux-config-types nil) | |
(<span style="color: #96CBFE;">setq</span> tmux-config-constants nil) | |
(<span style="color: #96CBFE;">setq</span> tmux-config-events nil) | |
(<span style="color: #96CBFE;">setq</span> tmux-config-functions nil)) | |
(<span style="color: #96CBFE;">provide</span> '<span style="color: #99CC99;">tmuxconf-emacs</span>) | |
(add-to-list 'auto-mode-alist '(<span style="color: #8AE234;">"\\.*tmux.*\\'"</span> . tmuxconf-emacs)) | |
<span style="color: #7C7C7C;">;;; </span><span style="color: #7C7C7C;">tmuxconf-emacs.el ends here</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgf43c206" class="outline-3"> | |
<h3 id="orgf43c206"><span class="section-number-3">10.16</span> macros</h3> | |
<div class="outline-text-3" id="text-10-16"> | |
<ul class="org-ul"> | |
<li><a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Save-Keyboard-Macro.html">how to save macros</a></li> | |
</ul> | |
</div> | |
<div id="outline-container-org098f619" class="outline-4"> | |
<h4 id="org098f619"><span class="section-number-4">10.16.1</span> programming macros</h4> | |
<div class="outline-text-4" id="text-10-16-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(fset 'term-run-bpython3 | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([98 112 return] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'my-calc-region | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"V bx"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'py3 | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"clear | |
bpython3 | |
"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'py3-normal | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"iclear | |
bpython3 | |
"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'term-ls-p | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([115 109 97 108 108 112 114 111 109 112 116 return 99 108 101 97 114 return 108 115 return 112 32] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'select-next-block | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item (<span style="color: #96CBFE;">quote</span> ([47 35 92 43 66 69 71 73 78 95 83 82 67 return 86 47 35 92 43 69 78 68 95 83 82 67 return] 0 <span style="color: #8AE234;">"%d"</span>)) arg))) | |
(fset 'select-next-inner-block | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item (<span style="color: #96CBFE;">quote</span> ([47 35 92 43 66 69 71 73 78 95 83 82 67 return 106 86 47 35 92 43 69 78 68 95 83 82 67 return 107] 0 <span style="color: #8AE234;">"%d"</span>)) arg))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgfe5ac4b" class="outline-4"> | |
<h4 id="orgfe5ac4b"><span class="section-number-4">10.16.2</span> org macros</h4> | |
<div class="outline-text-4" id="text-10-16-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(fset 'org-inner-block | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([47 35 92 43 98 101 103 105 110 95 101 120 97 109 112 108 101 return 106 86 47 35 92 43 101 110 100 95 101 120 97 109 112 108 101 return 107] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'org-outer-block | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([47 35 92 43 98 101 103 105 110 95 101 120 97 109 112 108 101 return 86 47 35 92 43 101 110 100 95 101 120 97 109 112 108 101 return] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'org-code | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([escape 96 60 105 126 escape 96 62 97 126 escape] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'org-bold | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([escape 96 60 105 42 escape 96 62 97 42 escape] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'org-emphasis | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([escape 96 60 105 47 escape 96 62 97 47 escape] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'org-hide-all | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item (<span style="color: #96CBFE;">quote</span> ([21 tab] 0 <span style="color: #8AE234;">"%d"</span>)) arg))) | |
(fset 'org-sort-todos | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"gg]^d"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgb7ba8ed" class="outline-4"> | |
<h4 id="orgb7ba8ed"><span class="section-number-4">10.16.3</span> text macros</h4> | |
<div class="outline-text-4" id="text-10-16-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(fset 'copy-whole-buffer | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"gmzggyG`z"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'select-paragraph | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"vap"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'select-inner-paragraph | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"vip"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'my-below-line-macro | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([65 return escape] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'my-above-line-macro | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '([73 return escape] 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'duplicate-line | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"gmzyyp`zj"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'yank-inner-paragraph | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"yip"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'yank-paragraph-macro | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"yap"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'duplicate-a-paragrah | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"vapy`>p"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
(fset 'duplicate-inner-paragraph | |
(<span style="color: #96CBFE;">lambda</span> (<span style="color: #CFCB90;">&optional</span> arg) <span style="color: #8AE234;">"Keyboard macro."</span> (<span style="color: #96CBFE;">interactive</span> <span style="color: #8AE234;">"p"</span>) (kmacro-exec-ring-item '(<span style="color: #8AE234;">"vipy`>gop"</span> 0 <span style="color: #8AE234;">"%d"</span>) arg))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org576fd63" class="outline-3"> | |
<h3 id="org576fd63"><span class="section-number-3">10.17</span> vsplit</h3> | |
<div class="outline-text-3" id="text-10-17"> | |
<p> | |
Split and focus new windows. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-evil-window-vsplit</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(split-window-right) | |
(windmove-right))) | |
</pre> | |
</div> | |
<p> | |
org-open-at-point | |
</p> | |
</div> | |
</div> | |
<div id="outline-container-org1efae81" class="outline-3"> | |
<h3 id="org1efae81"><span class="section-number-3">10.18</span> xelatex</h3> | |
<div class="outline-text-3" id="text-10-18"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-xelatex</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">defvar</span> <span style="color: #c5c8c6; background-color: #1d1f21;">foo</span>) | |
(<span style="color: #96CBFE;">setq</span> foo (concat <span style="color: #8AE234;">"xelatex "</span> (buffer-name))) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) (shell-command foo)) | |
(my-ranger)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgd8ed695" class="outline-3"> | |
<h3 id="orgd8ed695"><span class="section-number-3">10.19</span> goindex</h3> | |
<div class="outline-text-3" id="text-10-19"> | |
<p> | |
Split and focus new windows. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">goindex</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/org/index.org"</span>) | |
(evil-goto-first-line) | |
(org-next-link)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgbac2207" class="outline-3"> | |
<h3 id="orgbac2207"><span class="section-number-3">10.20</span> backups</h3> | |
<div class="outline-text-3" id="text-10-20"> | |
<p> | |
Check if it's this function that's create the <code>auto-save-list</code> problem. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">make-backup-file-name-function</span> (FILE) | |
(<span style="color: #96CBFE;">let</span> ((dirname (concat <span style="color: #8AE234;">"/home/dotfiles/emacsd/backups"</span> | |
(format-time-string <span style="color: #8AE234;">"%d/%m/%y/"</span>)))) | |
(concat dirname (file-name-nondirectory FILE)))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgf765241" class="outline-3"> | |
<h3 id="orgf765241"><span class="section-number-3">10.21</span> buffers</h3> | |
<div class="outline-text-3" id="text-10-21"> | |
</div> | |
<div id="outline-container-org1e3d334" class="outline-4"> | |
<h4 id="org1e3d334"><span class="section-number-4">10.21.1</span> copy file path</h4> | |
<div class="outline-text-4" id="text-10-21-1"> | |
<p> | |
Copy file path to the clipboard. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-put-file-name-on-clipboard</span> () | |
<span style="color: #8AE234;">"Put the current file name on the clipboard"</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((filename (<span style="color: #96CBFE;">if</span> (equal major-mode 'dired-mode) | |
default-directory | |
(buffer-file-name)))) | |
(<span style="color: #96CBFE;">when</span> filename | |
(<span style="color: #96CBFE;">with-temp-buffer</span> | |
(insert filename) | |
(clipboard-kill-region (point-min) (point-max))) | |
(message filename)))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgf691e92" class="outline-4"> | |
<h4 id="orgf691e92"><span class="section-number-4">10.21.2</span> my copy dir</h4> | |
<div class="outline-text-4" id="text-10-21-2"> | |
<p> | |
Copy file path to the clipboard. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-copy-dir</span> () | |
<span style="color: #8AE234;">"Put the current dir name on the clipboard"</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((filename default-directory)) | |
(<span style="color: #96CBFE;">when</span> filename | |
(<span style="color: #96CBFE;">with-temp-buffer</span> | |
(insert filename) | |
(clipboard-kill-region (point-min) (point-max))) | |
(message filename)))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org7dcf2d9" class="outline-4"> | |
<h4 id="org7dcf2d9"><span class="section-number-4">10.21.3</span> rename file and buffer</h4> | |
<div class="outline-text-4" id="text-10-21-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">rename-file-and-buffer</span> () | |
<span style="color: #8AE234;">"Rename the current buffer and file it is visiting."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((filename (buffer-file-name))) | |
(<span style="color: #96CBFE;">if</span> (not (<span style="color: #96CBFE;">and</span> filename (file-exists-p filename))) | |
(message <span style="color: #8AE234;">"Buffer is not visiting a file!"</span>) | |
(<span style="color: #96CBFE;">let</span> ((new-name (read-file-name <span style="color: #8AE234;">"New name: "</span> filename))) | |
(<span style="color: #96CBFE;">cond</span> | |
((vc-backend filename) (vc-rename-file filename new-name)) | |
(t | |
(rename-file filename new-name t) | |
(set-visited-file-name new-name t t))))))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org6cdc1da" class="outline-4"> | |
<h4 id="org6cdc1da"><span class="section-number-4">10.21.4</span> kill others</h4> | |
<div class="outline-text-4" id="text-10-21-4"> | |
<p> | |
Kill all buffers except the current one. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">kill-other-buffers</span> () | |
<span style="color: #8AE234;">"Kill all other buffers."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(mapc 'kill-buffer (delq (current-buffer) (buffer-list))) | |
(delete-other-windows)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org1e21035" class="outline-4"> | |
<h4 id="org1e21035"><span class="section-number-4">10.21.5</span> my-eval-buffer.back</h4> | |
<div class="outline-text-4" id="text-10-21-5"> | |
<p> | |
Save, then eval. | |
</p> | |
</div> | |
</div> | |
<div id="outline-container-org87c3214" class="outline-4"> | |
<h4 id="org87c3214"><span class="section-number-4">10.21.6</span> my-eval-buffer</h4> | |
<div class="outline-text-4" id="text-10-21-6"> | |
<p> | |
Save, then eval. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-eval-buffer</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(my-quiet-save-buffer) | |
(eval-buffer) | |
(message <span style="color: #8AE234;">"buffer evaluated"</span>)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org5ae5451" class="outline-4"> | |
<h4 id="org5ae5451"><span class="section-number-4">10.21.7</span> my-python-save</h4> | |
<div class="outline-text-4" id="text-10-21-7"> | |
<p> | |
Save, then eval. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-python-save</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) | |
(py-autopep8-buffer) | |
(save-buffer)))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgcd4725f" class="outline-4"> | |
<h4 id="orgcd4725f"><span class="section-number-4">10.21.8</span> my quiet save buffer</h4> | |
<div class="outline-text-4" id="text-10-21-8"> | |
<p> | |
Save buffer without printing any message. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-quiet-save-buffer</span> () (<span style="color: #96CBFE;">interactive</span>) | |
(evil-ex-nohighlight) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) | |
(delete-trailing-whitespace) | |
(save-buffer))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgb0b94ed" class="outline-4"> | |
<h4 id="orgb0b94ed"><span class="section-number-4">10.21.9</span> my quiet save no delete ws</h4> | |
<div class="outline-text-4" id="text-10-21-9"> | |
<p> | |
Save buffer without printing any message. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-quiet-save-buffer-no-dl-ws</span> () (<span style="color: #96CBFE;">interactive</span>) | |
(evil-ex-nohighlight) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) | |
(save-buffer))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc5ae05a" class="outline-4"> | |
<h4 id="orgc5ae05a"><span class="section-number-4">10.21.10</span> my super-save</h4> | |
<div class="outline-text-4" id="text-10-21-10"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">super-save-command</span> () | |
<span style="color: #8AE234;">"Save the current buffer if needed."</span> | |
(<span style="color: #96CBFE;">when</span> (<span style="color: #96CBFE;">and</span> buffer-file-name | |
(buffer-modified-p (current-buffer)) | |
(file-writable-p buffer-file-name)) | |
(my-quiet-save-buffer-no-dl-ws))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgef80e97" class="outline-4"> | |
<h4 id="orgef80e97"><span class="section-number-4">10.21.11</span> remove whitespace save buffer</h4> | |
<div class="outline-text-4" id="text-10-21-11"> | |
<p> | |
Save buffer after deleting all trailing whitespace. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">save-buffer-remove-whitespace</span> () (<span style="color: #96CBFE;">interactive</span>) | |
(evil-ex-nohighlight) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) (delete-trailing-whitespace) (save-buffer) )) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org529c3ae" class="outline-3"> | |
<h3 id="org529c3ae"><span class="section-number-3">10.22</span> botright</h3> | |
<div class="outline-text-3" id="text-10-22"> | |
<p> | |
Open window in the very bottom. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-evil-botright</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(evil-window-split) | |
(windmove-down) | |
(evil-window-move-very-bottom))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgeef03b8" class="outline-3"> | |
<h3 id="orgeef03b8"><span class="section-number-3">10.23</span> term</h3> | |
<div class="outline-text-3" id="text-10-23"> | |
<p> | |
Open term in the very bottom. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-term</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(evil-window-split) | |
(windmove-down) | |
(evil-window-move-very-bottom) | |
(ansi-term <span style="color: #8AE234;">"/bin/bash"</span>) | |
(term-ls-p)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org105f5af" class="outline-3"> | |
<h3 id="org105f5af"><span class="section-number-3">10.24</span> term-bpython3</h3> | |
<div class="outline-text-3" id="text-10-24"> | |
<p> | |
Open term in the very bottom. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">term-bpython3</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(evil-window-split) | |
(windmove-down) | |
(evil-window-move-very-bottom) | |
(ansi-term <span style="color: #8AE234;">"/bin/bash"</span>) | |
(comint-clear-buffer) | |
(term-run-bpython3)) | |
</pre> | |
</div> | |
<p> | |
Open term in the very bottom. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">term-bpython3</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(evil-window-split) | |
(windmove-down) | |
(evil-window-move-very-bottom) | |
(ansi-term <span style="color: #8AE234;">"/bin/bash"</span>) | |
(comint-clear-buffer) | |
(term-run-bpython3)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org378fb5b" class="outline-3"> | |
<h3 id="org378fb5b"><span class="section-number-3">10.25</span> find files</h3> | |
<div class="outline-text-3" id="text-10-25"> | |
<p> | |
Open term in the very bottom. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-day</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"/home/BigHome/Documents/org/day.org"</span>)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-unifacs</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/org/Estudo/Unifacs/unifacs-index.org"</span>)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-dotfiles</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/org/Config/dotfiles.org"</span>)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-index</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/org/index.org"</span>)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-i3-config</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/.config/i3/config"</span>)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-init</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/.emacs.d/init.org"</span>)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-scratch-markdown</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/.emacs.d/scratch-markdown.md"</span>)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-custom-settings</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/.emacs.d/custom-settings.el"</span>)) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">find-agenda</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(find-file <span style="color: #8AE234;">"~/org/Compromissos/agenda.org"</span>)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org298bdcc" class="outline-3"> | |
<h3 id="org298bdcc"><span class="section-number-3">10.26</span> show major mode</h3> | |
<div class="outline-text-3" id="text-10-26"> | |
<p> | |
Open term in the very bottom. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">show-major-mode</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(describe-variable 'major-mode)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org07fd0ed" class="outline-3"> | |
<h3 id="org07fd0ed"><span class="section-number-3">10.27</span> yas comp</h3> | |
<div class="outline-text-3" id="text-10-27"> | |
<p> | |
<a href="https://gist.github.com/sebastiencs/a16ea58b2d23e2ea52f62fcce70f4073">https://gist.github.com/sebastiencs/a16ea58b2d23e2ea52f62fcce70f4073</a> | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"><span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">With this code, yasnippet will expand the snippet if company didn't complete the word</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">replace company-complete-common with company-complete if you're using it</span> | |
(advice-add 'company-complete-common <span style="color: #DAD085;">:before</span> (<span style="color: #96CBFE;">lambda</span> () (<span style="color: #96CBFE;">setq</span> my-company-point (point)))) | |
(advice-add 'company-complete-common <span style="color: #DAD085;">:after</span> (<span style="color: #96CBFE;">lambda</span> () | |
(<span style="color: #96CBFE;">when</span> (equal my-company-point (point)) | |
(yas-expand)))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org723f488" class="outline-3"> | |
<h3 id="org723f488"><span class="section-number-3">10.28</span> run file</h3> | |
<div class="outline-text-3" id="text-10-28"> | |
<p> | |
I'm using a simplified version of this function for <code>c</code> programs. I'll keep this one here, though. I't might be useful. | |
</p> | |
<ul class="org-ul"> | |
<li><a href="http://ergoemacs.org/emacs/elisp_run_current_file.html%0A">source</a></li> | |
</ul> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">xah-run-current-file</span> () | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Execute the current file.</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">For example, if the current buffer is x.py, then it'll call 「python x.py」 in a shell.</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Output is printed to buffer “*xah-run output*”.</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">The file can be Emacs Lisp, PHP, Perl, Python, Ruby, JavaScript, TypeScript, golang, Bash, Ocaml, Visual Basic, TeX, Java, Clojure.</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">File suffix is used to determine what program to run.</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">If the file is modified or not saved, save it automatically before run.</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">URL `</span><span style="color: #99CC99;">http://ergoemacs.org/emacs/elisp_run_current_file.html</span><span style="color: #7C7C7C;">'</span> | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Version 2018-07-01"</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ( | |
($outputb <span style="color: #8AE234;">"*xah-run output*"</span>) | |
(resize-mini-windows nil) | |
($suffix-map | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(‹extension› . ‹shell program name›)</span> | |
`( | |
(<span style="color: #8AE234;">"php"</span> . <span style="color: #8AE234;">"php"</span>) | |
(<span style="color: #8AE234;">"pl"</span> . <span style="color: #8AE234;">"perl"</span>) | |
(<span style="color: #8AE234;">"py"</span> . <span style="color: #8AE234;">"python"</span>) | |
(<span style="color: #8AE234;">"py3"</span> . ,(<span style="color: #96CBFE;">if</span> (string-equal system-type <span style="color: #8AE234;">"windows-nt"</span>) <span style="color: #8AE234;">"c:/Python32/python.exe"</span> <span style="color: #8AE234;">"python3"</span>)) | |
(<span style="color: #8AE234;">"rb"</span> . <span style="color: #8AE234;">"ruby"</span>) | |
(<span style="color: #8AE234;">"go"</span> . <span style="color: #8AE234;">"go run"</span>) | |
(<span style="color: #8AE234;">"hs"</span> . <span style="color: #8AE234;">"runhaskell"</span>) | |
(<span style="color: #8AE234;">"js"</span> . <span style="color: #8AE234;">"node"</span>) | |
(<span style="color: #8AE234;">"mjs"</span> . <span style="color: #8AE234;">"node --experimental-modules "</span>) | |
(<span style="color: #8AE234;">"ts"</span> . <span style="color: #8AE234;">"tsc"</span>) <span style="color: #7C7C7C;">; </span><span style="color: #7C7C7C;">TypeScript</span> | |
(<span style="color: #8AE234;">"tsx"</span> . <span style="color: #8AE234;">"tsc"</span>) | |
(<span style="color: #8AE234;">"sh"</span> . <span style="color: #8AE234;">"bash"</span>) | |
(<span style="color: #8AE234;">"clj"</span> . <span style="color: #8AE234;">"java -cp ~/apps/clojure-1.6.0/clojure-1.6.0.jar clojure.main"</span>) | |
(<span style="color: #8AE234;">"rkt"</span> . <span style="color: #8AE234;">"racket"</span>) | |
(<span style="color: #8AE234;">"ml"</span> . <span style="color: #8AE234;">"ocaml"</span>) | |
(<span style="color: #8AE234;">"vbs"</span> . <span style="color: #8AE234;">"cscript"</span>) | |
(<span style="color: #8AE234;">"tex"</span> . <span style="color: #8AE234;">"pdflatex"</span>) | |
(<span style="color: #8AE234;">"latex"</span> . <span style="color: #8AE234;">"pdflatex"</span>) | |
(<span style="color: #8AE234;">"java"</span> . <span style="color: #8AE234;">"javac"</span>) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">("pov" . "/usr/local/bin/povray +R2 +A0.1 +J1.2 +Am2 +Q9 +H480 +W640")</span> | |
)) | |
$fname | |
$fSuffix | |
$prog-name | |
$cmd-str) | |
(<span style="color: #96CBFE;">when</span> (not (buffer-file-name)) (save-buffer)) | |
(<span style="color: #96CBFE;">when</span> (buffer-modified-p) (save-buffer)) | |
(<span style="color: #96CBFE;">setq</span> $fname (buffer-file-name)) | |
(<span style="color: #96CBFE;">setq</span> $fSuffix (file-name-extension $fname)) | |
(<span style="color: #96CBFE;">setq</span> $prog-name (cdr (assoc $fSuffix $suffix-map))) | |
(<span style="color: #96CBFE;">setq</span> $cmd-str (concat $prog-name <span style="color: #8AE234;">" \""</span> $fname <span style="color: #8AE234;">"\""</span>)) | |
(<span style="color: #96CBFE;">cond</span> | |
((string-equal $fSuffix <span style="color: #8AE234;">"el"</span>) | |
(load $fname)) | |
((<span style="color: #96CBFE;">or</span> (string-equal $fSuffix <span style="color: #8AE234;">"ts"</span>) (string-equal $fSuffix <span style="color: #8AE234;">"tsx"</span>)) | |
(<span style="color: #96CBFE;">if</span> (fboundp 'xah-ts-compile-file) | |
(xah-ts-compile-file current-prefix-arg) | |
(<span style="color: #96CBFE;">if</span> $prog-name | |
(<span style="color: #96CBFE;">progn</span> | |
(message <span style="color: #8AE234;">"Running"</span>) | |
(shell-command $cmd-str $outputb )) | |
(message <span style="color: #8AE234;">"No recognized program file suffix for this file."</span>)))) | |
((string-equal $fSuffix <span style="color: #8AE234;">"go"</span>) | |
<span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">(when (fboundp 'gofmt) (gofmt) )</span> | |
(shell-command $cmd-str $outputb )) | |
((string-equal $fSuffix <span style="color: #8AE234;">"java"</span>) | |
(<span style="color: #96CBFE;">progn</span> | |
(shell-command (format <span style="color: #8AE234;">"java %s"</span> (file-name-sans-extension (file-name-nondirectory $fname))) $outputb ))) | |
(t (<span style="color: #96CBFE;">if</span> $prog-name | |
(<span style="color: #96CBFE;">progn</span> | |
(message <span style="color: #8AE234;">"Running"</span>) | |
(shell-command $cmd-str $outputb )) | |
(message <span style="color: #8AE234;">"No recognized program file suffix for this file."</span>)))))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org09c4564" class="outline-3"> | |
<h3 id="org09c4564"><span class="section-number-3">10.29</span> my-ranger</h3> | |
<div class="outline-text-3" id="text-10-29"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-ranger</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) (my-copy-dir) (shell-command <span style="color: #8AE234;">"i3-msg [class=sranger] scratchpad show"</span>))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org0d6174e" class="outline-3"> | |
<h3 id="org0d6174e"><span class="section-number-3">10.30</span> my-visualg</h3> | |
<div class="outline-text-3" id="text-10-30"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-visualg</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) (copy-whole-buffer) (shell-command <span style="color: #8AE234;">"i3-msg focus left"</span>))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgdf55891" class="outline-3"> | |
<h3 id="orgdf55891"><span class="section-number-3">10.31</span> init-reload</h3> | |
<div class="outline-text-3" id="text-10-31"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">init-reload</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((inhibit-message t)) | |
(my-quiet-save-buffer) | |
(widen) | |
(org-babel-tangle) | |
(shell-command <span style="color: #8AE234;">"~/.maps/bin/launchers/emacs/rel"</span>))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga11694a" class="outline-3"> | |
<h3 id="orga11694a"><span class="section-number-3">10.32</span> delete both</h3> | |
<div class="outline-text-3" id="text-10-32"> | |
<p> | |
Kill the current buffer and deletes the file it is visiting. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">delete-file-and-buffer</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((filename (buffer-file-name))) | |
(<span style="color: #96CBFE;">when</span> filename | |
(<span style="color: #96CBFE;">if</span> (vc-backend filename) | |
(vc-delete-file filename) | |
(<span style="color: #96CBFE;">progn</span> | |
(delete-file filename) | |
(message <span style="color: #8AE234;">"Deleted file %s"</span> filename) | |
(kill-buffer)))))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org98ec92c" class="outline-3"> | |
<h3 id="org98ec92c"><span class="section-number-3">10.33</span> last-buffer</h3> | |
<div class="outline-text-3" id="text-10-33"> | |
<p> | |
Alternates between the current and the previous buffer. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">last-buffer</span> () | |
<span style="color: #8AE234;">"Switch to previously open buffer.</span> | |
<span style="color: #8AE234;">Repeated invocations toggle between the two most recently open buffers."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(switch-to-buffer (other-buffer (current-buffer) 1))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgfb2cba4" class="outline-3"> | |
<h3 id="orgfb2cba4"><span class="section-number-3">10.34</span> xmodmap mode</h3> | |
<div class="outline-text-3" id="text-10-34"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">define-generic-mode</span> '<span style="color: #FFD2A7;">xmodmap-mode</span> | |
'(?!) | |
'(<span style="color: #8AE234;">"add"</span> <span style="color: #8AE234;">"clear"</span> <span style="color: #8AE234;">"keycode"</span> <span style="color: #8AE234;">"keysym"</span> <span style="color: #8AE234;">"pointer"</span> <span style="color: #8AE234;">"remove"</span>) | |
nil | |
'(<span style="color: #8AE234;">"[xX]modmap.*</span><span style="color: #8AE234;">\\</span><span style="color: #C6A24F;">(</span><span style="color: #8AE234;">rc</span><span style="color: #8AE234;">\\</span><span style="color: #C6A24F;">)</span><span style="color: #8AE234;">?\\'"</span>) | |
nil | |
<span style="color: #8AE234;">"Simple mode for xmodmap files."</span>) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org752be41" class="outline-3"> | |
<h3 id="org752be41"><span class="section-number-3">10.35</span> agenda enter</h3> | |
<div class="outline-text-3" id="text-10-35"> | |
<p> | |
Open org-agenda item in the same window. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my-agenda-enter</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let</span> ((current-prefix-arg 4)) | |
(org-agenda-switch-to))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgd6cf8f2" class="outline-3"> | |
<h3 id="orgd6cf8f2"><span class="section-number-3">10.36</span> external file</h3> | |
<div class="outline-text-3" id="text-10-36"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">xah-open-in-external-app</span> () | |
<span style="color: #8AE234;">"Open the current file or dired marked files in external app.</span> | |
<span style="color: #8AE234;">The app is chosen from your OS's preference.</span> | |
<span style="color: #8AE234;">URL `</span><span style="color: #99CC99;">http://ergoemacs.org/emacs/emacs_dired_open_file_in_ext_apps.html</span><span style="color: #8AE234;">'</span> | |
<span style="color: #8AE234;">Version 2016-10-15"</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">let*</span> ( | |
($file-list | |
(<span style="color: #96CBFE;">if</span> (string-equal major-mode <span style="color: #8AE234;">"dired-mode"</span>) | |
(dired-get-marked-files) | |
(list (buffer-file-name)))) | |
($do-it-p (<span style="color: #96CBFE;">if</span> (<= (length $file-list) 5) | |
t | |
(y-or-n-p <span style="color: #8AE234;">"Open more than 5 files? "</span>)))) | |
(<span style="color: #96CBFE;">when</span> $do-it-p | |
(<span style="color: #96CBFE;">cond</span> | |
((string-equal system-type <span style="color: #8AE234;">"windows-nt"</span>) | |
(mapc | |
(<span style="color: #96CBFE;">lambda</span> ($fpath) | |
(w32-shell-execute <span style="color: #8AE234;">"open"</span> (replace-regexp-in-string <span style="color: #8AE234;">"/"</span> <span style="color: #8AE234;">"\\"</span> $fpath t t))) <span style="color: #ff982d; font-weight: bold;">$file-list))</span> | |
((string-equal system-type <span style="color: #8AE234;">"darwin"</span>) | |
(mapc | |
(<span style="color: #96CBFE;">lambda</span> ($fpath) | |
(shell-command | |
(concat <span style="color: #8AE234;">"open "</span> (shell-quote-argument $fpath)))) <span style="color: #ff982d; font-weight: bold;">$file-list))</span> | |
((string-equal system-type <span style="color: #8AE234;">"gnu/linux"</span>) | |
(mapc | |
(<span style="color: #96CBFE;">lambda</span> ($fpath) (<span style="color: #96CBFE;">let</span> ((process-connection-type nil)) | |
(start-process <span style="color: #8AE234;">""</span> nil <span style="color: #8AE234;">"xdg-open"</span> $fpath))) <span style="color: #ff982d; font-weight: bold;">$file-list))))))</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org7d3e8ad" class="outline-3"> | |
<h3 id="org7d3e8ad"><span class="section-number-3">10.37</span> link to other</h3> | |
<div class="outline-text-3" id="text-10-37"> | |
<p> | |
Open link in another window. | |
</p> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">link-to-other</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(split-window-right) | |
(windmove-right) | |
(link-hint-open-link-at-point)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgbaed844" class="outline-3"> | |
<h3 id="orgbaed844"><span class="section-number-3">10.38</span> xah buffers</h3> | |
<div class="outline-text-3" id="text-10-38"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">xah-next-user-buffer</span> () | |
<span style="color: #8AE234;">"Switch to the next user buffer.</span> | |
<span style="color: #8AE234;">“user buffer” is determined by `</span><span style="color: #99CC99;">xah-user-buffer-q</span><span style="color: #8AE234;">'.</span> | |
<span style="color: #8AE234;">URL `</span><span style="color: #99CC99;">http://ergoemacs.org/emacs/elisp_next_prev_user_buffer.html</span><span style="color: #8AE234;">'</span> | |
<span style="color: #8AE234;">Version 2016-06-19"</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(next-buffer) | |
(<span style="color: #96CBFE;">let</span> ((i 0)) | |
(<span style="color: #96CBFE;">while</span> (< i 20) | |
(<span style="color: #96CBFE;">if</span> (not (xah-user-buffer-q)) | |
(<span style="color: #96CBFE;">progn</span> (next-buffer) | |
(<span style="color: #96CBFE;">setq</span> i (1+ i))) | |
(<span style="color: #96CBFE;">progn</span> (<span style="color: #96CBFE;">setq</span> i 100)))))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">xah-previous-user-buffer</span> () | |
<span style="color: #8AE234;">"Switch to the previous user buffer.</span> | |
<span style="color: #8AE234;">“user buffer” is determined by `</span><span style="color: #99CC99;">xah-user-buffer-q</span><span style="color: #8AE234;">'.</span> | |
<span style="color: #8AE234;">URL `</span><span style="color: #99CC99;">http://ergoemacs.org/emacs/elisp_next_prev_user_buffer.html</span><span style="color: #8AE234;">'</span> | |
<span style="color: #8AE234;">Version 2016-06-19"</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(previous-buffer) | |
(<span style="color: #96CBFE;">let</span> ((i 0)) | |
(<span style="color: #96CBFE;">while</span> (< i 20) | |
(<span style="color: #96CBFE;">if</span> (not (xah-user-buffer-q)) | |
(<span style="color: #96CBFE;">progn</span> (previous-buffer) | |
(<span style="color: #96CBFE;">setq</span> i (1+ i))) | |
(<span style="color: #96CBFE;">progn</span> (<span style="color: #96CBFE;">setq</span> i 100)))))) | |
(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">xah-user-buffer-q</span> () | |
<span style="color: #8AE234;">"Return t if current buffer is a user buffer, else nil.</span> | |
<span style="color: #8AE234;">Typically, if buffer name starts with *, it's not considered a user buffer.</span> | |
<span style="color: #8AE234;">This function is used by buffer switching command and close buffer command, so that next buffer shown is a user buffer.</span> | |
<span style="color: #8AE234;">You can override this function to get your idea of “user buffer”.</span> | |
<span style="color: #8AE234;">version 2016-06-18"</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">if</span> (string-equal <span style="color: #8AE234;">"*"</span> (substring (buffer-name) 0 1)) | |
nil | |
(<span style="color: #96CBFE;">if</span> (string-equal major-mode <span style="color: #8AE234;">"dired-mode"</span>) | |
nil | |
t | |
))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgf69e064" class="outline-3"> | |
<h3 id="orgf69e064"><span class="section-number-3">10.39</span> par</h3> | |
<div class="outline-text-3" id="text-10-39"> | |
</div> | |
<div id="outline-container-org026963f" class="outline-4"> | |
<h4 id="org026963f"><span class="section-number-4">10.39.1</span> par-justify-79</h4> | |
<div class="outline-text-4" id="text-10-39-1"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-justify-79</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 79j1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org28f4931" class="outline-4"> | |
<h4 id="org28f4931"><span class="section-number-4">10.39.2</span> par-justify-59</h4> | |
<div class="outline-text-4" id="text-10-39-2"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-justify-59</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 59j1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orga4f2ccc" class="outline-4"> | |
<h4 id="orga4f2ccc"><span class="section-number-4">10.39.3</span> par-fit-79</h4> | |
<div class="outline-text-4" id="text-10-39-3"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-fit-79</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 79f1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org7ac4e73" class="outline-4"> | |
<h4 id="org7ac4e73"><span class="section-number-4">10.39.4</span> par-fit-59</h4> | |
<div class="outline-text-4" id="text-10-39-4"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-fit-59</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 59f1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org01fe125" class="outline-4"> | |
<h4 id="org01fe125"><span class="section-number-4">10.39.5</span> par-justify-85</h4> | |
<div class="outline-text-4" id="text-10-39-5"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-justify-85</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 85j1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org7d95cb0" class="outline-4"> | |
<h4 id="org7d95cb0"><span class="section-number-4">10.39.6</span> par-justify-95</h4> | |
<div class="outline-text-4" id="text-10-39-6"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-justify-95</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 95j1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgbc8351a" class="outline-4"> | |
<h4 id="orgbc8351a"><span class="section-number-4">10.39.7</span> par-fit-85</h4> | |
<div class="outline-text-4" id="text-10-39-7"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-fit-85</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 85f1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org92adf26" class="outline-4"> | |
<h4 id="org92adf26"><span class="section-number-4">10.39.8</span> par-fit-95</h4> | |
<div class="outline-text-4" id="text-10-39-8"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-fit-95</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 95f1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgac1be4d" class="outline-4"> | |
<h4 id="orgac1be4d"><span class="section-number-4">10.39.9</span> par-justify-105</h4> | |
<div class="outline-text-4" id="text-10-39-9"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-justify-105</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 105j1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgccbd0c7" class="outline-4"> | |
<h4 id="orgccbd0c7"><span class="section-number-4">10.39.10</span> par-justify-115</h4> | |
<div class="outline-text-4" id="text-10-39-10"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-justify-115</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 115j1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc16273f" class="outline-4"> | |
<h4 id="orgc16273f"><span class="section-number-4">10.39.11</span> par-fit-105</h4> | |
<div class="outline-text-4" id="text-10-39-11"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-fit-105</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 105f1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-org1e48899" class="outline-4"> | |
<h4 id="org1e48899"><span class="section-number-4">10.39.12</span> par-fit-115</h4> | |
<div class="outline-text-4" id="text-10-39-12"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">par-fit-125</span> (<span style="color: #CFCB90;">&optional</span> _justify) | |
<span style="color: #8AE234;">"Invoke shell command `</span><span style="color: #99CC99;">par</span><span style="color: #8AE234;">' on the current paragraph."</span> | |
(<span style="color: #96CBFE;">interactive</span>) | |
(<span style="color: #96CBFE;">save-excursion</span> | |
(mark-paragraph) | |
(forward-whitespace 1) | |
(shell-command-on-region (point) (mark) <span style="color: #8AE234;">"par 125f1g1"</span> nil <span style="color: #DAD085;">:replace</span>)) | |
t) <span style="color: #7C7C7C;">;; </span><span style="color: #7C7C7C;">Don't return nil. See variable `</span><span style="color: #99CC99;">fill-paragraph-function</span><span style="color: #7C7C7C;">'.</span> | |
</pre> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgc91c928" class="outline-4"> | |
<h4 id="orgc91c928"><span class="section-number-4">10.39.13</span> unfill</h4> | |
<div class="outline-text-4" id="text-10-39-13"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp"> (<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">my/unfill-paragraph</span> (<span style="color: #CFCB90;">&optional</span> region) | |
<span style="color: #8AE234;">"Takes a multi-line paragraph and makes it into a single line of text."</span> | |
(<span style="color: #96CBFE;">interactive</span> (<span style="color: #96CBFE;">progn</span> | |
(barf-if-buffer-read-only) | |
(list t))) | |
(<span style="color: #96CBFE;">let</span> ((fill-column (point-max))) | |
(fill-paragraph nil region))) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="outline-container-orgccf5a09" class="outline-3"> | |
<h3 id="orgccf5a09"><span class="section-number-3">10.40</span> fountain spell br</h3> | |
<div class="outline-text-3" id="text-10-40"> | |
<div class="org-src-container"> | |
<pre class="src src-emacs-lisp">(<span style="color: #96CBFE;">defun</span> <span style="color: #FFD2A7;">fountain-spell-br</span> () | |
(<span style="color: #96CBFE;">interactive</span>) | |
(flyspell-mode) | |
(ispell-change-dictionary <span style="color: #8AE234;">"brasileiro"</span>)) | |
</pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="postamble" class="status"> | |
<p class="date">Created: 2018-09-27 Thu 19:07</p> | |
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment