Hacker News new | past | comments | ask | show | jobs | submit login
Vim-powerline: The ultimate vim statusline utility (github.com/lokaltog)
201 points by mnazim on Jan 12, 2012 | hide | past | favorite | 58 comments



Installed it earlier this week, and it is awesome.

I've uploaded patched versions of Menlo and Mensch here if you don't want to bother doing it yourself.

https://gist.github.com/1595572


Thanks for sharing these! As long as you're encoding fonts, any chance you could do Monaco?


I would be interested in a patched version of Monaco as well.


Great, I'd been hoping that someone would patch Menlo, thanks!


I love how easy pathogen (https://github.com/tpope/vim-pathogen) makes installing vim plugins from github. I always struggled with it in the past (and mostly avoided it) but now it is as simple as git clone and done.


Vundle is even better than Pathogen IMO. It takes away the need to manage git submodules, in favor of just creating a text file that defines your plugins, Bundler style. Removing plugins from your setup is MUCH cleaner.


Also, Vundle has a nice interface to manage installation/removal of new plugins (BundleSearch, BundleInstall, BundleClean, etc.). Pathogen is more of a 'do it yourself' approach, while Vundle tries to be a complete suite a la Aptitude.


I have to +1 this, I tend to use every piece that Tim Pope produces for their goodness, but Vundle truly rocks for exactly what you mentioned.


And to be fair to tpope, Vundle is something that clearly came along later, looking to refine the experience that Pathogen established.

Vundle is a minor but very welcome improvement on Pathogen, while Pathogen was a monsterous improvement on the painful Vim plugin management of before.

I too am a big fan of tpope Vim plugins, and Vundle is the first plugin that I've ever used to replace one of his with. So now I don't have Pathogen but I have a Vundle file that says "tpope" all over it. :)


Cheers for the heads up - great plugin. Hadn't heard of Vundle before, but its handling of plugin installation, update and removal is really slick!


It seems like the current Vundle version does not play well with .vimrc under version control. That’s why I like Pathogen more, since I can simply insert the bundles as Git submodules into .vim/bundle. (Submodule support for Vundle is already on the way, there are some pull requests on GitHub.)


Try put .vim/bundle into .gitignore


Vundle installed. I agree that it is nicer than Pathogen, thanks for the tip.


A couple of questions about Vundle.

What about plugins that are not in a git repo (but a hg repo)?

What if I don't want the lastest version of a plugin?


Looks like a nice replacement for status.vim https://github.com/dickeytk/status.vim. Just needs syntastic support https://github.com/scrooloose/syntastic.



Nice. Looks prettier than status.vim too.


It even shows which git branch I'm in. How cool is that!


How did you do that? the doc said there is a $branch variable, how do you add it?


I think it's activated by default. I didn't do anything and it appears next to the filename.


Pretty sure it's using the fugitive.vim git plugin.


If you've tried this on Snow Leopard and are confused as to why it looks nothing like the screenshots, you might want to try a different terminal application.

Terminal in Snow Leopard doesn't support 256 colours, so iTerm2 should show vim-powerline closer to the screenshots. It's open source and works pretty well in my experience.

The Terminal in Lion supports 'xterm-256color'.



Real link: https://github.com/gaving/dotfiles/blob/19d95fa1ee0461dbe4d5...

Mind you on second thoughts, I really miss the mixed indentation warning.


You cold fork the repo (or even better, create your own statusline theme) and add indentation warnings and the other stuff as a Powerline segment. ;)


Totally intend to if/when I get some time :)


I love this plugin, man I spent so much time configuring my colorscheme and my status line to know in which window I am currently on. I like that is written in full VimScript too.


I too appreciate "native" plugins. I've even recompiled vim without support for Python, Ruby and Perl in an attempt to speed up startup (it starts a "great deal" faster, if I remember my tests correctly).


How much faster could it start? It's already instant.


For various definitions of "instant", I guess.

I move around a lot and I want my editor (and my shell, for that matter) to be ready the instant I hit enter.


So do I. Removing plugins and autoloads seems less cripling than recompile without python et al...


I've been using this for a few weeks, and really love it. It is definitely worth patching your vim font (although not very well documented).

You can use `:set guifont` in gvim to determine your font. Then, just run the included fontpatcher python script on the correct font to add the new symbols. Note that this script requires installing the fontforge python package (python-fontforge on ubuntu). Then tell gvim to use the patched font with `:set guifont=<fontname>`.


That's good to know, I'll include it in the documentation.


Beautiful, thank you for this!

Would be nice if there it was bundled with sample patched fonts, so those wanting to try it could see if it's worth the trouble to patch a font.


Great piece of work! Thanks! Have added it to my Pathogen plugins already - wonder where we'd be without Pathogen?


Agreed, this is a really great plugin. I love how I can see which mode (normal/insert/etc) I'm in by the statusbar color change. The color change is strong enough that I can see it in my peripheral vision, and don't ever have to take my eyes off of the code.

I'm so used to pathogen now that I almost forgot how much a mess installing vim plugins used to be. Really seems like there's been a plugin renaissance in the last couple of years.


I've spend hours configuring my status line, but I'm definitely gonna install this. Very beautiful and functional.


Screenshot of how powerline looks like: https://github.com/sohooo/vimfiles

This is without patched fonts. You get nice symbols if you perform that additional step.


My patched version of all the variants of Ubuntu Mono https://github.com/scotu/ubuntu-mono-powerline/


The docs say that this will work best on a unix like system but doesn't say what that means or whether it will work on Windows. Has anyone tried this on Windows? Does it work?


It does work on Windows. Kinda. I'm using Consolas, and simple mode has a little question-mark-in-a-box where some dividers should be. Unicode mode is worse. Absolutely usable, though.

It'll take more fiddling than it's worth to patch the font on Windows, so I plan on booting Ubuntu to do it later.


Yeah, feel sorry for those that haven't discovered Consolas, such a better looking font on gvim anyway :)

Seconding a upload request if someone patches it. Had a go on cygwin but you're needing a few dependencies by the looks of things.


I can't get it working on Windows. The Consolas patched font looks ugly and it does not show the fancy glyphs. Even using Menlo, Inconsolata or Mensch version posted here http://news.ycombinator.com/item?id=3457785 the glyphs does not show as on the screenshots on the vim-powerline readme. Sad :)


The hinting/subpixel-shading/whatever on Menlo and Mensch looks awful on Windows Vista, although they do provide the proper symbols. After patching Consola, I got the same awful look and no symbols, even with `let g:Powerline_symbols="fancy" set and c:\tmp\Powerline.cache deleted before running the first time.

Edit 2: The symbols _did_ work on Menlo and Mensch yesterday. Today they do not, even with setting the font and g:Power_linesymbols in _vimrc and deleting the cache file and restarting the editor. There's something odd going on.


After deleting the Powerline.cache file, I now have the '€' symbol and ',' instead of the arrows I think. Using the Inconsolata that can be found upper in the comments or Menlo does not help. It's still very usable and useful ;)


I'm trying to patch the Consolas font on Windows 7 using Cygwin, installing a bunch of dependencies for it. I will try to host it somewhere if I succeed and if no one did it until then :)


Yeah I'm getting the same behavior. When you patch it, can you let me know?


I've updated the plugin and it should work for Windows users now. Please open an issue on GitHub if you experience any problems on Windows.


you should try it and let us know =]


I'm a noob. Can someone please explain how to install this thing?


The way you would install any Vim plugin. Extract these files inside your ~/.vim directory such that.

    copy vim-poweline/autoload/* to ~/.vim/autoload/*
    copy vim-poweline/doc/* to ~/.vim/doc/*    
    copy vim-poweline/plugin/* to ~/.vim/plugin/*    
and so on.

PS. Learn Pathogen or Vundle. It will be very well invested time.


If you don't want to install pathogen or vundle here is another simple way:

   ~/.vim $ git clone https://github.com/Lokaltog/vim-powerline.git powerline
Edit your ~/.vimrc and add

    set runtimepath=~/.vim/powerline,$VIMRUNTIME


Since some plugins write temporary files to the first directory in runtimepath, this could have unintended consequences though.


I just learnt Vundle. It took all of a minute to read the three lines of documentation, and now all my vim instances will always be in sync.


thank you


Inconsolata patched for Powerline here if anyone is interested: http://cl.ly/3G2414080H1I0c2v3B27


I've been using this all morning - it's really incredible.


Anybody have linux fonts patched? I can't deal with these OTFs.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: