spacemacs

How do you define and call a function in Spacemacs?

☆樱花仙子☆ 提交于 2021-02-07 18:36:38
问题 I've defined a emacs / lisp function within defun dotspacemacs/user-config () like so: (defun clientdir () "docstring" neotree-dir "~/Projects/Clients" ) How do I execute it? 回答1: That function will evaluate the neotree-dir variable and discard the result, then evaluate the "~/Projects/Clients" string and return it. i.e. Your function unconditionally returns the value "~/Projects/Clients" (unless neotree-dir is not bound as a variable, in which case it will trigger an error). I am guessing

Windows10下安装spacemacs

…衆ロ難τιáo~ 提交于 2020-03-01 05:05:24
安装emacs最新版251 编辑emacs配置文件 主目录的initel一定要添加 package-initialize否则spacemacs启动时间一次比一次长 安装spacemacs spacemacs真正的启动还需要很多设置步骤 emacs和initel的区别 1. 安装emacs最新版25.1 步骤: 1. 下载emacs最新版 http://ftp.gnu.org/gnu/emacs/windows/ 2. 解压并执行emacs安装目录的\bin\addpm.exe 下文的安装目录,是“ D:/EDA-tools/emacs/emacs-25.1 ”。 注意:是左斜杠 / ,而不是右斜杠 \ 。emacs会认为右斜杠是转义符。 3. 下载emacs-25-x86_64-deps.zip,并解压缩到 D:/EDA-tools/emacs/emacs-25.1 目录里; 这一步骤很重要 ,是让windows支持更多的gnu库,比如使得org-mode可以显示png格式的图片等。 2. 编辑emacs配置文件 配置文件,默认是不存在的。配置文件生效的目录是windows主目录: C:\Users\Administrator\AppData\Roaming\ 1 配置文件的设置步骤: 保证 C:\Users\Administrator\AppData\Roaming 目录下没有

Windows上安装Spacemacs

时间秒杀一切 提交于 2020-03-01 00:19:38
emacs安装 下载地址 emacs 安装比较简单,解压后执行\bin\addpm.exe即可 emacs配置 emacs的默认配置文件路径和.emacs.d文件夹都是在Windows主目录下的 C:\Users\Administrator\AppData\Roaming\ 如果想修改emacs的配置文件路径为emacs的安装目录,可以在Windows主目录下新建一个.emacs文件并将以下内容放到里面 ;; 设置emacs HOME路径 (setenv "HOME" "D:/emacs-26.1") ;; 设置emacs PATH路径 (setenv "PATH" "D:/emacs-26.1") ;; 设置emacs默认路径 (setq default-directory "~/") ;; 加载自己的配置文件 (load-file "D:/.emacs.d/init.el") Spacemacs安装 下载地址 spacemacs 安装可以直接下载zip压缩包,然后解压到.emacs.d文件夹中即可,或者用git安装 git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d spacemacs复制到.emacs.d文件夹后,双击\bin\runemacs.exe,打开emacs后就会自动安装了,中间会有写选项需要你配置

Atom配置(VIM党) · iuunhao

拜拜、爱过 提交于 2020-02-09 22:22:50
为什么说是Vim党呢?首先我是一个深度的Vim用户,自己的电脑上基本上可以兼容Vim的插件都有,所有浏览器,所有编辑器都是Vim的操作方式,当然包括我现在书写的markdown的软件 EME 也是兼容的Vim的操作。 自从4年前,一次偶尔的机会接触到了Vim这款编辑器,就深深的被吸引了。 从刚开始实用别人的配置文件,直到最后自己用了2年的时间打磨出了自己的配置文件,我曾经用了1个月的时间翻遍了 VimAwesome 的所有插件,从当初100+的插件配置到现在插件也就是10+配置文件也从当初3000+行到现在400+行,开始喜欢修改快捷键,喜欢什么都用插件来代替,到现在全部原生快捷键,能用 VimScript 实现的功能都不会去用插件来代替。 也许我们对一个事物的追求到了一定程度的时候,我就回到起点,感觉一切都是最原始的是最好的。 我写这篇文章呢? 不管是vim 还是Gvim 还是spacemacs 他们都做的很好,也许是自己对UI要求过高吧,Atom的界面做的很棒。 sublime VScode 等等的编辑器,虽然也都有vim的插件支持,但是目前我发现的只有atom的这个插件做的是好的,速度也是相当快的。基本可以平移。 这里借用作者的一幅图 快捷键基本也是通用的(space 代替空格) 常用快捷键(也可以自定义) SPACE f :显示所有快捷键 SPACE f f :显示文件列表

win10安装emacs+spacemacs

与世无争的帅哥 提交于 2020-02-03 03:23:39
1、下载 emacs最新版 26.1 或 https://www.gnu.org/software/emacs/download.html#windows 2、解压emacs到你的安装目录,我的系统是D:/Program File/。执行/bin目录下的addpm.exe   这一步会在开始菜单创建快捷方式 3、在系统环境变量中添加新项HOME(具体环境变量设置方式请自行google),该变量的路径决定了emacs启动时.emacs.d目录的搜索路径。我在系统变量中设置HOME值为:D:\Program Files\emacs-26.1 。指定到emacs解压目录下,这样你的.emacs.d文件夹位置作相应调整。以下步骤均假设HOME值为D:\Program Files\emacs-26.1。 4、拉取 spacemacs 库到目录.emacs.d 5、运行emacs解压目录/bin/runemacs.exe。由于插件源网络关系,下载极慢而且不稳定;所以修改插件源为清华服务器。第一次运行runemacs.exe后会在HOME指定的路径下生成 .spacemacs文件(所在位置见上图)。在.spacemacs文件函数defun dotspacemacs/user-init ()里添加清华源: (setq-default configuration-layer--elpa

Spacemacs using the mouse to copy paste

◇◆丶佛笑我妖孽 提交于 2020-01-01 05:32:06
问题 I quite often use the mouse to highlight text and then press cmd-c (Osx) to copy the highlighted text. However it seems that the cursor is not updated when I do this and so instead of copying the highlighted text to the register it copies from current cursor position to end of where I highlighted. What am I doing wrong? I dont want to keep remembering to click before select to move the cursor. I am using evilmode. 回答1: Put (xterm-mouse-mode -1) under user-config in your .spacemacs file should

Extract the second level headline

為{幸葍}努か 提交于 2019-12-22 12:21:38
问题 For my global TODO list, I am showing breadcrumbs as suggested here : (concat \"[ \"(org-format-outline-path (org-get-outline-path)) \" ]\") ") to produce following: I would like to show only the second level of project breadcrumb. So in this case, I would only display [Project A] . I think if I can make a function that can extract the second level, I just need to prepend with %? so that [Tasks] does not appear for Tasks, but only project names would appear for Projects. What would be an

Enter Beg End parameters automatically in Evil-Visual-Mode

偶尔善良 提交于 2019-12-11 08:46:01
问题 I see some functions like evil-change or evil-delete are take in the beginning and end of a visual region in evil-visual-state. I've looked at the source code in "evil-commands.el" of these functions but their 'beg' and 'end' parameters just seem to come out of nowhere. And some (such as the one below) aren't even interactive. Why this is and how I can do the same thing in my own methods? Below is just an example of one of the methods I looked at: ;; Defined in ~/.emacs.d/elpa/evil-20170712

Python indentation in Spacemacs with hard tabs is off

柔情痞子 提交于 2019-12-11 06:16:52
问题 Let me preface by saying that I am a relatively new emacs/spacemacs convert from vim, so my my knowledge is still pretty basic. I have spacemacs set up with the python layer, with the additional package of dtrt-indent listed in dotspacemacs-additional-packages. And setting (dtrt-indent-mode t) in the dotspacemacs/user-config. I need the dtrt-indent as I am working on a few projects (in python and lua) where I am not the one who sets the indentation rules. This configuration works fine for

How to install flycheck in spacemacs?

南笙酒味 提交于 2019-12-08 07:59:47
问题 I am attempting to use flycheck with my spacemacs setup. The spacemacs documentation, under "12.4.0.6 Minor Modes" lists flycheck as a mode which can be toggled with SPC t s . However, no such option is present in my spacemacs setup. Pressing SPC t raises a set of options that does not include s . And, if I press SPC t s anyway, I get the message SPC t s is undefined . How can I install flycheck to use with spacemacs? 回答1: Flycheck is provided as part of the syntax-checking layer. You need to