emacs

为什么 vim 和 emacs 没有占领市场

早过忘川 提交于 2020-02-19 00:24:49
一个软件要想推广, 一定是先要给新用户足够的便利, 解决了用户的需求, 之后, 用户才会为看见他的潜力感到欣喜, 从而爱上它的将来, 但是 vim 和 emacs 不是这么做的, 他们首先要求用户学习区别于 GUI 的 TUI 操作模式, 就算学会了, 也仅仅是一个 基于 TUI 的 notepad++, 在被配置 vim 或者 emacs 虐上最少 10 个小时后, 才能把它配置成一个具备简单补全功能的代码编辑器, 在之后的插件探索道路上, 如果碰到插件之间的兼容问题, 还要考虑自己debug. 简单的总结下来, 就是: vim 是一个对新手不友好的工具. 要想让 vim 友好, 必须要根据使用的人群, 设计专用的工具, 这个工具可能不够强大, 但是可以基于 vim 的潜力, 让用户自己扩展, 你可以理解为, 基于 vim 的 Pycharm 比如, 同样是一个 Python 程序员, 想要使用 vim 开发, 至少要有以下几个功能 1. 代码高亮 2. 代码定义跳转 3. 代码补全 4. debug 如果vim想要吸引 Python 用户, 就应当先把这个功能定制出来, 这样的配置, 或许没有对于常用的html/css/js补全, 但是, 这里所缺少的, 不是 Python 程序员所必要的, 之后的, 就交给程序员自己去配置, 这是非常合适的, vim的配置, 都是基于

emacs的daemon

落爺英雄遲暮 提交于 2020-02-17 08:31:22
Emacs是慢,我承认,这也是为什么我在term下使用VIM. 不过今天看到个让Emacs飞起来的办法.真好!! 1.emacs --daemon 我用awesome,所以添加在.xinitrc里面了 eamcs --daemon & 2. emacsclient emacsclient -c 对应的GUI emacsclient -t 对应的是term,考虑term下面也换成emacs,那多爽阿. 为了方便 win+enter 直接启动emacsclient -c ,awesome的键绑. 在.bashrc中定义了 alias et='emacsclient -t "$@" -a "vim"' 要是daemon没启动的话就用vim替代. 3.Stopping the Emacs Daemon The simplest way to stop the emacs daemon from within emacs is to use the kill-emacs or save-buffers-kill-emacs commands. From outside of emacs this can be achieved using emacsclient: emacsclient -e '(kill-emacs)' This will shutdown the daemon

Emacs 中英文字体设置

纵饮孤独 提交于 2020-02-17 08:31:07
鱼与熊掌不可兼得,一个好的英文字体不一定能够显示好的中文字体。 Emacs 在这个方面体现了较好的制定性,可以分别设置中英文字体,看着更顺眼。 在 .emacs 中加入以下字段: 其中 "monofur" 和 "WenQuanYi Zen Hei Mono" 是我自己设置的英文与中文字体。 ;;中文与外文字体设置 ;; Setting English Font (set-face-attribute 'default nil :font "monofur 12") ;; Chinese Font (dolist (charset '(kana han symbol cjk-misc bopomofo)) (set-fontset-font (frame-parameter nil 'font) charset (font-spec :family "WenQuanYi Zen Hei Mono" :size 14))) 来源: https://www.cnblogs.com/FelixLee/archive/2012/01/31/2412532.html

Emacs: 设置窗口标题格式

和自甴很熟 提交于 2020-02-09 10:56:25
Emacs默认的窗口标题常常比较简单,例如我的默认标题是 emacs@ubuntu 。如果想要在标题中显示更多的信息,我们可以对它进行一些设置。由于Emacs的可扩展性,这种修改实际上非常容易。 显示文件名 设置Emacs的标题只需要设置变量 frame-title-format 就可以了[1]。例如 (setq frame-title-format "%b - Emacs") 将标题设置为"文件名 - Emacs"的形式,其中 %b 表示文件名。更多格式说明可以参考 mode-line-format 的文档。 显示当前目录 我们比较贪,想要titlebar做更多的事[2]。一个比较常见的做法是显示当前文件所在的目录。为了便于扩展我们将上述标题整理为等价的格式: (setq frame-title-format '(:eval (concat (buffer-name) " - Emacs")) ) 表示标题的格式由计算一个表达式得到,而这个表达式是 (buffer-name) 和 "- Emacs" 连接得到的。这样,就容易加入当前目录的计算[3]: (if buffer-file-name (concat " (" (directory-file-name (abbreviate-file-name default-directory)) ")")) 其中 default

Where can I find my .emacs file for Emacs running on Windows?

淺唱寂寞╮ 提交于 2020-02-08 21:48:54
问题 I tried looking for the .emacs file for my Windows installation for Emacs, but I could not find it. Does it have the same filename under Windows as in Unix? Do I have to create it myself? If so, under what specific directory does it go? 回答1: Copy and pasted from the Emacs FAQ, http://www.gnu.org/software/emacs/windows/: Where do I put my init file? On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a

Where can I find my .emacs file for Emacs running on Windows?

China☆狼群 提交于 2020-02-08 21:48:00
问题 I tried looking for the .emacs file for my Windows installation for Emacs, but I could not find it. Does it have the same filename under Windows as in Unix? Do I have to create it myself? If so, under what specific directory does it go? 回答1: Copy and pasted from the Emacs FAQ, http://www.gnu.org/software/emacs/windows/: Where do I put my init file? On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a

In elisp, how do I apply backquote to lists read from files

人走茶凉 提交于 2020-02-05 16:15:47
问题 I would like to take a large list (think faces in an emacs theme) and break it up into smaller lists in separate files. The problem I have is applying (backquote) to the lists once I've read them in. Here is the code I have been using to experiment with solutions: (defvar x 23) (defun read-from-file (file) (with-temp-buffer (insert-file-contents file) (read (current-buffer)))) ;;(defun apply-macro (macro arg-list) ;; (eval ;; `(,macro ,@(loop for arg in arg-list ;; collect `(quote ,arg)))))

In elisp, how do I apply backquote to lists read from files

落爺英雄遲暮 提交于 2020-02-05 16:13:33
问题 I would like to take a large list (think faces in an emacs theme) and break it up into smaller lists in separate files. The problem I have is applying (backquote) to the lists once I've read them in. Here is the code I have been using to experiment with solutions: (defvar x 23) (defun read-from-file (file) (with-temp-buffer (insert-file-contents file) (read (current-buffer)))) ;;(defun apply-macro (macro arg-list) ;; (eval ;; `(,macro ,@(loop for arg in arg-list ;; collect `(quote ,arg)))))

emacs terminal bash (PS1) prompt duplicated

杀马特。学长 韩版系。学妹 提交于 2020-02-05 06:36:06
问题 This is a bit of a convoluted question, but here goes nothing! I've recently updated my bash prompt to the nice version appearing in the last post of this thread: Bash: custom PS1 with nice working directory path. The relevant bash code (from that thread post) is copied here: # define the awk script using heredoc notation for easy modification MYPSDIR_AWK=$(cat << 'EOF' BEGIN { FS = OFS = "/" } { if (length($0) > 16 && NF > 4) print $1,$2,".." NF-4 "..",$(NF-1),$NF else print $0 } EOF ) # my

idris-mode – Buffer has no process

我的梦境 提交于 2020-02-03 08:57:28
问题 I'm new to emacs (coming from vim, where I can't get idris-vim to work) and have these packages installed via el-get: ace-jump-mode installed A quick cursor location minor mode for emacs. el-get installed Manage the external elisp bits and pieces you depend upon. evil-leader installed Add <leader> shortcuts to Evil, the extensible vim emulation layer evil-numbers installed Increment/decrement numbers in Evil, the extensible vim emulation layer. Like C-a/C-x in vim. After installation, you