prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.52k stars 161 forks source link

:o :open not working #27

Closed lunemec closed 9 years ago

lunemec commented 9 years ago

in pyvim there is :e and :edit, but vim uses :o and :open for these as well.

jonathanslenders commented 9 years ago

Are these just aliases, or do they have a different meaning?

lunemec commented 9 years ago

From my tests and what I could find online they seem to be aliases. Also when you press :e or :o again, it re-reads the file currently being edited from disk for changes from other programs (git or other editor) or tells you you have unsaved changes and the file has been changed on disk.

lunemec commented 9 years ago

from vim's :help open

:o :op :open :[range]o[pen] Works like |:visual|: end Ex mode. {Vi: start editing in open mode}

:[range]o[pen] /pattern/ As above, additionally move the cursor to the column where "pattern" matches in the cursor line.

Vim does not support open mode, since it's not really useful. For those situations where ":open" would start open mode Vim will leave Ex mode, which allows executing the same commands, but updates the whole screen instead of only one line.

jonathanslenders commented 9 years ago

Thank you. I didn't know about the re-read part. That is interesting.

jonathanslenders commented 9 years ago

This has been implemented: https://github.com/jonathanslenders/pyvim/commit/40cfe6691aef91262eb30ca8d415c437331ba104