From 310af4891242ed01d49401e6840f2ace14dcd802 Mon Sep 17 00:00:00 2001 From: Kristofer Joseph Date: Sat, 23 Nov 2013 09:18:49 -0800 Subject: [PATCH] Added autocompletion option for Ace editor. --- coder-apps/common/editor/static/js/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coder-apps/common/editor/static/js/index.js b/coder-apps/common/editor/static/js/index.js index 71becefe..84cb1675 100644 --- a/coder-apps/common/editor/static/js/index.js +++ b/coder-apps/common/editor/static/js/index.js @@ -272,6 +272,10 @@ var setupEditor = function( panelid, editorid, data, serverid, editmode ) { $("#" + editorid).text( data ); var editor = ace.edit( editorid ); editor.setTheme("ace/theme/coder"); + editor.setOptions({ + enableBasicAutocompletion: true, + enableSnippets: true + }); editor.getSession().setMode(editmode); editor.setBehavioursEnabled( false ); editor.gotoLine(1);