emacs

Does emacs offer hide show for html mode

烂漫一生 提交于 2021-02-10 05:04:43
问题 Does emacs have a hide-show code fold-ability for html? I have it when I'm using org mode, but can't seem to find it on the nXML/html side. 回答1: I wrote this for mhtml-mode and it works pretty well, it can fold HTML by tag as well as the embedded CSS and JS. Simply add it to your emacs config file and you'll be set to go. ;; When called this automatically detects the submode at the current location. ;; It will then either forward to end of tag(HTML) or end of code block(JS/CSS). ;; This will

Deleting lines of code in a text editor

孤人 提交于 2021-02-08 12:16:45
问题 Edit: This question had been tagged "Tolstoy" in appreciation of the quality and length of my writing:) Just reading the first and the last paragraph should be enough:) If you tend to select and move code with the mouse, the stuff in middle could be interesting to you. This question is about how you use text editors in general. I’m looking for the best way to delete a plurality of lines of code (no intent to patent it:) This extends to transposing lines, i.e. deleting and adding them

How to clear the Emacs buffer history?

谁都会走 提交于 2021-02-07 20:21:08
问题 When I press C-x b ( ido-switch-buffer ) I get a lot of buffers that I don't want to see. I'd like to clear the buffer history. I tried evaluating this expression (using M-x eval-buffer ): (setq ido-buffer-history '()) And it took effect; I can tell because I looked at the variable with C-h v ido-buffer-history . However, the change did not get reflected in the minibuffer when I press C-x b . What else should I do? Are there other variables I should be clearing? UPDATE : The 'extra' buffers

How to clear the Emacs buffer history?

偶尔善良 提交于 2021-02-07 20:21:04
问题 When I press C-x b ( ido-switch-buffer ) I get a lot of buffers that I don't want to see. I'd like to clear the buffer history. I tried evaluating this expression (using M-x eval-buffer ): (setq ido-buffer-history '()) And it took effect; I can tell because I looked at the variable with C-h v ido-buffer-history . However, the change did not get reflected in the minibuffer when I press C-x b . What else should I do? Are there other variables I should be clearing? UPDATE : The 'extra' buffers

Banish unmatched top-level trees when performing tag search in Emacs Org Mode

守給你的承諾、 提交于 2021-02-07 19:17:10
问题 For the past year and a half, I've maintained a monolithic buffer in Org Mode for my engineering notes with my current employer. Despite containing mostly pointers to other documents, this file has become quite large by human standards (48,290 lines of text), while remaining trivially searchable and editable through programmatic means (read: grep and Org Mode tag search). One thing bothers me, though. When I perform a tag search using Org Mode 6.33x, Org's sparse tree view retains the folded

Banish unmatched top-level trees when performing tag search in Emacs Org Mode

五迷三道 提交于 2021-02-07 19:16:58
问题 For the past year and a half, I've maintained a monolithic buffer in Org Mode for my engineering notes with my current employer. Despite containing mostly pointers to other documents, this file has become quite large by human standards (48,290 lines of text), while remaining trivially searchable and editable through programmatic means (read: grep and Org Mode tag search). One thing bothers me, though. When I perform a tag search using Org Mode 6.33x, Org's sparse tree view retains the folded

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

how to configure python.el for emacs to use python3 shell?

感情迁移 提交于 2021-02-07 10:38:39
问题 I am new to emacs. I installed emacs24 which has a built-in python mode(python.el). I cannot find this file and don't know how to configure it to use python3 shell (it's using python2.7 as default). Thannks 回答1: M-x customize-variable RET python-shell-interpreter RET Set it to python3. Afterwards M-x run-python RET should open a Python3 shell. If not working yet, check $PATH, make sure the directory holding python3 executable appears. 来源: https://stackoverflow.com/questions/23852308/how-to

How to properly setup Jedi with elpy in emacs?

血红的双手。 提交于 2021-02-06 20:13:18
问题 I am using emacs with elpy as mode for working with python code. I have also installed Jedi for, mainly, two things: go to definition functionality it provides and autocompletion. However, I have run into the following problems with this setup: Jedi completion is not triggered by key commands. It appears automatically, but sometimes too late for my tastes, and i would prefer to try and invoke it earlier. However, despite there being a Jedi: Key complete option in customisation pages, it does

How to properly setup Jedi with elpy in emacs?

不想你离开。 提交于 2021-02-06 20:03:33
问题 I am using emacs with elpy as mode for working with python code. I have also installed Jedi for, mainly, two things: go to definition functionality it provides and autocompletion. However, I have run into the following problems with this setup: Jedi completion is not triggered by key commands. It appears automatically, but sometimes too late for my tastes, and i would prefer to try and invoke it earlier. However, despite there being a Jedi: Key complete option in customisation pages, it does