Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: tools/emacs/chrome-filetypes.el

Issue 7300011: Add emacs and vim helper config files for gyp settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: emacs Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/vim/filetypes.vim » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/emacs/chrome-filetypes.el
diff --git a/tools/emacs/chrome-filetypes.el b/tools/emacs/chrome-filetypes.el
new file mode 100644
index 0000000000000000000000000000000000000000..14fc6bbaef38c34a30f4685e20260008df590adc
--- /dev/null
+++ b/tools/emacs/chrome-filetypes.el
@@ -0,0 +1,16 @@
+; To get syntax highlighting and tab settings for gyp(i) files, add the
+; following to init.el:
+; (setq-default chrome-root "/path/to/chrome/src/")
+; (add-to-list 'load-path (concat chrome-root "tools/emacs"))
+; (require 'chrome-filetypes)
+
+(define-derived-mode gyp-mode python-mode "Gyp"
+ "Major mode for editing Generate Your Project files."
+ (setq indent-tabs-mode nil
+ tab-width 2
+ python-indent 2))
+
+(add-to-list 'auto-mode-alist '("\\.gyp$" . gyp-mode))
+(add-to-list 'auto-mode-alist '("\\.gypi$" . gyp-mode))
+
+(provide 'chrome-filetypes)
« no previous file with comments | « no previous file | tools/vim/filetypes.vim » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698