92 points · by pkkm · 14y ago · 108 comments
I also wonder how he is going to support modern features that Vim currently has with a web-based editor. Can I script this in my choice of modern languages? Python? Ruby?
If I were going to change any single thing about Vim, it would be to make MzScheme scripting support a first class citizen, and slowly re-engineer the backend to be more Emacs styled. Core C (or whatever, but C out of momentum) functions with the rest of the system build up in Scheme. I think it would be foolish to call such an improvement "modernizing" though, since it is hardly a new idea. ;)
Thank god there are people who share this vision! I have solemnly promised to myself that I will write a new vim in exactly this fashion if no one has done so in the next 10 years.
One thing that I don't understand about contemporary developers is the aversion to running their editors in a terminal. The benefits of doing this are significant (e.g. session management with tmux, remote pair programming via the same), but programmers leave them behind for what is ultimately just eye candy.
The major reasons for this are the difficulty in binding complex key chords in a terminal, and the poor implementation of OS X's Terminal.app (both of which can be worked around today with a little work, and a proper X terminal). If this terminal-based workflow is going to thrive in the future, what will need to be modernized is the terminal.¹
So you heard it here first: if a new vim built atop a Lisp interpreter running on a new data-centric, mixed character-grid/HTML5-webview terminal emulator does not appear in the next 10 years, I'm on the job.²
¹ Some excellent musings on the subject: http://lubutu.com/idea/ivo
² This would all be easier if I could love to learn Emacs, but Vim modal editing is a pernicious addiction.
However, that's pretty strong praise, so I promise I'll give it a shot before trying to birth a new editor into the world.
Also, how do you do the superscripts?!
http://news.ycombinator.com/item?id=3300264
> Also, how do you do the superscripts?!
Unicode. In my case I input them in vim by way of vimperator. You can input them in vim using the digraph feature (try <C-K>11 in insert mode).
My vimrc actually parses my ~/.inputrc to extract the keybindings I use to input Unicode characters in bash and every other program that uses readline, allowing me to use the same keys for Unicode chars in every context that I input text.
https://github.com/guns/meinhaus/blob/guns/etc/inputrc#L144
https://github.com/guns/meinhaus/blob/guns/etc/vim/local/com...
http://emacswiki.org/emacs/ViperMode
You're welcome :D
I often run Emacs in a remote screen session (well actually I open a terminal frame in my already-running window-system Emacs), and this is by far the biggest annoyance for me.
This works quite nicely in Vim (even when running in console) with X11. You can access both X11 clipboards from Vim if it was compiled with that option (if you use binaries, most likely it is).
The registers for X11 clipboard are "* and "+.
My pet peeve has always been the crappiness of VimL, and the internal confusion between the scripting language and command mode. I've started designing a language (and have a toy implementation) whose goal is to be as powerful on the command-line as a shell language, but also super-easy to write large plugins in.
I'd actually approach the issue from the other end (that is, frontend) - There is a slight pain point in the strong binding between vim and terminals in that, as this video points out, the UI is limited by a character grid. This makes many features uglier and less usable, such as autocomplete, file viewers, the command line, the gutter, etc. It also limits your choices for fonts.
If I were to design a "modern" vim from the ground up, I'd probably arrive at something a lot like Sublime Text 2 with vim at the core.
I think that re-engineering Vim to be more like Emacs under the surface would lend itself well to other things, like what you are suggesting.
[+] This isn't a diss, mind you—I use Emacs, and love it, and have done a fair bit of Emacs development.
As such, scripting would be limited to languages that can run in JS. So if he allows plugins, it would be JS, CoffeeScript, or possibly Emscripten.
Too many developers have this conceit that it's easier to start from scratch. Sometimes that's true, but usually not. Usually there's an exaggerated fear of extending other people's code.
Of course the world is big enough for another project, and you might make the next great editor. But be realistic about how much effort went into something like vim, and don't think you're going to single-handedly replace it in a month.
1. The major difficulty in writing an editor is in writing the editor core. He didn't write it from scratch but used existing ACE editor.
2. VIM is a huge mass of C code. Working on a huge mass of C code is ridiculously slow.
He's writing in JavaScript and using html for the UI - this is orders of magnitude faster.
Meanwhile, the old and rusty Vim has had 39 patches pushed.
In what sense is that true?
I agree with your point, just not that the Emacs code base is a good reference of what's required to implement the numerous little text editing features people use every day.
That's just not true. I'm a huge vim fan, I've customized my vim a ton, I have maybe 30 installed plugins. But when I open Sublime Text and type "ctrl-p" to go to another file, it just works plain better than any vim plugin can achieve.
Vim is made to work on a terminal. Great for some people, lousy for people who want the vim model of text editing with a modern gui.
A few specific things that you simply can't fix in vim:
- Making pop-up boxes, a-la Sublime Text, that moves you to a new file. Simply cannot be implemented in a nice-looking way in vim.
- Making some fonts smaller or bigger, to display extra information that isn't code. Simply impossible to do, because vim is a one-size font. This alone is a huge limitation.
- Making a decent-looking code-folding system. The code folding in vim doesn't look good, and since you're limited to one font size and to only putting in characters, you're stuck with the very ugly way of doing things. I'm a huge fan of vim folding, and the way of controlling them is just amazing. Except for the way it looks, which is terrible.
Now, these aren't just "I want my editor to be pretty" issues. A lot of these things are functionally important to get working faster on your code.
You are not talking about the same ST2 I've tried out. Mine was limited to files contained in "the project" (so none, if you just open a single file, not even nearby files) and the only way to open a a file outside of "the project" was to use the classic Ctrl+o. How "modern" that was!
> "Now, these aren't just "I want my editor to be pretty" issues. A lot of these things are functionally important to get working faster on your code."
But, somehow, all the issues in your list have something to do with looks and that's one of the most subjective subjects possible. RoundRects don't help anyone write better code faster: they help you feel better and more confident but nothing more. I'm actually a fan of minimalism and text-based interface and the "fixes" you want would be of no interest to me.
> "- Making pop-up boxes, a-la Sublime Text, that moves you to a new file. Simply cannot be implemented in a nice-looking way in vim."
I'd say that LustyExplorer looked quite good and now CtrlP both looks very good and does a lot more than ST2's Ctrl+P window.
> "- Making some fonts smaller or bigger, to display extra information that isn't code. Simply impossible to do, because vim is a one-size font. This alone is a huge limitation."
I fail to see how such a feature would make Vim or any editor better.
> "- Making a decent-looking code-folding system. The code folding in vim doesn't look good, and since you're limited to one font size and to only putting in characters, you're stuck with the very ugly way of doing things. I'm a huge fan of vim folding, and the way of controlling them is just amazing. Except for the way it looks, which is terrible."
Subjectivity again. How it looks is totally irrelevant: how it works is what matters. `za`, `zM`, `zR`, `zj` and friends are the important parts: add a nice gradient, a right-pointing shadowed arrow and rounded corners and you simply have the exact same feature… with a shiny look that suits your taste. Maybe not mine.
Still, here are some examples of more functional ways vim could be better. Most of these are related to visuals, yes, because that's the main thing that plugins can't change in vim.
Examples:
1. Code folding is there to make it easier to scan code. Vim's folds take up a lot of space, and aren't very easy to scan. Yes, this is subjective - it's possible that for you, it's the easiest to scan thing in the world. But for me, the way many modern editors work is better - have a simple, colored, "..." indicator at the end of the line that has a fold after it. Simple, easy to scan, doesn't take up any more lines on screen. Minimal, in the sense of UI.
2. Adding some kind of info in the margin. Most editors add some kind of way to see folds in the margin. This is usually kept very tight, since all you really need are some dashed-lines and a "+" sign, perhaps. Not possible with vim. The closest we have is "foldcolumn", which a) takes up a lot of space, and b) is less visually appearling, making it harder to understand or use. Other info is also sometimes added, not just folds.
3. The project opening. While I love ctrl-p, especially over the alternatives, it has several flaws. For example, it's very, noticeably, slow. And I'm on small projects, usually.
But here's the bigger issue: the way ctrl-p in Sublime works is more beautiful, but that's not the only advantage. It makes it easier to see what file you're going to open. It makes it easier by doing things like bold-ing the letters that it's matched. It makes it easier by making the filenames "REALLY BIG", but still giving you the details of the file's location in a smaller font.
There are really many more issues I can bring up, but these are the keys. In all honesty, vim is a bad choice for most people because, to get it to the level of what Sublime Text or other editors do out of the box, you have to spend months tweaking vim. This makes it irrelevant for the vast, vast majority of people, which is unfortunate, because it has text-editing capabilites that are simply unsurpassed by any other editor.
But vim is open source, you are not limited to only plugins. Nothing is impossible if you fork the actual codebase.
I think the only meaningful thing to say would be whether, in the specific case of Vim, you can outline why it wouldn't be easier.
The file model for Chrome packaged apps is similar to the Mac App Store in that you can access files but you have to get explicit permission for each one you open. There's also an internal file system to the app that you can create.
I write HTML5 apps but also do quite a bit of Java moving between different projects during the course of the day and running some command-line functions too. Happy Edit as it appears today wouldn't give me parity to how I use vim.
If I were on a Chromebook, I would probably just use tmux/screen and a ssh session.
http://www.indiegogo.com/happyedit (3 days left, $805 / $10,000 raised).
Have you considered alternate ways of funding your development? Like subscriptions? (it's a web app right?). Maybe figure out a price... let's say $10 a month or $100 a year and get people to pay for a yearly subscription up front.
It may not allow you to focus on it full time at first, but could give you the incentive to continue improving the product and eventually work on it full time.
>Flexible Funding campaign >This campaign will receive all of the funds contributed by Wed Oct 31 at 11:59PM PT.
And to top it all, it doesn't even work in a terminal.
Let's face it the editor market is really really crowded. And there are tons of great editors out there. You really have to be innovative to get a foothold there. And can HappyEdit really provide that by simply being a vim-like in-browser editor with some sublime features? It is incompatible to all the existing vim plugins and has to reimplement everything vim does. The majority of vim users are probably not interested in fancy guis or even leaving the terminal ("it's not the UNIX way"(tm)). And the $10,000 he asks for will only get him 1-2 month of development. Oh and the indiegogo campaign has less than 3days left and currently only a bit more than $1,000 of the $10,000 he asks for.
So yeah I doubt that this will be a huge success.
1: Unless you can play "abusive monopolist".
The closest thing I've found so far is Vico (http://www.vicoapp.com/)
That's not a lot of money. He says it will only get him 1-2 month of development time. Depending on where you are it might get you a few more month but achieving what he wants to achieve would take several years.
Your comment seems weird to me. It sounds like "Use an underpowered tool for your everyday task but turn to a vastly more powerful tool only in some strictly defined situation."
Wouldn't it be a little more sane to go the other way: use a super powerful tool for your daily work and only turn to a far less powerful tool when there's no other choice?
Never say never...
I agree though that 1-2 months would only be scratching the surface, surely.
"What will you do with the money?
The money buys time for me to work on this project. With the $10,000 that I am asking for, I expect to get 1-2 months of development. This should be enough time to finish what's on the roadmap."
Why would he need an average yearly income to be coding ± 45 days?
(10000$/2month still seems like a good salary... for something resembling vaporware for now.)
However, HappyEdit has one significant advantage over ST2, in that it is open source. While I love ST2, I feel like for it to really be embraced as a great editor, it needs to be open source.
My old emacs.d still sits in my home folder because I have this fear that Sublime will just stop being supported tomorrow and I would have no choice but to go back to emacs.
I really just wish emacs had an amazing mixed mode, it's the only thing that even made me try out Sublime. All the php mixed modes I tried were really bad and I do a lot of work in PHP/HTML mixed view files.
I'd love for this project to succeed, and I was ready to pay for it, but frankly, I'm skeptical, after looking at the product page. He's asking for money equal to 2 months of development. This is nowhere near, not even remotely close, to how much time it will take to get even a semi-descent version of an editor. I'm sorry, but that's just unrealistic.
Also, I'd love to see other projects he's worked on, to see he knows how to build things, before I back a project.
The "Back This Project" button send this message: only click this button if you have already decided you want to pledge money.
I think more people would click on it if it was named something like: "Find Out More" or "Visit Project Page".
Is it that hard to also write some old-fasioned text as well?