Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

atom autocomplete-plus without semicolon

Tags:

atom-editor

How to config autocomplete-plus to suggest javascript without semicolon?

For example, I input log in atom, autocomplete-plus suggest console.log();.
I don't need the ;, how to config autocomplete-plus to remove ; when suggest.

like image 515
Leon Avatar asked Sep 21 '16 12:09

Leon


People also ask

How do you set autocomplete in an Atom?

If you want more options, in the Settings panel for the autocomplete-plus package you can toggle a setting to make autocomplete-plus look for text in all your open buffers rather than just the current file. The Autocomplete functionality is implemented in the autocomplete-plus package.

How do I create an autocomplete Atom in HTML?

Usage. Finally, press: alt + tab or, right click and do Run HTML Tag AutoComplete . You will also find it available under Packages in menubar.

How do I turn off autocomplete Atom?

Here's how: Go to the Atom Settings: Atom > Preferences… Then uncheck the “Show Suggestions On Keystroke” checkbox: That's it!


1 Answers

You can add custom snippet to replace the default one. In order to do that open command palette Ctrl+Shift+P, search for Application: Open your Snippets and write a snippet for .source.js scope:

'.source.js':
  'Log without ;':
    'prefix': 'log'
    'body': 'console.log()'

To override the default snippet you have to set prefix to log. If you want to learn more about snippets you can visit Flight Manual.

like image 121
pamat Avatar answered Nov 09 '22 22:11

pamat