Alter plugin layout: move *.plugin to *.{ext}.plugin
I do not see why vim plugins should receive such a generic name as `powerline.segments.plugin.gundo`: taking a name that clearly indicates that `gundo` is a *vim* plugin is better.
This commit is contained in:
parent
d66256ad34
commit
63a376e91d
powerline
|
@ -34,10 +34,10 @@
|
||||||
"help": "help",
|
"help": "help",
|
||||||
"quickfix": "quickfix",
|
"quickfix": "quickfix",
|
||||||
|
|
||||||
"powerline.matchers.plugin.nerdtree.nerdtree": "plugin_nerdtree",
|
"powerline.matchers.vim.plugin.nerdtree.nerdtree": "plugin_nerdtree",
|
||||||
"powerline.matchers.plugin.ctrlp.ctrlp": "plugin_ctrlp",
|
"powerline.matchers.vim.plugin.ctrlp.ctrlp": "plugin_ctrlp",
|
||||||
"powerline.matchers.plugin.gundo.gundo": "plugin_gundo",
|
"powerline.matchers.vim.plugin.gundo.gundo": "plugin_gundo",
|
||||||
"powerline.matchers.plugin.gundo.gundo_preview": "plugin_gundo-preview"
|
"powerline.matchers.vim.plugin.gundo.gundo_preview": "plugin_gundo-preview"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"wm": {
|
"wm": {
|
||||||
|
|
|
@ -55,13 +55,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"exclude_modes": ["nc"],
|
"exclude_modes": ["nc"],
|
||||||
"module": "powerline.segments.plugin.syntastic",
|
"module": "powerline.segments.vim.plugin.syntastic",
|
||||||
"name": "syntastic",
|
"name": "syntastic",
|
||||||
"priority": 50
|
"priority": 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"exclude_modes": ["nc"],
|
"exclude_modes": ["nc"],
|
||||||
"module": "powerline.segments.plugin.tagbar",
|
"module": "powerline.segments.vim.plugin.tagbar",
|
||||||
"name": "current_tag",
|
"name": "current_tag",
|
||||||
"draw_soft_divider": false,
|
"draw_soft_divider": false,
|
||||||
"priority": 50
|
"priority": 50
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"default_module": "powerline.segments.plugin.ctrlp",
|
"default_module": "powerline.segments.vim.plugin.ctrlp",
|
||||||
"segments": {
|
"segments": {
|
||||||
"left": [
|
"left": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"default_module": "powerline.segments.plugin.nerdtree",
|
"default_module": "powerline.segments.vim.plugin.nerdtree",
|
||||||
"segments": {
|
"segments": {
|
||||||
"left": [
|
"left": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@ def gen_matcher_getter(ext, import_paths):
|
||||||
oldpath = sys.path
|
oldpath = sys.path
|
||||||
sys.path = import_paths + sys.path
|
sys.path = import_paths + sys.path
|
||||||
try:
|
try:
|
||||||
return getattr(__import__(match_module, fromlist=[match_function]), match_function)
|
return getattr(__import__(str(match_module), fromlist=[str(match_function)]), match_function)
|
||||||
finally:
|
finally:
|
||||||
sys.path = oldpath
|
sys.path = oldpath
|
||||||
return get
|
return get
|
||||||
|
|
|
@ -58,8 +58,9 @@ def get_function(data, segment):
|
||||||
oldpath = sys.path
|
oldpath = sys.path
|
||||||
sys.path = data['path'] + sys.path
|
sys.path = data['path'] + sys.path
|
||||||
segment_module = str(segment.get('module', data['default_module']))
|
segment_module = str(segment.get('module', data['default_module']))
|
||||||
|
name = str(segment['name'])
|
||||||
try:
|
try:
|
||||||
return None, getattr(__import__(segment_module, fromlist=[segment['name']]), segment['name']), segment_module
|
return None, getattr(__import__(segment_module, fromlist=[name]), name), segment_module
|
||||||
finally:
|
finally:
|
||||||
sys.path = oldpath
|
sys.path = oldpath
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue