summaryrefslogtreecommitdiffstats
path: root/powerline/matchers/vim/__init__.py
blob: f6de45ed1e0e2d10ae97890e9ee10cadf7b9cbff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)

import os

from powerline.bindings.vim import vim_getbufoption, buffer_name


def help(matcher_info):
	return vim_getbufoption(matcher_info, 'buftype') == 'help'


def cmdwin(matcher_info):
	name = buffer_name(matcher_info)
	return name and os.path.basename(name) == b'[Command Line]'


def quickfix(matcher_info):
	return vim_getbufoption(matcher_info, 'buftype') == 'quickfix'