Emacs shortcuts specific for a file type -


is there way different shortcut different file types?
tipically use f12 compile. runs make -f. i'd have f12 running

m-x org-export-as-html

when i'm on org-mode.
how should edit .emacs file? it's just:

(global-set-key [f12] 'compile)

thanks,
hamen

add mode hook org-mode local-set-key instead of global-set-key

(add-hook 'org-mode-hook (lambda () (local-set-key [f12] 'org-export-as-html))) 

Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -