我想只更改Org-Agenda缓冲区中的face属性.所以我需要在本地更改Org-Agenda面部属性缓冲区.
这是我的代码:(全球范围内)
(defun my-org-agenda-hl-line ()
(hl-line-mode)
(set-face-attribute 'hl-line nil
:box '(:color "deep pink" :line-width 2))
)
(add-hook 'org-agenda-mode-hook 'my-org-agenda-hl-line)
Run Code Online (Sandbox Code Playgroud)
请帮我在本地制作这个缓冲区.谢谢
是否有一种方法可以突出显示标有的Org-mode内联源代码的语法src_ruby{Array.new}?
组织模式是否有默认选项?或者还有其他方法吗?
可能重复:
Python中的"最小惊讶":可变默认参数
def f(a, L=[]):
L.append(a)
return L
print(f(1, [1, 2]))
print(f(1))
print(f(2))
print(f(3))
Run Code Online (Sandbox Code Playgroud)
我想知道为什么其他f(1),f(2),f(3)没有附加到第一个f(1,[1,2]).我想结果应该是:
[1, 2, 1]
[1, 2, 1, 1]
[1, 2, 1, 1, 2]
[1, 2, 1, 1, 2, 3]
Run Code Online (Sandbox Code Playgroud)
但结果不是这个.我不知道为什么.
我想启用auto-completeBabel代码块org-mode:
#+begin_src emacs-lisp
(setq ) <--- language-aware auto-completion here
#+end_src
Run Code Online (Sandbox Code Playgroud)
.emacs为了配置auto-complete这个,我需要添加到我的文件中?
我希望用来[C-c C-o]打开[[file://filename.org|filename]]当前窗口中的链接,而不是其他窗口中的默认链接.
如何更改此组织模式默认行为?
似乎默认[C-u C-c C-o]是在其他窗口中强制打开链接.
在这里有一个类似的问题:如何保持Emacs组织模式不分裂窗口?
我想要一个简单的解决方案来获取vim脚本中路径下的目录名称.
这是我尝试过的方法:代码.https://gist.github.com/4307744 功能位于L84行.
我使用此函数作为input()的完整函数.因此,此函数需要返回路径下的目录名列表.例如
to/path/
- a/
- b/
Run Code Online (Sandbox Code Playgroud)
我想得到a和b.
我试图找到vim内部函数:help functions.只有找到了globpath(),但它会返回完整路径.
那么有人有一个简单的解决方案吗?(顺便说一句,为什么在Vim的路径下获取目录名很难?)
我已经为修改Emacs行为的函数设置了一个键绑定auto-complete:
;; ISSUE: when I type the whole candidate string and then press [SPC],
;; Emacs will insert two spaces.
(define-key ac-menu-map (kbd "SPC")
(defun ac-complete-with-space ()
"Select the candidate and append a space. Save your time for typing space."
(interactive)
(ac-complete)
;; FIXME: this auto-inserts two spaces.
(insert " ")
))
Run Code Online (Sandbox Code Playgroud)
......我想禁用此键绑定中ac-menu-map 的 org-mode 唯一.
我尝试过以下方法:
;; Avoid always selecting unwanted first candidate with auto-complete
;; when writing in org-mode.
(add-hook 'org-mode-hook
(lambda ()
;; …Run Code Online (Sandbox Code Playgroud) 我对以下代码感到困惑:
class Point():
def __init__(self, x=0, y=0):
self.x = x
self.y = y
Run Code Online (Sandbox Code Playgroud)
我不明白x代码中的那两个是什么self.x = x意思.
emacs ×5
org-mode ×4
autocomplete ×2
function ×2
python ×2
babel ×1
complete ×1
directory ×1
elisp ×1
emacs-faces ×1
font-face ×1
highlight ×1
key-bindings ×1
parameters ×1
path ×1
self ×1
syntax ×1
vim ×1