-
Notifications
You must be signed in to change notification settings - Fork 253
Add ex commands, including save #50
Comments
👍 ! I was thinking that quickfix to this is mapping : to |
Oh that's a decent idea @aseba. |
I'm hesitant to add this as I think we want to carefully craft the mix of atomisms ( |
@mcolyer I agree that vim-mode should attempt to be as light a layer over Atom as practical, but I assume that respecting existing muscle memory is a log-term goal of vim-mode, correct? I can't tell if you're hesitant about the workaround, or the idea of completely supporting traditional ex commands along with the command palette. Personally I'd prefer the keep the workarounds out of master (although I will probably be using some locally) and also support ex commands with |
@zenhob both to some degree 😬. I definitely want to ease the transition to Atom but not at the cost of possible long term wins. It's a fine line and something that's going to evolve over time. For me the power of vim is the ability to quickly move around files and replace things in a succinct way and I definitely want to keep that part (so all of the awesome commands people have been asking for in command mode). However I'm not sure that I want to perpetuate I've been thinking about @rogeriopvl's #89 as a possible middle road, the muscle memory being |
I think the rest of Atom itself already covers the "Atom features" side of things pretty well, while vim-mode is supposed to act like Vim. I do have to disagree that the only relevant Vim features worth porting are movement and editing commands. ex commands are an incredibly powerful Vim feature with a lot of collective memory behind them. It's not just so we can vim-mode is by far the single most popular plugin for Atom so far. There are clearly a large number of potential users, probably very few of whom use the same subset of Vim commands. In the README this is acknowledged, with the hope that enough users can fill in their preferred Vim functionality as needed. However, just 2 days after release, the tune appears to be shifting to allowing users to add their preferred Vim functionality as long as it isn't something Atom already does? I am impressed by Atom's functionality, but that seems like an unnecessarily narrow interpretation. Vim has a vast command set, and it's discouraging to see push back on implementing a core part of it just 2 days after the announcement. |
While some commands (esp. plugin commands like Could a set of ex commands that populate the command palette be available prefixed with What do you think? |
What about a second plugin, |
That actually sounds like a nicer split. How do registers and other shared code get handled if the two are separate? |
I think I'm going to take a stab at some shared state between editors here soon. It would be referenceable from other plugins. Javascript! |
You're my hero ✨ |
I'm 👍 on splitting |
I love the idea of an ex plugin, great thinking.
|
👍 on having an |
Does that |
@blinks I believe the plan is that |
I've got an idea of how to start this: probably just something that talks correctly to vim mode and implements |
Ah, not planning on piggy-backing on top of the command panel? That's what I gleaned from ciarand's comment (a package that added a bunch of ex commands that could be run from |
Afaik the decision was made to create an ex package instead. That reduces the complexity of this package and allows people to make the decision regarding whether they'd like to use the command palette or the more traditionally vim-esque ex palette. |
I made a few suggestions regarding ex-mode in #185 that seem to trigger enjoyment. |
To sum it up:
|
I would definitely change from sublime to atom if it supports this essential feature |
I would like to see this enhancement realized in some way. Seperate package would work for me also. |
+1 I def. want this! I keep hitting :w, and was sad not to be able to goto line using :. |
You guys are trying to reinvent how vim emulation should work ?. The whole point of vim emulation is to make it easy for vim users to work on atom. If there is no way to save a file using :w then it's not vim emulation. Why not just go ahead invent a novel alternative to pressing Escape ?. Mean while I was waiting on this issue I went back to vim and have been playing around with spacemacs and tried other editors that have basic vim keybindings. Unsubscribing from this issue, I no longer want to get these +1 mails. |
If it's in a different package, fine, but +1 on this being essential. This is muscle memory, and it's a misconception to think that many long-term vim users are interested in 'transitioning' their muscle memory to the atom way. |
Maybe the easiest would be to use the vim binary for this feature, just On Wed, Feb 4, 2015 at 5:09 PM, Nick Perez [email protected] wrote:
|
@joelmo the problem seems to be that the vim module currently doesn't support external commands (someone please correct me if I am mistaken about this). So acting as a delegate and calling into the vim module won't work. |
On Wed, Feb 4, 2015 at 5:20 PM, Jeff Schwartz [email protected]
|
@joelmo so how can you save a file now just using vim emulation? I don't see a "save" option in the command palette. I'd guess if "save" were implemented then it would be exposed as would other ex commands and would show in the command palette, right? |
I don't understand what you mean. If atom supports opening external processes, then it could just execute /usr/bin/vim /path/to/file +CustomCmd +w +qa!, CustomCmd could be %substitute or anything. If those commands have to show up in the command palette there probably is a way to query them, ':command' in vim will list all user commands. |
@joelmo that's my point, this isn't vim and currently vim emulation doesn't implement what the actions that external commands would need, like saving a file in response to :w - it doesn't do that now. I'm not saying it wouldn't be nice if it did. Either a separate ex command module will have to implement :w or the current vim module will have to implement it. Personally, I sort of like the idea of a separate ex command module but I'd be happy in either case. The bottom line for me is that I don't expect vim emulation to emulate every facet of Vim. If I wanted that then I'd just use Vim (and I do at times). Perhaps when Neovim is ready, then some enterprising UI person will craft a sweet GUI around it. Until then for me there's Atom with decent (but could be better) emulation and the real deal when I want it. |
FWIW, the key resolver is very awesome, and vim mode is quite happy to work with it. This could be a good workaround for ya'll, if you weren't doing this already: In your keymap.cson
And that's Some of the other commands may require more creativity, however. Not sure what to do for
Again, not truly vim emulation, but it might be helpful to some for the time being. |
I agree that not everything have to be emulated, but I believe the core commands people are asking for is substitute, global, sort, bufdo. All those, except last accept a regex, and also supports operating on ranges. I think it would be hard work to implement an emulation for these. This feature was suggested one year ago, but I don't feel like doing that work so I'm just using vim and follow some progress on neovim. |
This is the only issue keeping me from using Atom |
No one was stepping up so, ex-mode here. While there's only |
+1 This is the main thing that makes me not want to use Atom. I want :commands. ...But cool that finally someone has started working on the ex-mode. EDIT: ok this means finding with /this doesn't work either. Also the ctrl+f thingy is bugged when used with vim. This works really horribly :( EDIT2: okay, this page https://github.com/atom/vim-mode/blob/master/docs/motions.md says / should work. Nothing happens for me from it though. EDIT3: okay even $ doesn't work for me (for moving to the end of a line). Maybe it's a keyboard layout issue. Dunno. I guess I'll just stop trying to use vim with this. |
: commands are essential. |
ex-mode now supports |
@flyingfisch you're too modest (: 40e7f3d Does it make sense to close this in favor of opening bugs on ex-mode? Or is there anything that still needs to be tracked here? |
I'm happy to close the issue now that I know about ex-mode. |
@bronson yeah after i posted here i thought i would just do it the github way ;) |
Heh, I never closed this. I'll keep it open now that Perhaps there are contributors here that would like to help there (or bring over some of it?) |
As stated in the README, this package is no longer maintained and is deprecated. We recommend that people use the vim-mode-plus package instead. Because of this, we are archiving this repository and closing all issues and pull requests. Thanks very much for your support and contributions! |
Many of the
ex
commands are critical to truevi
heritage, including:w
. From wikipedia's article onex
:We've got a lot of our movement commands, but it would be great to have our
:w
,:%s
,:g
.Most of the movement commands are there, so I'm generally having a good time. Thanks for this package!
The text was updated successfully, but these errors were encountered: