autocomplete-plus icon indicating copy to clipboard operation
autocomplete-plus copied to clipboard

Autocompletion is unwanted when editing plain text (txt, md, …) files

Open jancborchardt opened this issue 8 years ago • 14 comments

Similarly to https://github.com/atom/autocomplete-plus/issues/377 (»Disable default provider in comments / strings?«), the autocompletion should probably be disabled in plain text documents like txt or Markdown.

It’s pretty annoying when you’re typing something and you get suggestions for functions and stuff all the time even though you write an article for example.

jancborchardt avatar Jul 30 '15 15:07 jancborchardt

You can use the fileBlacklist in the autocomplete plus settings to disable it in md and txt files.

It may not be unwanted for everyone.

benogle avatar Jul 30 '15 17:07 benogle

Yup, of course just suggesting something. It’s all about good defaults and I feel that maybe it’s a good default to put these filetypes in the fileBlacklist already. Thanks for the pointer to that in any case!

jancborchardt avatar Jul 30 '15 17:07 jancborchardt

Sorry if this is a dumb question, but can anybody help me out with this? I'm relatively new to Atom. I've added the following lines to my config.cson and I'm still getting autocomplete suggestions in my .md files.

"autocomplete-plus":
  fileBlacklist: [
    "*.md"
  ]

davemacdo avatar Aug 27 '15 15:08 davemacdo

@davemacdo go to Settings -> Packages -> autocomplete-plus -> Settings -> File Blacklist and put in *.txt, *.md :)

jancborchardt avatar Aug 28 '15 10:08 jancborchardt

(-‸ლ)

@jancborchardt Thanks.

davemacdo avatar Aug 28 '15 10:08 davemacdo

I would love to be able to disable autocomplete in plain text files, however more often than not my plain text files are a new file (no filename to parse for an extension). I also encounter many unique file extensions that are plain text, so attempting to blacklist them all is a pain. Is there a way to blacklist by language rather than by extension? This would solve my problem perfectly as Atom assumes any unknown extension (including none) is plain text.

ian-rose avatar Nov 06 '15 15:11 ian-rose

Is there a way to blacklist by language rather than by extension?

There is a Scope Blacklist setting. You can add .text.plain to that field to blacklist those without grammars.

benogle avatar Nov 06 '15 18:11 benogle

There's a minor formatting problem in the blacklist description due to the text being interpreted as markdown in the settings for the plugin.

https://github.com/atom/autocomplete-plus/blob/c75f47636f3af42da5339d0704e21f723d91fd72/package.json#L85

The source: Suggestions will not be provided for files matching this list, e.g. *.md for Markdown files. To blacklist more than one file extension, use comma as a separator, e.g. *.md, *.txt (both Markdown and text files).

But in the UI, the text between the first and second "" is being italicized and the "" are removed. This provides a bit of confusion as the editor will continue to autocomplete for markdown files if ".md" is entered and not "*.md".

calvinf avatar Feb 18 '16 21:02 calvinf

Thank you for the pointer @calvinf! Would you mind opening a new Issue for this?

lee-dohm avatar Feb 18 '16 21:02 lee-dohm

@lee-dohm will do. Opened #674.

calvinf avatar Feb 18 '16 23:02 calvinf

@benogle is there a way to blacklist only GFM text but leave autocomplete for code? In one file?

I couldn't find the right scope because .scope.gfm will blacklist everything.

azat-co avatar Oct 30 '16 20:10 azat-co

I really really really need help with blacklisting... Atom 1.21.1 autocomplete-plus 2.35.11

Whenever I type ANYTHING this suggestion comes up:

image

No matter if I am writing javascript/python/php it tries to auto complete the <?php php open tag, its super annoying, I have tried a fresh install of Atom removing .atom and everything. I have tried disabling other plugins, its FOR SURE autocomplete-plus.

Can anyone help???

image

image

d4rkd0s avatar Oct 24 '17 17:10 d4rkd0s

How can I target new files that are unsaved and marked 'untitled' in the blacklist? I tried

*.md, *.txt, untitled, .text.plain

But new files still autocomplete

moustachedelait avatar May 08 '18 23:05 moustachedelait

I strongly agree with the OP. I didn't choose to install autocomplete-plus, and given its installed by default from the minimal configuration I have, it has turns Atom from a usable text editor into a tool I have to combat.

Each design decision might seem to make sense individually, (adding a full language dictionary, running by default on all files, selecting single suggestion on Enter). However, the combined result is pretty horrific, meaning I have to permanently interact with the autocomplete navigation to type any words at all in the file I am currently editing. I'm making simple bulleted list in Markdown. Try it for yourself.

That's because when editing short lines of text (which I consider the killer app of a text editor) pressing <Enter> happens every 20 characters or so when I complete a new bullet and almost universally replaces the last word of my text with something arbitrary. I can't agree that digging through the internet to find this package and setting to turn this behaviour off is a legitimate use of time for a new user of a text editor, and for many who might benefit from Atom it would simply be impossible to solve.

I recall giving up on Atom when I originally tested it because of behaviours like this, and I am only resuming testing because it is a standard IDE for pair programming with a prospective employer. Please consider disabling at least one of the elements in the default configuration, e.g.

  • Don't activate an (English) language dictionary as an autocompletion server by default - that will mean there isn't a 'single suggestion' for everything that looks even a bit like a word
  • Don't activate on all files by default, consider a whitelist not a blacklist
  • Don't have Enter as a default selection behaviour unless explicit ( see https://github.com/atom/autocomplete-plus/issues/943 https://github.com/atom/autocomplete-plus/issues/595 )

Another workaround would be an alert box on load of a new file type which a) surfaces that autocomplete-plus is likely to interfere with your typing - which is otherwise hidden in the plumbing, b) offers a choice of behaviour, c) offers the means of making it permanent for the file type.

Of course the appearance of an alert box interferes with workflow, but not as badly as replacing every word you type without asking.

cefn avatar Jul 06 '18 06:07 cefn