Snippets
By Ajit Kumar
Version 2.0.0
acode-plugin-snippets version Snippets plugin for the Ace and CodeMirror editors in Acode. It provides code autocompletion for the languages listed below. NOTE: This plugin is not fully supported in Acode version lower than v1.6.0 (212). Please update your Acode App to latest version for using this plugin. Using snippets A snippet turns a short trigger into a reusable code template. For example, in a JavaScript file, type fun to use the function snippet. The workflows below apply to CodeMirror. Ace continues using its native snippet completion and expansion behavior. Compatibility The plugin bundle is compiled for the Chrome 51-era WebView shipped with Android 7/API 24. This keeps legacy Acode releases using Ace compatible with factory WebViews. CodeMirror features activate only when the installed Acode version exposes its CodeMirror modules and supports the device's WebView. With autocomplete suggestions enabled 1. Start typing a snippet trigger. 2. Select the suggestion marked with the plugin logo and confirm it. You can also type the complete trigger and press Tab to expand it directly. With autocomplete suggestions disabled Turning off Autocomplete suggestions hides plugin snippets from completion menus, but it does not disable snippet expansion. Acode's built-in, word, or language-server suggestions may still open while you type. 1. Type the complete snippet trigger. 2. If a completion menu is visible, press Esc once to close it. 3. Press Tab to expand the snippet. If no menu is visible, press Tab directly. When a completion menu is visible, Esc dismisses it. Once a snippet session is active, Esc ends that session. Moving through snippet fields After expansion, the first editable field is selected. Press Tab to move to the next field and Shift + Tab to move to the previous one. Repeated fields and transformed values update as you edit. If a snippet does not expand If a snippet does not expand, check that: - The complete trigger is typed exactly, including any punctuation or case. - The file has the correct language mode. - The expected snippets directory is shown below Set snippets directory . - A language mapping is configured when the mode and snippet filename differ. - Any open completion menu has been dismissed with Esc before pressing Tab . Default snippets directory On a fresh CodeMirror installation, the plugin creates /public/.acode-snippets…