Live data from Hacker News

Actualvim – Sublime Text 3 input mode powered by Vim itself

github.com

21–30 of 112 posts

Re: Actualvim – Sublime Text 3 input mode powered by Vim itself

#21
post #17

Earlier quoted context omitted.

Huh, do the syntax checkers for those languages actually do type checking too?

For C and C++ at least, it uses your compiler, so yes.

For Haskell too, with ghc-mod[1].

[1] https://github.com/eagletmt/ghcmod-vim

Re: Actualvim – Sublime Text 3 input mode powered by Vim itself

#22
post #2

This makes me want to ask... why not just use vim?

I'm just guessing here, but you can use all the Sublime Plugins and Key combos while in INSERT mode. The Vim Insert Mode is rather limiting since you're supposed to do mostly just typing in there. I always add the basic emacs keybindings to my vimrc so that I can jump by word, to the beginning of the line / the end or move by character, without leaving insert mode. I really don't like leaving insert mode for just 2 c…

Vim can be setup to look and scroll exactly like Sublime, I recall a mapping where the key for 'go down a screen' is overridden with multiple 'go down 1 line' which makes it feel smooth. (I generally just go '{L,H,M}', 'z{t,m,b}')

As for jumping around while in insert mode, I totally understand that instinct but it goes against the grain of Vim. Don't spend extra time in insert mode.

I think the real problem with Vim is that you have to wrangle it with a lot of tweaks to make it sane and comfortable and that's a rabbit hole a lot of people (justifiably) don't want to go down. Sublime is very friendly, I like it a lot, Vim demands a long weekend of your life to customize but it really does leapfrog everything once you get it right.

Re: Actualvim – Sublime Text 3 input mode powered by Vim itself

#24
post #13

Earlier quoted context omitted.

Because vim is broken. I gave up vim after 7 years because of all the segfaults, in-extensibility and just horrible code. Some of the files in the vim code base are over 20,000 lines with hundreds of ifdefs, and littered with unsafe pointer use. The code is a horrible experience to just look at, pre 1989 C style functions, mixed tabs and spaces everywhere, and the files aren't even a valid encoding of any kind whatso…

How much of a challenge would it be to rewrite vim properly? Or is that a crazy idea..

Not that crazy. Vim itself is a reboot of Vi, and there were/are other minimal Vi clones that are very small (couple of KLOCs). You'd be throwing away the horrible Vimscript, and sadly the community is married to it.

As a result your neat little Vim2 reboot thing will not be nearly as useful for a long time, so you've lost backwards compatibility for what? Cleaner internals? Doesn't really benefit the end user much. :)

Re: Actualvim – Sublime Text 3 input mode powered by Vim itself

#25
post #13

Earlier quoted context omitted.

Because vim is broken. I gave up vim after 7 years because of all the segfaults, in-extensibility and just horrible code. Some of the files in the vim code base are over 20,000 lines with hundreds of ifdefs, and littered with unsafe pointer use. The code is a horrible experience to just look at, pre 1989 C style functions, mixed tabs and spaces everywhere, and the files aren't even a valid encoding of any kind whatso…

A patch series implementing asynchronous timers has in fact recently been posted to the Vim development list [^1]. Its status is uncertain, and is still being actively discussed, but to state that such a thing "will never be possible" is just blatantly false. [^1]: https://groups.google.com/forum/#!topic/vim_dev/-4pqDJfHCsM%...

Actually I know all about that patch and have commented in that thread. I tried that patch and vim segfaults. It's not the patch's fault, it's vim's fault. Checkout this response from Bram when one of the devs for that patch reveals an error:

https://groups.google.com/forum/#!searchin/vim_dev/kans/vim_...

It's clearly an unsafe operation that wont work with async/timed code, because the buffer may be null at that point, but Bram's response is how do you reproduce it? How do you reproduce it? It's a segfault on an unsafe pointer! It crashes vim. Anyway, the way to reproduce it and all the other segfaults I encountered is to develop a plugin using the timers in that patch.

So nope, vim is broken, and that patch will never see the light of day. Those guys put months of work into that patch and Bram is like "I don't have time." His instincts are right. The patch would ruin vim for anyone using timers.

Re: Actualvim – Sublime Text 3 input mode powered by Vim itself

#26
I love vim's keybindings and cant work without them. I really like sublime but i just cant leave vim's keybindings which makes me so much efficient. Last time I tried a vim emulator for sublime it didn't go so well. it wasnt as smooth and limiting. I hope someone perfects the vim+sublime combo because that would be killer.

Re: Actualvim – Sublime Text 3 input mode powered by Vim itself

#27
post #10

Earlier quoted context omitted.

https://github.com/scrooloose/syntastic

Syntastic is great for flagging syntax errors, but I don't think it provides for type checking like DannoHung is after.

Actually, it does: http://cl.ly/image/2Z2U080T0L2A

Re: Actualvim – Sublime Text 3 input mode powered by Vim itself

#28
post #13

Earlier quoted context omitted.

Because vim is broken. I gave up vim after 7 years because of all the segfaults, in-extensibility and just horrible code. Some of the files in the vim code base are over 20,000 lines with hundreds of ifdefs, and littered with unsafe pointer use. The code is a horrible experience to just look at, pre 1989 C style functions, mixed tabs and spaces everywhere, and the files aren't even a valid encoding of any kind whatso…

How much of a challenge would it be to rewrite vim properly? Or is that a crazy idea..

The challenge will be in getting the crazy compatibility that vim currently has. Given the pre-1989 C style syntax it probably still compiles on the original Amiga it was developed on. That's not really a good thing unless you use an Amiga still.

Re: Actualvim – Sublime Text 3 input mode powered by Vim itself

#29
post #11

Earlier quoted context omitted.

The main reason (for me) is Ctrl+P. Working on a project with lots of files (like Rails) without that is a huge pain.

Not only does Vim have a Ctrl+P plugin, but the Ctrl+P feature of Sublime originated from the Vim plugin.

No. Kien's CtrlP plugin is inspired by Sublime's Ctrl+P (the name is the hint) feature which itself extends TextMate's Cmd+T and Cmd+Shift+T which inspired numerous other Vim plugins like Command-T (hint), FuzzyFinder, LustyExplorer, Unite and many others.
Post reply on HN