(global-set-key(kbd"RET")'newline-and-indent) 其它设置示例: (global-set-key(kbd"M-w")'kill-region); 交换 M-w 和 C-w,M-w 为剪切(global-set-key(kbd"C-w")'kill-ring-save); 交换 M-w 和 C-w,C-w 为复制(global-set-key(kbd"C-a")'back-to-indentation); 交换 C-a 和 M-...
(setq-defaultpy-indent-tabs-modet) (add-to-list'write-file-functions 'delete-trailing-whitespace))) 我的配置 通过实践,并阅读了python-mode.el的源码,发现上面的配置并不生效。 应如下配置: (add-hook 'python-mode-hook (lambda () (setq-default py-indent-offset 8) (setq-default py-indent-tabs...
(indent-for-tab-command) ) ) ;; hippie-expand 自动补全策略 (setq hippie-expand-try-functions-list '( senator-try-expand-semantic ;优先调用senator的分析结果 try-expand-dabbrev-visible ;dabbrev策略, 可见窗口优先 try-expand-dabbrev ;dabbrev策略 try-expand-dabbrev-all-buffers ;dabbrev策略, 包...
(let ((path (shell-command-to-string ". ~/.bashrc; echo -n $PATH"))) (setenv "PATH" path) (setq exec-path (append (split-string-and-unquote path ":") exec-path))) ;; ;; Ugly code for READING XLS (but works) ;; Requires: xlhtml & w3m ;; (add-to-list 'auto-mode-ali...
1. 记住在所有要绑定到快捷键的函数上面加上(interactive)关键字,否则,会发生(wrong-type-argument commandp my-command)的错误 对于要绑定到鼠标的函数,要在函数声明中指定参数(event),在修饰段,加入(interactive "e"),然后才能绑定 2. 对于要传递参数的函数,可以用lambda匿名函数来实现 ...
goto-line-preview - Preview line when executing goto-line command. Avy - Jump to visible text using a char-based decision tree. avy-zap - Zap to char using avy. iy-go-to-char - Go to next CHAR which is similar to “f” and “t” in vim, works well with Multiple Cursors. goto...
to ~/.emacs.d/site-enabled/" (interactive "Bsettings: ") (let '(command (concat "ln -s ~/.emacs.d/site-available/" settings " ~/.emacs.d/site-enabled/")) (start-process-shell-command "enable-settings" "*Messages*" command))) (defun disable-settings (settings) "remove a plugin ...
There are two ways to install this setup (I recommend the first way):First way is to download latest setup and extract its content into ~/.emacs.d, OR run command cd ~; git clone https://github.com/redguardtoo/emacs.d.git .emacs.d in shell....
Command Keys Description Edit.EmacsBreakLine ENTER Inserts a new line. Edit.EmacsBreakLineIndent CTRL + J Inserts a new line and indents it. Edit.EmacsCharTranspose CTRL + T Transposes the characters on either side of the cursor. For example, Ed|n Sub would be changed to read End| Sub....
(defconst ansys-command-regexp (regexp-opt '("*afun" "*set" "*get" "*status" "*go" "*if" "*elseif" "*else" "*endif" "*do" "*enddo" "*exit" "*cycle" "*dowhile" "*repeat" "*create" "*end" "*use" "*dim" "*del" "*vget" "*vput" "*vscfun" "*vfact" "*...