Live data from Hacker News

Vintageous: Vim emulation for Sublime Text 3

guillermooo.bitbucket.org

21–30 of 45 posts

Re: Vintageous: Vim emulation for Sublime Text 3

#21

Am I missing something here? Sublime's an editor last I checked. So's vim. If you want a vim-flavored editor, why not just, I dunno... use vim? Wouldn't this be a bit like building a 'vim mode' for emacs?

Some people just aren't down with the "worse is better" design philosophy that Vim and *nix in general share.

Re: Vintageous: Vim emulation for Sublime Text 3

#22

Am I missing something here? Sublime's an editor last I checked. So's vim. If you want a vim-flavored editor, why not just, I dunno... use vim? Wouldn't this be a bit like building a 'vim mode' for emacs?

I am a dedicated Vim user, but I would assume people looking for an IDE instead of an editor, with tab-complete, file browsing etc but don't want to install and configure the myriad plugins required to get Vim into this state; would prefer Sublime.

Re: Vintageous: Vim emulation for Sublime Text 3

#23
post #3

For the vim -> Sumblime switchers out there on HN, what caused you to switch? I use vim exclusively but I'm not a religious zealot about technology. I've noticed all my students are using Sublime these days. Is it just the latest TextMate (i.e., the best GUI option if you don't like command-line editors) or are there truly features that will convert command-line folks to the GUI? I'm really hoping for an editor like…

I've tried a few times and just can't do it. The completion isn't actually that great (not that VIm completion plugins are very good either) and Vintage mode is at best a poor-mans VIm emulation. There is no sane way to control splits with the keyboard and block selections just don't work well. Search and replace functionality is also not great compared to my experience with VIm. Too many deal breakers for me.

You likely will still not be convinced, but some of those issues (off the top of my head, at least the splits with keyboard) seem to be addressed by Vintageous (and some [plugins][0] for it).

[0]: https://github.com/rodcloutier/Vintageous-Origami "Vintageous Origami"

Re: Vintageous: Vim emulation for Sublime Text 3

#24
post #9

As someone who just started another attempt at picking up vim (actually vintageous in this case) last week: how do I keep myself from forgetting that I'm in a vim editor? It'll happen every so often that I'm in the middle of something, switch to Sublime and just start typing - as it's second nature. By the time I notice whats going on, I typed half a dozen characters. I'll curse, undo the random commands, get into in…

I think vintage and vintageous can be configured to be in insert mode or in command mode by default. (I prefer command mode, but I think you might prefer insert mode -- as then you could just start typing.)

It won't really help when switching between applications, as I would have to put the editor in insert mode every time I left it.

Maybe I should just look into classic conditioning and have someone beat me up every time I enter text in command mode.

Re: Vintageous: Vim emulation for Sublime Text 3

#25
post #3

For the vim -> Sumblime switchers out there on HN, what caused you to switch? I use vim exclusively but I'm not a religious zealot about technology. I've noticed all my students are using Sublime these days. Is it just the latest TextMate (i.e., the best GUI option if you don't like command-line editors) or are there truly features that will convert command-line folks to the GUI? I'm really hoping for an editor like…

I've tried a few times and just can't do it. The completion isn't actually that great (not that VIm completion plugins are very good either) and Vintage mode is at best a poor-mans VIm emulation. There is no sane way to control splits with the keyboard and block selections just don't work well. Search and replace functionality is also not great compared to my experience with VIm. Too many deal breakers for me.

I recently tried switching from Vim to Sublime, but its window splitting just didn't work for me. In Vim, I make :sp and :vsp splits for quick edits all the time. Sublime's splits were cumbersome and didn't have (easy) side-by-side views into the same file.

Re: Vintageous: Vim emulation for Sublime Text 3

#26

Am I missing something here? Sublime's an editor last I checked. So's vim. If you want a vim-flavored editor, why not just, I dunno... use vim? Wouldn't this be a bit like building a 'vim mode' for emacs?

Sublime Text has a much better GUI front-end than gvim or MacVim. So for someone who doesn't want to work in a terminal and wants to use a GUI based editor, they may feel that a fully featured vim mode in Sublime Text would offer the best of both worlds: rich keyboard-controlled text editing and a beautiful front-end GUI.

I just use vim inside tmux, but that's mostly because I have to write a significant amount of code on a remote machine via ssh.

Also, I will say that even as a dedicated vim user I wouldn't be thrilled to use vim without a large number of plugins that more or less just offer features something like Sublime Text can offer natively, like a decent file tree browser. So a vim mode in Sublime Text can make the barrier to entry lower by reducing the need for the modern programmer to load up vim with plugins.

Re: Vintageous: Vim emulation for Sublime Text 3

#27
post #3

For the vim -> Sumblime switchers out there on HN, what caused you to switch? I use vim exclusively but I'm not a religious zealot about technology. I've noticed all my students are using Sublime these days. Is it just the latest TextMate (i.e., the best GUI option if you don't like command-line editors) or are there truly features that will convert command-line folks to the GUI? I'm really hoping for an editor like…

I prefer GUIs strictly for better window manager and system copy-paste integration, but I think that is irrelevant to vim/Sublime, as you can (and I do) use gVim or MacVim. I like vim movement and editing commands a lot, but I'm not much of a configuration fiddler - I fiddle if I must, but I find no joy in it. I switched to Sublime because it gives me adequate (if somewhat mediocre) vim commands, plus other fiddle-free features that I had to fiddle into my vim, most notably command-t file fuzzy-finding (which also works much better, on top of being fiddle-free). I also really like the command palette (which I haven't seen a vim corollary for) and the package manager (which is much easier than the various alternatives in vim IMO).

edit: For balance, it also has its annoyances, and I sometimes wonder if I should switch back.

Re: Vintageous: Vim emulation for Sublime Text 3

#28
post #19

Earlier quoted context omitted.

If you don't mind me being frank, it's really not that much to learn. Opening? :e [filename] Saving? :w [filename] Handling? be more specific? Search? /term Find next: n Find previous: N Find word under cursor: * Replace all instances? :%s/term to find/new term/g Replace all instances on line: :s/term to find/new term/g Replace first instance on line: :s/term to find/new term Version control? Why do you want version…

For each of these actions there's not much to learn, but it piles up, and my whole development process grinds to a halt if I have to look up yet another thing. With handling I meant stuff like syntax coloring, tab completion, tabbed views, side-by-side views, line lengths that adapt to the Terminal windows' width - the small things. Thanks for the list of commands, maybe it'll push me over the edge to do the right th…

Oh wow, he really changed his pricing model. It used to be a $10/mo subscription w/ access to all videos. Sorry about that!

> maybe it'll push me over the edge to do the right thing

Oh, there's no "right thing" here, there's just efficient and inefficient. Don't let some asshole like me tell you "you're doing it wrong!"

I hear you on the frustrating process breakdown during the learning curve. However, if you want to learn it I promise that it's much quicker to go the painful route and just dive in. Start off with just the basics, then every time something feels repetitive, go look it up. When you go to look something up, start with the internal help system, then move on to Google. Do ":help help" to learn how to use the help system.

For me it took about a day before I wasn't stopping every 5-10 minutes to look something up, a week before I wasn't stopping every hour, and I still run into stuff every couple of days where I say to myself "okay, this is too repetitive, what's the magic vim way?"

Something that also helped me - if you want to be fast, remember that the slowest thing you can do is read. So in terms of movements, it's bad to just keep tapping 'j/k' until you see what you want. That's like the O(n) approach. Then there's search with an incomplete key. That's like O(logN). But then there's search with a good key that you know will hit what you want first try - that's O(1). Then there's the command-t plugin and/or the :vim command...

Also, either get used to using ctrl-c instead of ESC, or remap your capslock key to ESC. I prefer the latter. Not sure how to do it on Windows, but on Linux see xmodmap, and on OS X see PCKeyboardHack.

Syntax highlighting/indenting: add the following to ~/.vimrc

  filetype on
  filetype plugin on
  filetype indent on

  syntax on
Tabs - see :help tabpage.txt, though I prefer windows (see below).

Completion's a bit weird in vim, but for starters there's always ctrl-n/ctrl-p in edit mode. For more advanced stuff, see Omni completion: http://vim.wikia.com/wiki/VimTip1591

For side-by-side split views, check out :help windows. Ctrl-w, n creates a new horizontally-split window; Ctrl-w, v creates a new vertically split window; Ctrl-w, c closes the current window; Ctrl-w, j/k/h/l switches to the next window up/down/left/right; Ctrl-w, J/K/H/L moves window to the extreme.

As a cheat, I've got the following in my .vimrc for nice split screen (window) buffers that automagically resize based on which one is currently in focus (taken from destroy all software):

  set winwidth=84
  " We have to have a winheight bigger than we want to set winminheight. But if
  " we set winheight to be huge before winminheight, the winminheight set will
  " fail.
  set winheight=5
  set winminheight=5
  set winheight=999

Wow, okay... this is a lot longer than I initially intended. Anyway, good luck!

Re: Vintageous: Vim emulation for Sublime Text 3

#29
post #16

Earlier quoted context omitted.

I have no problem with you being frank. My goal is to become more efficient at editing files, the typing/changing/refactoring part especially. I don't want a new way of opening/saving/handling files, search/replace, version control or debugging - it would just be too much to learn all at once. So I thought Vintageous would be a great opportunity for me to learn the text editing part of vim without burning down my eco…

If you don't mind me being frank, it's really not that much to learn. Opening? :e [filename] Saving? :w [filename] Handling? be more specific? Search? /term Find next: n Find previous: N Find word under cursor: * Replace all instances? :%s/term to find/new term/g Replace all instances on line: :s/term to find/new term/g Replace first instance on line: :s/term to find/new term Version control? Why do you want version…

> it's really not that much to learn.

Vim's been my main text editor for a while now, but I think it's misleading to suggest a shallow/gentle learning curve.

It's not the sheer amount of stuff to learn so much as it is that you have to know a lot of it at once and then get it in muscle memory in order to not break flow while you're trying to do even simple things.

It's been over 20 years since I first picked up vi. I still remember that I was murderously angry at whoever had invented it for the first month or two. It was only after that period of suffering that I found I rather liked it.

Re: Vintageous: Vim emulation for Sublime Text 3

#30
post #3

For the vim -> Sumblime switchers out there on HN, what caused you to switch? I use vim exclusively but I'm not a religious zealot about technology. I've noticed all my students are using Sublime these days. Is it just the latest TextMate (i.e., the best GUI option if you don't like command-line editors) or are there truly features that will convert command-line folks to the GUI? I'm really hoping for an editor like…

If you are just looking for a Vim replacement don't.

If you want to code faster and easier and are willing to spend a couple of hours learning sublimes shortcuts, then you will like it.

Sublime's autocomplete and plugins can reduce your errors and clean up your code. (Linters)

It's cross platform and runs the same pretty much on any OS.

I don't use ST3 much but for remote editing with ST2 http://log.liminastudio.com/writing/tutorials/sublime-tunnel.... it works well enough for most cases. Where it doesn't I just mount an sshfs and work from there.

Post reply on HN