Live data from Hacker News

Plugins you should put in your vimrc

vimninjas.com

61–70 of 99 posts

Re: Plugins you should put in your vimrc

#61
OTF isn't mentioned often but is extremely useful if you have to work with log files on a regular basis.

It allows you to define up to 10 search terms and highlights them in different colors, making it easy to see patterns of output in logs.

It doesn't sound that amazing at first but is worth trying if you herd log files for a living.

http://vim.sourceforge.net/scripts/script.php?script_id=634

Re: Plugins you should put in your vimrc

#62
post #5

I prefer CtrlP to CommandT, since it does not requires external programs. https://github.com/kien/ctrlp.vim

I prefer the builtin vim facilities. I use two features already built into vim. (1) "*" and "**" (ugh stars are italics markers in this editor, how do you escape them?) works in tab completion for both :ts & :e and (2) the --file-tags argument to exhuberant ctags. Oh and one more, :ts supports regexes.

    :ts *Something*xml (or /Something.*xml)  
will do what you expect. As will

    :e **/somewhere/*myfile*.
That said, I'm going to check ctrlp out to see if I'm missing something good. :-)

Re: Plugins you should put in your vimrc

#63
post #5

I prefer CtrlP to CommandT, since it does not requires external programs. https://github.com/kien/ctrlp.vim

A bunch of people have posted about Ctrl-P being slow but I've never had that problem. Here's my user_command: let g:ctrlp_user_command = "find %s -type f | egrep -v '/\.(git|hg|svn)|solr|tmp/' | egrep -v '\.(png|exe|jpg|gif|jar|class|swp|swo|log|gitkep|keepme|so|o)$'" While the CtrlP window is open, hitting F5 will refresh the list of files and it's really fast. I'm on an SSD but it's still basically instant on ever…

If you are concerned about speed, it might be worth adding this line to your vimrc as well. This way, ctrlp will keep its cache (stored by directory), and you only need to rebuild it when you create new files.

  "Keep caches between sessions - f5 to refresh
  let g:ctrlp_clear_cache_on_exit = 0

Re: Plugins you should put in your vimrc

#64
https://github.com/davidbeckingsale/writegood.vim

The Writegood scripts can be handy if you write non-fiction prose in Vim.

A strange synchronicity: I came across the page at

http://matt.might.net/articles/shell-scripts-for-passive-voi...

and duly copy/pasted the bash scripts and ran them over some text files. Quite useful. Then I saw this thread and wondered if anyone had done a vim plug in for them. And davidbeckingsale has.

Re: Plugins you should put in your vimrc

#65

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…

I do OK with macros which use registers: http://stackoverflow.com/questions/8120486/how-to-provide-pa...

Re: Plugins you should put in your vimrc

#66
post #5

I prefer CtrlP to CommandT, since it does not requires external programs. https://github.com/kien/ctrlp.vim

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.

Re: Plugins you should put in your vimrc

#67
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.

The vim that ships with 10.8 (and IIRC 10.7, maybe 10.6) has ruby and python linked out of the box, and straight-up

    ./configure --enable-rubyinterp && make
works just fine on my machine.

Or if yours isn't for whatever reason, you could cheat and grab MacVim[0] then symlink `/Applications/MacVim.app/Contents/MacOS/Vim` to `/usr/local/bin/vim` (editing paths as necessary)

[0] https://github.com/b4winckler/macvim

Re: Plugins you should put in your vimrc

#68
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.

Agreed, but he replied to a single word comment (=> worse)

but this single word was a very valid reply to the parents question. without needing any explanation.

Re: Plugins you should put in your vimrc

#69
post #5

I prefer CtrlP to CommandT, since it does not requires external programs. https://github.com/kien/ctrlp.vim

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.

Installing command-t is fairly easy on windows. Just compile as instructed with latest ruby 1.9 + devkit and replace gvim.exe with the one specified in this page https://wincent.com/comments/6544.

Re: Plugins you should put in your vimrc

#70

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…

Actually, where's the love for neocomplcache? [1] neocomplcache is actively maintained and well documented, not to mention supporting many more features, such as file path completion, register completion, omni completion and Vim completion. [1] https://github.com/Shougo/neocomplcache

Just switched to neocomplcache from AutoComplPop. Enjoying it very much so far.
Post reply on HN