简体   繁体   中英

Emacs key binding to run make

I am working on a C++ project and I want to bind the F10 key in order for the tests to run. The tests are the default target of a Makefile. How can I do this?

To literally do what you want:

(local-set-key [(f10)] (lambda () (interactive)(compile "make")))

However, you can use keyboard macros solve general problems like this in future. Or use `repeat-last-complex-command' to look at the Lisp form of your last action to use in your own definition.

将f10绑定到命令compile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM