;; ("\M-w" . save-buffer)
("e" . revert-buffer)
("s" . isearch-forward-regexp)
+ ("M-s" . isearch-forward-regexp)
("r" . isearch-backward-regexp)
("." . isearch-forward-symbol-at-point)
("o" . occur)
(use-package compile
:commands compile
:config
- (setq compilation-environment (cons "LC_ALL=C" compilation-environment)))
+ (setq compilation-environment (cons "LC_ALL=C" compilation-environment))
+ (setq compilation-auto-jump-to-first-error t)
+ (setq compilation-auto-jump-to-next t)
+ (setq compilation-scroll-output 'first-error))
;; super-r to compile
(with-eval-after-load "compile"
#+END_SRC
*** C++ Auto Insert
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(eval-after-load 'autoinsert
'(define-auto-insert '("\\.cpp\\'" . "C++ skeleton")
'(
"return 1;\n"
"}" > \n
)))
-
#+END_SRC
*** Perl Auto Insert
-
Refer [[https://www.emacswiki.org/emacs/AutoInsertMode][AutoInsertMode]] Wiki
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(eval-after-load 'autoinsert
'(define-auto-insert '("\\.pl\\'" . "Perl skeleton")
'(
- "Description: "
+ "Empty"
"#!/usr/bin/perl -w" \n
\n
- "use strict;" \n \n
+ "use strict;" > \n \n
+ > _
)))
+#+END_SRC
+*** Python template
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (eval-after-load 'autoinsert
+ '(define-auto-insert '("\\.\\(py\\)\\'" . "Python skeleton")
+ '(
+ "Empty"
+ "#import os,sys" \n
+ \n \n
+ )))
#+END_SRC
*** Elisp