Hacker News new | ask | show | jobs
by tachion 3979 days ago
I've tried switching to VIM (from few years of using Sublime) few times already, but failed every single time: bare VIM is too dysfunctional to my taste and ways of working with text editor (missing tabs, file/folder treee view, easy switching documents, easy visual copy/paste and so on, missing code expanding/completion...).

Last time I tried spf-vim[0] but while it looked 'cool' (it has colors, it does code completion, it somwhere have the folder/file tree view and maybe eve tabs/panels...) yet it is overly complicated, quite badly documented (there is no intro like tutorial on getting you up to speed with what you may want from a text editor, just some strange sounding plugin list with few shortcuts here and there) and overloaded with plugins I am not interested in (PHP related ones) not to mention having few strange issues requiring googling and writing additional configuration just to make VIM behave...

So, while I'd love to use VIM for its speed, the fact its easily portable with the configuration and is available on almost every OS (BSD, Mac, Windows, Linux, you name it) I still write 99% of my code in Sublime, and only use VIM on servers to change this and that. Perhaps another time ;)

[0] http://vim.spf13.com/

5 comments

One thing I'd stress: Start with Vim for side tasks, not to replace Sublime. Once you have the basics down, you can then layer on the IDE features (addons like Ag, NerdTree, CtrlP) that make Vim comparable to what you are used to in Sublime.

I'm happy to act as a coach for you (and anyone else), if it's helpful. If you have a good plan of attack, you can get Sublime-like functionality pretty quickly.

+10 to the suggestion to layer IDE features progressively.

My setup is after trial and error: vim + (nerd tree, command-T, tagbar, Gundo) inside a tmux session. On another tmux window, I use 'find ... exec...' to search. So far excellent for me, I feel Zen like coding with this setup with no IDE noise :-).

Thanks for the coaching offer, its really nice of you! However, you could consider writing a set of ramping up tutorials on using vim/spf13 and publish them somwhere, so that more than one person at a time could use your hard work.
Some thoughts:

What you call tabs are what vim calls buffers. (EDIT vim has something called tabs as well but they do something else.)

Completion press e.g. control-x (although I actually use a plugin here so I don't know how good vim's built in is).

Visual selection add set mouse=a to the .vimrc

Or using the "v" command

What he calls tabs are actually tabs: :tabe create tab :tabn next tab, :tabp previous tab, :tabm move tab.

I have tabn/tabp bound to <leader>l and <leader>h for easy nav and <leader>t for create.

Tabs in vim are actually just views of buffers. Ie: a workspace more than an editing window.

Buffers are the proper solution to the mentioned comment.

In my personal experience (fwiw), people who try vim and don't get it either 1) just don't want/need what vim offers, or 2) don't approach it with the "vim is an editing language" approach.

If you're in the #1 camp, chalk it up to experience and move on.

Otherwise, at some point consider giving it another try, but Google up some articles specifically about the language aspect of vim. It's a lot easier to get up to speed and make better use of vim that way.

> there is no intro like tutorial on getting you up to speed with what you may want from a text editor, just some strange sounding plugin list with few shortcuts here and there

You should try `vimtutor` (it usually ships with vim). For the first 1-2 weeks of using vim, you will be less productive than with your usual editor but you have to force yourself to use it. Eventually, you will not want to go back.

I'm pretty sure the base install of vim has everything you're looking for, it just requires a little reading. One problem that vim does not have is a lack of documentation. My favorite uses of tabs is scripting a work space based on context. You can start vim with several tabs already open: vim -p file0 file1 file2