655 lines
31 KiB
HTML
655 lines
31 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
<head>
|
|
<!-- 2020-05-16 szo 11:45 -->
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Emacs konfiguráció</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-2019 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 konfiguráció</h1>
|
|
<div id="table-of-contents">
|
|
<h2>Table of Contents</h2>
|
|
<div id="text-table-of-contents">
|
|
<ul>
|
|
<li><a href="#orged0939e">1. Preferenciák beállítása</a></li>
|
|
<li><a href="#org417dacc">2. Csomagok betöltése</a>
|
|
<ul>
|
|
<li><a href="#org9adc8b4">2.1. Melpa</a></li>
|
|
<li><a href="#org4e65ec2">2.2. Cask</a></li>
|
|
<li><a href="#org1efa68d">2.3. Plugin-ok betöltése</a>
|
|
<ul>
|
|
<li><a href="#org28b2a96">2.3.1. Neotree</a></li>
|
|
<li><a href="#org804dae8">2.3.2. Nyan-mode</a></li>
|
|
<li><a href="#org2bcfac8">2.3.3. ORG-bullets</a></li>
|
|
<li><a href="#org83f5a98">2.3.4. RTags</a></li>
|
|
<li><a href="#orga39c96f">2.3.5. Irony-mode</a></li>
|
|
<li><a href="#org26d0ecc">2.3.6. Comany-irony</a></li>
|
|
<li><a href="#orgfaf2017">2.3.7. Flycheck</a></li>
|
|
<li><a href="#orga9c0dbb">2.3.8. Flycheck-clang-tidy</a></li>
|
|
<li><a href="#org9fc642d">2.3.9. Cmake-ide</a></li>
|
|
<li><a href="#org5956445">2.3.10. Highlight beállítások</a></li>
|
|
<li><a href="#orgbc1ed9f">2.3.11. Srefactor</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orge3d173c">3. Makró beállítások</a>
|
|
<ul>
|
|
<li><a href="#org99d1b02">3.1. Rtags</a></li>
|
|
<li><a href="#org9ebff48">3.2. Open config</a></li>
|
|
<li><a href="#org17d11dc">3.3. Cmake build and run</a></li>
|
|
<li><a href="#orgf4baf2f">3.4. Kód indentálás</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org4db7305">4. Saját változók</a>
|
|
<ul>
|
|
<li><a href="#org8b594c5">4.1. Csomag változók</a></li>
|
|
<li><a href="#org4091991">4.2. Minibuffer</a></li>
|
|
<li><a href="#org68c6cc9">4.3. Spellcheck</a></li>
|
|
<li><a href="#orgdf2af2b">4.4. Téma betöltése</a></li>
|
|
<li><a href="#org302b01a">4.5. Org-mode</a></li>
|
|
<li><a href="#org7722497">4.6. Teszt</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orged0939e" class="outline-2">
|
|
<h2 id="orged0939e"><span class="section-number-2">1</span> Preferenciák beállítása</h2>
|
|
<div class="outline-text-2" id="text-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(add-to-list 'default-frame-alist
|
|
'(font . <span style="color: #3ee766;">"Hack 11"</span>))
|
|
(<span style="color: #00a6fb;">setq</span> visible-bell 1)
|
|
(<span style="color: #00a6fb;">setq</span> inhibit-startup-screen t)
|
|
(<span style="color: #00a6fb;">setq</span> debug-on-error t)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org417dacc" class="outline-2">
|
|
<h2 id="org417dacc"><span class="section-number-2">2</span> Csomagok betöltése</h2>
|
|
<div class="outline-text-2" id="text-2">
|
|
</div>
|
|
<div id="outline-container-org9adc8b4" class="outline-3">
|
|
<h3 id="org9adc8b4"><span class="section-number-3">2.1</span> Melpa</h3>
|
|
<div class="outline-text-3" id="text-2-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(require 'init-security)</span>
|
|
|
|
(<span style="color: #00a6fb;">require</span> '<span style="color: #e834f9;">package</span>)
|
|
(<span style="color: #00a6fb;">let*</span> ((no-ssl (<span style="color: #00a6fb;">and</span> (memq system-type '(windows-nt ms-dos))
|
|
(not (gnutls-available-p))))
|
|
(proto (<span style="color: #00a6fb;">if</span> no-ssl <span style="color: #3ee766;">"http"</span> <span style="color: #3ee766;">"https"</span>)))
|
|
(<span style="color: #00a6fb;">when</span> no-ssl (<span style="color: #ff9505; background-color: #232629;">warn</span> <span style="color: #3ee766;">"\</span>
|
|
<span style="color: #3ee766;">Your version of Emacs does not support SSL connections,</span>
|
|
<span style="color: #3ee766;">which is unsafe because it allows man-in-the-middle attacks.</span>
|
|
<span style="color: #3ee766;">There are two things you can do about this warning:</span>
|
|
<span style="color: #3ee766;">1. Install an Emacs version that does support SSL and be safe.</span>
|
|
<span style="color: #3ee766;">2. Remove this warning from your init file so you won't see it again."</span>))
|
|
(add-to-list 'package-archives (cons <span style="color: #3ee766;">"melpa"</span> (concat proto <span style="color: #3ee766;">"://melpa.org/packages/"</span>)) t)
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">and `package-pinned-packages`. Most users will not need or want to do this.</span>
|
|
<span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)</span>
|
|
)
|
|
(package-initialize)
|
|
(custom-set-variables
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">custom-set-variables was added by Custom.</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">If you edit it by hand, you could mess it up, so be careful.</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">Your init file should contain only one such instance.</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">If there is more than one, they won't work right.</span>
|
|
<span style="color: #6b7566;">;;</span><span style="color: #6b7566;">'(custom-enabled-themes 'doom-solarized-dark)</span>
|
|
'(package-selected-packages
|
|
(<span style="color: #00a6fb;">quote</span>
|
|
(nyan-mode neotree flycheck))))
|
|
<span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(custom-set-faces</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">custom-set-faces was added by Custom.</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">If you edit it by hand, you could mess it up, so be careful.</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">Your init file should contain only one such instance.</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">If there is more than one, they won't work right.</span>
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org4e65ec2" class="outline-3">
|
|
<h3 id="org4e65ec2"><span class="section-number-3">2.2</span> Cask</h3>
|
|
<div class="outline-text-3" id="text-2-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(package-initialize)</span>
|
|
<span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(require 'cask "~/.cask/cask.el")</span>
|
|
<span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(cask-initialize)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org1efa68d" class="outline-3">
|
|
<h3 id="org1efa68d"><span class="section-number-3">2.3</span> Plugin-ok betöltése</h3>
|
|
<div class="outline-text-3" id="text-2-3">
|
|
</div>
|
|
<div id="outline-container-org28b2a96" class="outline-4">
|
|
<h4 id="org28b2a96"><span class="section-number-4">2.3.1</span> Neotree</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: #6b7566;">;;</span><span style="color: #6b7566;">(add-to-list 'load-path "/some/path/neotree")</span>
|
|
(<span style="color: #00a6fb;">require</span> '<span style="color: #e834f9;">neotree</span>)
|
|
(global-set-key [f8] 'neotree-toggle)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org804dae8" class="outline-4">
|
|
<h4 id="org804dae8"><span class="section-number-4">2.3.2</span> Nyan-mode</h4>
|
|
<div class="outline-text-4" id="text-2-3-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(nyan-mode)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org2bcfac8" class="outline-4">
|
|
<h4 id="org2bcfac8"><span class="section-number-4">2.3.3</span> ORG-bullets</h4>
|
|
<div class="outline-text-4" id="text-2-3-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(<span style="color: #00a6fb;">require</span> '<span style="color: #e834f9;">org-bullets</span>)
|
|
(add-hook 'org-mode-hook (<span style="color: #00a6fb;">lambda</span> () (org-bullets-mode 1)))
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org83f5a98" class="outline-4">
|
|
<h4 id="org83f5a98"><span class="section-number-4">2.3.4</span> RTags</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: #00a6fb;">require</span> '<span style="color: #e834f9;">rtags</span>)
|
|
(<span style="color: #00a6fb;">require</span> '<span style="color: #e834f9;">company-rtags</span>)
|
|
|
|
(<span style="color: #00a6fb;">setq</span> rtags-completions-enabled t)
|
|
(eval-after-load 'company
|
|
'(add-to-list
|
|
'company-backends 'company-rtags))
|
|
(<span style="color: #00a6fb;">setq</span> rtags-autostart-diagnostics t)
|
|
(rtags-enable-standard-keybindings)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orga39c96f" class="outline-4">
|
|
<h4 id="orga39c96f"><span class="section-number-4">2.3.5</span> Irony-mode</h4>
|
|
<div class="outline-text-4" id="text-2-3-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(add-hook 'c++-mode-hook 'irony-mode)
|
|
(add-hook 'c-mode-hook 'irony-mode)
|
|
(add-hook 'objc-mode-hook 'irony-mode)
|
|
|
|
(<span style="color: #00a6fb;">defun</span> <span style="color: #b27701;">my-irony-mode-hook</span> ()
|
|
(define-key irony-mode-map [remap completion-at-point]
|
|
'irony-completion-at-point-async)
|
|
(define-key irony-mode-map [remap complete-symbol]
|
|
'irony-completion-at-point-async))
|
|
|
|
(add-hook 'irony-mode-hook 'my-irony-mode-hook)
|
|
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org26d0ecc" class="outline-4">
|
|
<h4 id="org26d0ecc"><span class="section-number-4">2.3.6</span> Comany-irony</h4>
|
|
<div class="outline-text-4" id="text-2-3-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(add-hook 'irony-mode-hook 'company-irony-setup-begin-commands)
|
|
(<span style="color: #00a6fb;">setq</span> company-backends (delete 'company-semantic company-backends))
|
|
(eval-after-load 'company
|
|
'(add-to-list
|
|
'company-backends 'company-irony))
|
|
(<span style="color: #00a6fb;">setq</span> company-idle-delay 0)
|
|
(define-key c-mode-map [(tab)] 'company-complete)
|
|
(define-key c++-mode-map [(tab)] 'company-complete)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgfaf2017" class="outline-4">
|
|
<h4 id="orgfaf2017"><span class="section-number-4">2.3.7</span> Flycheck</h4>
|
|
<div class="outline-text-4" id="text-2-3-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(add-hook 'c++-mode-hook 'flycheck-mode)
|
|
(add-hook 'c-mode-hook 'flycheck-mode)
|
|
(<span style="color: #00a6fb;">require</span> '<span style="color: #e834f9;">flycheck-rtags</span>)
|
|
|
|
(<span style="color: #00a6fb;">defun</span> <span style="color: #b27701;">my-flycheck-rtags-setup</span> ()
|
|
(flycheck-select-checker 'rtags)
|
|
(<span style="color: #00a6fb;">setq-local</span> flycheck-highlighting-mode nil) <span style="color: #6b7566;">;; </span><span style="color: #6b7566;">RTags creates more accurate overlays.</span>
|
|
(<span style="color: #00a6fb;">setq-local</span> flycheck-check-syntax-automatically nil))
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">c-mode-common-hook is also called by c++-mode</span>
|
|
(add-hook 'c-mode-common-hook #'my-flycheck-rtags-setup)
|
|
<span style="color: #6b7566;">;;</span><span style="color: #6b7566;">Integrate to irony</span>
|
|
(eval-after-load 'flycheck
|
|
'(add-hook 'flycheck-mode-hook #'flycheck-irony-setup))
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orga9c0dbb" class="outline-4">
|
|
<h4 id="orga9c0dbb"><span class="section-number-4">2.3.8</span> Flycheck-clang-tidy</h4>
|
|
<div class="outline-text-4" id="text-2-3-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #6b7566;">;</span><span style="color: #6b7566;">(eval-after-load 'flycheck</span>
|
|
<span style="color: #6b7566;">; </span><span style="color: #6b7566;">'(add-hook 'flycheck-mode-hook #'flycheck-clang-tidy-setup))</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org9fc642d" class="outline-4">
|
|
<h4 id="org9fc642d"><span class="section-number-4">2.3.9</span> Cmake-ide</h4>
|
|
<div class="outline-text-4" id="text-2-3-9">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(cmake-ide-setup)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org5956445" class="outline-4">
|
|
<h4 id="org5956445"><span class="section-number-4">2.3.10</span> Highlight beállítások</h4>
|
|
<div class="outline-text-4" id="text-2-3-10">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(add-hook 'irony-mode-hook 'highlight-numbers-mode)
|
|
(add-hook 'irony-mode-hook 'preproc-font-lock-mode)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgbc1ed9f" class="outline-4">
|
|
<h4 id="orgbc1ed9f"><span class="section-number-4">2.3.11</span> Srefactor</h4>
|
|
<div class="outline-text-4" id="text-2-3-11">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(<span style="color: #00a6fb;">require</span> '<span style="color: #e834f9;">srefactor</span>)
|
|
(<span style="color: #00a6fb;">require</span> '<span style="color: #e834f9;">srefactor-lisp</span>)
|
|
|
|
<span style="color: #6b7566;">;; </span><span style="color: #6b7566;">OPTIONAL: ADD IT ONLY IF YOU USE C/C++. </span>
|
|
(semantic-mode 1) <span style="color: #6b7566;">;; </span><span style="color: #6b7566;">-> this is optional for Lisp</span>
|
|
|
|
(define-key c-mode-map (kbd <span style="color: #3ee766;">"M-RET"</span>) 'srefactor-refactor-at-point)
|
|
(define-key c++-mode-map (kbd <span style="color: #3ee766;">"M-RET"</span>) 'srefactor-refactor-at-point)
|
|
(global-set-key (kbd <span style="color: #3ee766;">"M-RET o"</span>) 'srefactor-lisp-one-line)
|
|
(global-set-key (kbd <span style="color: #3ee766;">"M-RET m"</span>) 'srefactor-lisp-format-sexp)
|
|
(global-set-key (kbd <span style="color: #3ee766;">"M-RET d"</span>) 'srefactor-lisp-format-defun)
|
|
(global-set-key (kbd <span style="color: #3ee766;">"M-RET b"</span>) 'srefactor-lisp-format-buffer)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orge3d173c" class="outline-2">
|
|
<h2 id="orge3d173c"><span class="section-number-2">3</span> Makró beállítások</h2>
|
|
<div class="outline-text-2" id="text-3">
|
|
</div>
|
|
<div id="outline-container-org99d1b02" class="outline-3">
|
|
<h3 id="org99d1b02"><span class="section-number-3">3.1</span> Rtags</h3>
|
|
<div class="outline-text-3" id="text-3-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(define-key c-mode-base-map (kbd <span style="color: #3ee766;">"M-."</span>) (<span style="color: #00a6fb;">function</span> rtags-find-symbol-at-point))
|
|
(define-key c-mode-base-map (kbd <span style="color: #3ee766;">"M-,"</span>) (<span style="color: #00a6fb;">function</span> rtags-find-references-at-point))
|
|
(define-key c-mode-base-map (kbd <span style="color: #3ee766;">"M-;"</span>) (<span style="color: #00a6fb;">function</span> rtags-find-file))
|
|
(define-key c-mode-base-map (kbd <span style="color: #3ee766;">"C-."</span>) (<span style="color: #00a6fb;">function</span> rtags-find-symbol))
|
|
(define-key c-mode-base-map (kbd <span style="color: #3ee766;">"C-,"</span>) (<span style="color: #00a6fb;">function</span> rtags-find-references))
|
|
(define-key c-mode-base-map (kbd <span style="color: #3ee766;">"C-<"</span>) (<span style="color: #00a6fb;">function</span> rtags-find-virtuals-at-point))
|
|
(define-key c-mode-base-map (kbd <span style="color: #3ee766;">"M-i"</span>) (<span style="color: #00a6fb;">function</span> rtags-imenu))
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org9ebff48" class="outline-3">
|
|
<h3 id="org9ebff48"><span class="section-number-3">3.2</span> Open config</h3>
|
|
<div class="outline-text-3" id="text-3-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(global-set-key (kbd <span style="color: #3ee766;">"C-c o"</span>) (<span style="color: #00a6fb;">lambda</span> () (<span style="color: #00a6fb;">interactive</span>)
|
|
(find-file <span style="color: #3ee766;">"/home/balazs/.emacs.d/conf.org"</span>)
|
|
(message <span style="color: #3ee766;">"Opened: %s"</span> (buffer-name))))
|
|
(global-set-key (kbd <span style="color: #3ee766;">"C-c r"</span>) (<span style="color: #00a6fb;">lambda</span> () (<span style="color: #00a6fb;">interactive</span>)
|
|
(kill-buffer (buffer-name))
|
|
(load-file <span style="color: #3ee766;">"/home/balazs/.emacs.d/init.el"</span>)
|
|
(message <span style="color: #3ee766;">"Configuration reloaded"</span>)
|
|
))
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org17d11dc" class="outline-3">
|
|
<h3 id="org17d11dc"><span class="section-number-3">3.3</span> Cmake build and run</h3>
|
|
<div class="outline-text-3" id="text-3-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">
|
|
(<span style="color: #00a6fb;">defun</span> <span style="color: #b27701;">cmake-build-and-run</span> ()
|
|
<span style="color: #75715e;">"Asks for cmake target, then compiles and runs it."</span>
|
|
(<span style="color: #00a6fb;">interactive</span>)
|
|
(<span style="color: #00a6fb;">let</span> ((target
|
|
(ido-completing-read <span style="color: #3ee766;">"Choose build target: "</span> (remove <span style="color: #3ee766;">""</span> (split-string
|
|
(shell-command-to-string <span style="color: #3ee766;">"cmake --build ./cmake-build-debug --target help | awk '{if($2 != \"all\" && $2!= \"clean\" && $2 != \"following\" && $2 != \"edit_cache\" && $2 != \"rebuild_cache\" && $2 != \"depend\" && $2 !~ /\\./){print $2}}'"</span>) <span style="color: #3ee766;">"\n"</span>)))))
|
|
(<span style="color: #00a6fb;">setq</span> cmake-last-target target)
|
|
(async-shell-command (format <span style="color: #3ee766;">"cmake --build ./cmake-build-debug --target %s && ./cmake-build-debug/%s"</span> target target))))
|
|
|
|
(<span style="color: #00a6fb;">defun</span> <span style="color: #b27701;">cmake-build-last-target</span> ()
|
|
(<span style="color: #00a6fb;">interactive</span>)
|
|
(<span style="color: #00a6fb;">if</span> (not (null cmake-last-target))
|
|
(async-shell-command (format <span style="color: #3ee766;">"cmake --build ./cmake-build-debug --target %s && ./cmake-build-debug/%s"</span> cmake-last-target cmake-last-target))
|
|
(cmake-build-and-run))
|
|
)
|
|
(define-key c-mode-base-map (kbd <span style="color: #3ee766;">"C-c C-r"</span>) (<span style="color: #00a6fb;">function</span> cmake-build-and-run))
|
|
(define-key c-mode-base-map [f5] 'cmake-build-last-target)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgf4baf2f" class="outline-3">
|
|
<h3 id="orgf4baf2f"><span class="section-number-3">3.4</span> Kód indentálás</h3>
|
|
<div class="outline-text-3" id="text-3-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(<span style="color: #00a6fb;">defun</span> <span style="color: #b27701;">indent-buffer</span> ()
|
|
(<span style="color: #00a6fb;">interactive</span>)
|
|
(<span style="color: #00a6fb;">save-excursion</span>
|
|
(indent-region (point-min) (point-max) nil)))
|
|
(global-set-key [f6] 'indent-buffer)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org4db7305" class="outline-2">
|
|
<h2 id="org4db7305"><span class="section-number-2">4</span> Saját változók</h2>
|
|
<div class="outline-text-2" id="text-4">
|
|
</div>
|
|
<div id="outline-container-org8b594c5" class="outline-3">
|
|
<h3 id="org8b594c5"><span class="section-number-3">4.1</span> Csomag változók</h3>
|
|
<div class="outline-text-3" id="text-4-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org4091991" class="outline-3">
|
|
<h3 id="org4091991"><span class="section-number-3">4.2</span> Minibuffer</h3>
|
|
<div class="outline-text-3" id="text-4-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(<span style="color: #00a6fb;">setq</span> minibuffer-completion-confirm nil)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org68c6cc9" class="outline-3">
|
|
<h3 id="org68c6cc9"><span class="section-number-3">4.3</span> Spellcheck</h3>
|
|
<div class="outline-text-3" id="text-4-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(<span style="color: #00a6fb;">setq</span> ispell-local-dictionary <span style="color: #3ee766;">"/home/balazs/.local/hu_HU.dic"</span>)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgdf2af2b" class="outline-3">
|
|
<h3 id="orgdf2af2b"><span class="section-number-3">4.4</span> Téma betöltése</h3>
|
|
<div class="outline-text-3" id="text-4-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(load-theme "humanoid-dark" t)</span>
|
|
<span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(add-hook 'after-init-hook (lambda () (load-theme "humanoid-dark")))</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org302b01a" class="outline-3">
|
|
<h3 id="org302b01a"><span class="section-number-3">4.5</span> Org-mode</h3>
|
|
<div class="outline-text-3" id="text-4-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp">(<span style="color: #00a6fb;">setq</span> org-todo-keywords
|
|
'((squence <span style="color: #3ee766;">"TODO"</span> <span style="color: #3ee766;">"WAITING"</span> <span style="color: #3ee766;">"|"</span> <span style="color: #3ee766;">"DONE(!)"</span>)))
|
|
(<span style="color: #00a6fb;">setq</span> org-highlight-latex-and-related '(latex script entities))
|
|
(<span style="color: #00a6fb;">setq</span> org-src-fontify-natively t
|
|
org-src-tab-acts-natively t
|
|
org-confirm-babel-evaluate nil
|
|
org-edit-src-content-indentation 0)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-org7722497" class="outline-3">
|
|
<h3 id="org7722497"><span class="section-number-3">4.6</span> Teszt</h3>
|
|
<div class="outline-text-3" id="text-4-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #6b7566;">;;</span><span style="color: #6b7566;">(setq cmake-ide-build-dir "cmake-build-test")</span>
|
|
(cd <span style="color: #3ee766;">"~/CLionProjects/prog2/"</span>)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="postamble" class="status">
|
|
<p class="date">Created: 2020-05-16 szo 11:45</p>
|
|
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
|
</div>
|
|
</body>
|
|
</html>
|