Examples for taking input from command palette


#1

Are there any examples for taking input from the command pallete or generate a new overlay there and then take input


Input in atom command
#2

Like triggering a command that opens a new overlay?


#3

I feel a little cheap, now, but https://github.com/kgrossjo/atom-man is a small package that accepts input from the user. In man.coffee it registers a command that just instantiates man-input-view.coffee, which in turn does the work.

What’s happening here feels like a detour, but I didn’t know any better. If you learn of a better way, please teach me.


#4

@abe Yes… for my git log package i want to take input say… From where you want me to show the log… so that user can enter 100. And i show logs from 100


#5

Then that’s it, just register a command with atom.commands.add. And in that command create a new overlay view with a mini-editor inside.

I’ll see if I can write a small example when I get some spare time.


#6

i added some sort of pagination for git-log… Some inputs if you can have a look…

Besides api is kind of becoming confusing with these api changes ongoing… Any idea whether the space pen will be removed completely?


#7

Space Pen is going to remain around for those that want to use it. See this comment by @nathansobo:


#8

@leedohm Thank you, i was looking at what was the new way of creating packages in atom. So any ideas on whether this is going to be the way forward, because i saw a comment

We’ve all talked about this and decided 2 things: the injection of
globals via polymer isnt something we want to support long term, and it
doesnt exactly fit in with the API freeze (it’s additive). We plan to
revisit this when we’re into 1.0 initiative and can spend more time on
it.


#9

I’m not sure what you’re asking, @NikhilKalige. I don’t think they’ve settled on what the plan is going to be post-1.0 yet.


#10

@leedohm What i meant to ask was whether this new method of creating packages without the use of space pen will be how it should or will be done in the future. I had some doubt regarding this because of the above comment. So i thought they may remove this and go for api freeze with some other method.

I saw a few examples on that thread, may i will have a look at them to get an understanding on how to create packages without space pen.