atom / language-python

Python package for Atom
Other
190 stars 146 forks source link

env header autocomplete does not replace beginning of line #293

Closed wesinator closed 5 years ago

wesinator commented 5 years ago

Prerequisites

Description

The python env bang header autocomplete appends to the already typed text instead of replacing the beginning of the line, making it basically useless.

Steps to Reproduce

  1. File language set to Python
  2. Start typing #!/usr/bin/env
  3. select suggested env

image

Expected behavior: env autosuggest replaces from beginning of line

Actual behavior: autosuggest appends full string on to #!/usr/bin/

image

Reproduces how often: always

Versions

macOS

Atom    : 1.34.0
Electron: 2.0.16
Chrome  : 61.0.3163.100
Node    : 8.9.3
Aerijo commented 5 years ago

While possibly unexpected behaviour, the intended use is without the previous #!/usr/bin/; simply expanding env will give you what you want.

wesinator commented 5 years ago

@Aerijo it isn't even autosuggested until #!/usr/bin/e

Aerijo commented 5 years ago

That's odd. I see it fine starting with a blank line.

rsese commented 5 years ago

it isn't even autosuggested until #!/usr/bin/e

...

That's odd. I see it fine starting with a blank line.

Same for me with 1.34.0 on macOS 10.12.6 - this is in safe mode where you don't see the suggestion by typing just env @wesinator?

wesinator commented 5 years ago

Yea, I misunderstood the alias per https://github.com/atom/language-python/issues/294#issuecomment-468970212

Sorry,