5 ms·
Vy – A Vim-like in Python made from scratch
- wmu 9y agoSeems to be python-focused, but looks really nice.
- mkosmo 9y agoThat'd make sense. Written in python, for python (at least initially) since the author likes python :-) Looks like a neat start to a new project. The built-in IRC client made me chuckle, though.
- dotancohen 9y ago> The built-in IRC client I thought that this was a clone of Vim, not Emacs.
- flukus 9y agoAHEM, http://www.vim.org/scripts/script.php?script_id=931 http://www.vim.org/scripts/script.php?script_id=931
- Jeaye 9y agoSimply put: What does it offer which [neo]vim does not? > Python is such an amazing language; it turns vy such a powerful application because its plugin API is high level naturally. Ok, so you really like Python. > You can take the best out of vy with no need to learn some odd language like vimscript or emacs LISP; since vy is written in Python, you use Python to develop for it. Ok, so you _really_ like Python. I'd note that Vim also allows writing plugins in Python, so that alone doesn't warrant an entirely new editor. My biggest problem with this is that it doesn't explain what it provides which other editors do not. As such, I'd label this as the author thought "I love Python and want to make an editor which is all about Python, ignoring all existing Python-supporting editors and IDEs." That shouldn't be enough to get people using it, though. It's not ubiquotous, like Vim; it doesn't have the plugins and wholesome environment of Emacs; it doesn't have the comparable refactoring/debugging/project management features of modern Python IDEs; it doesn't even claim to provide anything new.
- daenz 9y ago> I'd note that Vim also allows writing plugins in Python Shameless plug, I wrote Snake https://github.com/amoffat/snake https://github.com/amoffat/snake, which makes writing plugins in Python much easier.
- Lxr 9y agoI've been looking for something like this, thanks!
- leephillips 9y agoThis looks truly awesome.
- scardine 9y agoWriting a vi clone in any language is worth a "Show HN" by itself, and "not being vi" is justification enough for a toy project. For me personally "i did a X clone in Python" is always interesting because the language is so easy to read that it makes for a good interface and algorithm documentation. The article made the front page - looks like it is interesting for a lot of other HNrs too.
- akkartik 9y agoAny users of it around? Does being in Python make it seem less responsive than regular Vim/Neovim?
- Johnny_Brahms 9y agoI doubt you will notice much during regular editing. I once wrote a text editor in chibi scheme which I would estimate to be slower than python,and it was snappy despite doing all redraws and such itself. What you will notice is of course the GIL. Once any plugin starts doing enough work there will be noticeable lag unless Vy supports plugins using multiprocess python. I have been toying with writing an editor in guile scheme and despite using _very_ suboptimal data structures and algorithms everything is instant up until maybe 10 simultaneous cursors in a 30kb file. Due to the shitty implementation (really just a first draft), that was actually creating a new buffer for every insert.
- Waterluvian 9y agoIsn't atom single process? I don't recall any plugins ever seriously hogging it out. Sure you can't get paralleism with the GIL but you can still get concurrency. It's not like these things weren't doable before we got multicore machines. Just requires sensible plugin design.
- Johnny_Brahms 9y agoEdit: Emacs is a great example btw. It is single threaded, and a lot of it is written in elisp, which is slow and makes emacs have noticeable lag if you turn some features on. The question was whether it was instant, rather than usable. ---------------------- First and foremost, atom has pretty much noticeable lag, even for someone like me who thinks emacs is instant (which it isn't). I agree that it requires a sensible plugin design, but the GIL will only get you so far. I haven't used atom much, but I suspect the heavier plugins rely on async tasks, which can be implemented using python's threads, or for python 3.4 and later using asyncio. This takes me to my next point: People also under-estimate how FRIGGIN FAST v8 is. JS executed in v8 (or node) will run so many laps around cpython it makes a web-technology-hater (but whatever floats your boat!) like myself cry and bang my head to the wall. People seem to think that they play in the same league. They do not.
- ahmeni 9y agoTKinter is a bit of a bizarre choice these days, it looks like you're locked into a non-shell non-native GUI for the benefit of being able to natively manipulate TKinter objects. Though, looking through the plugins it is nice to see how simple and isolated the code for each is. Lack of Python3 support is concerning as always with any modern Python project.
- oblio 9y agoFor this kind of tool that doesn't seem such a big problem. The presentation screenshots could have done without the Motif theme, though :)
- y7 9y agoWhy anyone would start a project exclusively supporting Python 2 six years after the release of Python 3 is beyond me. (GitHub lists the first commit in Nov 2014).
- hashkb 9y agoI don't know the specifics (sort of watching, amuses, from the sidelines) but the 2/3 schism is still very real. I'm not fluent in Python at all, and so it seems I have to have both, and if `pip install` doesn't work then I `pip3 install`. That seems pretty broken to me.
- dkuntz2 9y ago`pip` is dictated by your OS, so you've probably got python2 set as your default python.
- int_19h 9y agoPython itself has established the convention that the "python" binary is always 2.x, and "python3" is 3.x. Even if Python 2 is not installed at all. This naturally translated to other tools.
- 35bge57dtjku 9y ago> vy is built on top of Tkinter which is one of the most productive graphical toolkits I thought everyone always says it stinks and lacks better components.
- flukus 9y agoMakes an interesting comparison to kakoune (http://kakoune.org/ http://kakoune.org/), at nearly every point the two projects took the opposite decisions. I'm really not a fan of pip as a delivery mechanism though, if it isn't ready to be packaged properly then git clone and make instructions would be better.
- sevensor 9y agoThat's an interesting point! I switched over to Kakoune a couple of months ago, from vim, and I'm delighted with it. The idea that what vim needs is Motif widgets and more Python scripting (2.7 no less!) -- it's the exact opposite direction, indeed.
- flukus 9y agoI ended up switching back because I haven't had time to bring it up to the level of vim and the extensions I have, particularly dbext. It's programming model is interesting though, most of my work could be ported but there are still a few that I don't think can be replicated, like the templating plugins.
- sevensor 9y agoI think it would have been a lot harder to switch if I had made heavy use of extensions. The only thing I go back to vim for at this point is vimdiff. Kakoune doesn't have anything quite like it at this point, and I'm fine with that. There's enough room in my head for both as long as I don't have to switch too often.
- cheriot 9y agoProjects like this make me wonder why all the for-profit IDEs can't implement better vi/emacs modes. edit: I'm thinking of IntelliJ and realizing I've not used other for-profit IDEs much.
- sleepychu 9y agoDo you use the vim plugin? I find it pretty good. What's missing for you?
- cheriot 9y agoI do use it. Aside from missing plugins of course, Crtl+o to go back to previous cursor locations is unpredictable and Ctrl+p to complete the word if it's appeared in the file. There's also some weirdness in multiline mode.
- sleepychu 9y agoAh. Maybe the difference is that I don't author much content in web.
- real-hacker 9y agoI have written a toy vi clone in python, based on curses, https://github.com/RealHacker/python-vi https://github.com/RealHacker/python-vi. That's nothing compared with Vy, which obviously is a much more serious project.
- gigatexal 9y agoPython and TK and a viable app? I'm impressed. Kudos to the author.
- marmaduke 9y agoThere's another one over here: https://github.com/jonathanslenders/pyvim https://github.com/jonathanslenders/pyvim I've used Vim for years but on cli only as one of many jobs, fzf pydoc grep find ssh etc etc. I don't quite understand the GUI approach but that's ok
- iso-8859-1 9y agoSee also https://github.com/yi-editor/yi https://github.com/yi-editor/yi in Haskell , which has vim keymap bindings
- poisonarena 9y agoawwwww... :( python 2.7
- jwilk 9y ago-EPARSE "Vim-like" is an adjective, so where the noun it's modifying?
- kaushalmodi 9y agoThat was my first thought too; either the OP meant to write "Vim clone", or forgot to put "editor" after "Vim-like".
- gjm11 9y agoIt's really not unusual for an adjective to be used to mean "thing described by this adjective". Laptop (computer). Roguelike (computer game). A glass of the house red (wine). Tabloid (newspaper). Convertible (car). Mobile/cell (phone), though these days people usually just say "phone". Etc.
- mac01021 9y agoBlessed are the meek. Youth is wasted on the young.
- masukomi 9y agoi think you're missing the reference to a "roguelike". Assuming it's meant the same way "vim-like" is a noun not an adjective. https://en.wikipedia.org/wiki/Roguelike https://en.wikipedia.org/wiki/Roguelike - "A roguelike game is one belonging to a subgenre of role-playing video games characterized by a dungeon crawl through procedurally generated game levels, turn-based gameplay, tile-based graphics, and permanent death of the player-character. "
- deleted 9y ago[deleted]
- filereaper 9y agoheh, you know... emacs is 'just' a wapper around a lisp interpreter in a similar fashion.