Skip to content

:q not closing editor, ZZ not working as well #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lunemec opened this issue Apr 29, 2015 · 5 comments
Open

:q not closing editor, ZZ not working as well #19

lunemec opened this issue Apr 29, 2015 · 5 comments
Labels

Comments

@lunemec
Copy link
Contributor

lunemec commented Apr 29, 2015

I've noticed that ":q" causes (even on not changed file) to say "1 more file to edit" and editor will not close. ZZ does nothing, it should be equivalent to ":q".

Also ":bd" should close a split window (":q" should too).

@SanketDG
Copy link
Contributor

OS and python version?
Works here in Mint 17 and python2.7

@jonathanslenders
Copy link
Member

Thanks for reporting. There is indeed still a bug in :q. It happens when you start the editor without file, and then uses :edit to add a new file. I will fix that.

ZZ has not yet been implemented. I'll fix that as well.

@lunemec
Copy link
Contributor Author

lunemec commented Apr 29, 2015

Also there is a difference on these:

ZZ is equivalent of :wq - write and close
ZQ is equivalent to :q!

@lunemec
Copy link
Contributor Author

lunemec commented May 1, 2015

I found some strange behavior. I added this function

    @handle('Z', 'Z', filter=in_navigation_mode)
    def close_with_save(event):
        print('Close and save.')

to file pyvim/key_bindings.py to function def create_key_bindings(editor):

But when I press ZZ, nothing happens. But strange thing is, when I add this exact same function (only with filter=navigation_mode) to python-prompt-toolkit, file prompt_toolkit/key_binding/bindings/vi.py to function def load_vi_bindings(registry, vi_state, filter=None): it WORKS! Why?

@SimonBiggs
Copy link

In windows 7, python 3.5, using powershell I type:

:help  

then:

:q

And I get the error "1 more files to edit" and it does not exit.

See screenshot below:
capture

I am interested in this project, and am also stuck using windows at work.

:q! also does not work, however :wq does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants