Пример #1
0
def install_dependencies():
    # install vim
    utils.deb.install('vim')

    # install required packages by plugins
    print(green('Installing plugins dependencies.'))
    # ctags, better grep, python flake, C/C++ omnicompletion
    plugins = ['exuberant-ctags', 'ack-grep', 'pyflakes', 'clang']
    for plugin in plugins:
        utils.deb.install(plugin)

    # install pip if is not available
    utils.deb.install('python-pip')

    # update pip through pip
    py_install('pip', use_sudo=True, upgrade=True)

    # TODO Check if the command python get-pip.py is better
    # install and upgrade setup tools (that replaced distribute)
    py_install('setuptools', use_sudo=True, upgrade=True)

    # python flake+pep8
    if not py_is_installed('flake8'):
        py_install('flake8', use_sudo=True)
    # google closure linter
    if not py_is_installed('closure-linter'):
        closure_url = ('http://closure-linter.googlecode.com/files/'
                       'closure_linter-latest.tar.gz')
        py_install(closure_url, use_sudo=True)
Пример #2
0
def install_dependencies():
    # install vim
    utils.deb.install('vim')

    # install required packages by plugins
    print(green('Installing plugins dependencies.'))
    # ctags, better grep, python flake, C/C++ omnicompletion
    plugins = ['exuberant-ctags', 'ack-grep', 'pyflakes', 'clang']
    for plugin in plugins:
        utils.deb.install(plugin)

    # install pip if is not available
    utils.deb.install('python-pip')

    # update pip through pip
    py_install('pip', use_sudo=True, upgrade=True)

    # TODO Check if the command python get-pip.py is better
    # install and upgrade setup tools (that replaced distribute)
    py_install('setuptools', use_sudo=True, upgrade=True)

    # python flake+pep8
    if not py_is_installed('flake8'):
        py_install('flake8', use_sudo=True)

    # js linters
    if is_installed('nodejs'):
        cmd = 'sudo -H npm -g install jscs jshint'
        run(cmd)
    else:
        print(red('npm not installed. Re-run this task after installing npm'))
Пример #3
0
def install_dependencies():
    # install vim
    utils.deb.install('vim')

    # install required packages by plugins
    print(green('Installing plugins dependencies.'))
    # ctags, better grep, python flake, C/C++ omnicompletion
    plugins = ['exuberant-ctags', 'ack-grep', 'pyflakes', 'clang']
    for plugin in plugins:
        utils.deb.install(plugin)

    # install pip if is not available
    utils.deb.install('python-pip')

    # update pip through pip
    py_install('pip', use_sudo=True, upgrade=True)

    # TODO Check if the command python get-pip.py is better
    # install and upgrade setup tools (that replaced distribute)
    py_install('setuptools', use_sudo=True, upgrade=True)

    # python flake+pep8
    if not py_is_installed('flake8'):
        py_install('flake8', use_sudo=True)

    # js linter
    if is_installed('nodejs'):
        cmd = 'sudo -H npm -g install jscs'
        run(cmd)
    else:
        print(red('npm not installed. Re-run this task after installing npm'))
Пример #4
0
def install_dependencies():
    # install vim
    utils.deb.install('vim')

    # install required packages by plugins
    print(green('Installing plugins dependencies.'))
    # ctags, better grep, python flake, C/C++ omnicompletion
    plugins = ['exuberant-ctags', 'ack-grep', 'pyflakes', 'clang',
               'rhino']
    for plugin in plugins:
        utils.deb.install(plugin)

    # install pip if is not available
    utils.deb.install('python-pip')
    if not py_is_installed('flake8'):
        py_install('flake8', use_sudo=True)  # python flake+pep8
Пример #5
0
def install_dependencies():
    # install vim
    utils.os_commands.install('vim')

    # install required packages by plugins
    print(green('Installing plugins dependencies.'))
    # ctags, better grep, python flake, C/C++ omnicompletion
    if platform.system().lower() == 'linux':
        plugins = ['exuberant-ctags', 'ack-grep', 'pyflakes', 'clang']
    else:
        plugins = ['ctags', 'ack', 'flake8']

    for plugin in plugins:
        utils.os_commands.install(plugin)

    if platform.system().lower() == 'linux':
        # install pip if is not available
        utils.os_commands.install('python-pip')
        use_sudo = True
    else:
        use_sudo = False

    # update pip through pip
    py_install('pip', use_sudo=use_sudo, upgrade=True)

    # TODO Check if the command python get-pip.py is better
    # install and upgrade setup tools (that replaced distribute)
    py_install('setuptools', use_sudo=use_sudo, upgrade=True)

    # python flake+pep8
    if not py_is_installed('flake8'):
        py_install('flake8', use_sudo=use_sudo)

    # js linter
    if platform.system().lower() == 'linux':
        node_pkg_name = 'nodejs'
    else:
        node_pkg_name = 'node'

    if utils.os_commands.is_installed(node_pkg_name):
        cmd = '{}npm -g install jscs jshint'.format(
            'sudo -H ' if use_sudo else ''
        )
        run(cmd)
    else:
        print(red('npm not installed. Re-run this task after installing npm'))
Пример #6
0
def install_dependencies():
    # install vim
    utils.os_commands.install('vim')

    # install required packages by plugins
    print(green('Installing plugins dependencies.'))
    # ctags, better grep, python flake, C/C++ omnicompletion
    if platform.system().lower() == 'linux':
        plugins = ['exuberant-ctags', 'ack-grep', 'pyflakes', 'clang']
    else:
        plugins = ['ctags', 'ack', 'flake8']

    for plugin in plugins:
        utils.os_commands.install(plugin)

    if platform.system().lower() == 'linux':
        # install pip if is not available
        utils.os_commands.install('python-pip')
        use_sudo = True
    else:
        use_sudo = False

    # update pip through pip
    py_install('pip', use_sudo=use_sudo, upgrade=True)

    # TODO Check if the command python get-pip.py is better
    # install and upgrade setup tools (that replaced distribute)
    py_install('setuptools', use_sudo=use_sudo, upgrade=True)

    # python flake+pep8
    if not py_is_installed('flake8'):
        py_install('flake8', use_sudo=use_sudo)

    # js linter
    if platform.system().lower() == 'linux':
        node_pkg_name = 'nodejs'
    else:
        node_pkg_name = 'node'

    if utils.os_commands.is_installed(node_pkg_name):
        cmd = '{}npm -g install jscs jshint'.format(
            'sudo -H ' if use_sudo else '')
        run(cmd)
    else:
        print(red('npm not installed. Re-run this task after installing npm'))
Пример #7
0
def install():
    """ Installs and configures vim """
    # update apt index
    update_index(quiet=False)

    # install vim
    utils._deb.install('vim')

    # backup vim configuration folder
    if exists('.vim'):
        print(green('Backing up your vim configuration folder to .vim-bkp'))
        cmd = 'mv .vim .vim-bkp'
        run(cmd)

    # backup vim configuration file
    if exists('.vimrc'):
        print(green('Backing up your vim configuration file to .vimrc-bkp'))
        cmd = 'mv .vimrc .vimrc-bkp'
        run(cmd)

    # clone vim_config repository
    print(green('Cloning Vim_config repository.'))
    # install git if is not available
    git_install()
    git_clone('git://github.com/magnet-cl/Vim_config.git', '.vim')

    # install required packages by plugins
    print(green('Installing plugins dependencies.'))
    # ctags, better grep, python flake, latex, C/C++ omnicompletion
    plugins = ['exuberant-ctags', 'ack-grep', 'pyflakes', 'lacheck', 'clang',
               'rhino']
    for plugin in plugins:
        utils._deb.install(plugin)
    # install pip if is not available
    if not is_pip_installed():
        install_pip()
    if not py_is_installed('flake8'):
        py_install('flake8', use_sudo=True)  # python flake+pep8

    # installation script
    print(green('Installing Vim_config.'))
    cmd = 'source .vim/install.sh'
    run(cmd)