Ejemplo n.º 1
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>'
    )
Ejemplo n.º 2
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')
Ejemplo n.º 3
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)
Ejemplo n.º 4
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')
Ejemplo n.º 5
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)
Ejemplo n.º 6
0
def init():
    register_function('<SID>BS()', backspace)
    register_function('<SID>CR()', cr)
    register_function('<SID>OpenClose(start)', open_close)

    vim.command('inoremap <Plug>VialCrampLeave <esc>')
    vim.command('inoremap <Plug>VialCrampSkip <c-g>U<right>')

    vim.command('inoremap <bs> <c-r>=<SID>BS()<cr><bs>')
    vim.command('inoremap <cr> <cr><c-r>=<SID>CR()<cr>')

    for s, e in BRACKETS:
        ss = s.replace('"', '\\"')
        ee = e.replace('"', '\\"')
        if s == e:
            vim.command(
                'inoremap {0} {0}<c-r>=<SID>OpenClose("{1}")<cr>{0}<c-g>U<left>'
                .format(s, ss))
        else:
            vim.command('inoremap {0} {0}{1}<c-g>U<left>'.format(s, e))
            vim.command(
                'inoremap {0} {0}<c-r>=<SID>OpenClose("{1}")<cr>'.format(
                    e, ee))
Ejemplo n.º 7
0
def init():
    vial.register_function('VialMailOmni(findstart, base)', '.plugin.omnifunc')
    vial.register_command('VialMailUpdate', '.plugin.update')
Ejemplo n.º 8
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')
Ejemplo 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')
Ejemplo n.º 10
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>')