Esempio n. 1
0
def init():
    vial.register_command('VialQuickOpen', '.plugin.quick_open')

    vial.vim.vars['vial_ignore_dirs_default'] = ['^build$', '^dist$',
        '(^|.*/)__pycache__$', '.*\.egg-info$', '(^|.*/)\.']

    vial.vim.vars['vial_ignore_extensions_default'] = [
        'pyc', 'pyo', 'swp', 'class', 'o']
Esempio n. 2
0
def init():
    vial.register_command('VialGrep', '.plugin.grep', nargs=1)

    vial.register_function('<SID>VialGrepOperator(type)', '.plugin.grepop')
    vial.vim.command(
        'nnoremap <Plug>VialGrep :set operatorfunc=<SID>VialGrepOperator<cr>g@'
    )
    vial.vim.command(
        'vnoremap <Plug>VialGrep :<c-u>call <SID>VialGrepOperator(visualmode())<cr>'
    )
Esempio n. 3
0
def init():
    vial.register_command('VialQuickOpen', '.plugin.quick_open')

    vial.vim.vars['vial_ignore_dirs_default'] = [
        '^build$', '^dist$', '(^|.*/)__pycache__$', '.*\.egg-info$',
        '(^|.*/)\.'
    ]

    vial.vim.vars['vial_ignore_extensions_default'] = [
        'pyc', 'pyo', 'swp', 'class', 'o'
    ]
Esempio n. 4
0
def init():
    vial.register_function('VialMailOmni(findstart, base)', '.plugin.omnifunc')
    vial.register_command('VialMailUpdate', '.plugin.update')
Esempio n. 5
0
def init():
    vial.register_command('VialHttp', '.plugin.http')
    vial.register_command('VialHttpBasicAuth', '.plugin.basic_auth_cmd', nargs='?')
    vial.register_function('VialHttpBasicAuth()', '.plugin.basic_auth_func')
Esempio n. 6
0
def init():
    vial.register_command('VialEscape', '.plugin.escape')
    vial.register_command('VialSearchOutline', '.plugin.search_outline')
    vial.register_command('VialChangedProjects', '.plugin.changed_projects')
    vial.register_command('VialNew', '.plugin.new', complete='file', nargs=1)
    vial.register_command('VialFilterqf', '.plugin.filter_qf', nargs=1)
    vial.register_command('VialAddProjects', '.plugin.add_projects',
                          complete='dir', bang=True, nargs='*')
    vial.register_command('VialAddIgnoreExtension',
                          '.plugin.add_ignore_extensions', bang=True, nargs='*')
    vial.register_command('VialAddIgnoreDirs', '.plugin.add_ignore_dirs',
                          complete='dir', bang=True, nargs='*')

    vial.register_function('VialIndent()', '.plugin.indent')
Esempio n. 7
0
def init():
    vial.register_function('VialPythonOmni(findstart, base)',
                           '.plugin.omnifunc')

    vial.register_function('VialPythonGetExecutable()', '.env.get_executable')
    vial.register_function(
        '<SID>VialPythonExecutableChoice(start, cmdline, pos)',
        '.plugin.executable_choice')
    vial.register_command('VialPythonSetExecutable',
                          '.plugin.set_executable',
                          complete='custom,<SID>VialPythonExecutableChoice',
                          nargs=1)

    vial.register_command('VialPythonGotoDefinition',
                          '.plugin.goto_definition')
    vial.register_command('VialPythonOutline', '.plugin.show_outline')
    vial.register_command('VialPythonShowSignature', '.plugin.show_signature')

    vial.register_command('VialPythonLint', lambda: lfunc('.plugin.lint')
                          (False))
    vial.register_command('VialPythonLintAdd', lambda: lfunc('.plugin.lint')
                          (True))
    vial.register_command('VialPythonLintAll', '.plugin.lint_all')

    vial.register_function(
        '<SID>VialPythonOpenModuleChoice(start, cmdline, pos)',
        '.plugin.open_module_choice')
    vial.register_command('VialPythonOpenModule',
                          '.plugin.open_module',
                          complete='custom,<SID>VialPythonOpenModuleChoice',
                          nargs=1)
    vial.register_command('VialPythonCreateModule',
                          '.plugin.create_module',
                          complete='custom,<SID>VialPythonOpenModuleChoice',
                          nargs=1)
Esempio n. 8
0
def init():
    vial.register_command('VialEscape', '.plugin.escape')
    vial.register_command('VialSearchOutline', '.plugin.search_outline')
    vial.register_command('VialChangedProjects', '.plugin.changed_projects')
    vial.register_command('VialNew', '.plugin.new', complete='file', nargs=1)
    vial.register_command('VialFilterqf', '.plugin.filter_qf', nargs=1)
    vial.register_command('VialAddProjects',
                          '.plugin.add_projects',
                          complete='dir',
                          bang=True,
                          nargs='*')
    vial.register_command('VialAddIgnoreExtension',
                          '.plugin.add_ignore_extensions',
                          bang=True,
                          nargs='*')
    vial.register_command('VialAddIgnoreDirs',
                          '.plugin.add_ignore_dirs',
                          complete='dir',
                          bang=True,
                          nargs='*')

    vial.register_function('VialIndent()', '.plugin.indent')
Esempio n. 9
0
def init():
    vial.register_command('VialHttp', '.plugin.http')
    vial.register_command('VialHttpBasicAuth',
                          '.plugin.basic_auth_cmd',
                          nargs='?')
    vial.register_function('VialHttpBasicAuth()', '.plugin.basic_auth_func')
Esempio n. 10
0
def init():
    vial.register_function('VialPythonOmni(findstart, base)', '.plugin.omnifunc')

    vial.register_function('VialPythonGetExecutable()', '.env.get_executable')
    vial.register_function('<SID>VialPythonExecutableChoice(start, cmdline, pos)',
        '.plugin.executable_choice')
    vial.register_command('VialPythonSetExecutable', '.plugin.set_executable',
        complete='custom,<SID>VialPythonExecutableChoice', nargs=1)

    vial.register_command('VialPythonGotoDefinition', '.plugin.goto_definition')
    vial.register_command('VialPythonOutline', '.plugin.show_outline')
    vial.register_command('VialPythonShowSignature', '.plugin.show_signature')

    vial.register_command('VialPythonLint', lambda: lfunc('.plugin.lint')(False))
    vial.register_command('VialPythonLintAdd', lambda: lfunc('.plugin.lint')(True))
    vial.register_command('VialPythonLintAll', '.plugin.lint_all')

    vial.register_function('<SID>VialPythonOpenModuleChoice(start, cmdline, pos)',
        '.plugin.open_module_choice')
    vial.register_command('VialPythonOpenModule', '.plugin.open_module',
        complete='custom,<SID>VialPythonOpenModuleChoice', nargs=1)
    vial.register_command('VialPythonCreateModule', '.plugin.create_module',
        complete='custom,<SID>VialPythonOpenModuleChoice', nargs=1)
Esempio n. 11
0
def init():
    register_command('VialPytestRun', '.plugin.run', complete='file', nargs='*')
Esempio n. 12
0
def init():
    vial.register_command('VialGrep', '.plugin.grep', nargs=1)

    vial.register_function('<SID>VialGrepOperator(type)', '.plugin.grepop')
    vial.vim.command('nnoremap <Plug>VialGrep :set operatorfunc=<SID>VialGrepOperator<cr>g@')
    vial.vim.command('vnoremap <Plug>VialGrep :<c-u>call <SID>VialGrepOperator(visualmode())<cr>')