codingdir logo sitemap sitemap |
Home
PHP
C#
C++
ANDROID
JAVA
JAVASCRIPT
PYTHON

Emacs ESS key bindings


By : , Category : emacs

ess-noweb mode is just a wrapper and it loads latex-mode and R-mode in corresponding chunks. So if you define a shortcut in latex-mode-map it should be available in .rnw buffers as well.

ReLated :

You should use defun to define your interactive function and bind to that.

(defun my-func ()
  "Moves the current line up by one"
  (interactive)
  (let ((col (current-column)))
    (transpose-lines 1)
    (forward-line -2)
    (forward-char col)))

(global-set-key (kbd "M-p") 'my-func)

You want to disable the check box, Enable keybindings in menus.

Unfortunately this checkbox is a bit buried:

  1. Open the Racket Preferences dialog.

  2. Click the Editing tab.

  3. There's a row of sub-tabs for that. Click the General sub-tab.

  4. A few items down you should see the Enable keybindings in menus check box. Un-check it.

The second argument of global-set-key needs to be the symbol of the function you want to run. In your case, the command C-x r m ordinarily corresponds to the bookmark-set (I determined this by running C-x k C-x r m), so you should pass 'bookmark-set:

(global-set-key (kbd "C-c C-z") 'bookmark-set)

This is something I borrowed from here: http://www.hulubei.net/tudor/configuration/download/.emacs

I have not tested the code, but it looks like it should work. With this type of setup, the original poster can maintain just one .emacs file and/or load the preferences file.

(defvar gnuemacs-flag (string-match "GNU" (emacs-version)))

(defvar aquamacs-flag (string-match "Aquamacs" (emacs-version)))

(cond
  (aquamacs-flag
    (define-key osx-key-mode-map (kbd "A-h") 'replace-string))
  (gnuemacs-flag
    (define-key key-minor-mode-map (kbd "s-h") 'replace-string)))
Comments


Message :
Login to Add Your Comments .
How to disable registered OpenCL platforms on Windows?
Is Observable broken in Angular 2 Beta 3?
Cross-thread operation not valid when using Invoke
How to pass an IEnumerable or queryable list of properties from Controller to View
Finding numbers after a certain keyword using Python
Pocketsphinx recognizes random phrases in a silence
Passing non-thread-safe objects through thread-safe containers
React scroll nav
BizTalk WCF-BasicHttp Adapter does not allow Empty string for Service Certificate Props
Why property ''cause" of Exception is repeating forever?
Privacy Policy 2017 © codingdir.com All Rights Reserved .