ユーザ用ツール

サイト用ツール


emacs

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
emacs [2014/10/09 16:50]
tsuji
emacs [2017/10/03 12:55] (現在)
ライン 1: ライン 1:
 ====== emacs ====== ====== emacs ======
  
 +  * emacsの設定は.emacs.d/​init.el に書くのが主流らしい.
   * reference.pdf があるとショートカットを覚えるのに便利   * reference.pdf があるとショートカットを覚えるのに便利
   * [[http://​clip.dia.fi.upm.es/​~albegarcia/​emacs-reference.pdf]]   * [[http://​clip.dia.fi.upm.es/​~albegarcia/​emacs-reference.pdf]]
ライン 8: ライン 9:
 | C-M-\| カレントリージョンをまとめてインデント| | C-M-\| カレントリージョンをまとめてインデント|
 | C-c Enter | (.f90モード) &​(改行)&​を出力| | C-c Enter | (.f90モード) &​(改行)&​を出力|
 +
 +===== Frotran90でopenmpに色付け ​ =====
 +
 +
 +<code lisp>
 +;;; highlight fortran openmp code
 +;;; original version is ...
 +;;; https://​www.pgroup.com/​userforum/​viewtopic.php?​t=5214&​sid=51dc5164d4b5962373b0adda3fa62705
 +(when (require '​font-lock nil '​noerror ) 
 +
 +  (defface openmp-face ​
 +    '​((t ​
 +       :​foreground "#​666666"​
 +       ;; :background "​yellow" ​
 +       ;; :bold       ​t ​
 +       ​)) ​
 +    "Face for !$ [a-zA-Z] comments" ​
 +    ) 
 +  (defvar openmp-face '​openmp-face) ​
 +
 +  (defface openmp2-face ​
 +    '​((t ​
 +       :​foreground "#​999999"​
 +       ;; :background "​yellow" ​
 +       ;; :bold       ​t ​
 +       ​)) ​
 +    "Face for !$OMP comments" ​
 +    ) 
 +  (defvar openmp2-face '​openmp2-face) ​
 +
 +
 +  (defvar omp-regex "$[\t ][a-zA-Z].*"​) ​
 +  (defvar omp-regex2 "​$omp[\t ].*"​) ​
 +  (defvar omp-regex-f90 (concat "^[ \t]*\\(!"​ omp-regex "​\\)"​ ) ) 
 +  (defvar omp-regex2-f90 (concat "^[ \t]*\\(!"​ omp-regex2 "​\\)"​ ) ) 
 +
 +  (font-lock-add-keywords '​f90-mode  ​
 +                          ( list 
 +                            ( list omp-regex-f90 1 '​openmp-face ​ t) 
 +                            ( list omp-regex2-f90 1 '​openmp2-face ​ t) 
 +                            )) 
 +
 +)
 +</​code>​
  
 ===== Changelog memo ===== ===== Changelog memo =====
emacs.1412841059.txt.gz · 最終更新: 2017/10/03 12:55 (外部編集)