The program emacs
has a Markdown plugin that you can read about here: http://jblevins.org/projects/markdown-mode/
However, emacs has a very VERY steep learning curve as to how to use it. That page documents the shortcuts that are available, but you'll have to find other resources to find out what exactly they mean
Two options:
(See my blog for more details and screenshots for option 1)
First option (much simpler)
Upgrade to the python 3 port of autokey (because python 3 deals with unicode characters better than python 2)
For me, the installation worked as follows:
# Edit (April 2018). Autokey now uses python 3 by default. So try
pip3 install autokey
# Install the original autokey
sudo apt-get install autokey-gtk
# Update autokey to python 3 using pip3
pip3 install --user autokey-py3
Then make sure you run the python3 version, which is probably at
~/.local/bin/autokey-gtk
With this method, you can enter your unicode characters as phrases
Second option (if you can't get autokey-py3 to work)
Use a python script (File -> New -> Script) together with the system's clipboard
Paste the following into the script
import sys
reload(sys)
sys.setdefaultencoding('utf8')
from subprocess import Popen, PIPE
def paste_character(symbol):
c = Popen(['xclip', '-selection', 'clipboard'], stdin=PIPE)
c.communicate(symbol.encode('utf-8'))
keyboard.send_keys('<ctrl>+v')
paste_character('γ')
This works by changing the default python settings to work with unicode correctly. It then sends the chosen character to the clipboard (ensure you have xclip
installed). Here I've used γ as an example). Then it sends control+v to paste the character.
Extras for second option
The second method can be improved by taking all but the last line of the script and putting it in a file (lets call it MyCopy.py
). Then, in Autokey's preferences (Script Engine), tell Autokey where this file is. Then the script becomes
from MyCopy import paste_character
paste_character('γ')
Some applications don't use control+v for paste (eg terminal uses control+shift+v). But the character will still be on the clipboard.
Best Answer
Note: this may not work in a Wayland session!
Texpander:
Download the
.zip
file and extract the contents.Copy
texpander.sh
over to~/bin
. Make it executable.Use your distro's method to assign Ctrl+Shift+~, for example, to
texpander.sh
. (Note that~/bin
should be in your$PATH
.)Install
xsel
, notxclip
, andxdotool
usingsudo apt install
.Create a folder
~/.texpander
.In that folder, create the following three files:
au.txt
,off-topic.txt
andos.txt
with the following contents:au.txt
off-topic.txt
os.txt
Open a text editor and press the assigned shortcut to launch
texpander.sh
. You'll get a Zenity window like this:If you have a longer list, there'll be a handy scrollbar or just type the first letter of a listed item to jump down the list to that item.
Select the one you want and press Enter or click
OK
.Troubleshooting: If things don't work, try increasing the
sleep
values in lines 45 and 61 oftexpander.sh
.xdotool
on older machines may benefit.