Hacker News new | ask | show | jobs
by grayrest 5368 days ago
I respectfully disagree. I've been a Vim user for 10 years. I've written half a dozen plugins and customized another 15 or so in addition to writing several syntax/indent files. I decided to take a look at Sublime last week when I noticed that it had a vim mode coming from the author (important in that it has a chance of not sucking) that looked like a work in progress but at a reasonable state. I've since paid my $60 and am in the process of switching despite the vi emulation's flaws irritating me to no end.

Advantages:

- Scripting system is in Python and is a joy to work with. Easy things are easy. Hard things seem acheivable but I haven't done serious plugin work. You can poke around/debug things using the built in Python REPL. The things I have tried to do are considerably easier than they are in Vim.

- Scope system. You can accomplish a significant set of activities with keybindings and scopes that would require a vim plugin. I've wanted scopes in Vim since I read about them when Textmate was announced. There isn't a technical reason it's not doable but it would require a complete rewrite of all the syntax files to be consistently useful. Enables things like go-to-function, select scope, and fold tag attributes to work without filetype specific plugins.

- Native Snippets. You can get snippets in Vim (I've contributed patches to both plugins) but nested placeholders and nested snippets just don't work, which really limits how far you can push snippets. Also Vim snippets can't interact with the selection and snippets containing indention tend to work incorrectly/interact with the indent script strangely. The only downside is that it's easier to invoke code from SnipMate than it is in Sublime. Being able to do snippets directly from keybinds cuts out another small class of plugins and due to the interaction between scopes, snippets, and keybinds this class is larger than you'd think.

- True multi-cursor. Current uses are fairly mundane but I've wanted a programmable editor with multi cursor ever since I read the MIT whitepapers on generalized cursors a couple years ago. You can do really neat things with generalized multicursor but not worth writing my own editor. In current form, multiple cursors have a neat interaction with vim normal mode but I haven't figured out a solid set of techniques for generating multiple cursors where I want them without mouseclicks and without getting fouled up by visual mode.

- Saves state between quit/open.

- Anything in the JSON configuration format is immediately applied on save, which makes tweaking a lot more convenient.

Disadvantages:

- Vi mode flaws make me crazy. Off the top of my head:

    - No ~ implemented
    - % doesn't work correctly with edit operators and 
      crosses newlines when it searches
    - % doesn't jump between start/end tags
    - No [c-i]/[c-o]
    - Text objects that cross lines seem to be getting 
      set to linewise for subsequent lines
    - no ex commands, the lack of s// is particularly irritating
    - Selections intersect with visual/command/insert mode in
      fun and exciting ways. I'm not sure what the right 
      behavior is but I know I have a mode error almost every
      time I wind up with a selection.
    - Various commands helpfully (if you're in insert mode)
      highlight text, see above
    - No blockwise visual
    - Intermittent off-by-one errors (e.g. I've gotten 
      'for<Esc>..' -> 'fofofor' but now can't replicate)
- Hand editing JSON for configuration sucks.

- Editing XML plists for syntax, snippets, and color schemes sucks more. And they don't autoload.

- Does not mantain cursor position across file close/open.

- No \zs \ze in regex engine. You can accomplish the same thing with more typing but I miss them.

- Not already installed on every posix environment, can't use over ssh

- Docs are comparatively poor and are on web instead of editor local.

- Not a lot of stuff available for various languages/environments means writing your own.

The problems are annoying but minor/fixable while the advantages aren't going to be duplicated by Vim any time soon. All in all, despite it being closed source it's a much better platform for me to build on. In addition the base platform has quite a few features that I'd implemented as plugins and there are some neat plugins like a package manager and REPL, which aren't polished but neat.