Is there a simple way to get command-i, command-b, and command-u to operate in emacs org-mode on Mac in exactly the way that they operate in a typical word processor on Mac (for example, Microsoft Word for Mac)?
[Edit (Mar 14 '21)]:
To be more precise, I think I want typing 'command-i', for example, to do something like the following:
For every chunk of selected text (counting a cursor with no text selected as a selection with zero length):
- Adding emphasis markers:
- If no '/' immediately precedes the selection and no '/' begins the selection, then add a '/' immediately before the selection;
- If no '/' immediately follows the selection and no '/' ends the selection, then add a '/' immediately after the selection;
- Deleting emphasis markers:
- Deleting emphasis markers at the start of the selection:
- If a '/' immediately precedes the selection if and only if no '/' begins the selection, then delete the '/' that precedes or begins the selection;
- If a '/' immediately precedes the selection and a '/' begins the selection, then delete the '/' that begins the selection;
- Deleting emphasis markers at the end of the selection:
- If a '/' immediately follows the selection if and only if no '/' ends the selection, then delete the '/' that follows or ends the selection;
- If a '/' immediately follows the selection and a '/' ends the selection, then delete the '/' that ends the selection.
- Deleting emphasis markers at the start of the selection:
I’m a writer/academic, and I’ve been looking for a new text editor. It looks like it should be possible to set up emacs org-mode in a way that meets almost all of my requirements, so I'm thinking of making the switch from writing markdown in Visual Studio Code. My main concern regards the keybindings. I would like to be able to keep as many of the standard Mac/Windows keybindings as possible so that I’m not constantly getting tripped up whenever I switch between different applications and computers, which I will need to do regularly. I’m aware that there’s a mode called ‘cua-mode’ which allows the use of C-c, C-x, C-v, and C-z for copy, cut, paste, undo, etc., and I’ve downloaded Aquamacs which appears to use most of the standard Mac keybindings (using the more standard command key rather than the control key).
The main thing I would like to be able to do is to use the standard (on Mac) command-i, command-b, and command-u to toggle italics, bold, and underline, respectively, in org-mode, inserting or removing the relevant emphasis marks around the selected region (or point, if nothing is selected). The closest solution I’ve found so far is a configuration called emacs-org-mode-for-the-laity, but its keybindings for removing italics, bold, or underline from a selection are non-standard, requiring the use of the shift key.
I'm surprised not to have found an existing simple way of implementing this (I'm currently using an extension that does exactly this for markdown syntax in Visual Studio Code). This makes me think that it may be trickier to set this up in org-mode than one might think. Would it be particularly difficult to set this up in org-mode? Is there an existing package that I've overlooked that allows for this functionality?
(setq org-hide-emphasis-markers t)
to see how org mode understands your added emphasis markers?org-version
.(setq org-hide-emphasis-markers t)
; org-mode seems to highlight the emphasised text the same way either way. And the version of org-mode that's included in the version of Aquamacs I've installed is org-mode 8.2.10.