Live data from Hacker News

Plugins you should put in your vimrc

vimninjas.com

81–90 of 99 posts

Re: Plugins you should put in your vimrc

#81
post #17

Earlier quoted context omitted.

i had trouble with CtrlP initialy because the initial load time is too slow. However, this config line fix it for me let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files'] It lets CtrlP use git to list files, which is much faster for large project

I've tweaked mine to this, which includes untracked files, but honours your gitignores: let g:ctrlp_user_command = ['.git/', 'cd %s && git ls-files --exclude-standard -co'] It was annoying me that I couldn't open files I'd just created with CtrlP, as they wern't yet tracked.

Just tried this out on my setup, and it made a huge difference. A large project that used to take ~1s to load the first time is now pretty much instantaneous.

Re: Plugins you should put in your vimrc

#82
post #78

Earlier quoted context omitted.

Vundle's better.

Does Vundle allow you to just unzip plugins that aren't hosted anywhere into their own subdirectory somewhere inside your ~/.vim/ like Pathogen does? This isn't clear from it's webpage.

I'd like to know this too.

Re: Plugins you should put in your vimrc

#83
post #66

Earlier quoted context omitted.

As others have said CtrlP is slower; but not having the Ruby dependency makes it _far_ less of a headache to install on Windows, should you ever find yourself on such a machine.

Or OSX where I can never seem to get vim to build from source (which is the only option for Ruby or even Python integration). I know I've done it in the past but every time I need to I forget the magic I need to do.

Just use MacVim and the bundled mvim.

Open file in MacVim:

    $ mivm file
Open file in Vim:

    $ mvim -v file

Re: Plugins you should put in your vimrc

#84
post #49

Earlier quoted context omitted.

> Not sure why you've been downvoted. Just stating "X is better" without giving any reason is not particularly helpful.

pathogen requires you to roll your own submodule thingy. This is certainly feasible if you know git well, but vundle is still easier

Not sure where you got that idea: I use pathogen without involving Git at all.

Re: Plugins you should put in your vimrc

#85

Every time an article like this comes up, snipMate seems to be mentioned. This particular author even pointed to the old repository which appears unmaintained and has not had a check-in for two years. Where's the love for UltiSnips? [1] UltiSnips is actively maintained and well documented, not to mention supporting many more features, such as Python interpolation. More info at [2]. [1] https://github.com/SirVer/ultis…

Because UltiSnips was buggy as hell when I tried.

Because the old SnipMate still works very well. Thanks.

Re: Plugins you should put in your vimrc

#87

Earlier quoted context omitted.

In my experience, it's better to spend a long time playing with Vim, and then look at plugins. There's a lot that Vim does out of the box without any additional tools, and spending time learning to use (some) of it without trying to make it more like another editor is the only way you're going to get better at it. Learn about buffers and how to manage them before using BufExplorer. Learn the (many) movement keys, and…

I disagree. As someone who started using Vim recently, the issue wasn't learning modes/key sequences as it was just reaching feature parity with my previous editor (note that doesn't mean "acts like my previous editor", just "is at least as capable as my previous editor"). If I can't open files really quickly, I feel lost and upset, so I took care of that very early in the learning process by setting up CtrlP. Same w…

That's why you need to learn Vim without plugins. Vim can "open files really quickly":

    :e *ba
    :vs ../**/fo
I love CtrlP but you can go a long way without any plugins. It just takes some time and effort.

Re: Plugins you should put in your vimrc

#89
post #78

Earlier quoted context omitted.

Vundle's better.

Does Vundle allow you to just unzip plugins that aren't hosted anywhere into their own subdirectory somewhere inside your ~/.vim/ like Pathogen does? This isn't clear from it's webpage.

As far as I know, it does. However, I'm not sure.

Re: Plugins you should put in your vimrc

#90
Wow, another post with the exact same plugins as all the other posts.

These are all the 13 plugins currently sitting in my bundle directory:

* AutoComplPop

Provides auto completion. I like/need auto completion less and less, these days, so this one is on its way out. I tend to deactivate it and use my old custom mappings for omni completion instead.

The no plugin way:

    inoremap ,, 
* Commentary

Toggles comments.

The no plugin way:

    0i//
    :s+^//++
* CtrlP

Super sleek fuzzy file/buffer/tag navigation. I love it.

The no plugin way:

    :e filename
    :sp *na
    :vs **/fi
    :sb *na
    nnoremap ls :ls:sb
    etc.
* DelimitMate

Automatically adds the second "')]}.

The no plugin way:

    inoremap { {}
* EasyGrep

Handy cross-files/buffers search/replace. More convenient than the default mechanism.

The no plugin way:

    :vimgrep  *.js | copen
* InsertImg (customized)

Inserts an tag with the correct width and height.

* SnipMate

I use the old one as it does everything I need without any problem.

The no plugin way:

    :help abbreviations
* Sparkup

Uses CSS syntax to quickly create large HTML layouts:

    div.aclass*5 > p{lorem ipsum} + img.anotherclass[src=/images/img.png]
* Surround

See the article. This one is almost a good reason in of itself to switch to Vim.

* Syntastic

Syntax checking of many languages on the fly. Super handy.

* Tabular

Because I like my code neatly aligned.

* Visincr

I actually don't use this one much but it helps a lot when I need to write lists of numbers/letters.

* Word-Column

The new kid on the block. Provides a text-object for columns.

and the 14th, currently testing:

* EasyMotion

Post reply on HN