GithubHelp home page GithubHelp logo

343829084 / docker-spacevim-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thawk/docker-spacevim-cpp

0.0 2.0 0.0 13 KB

Container to use SpaceVim for C++ projects

License: MIT License

Dockerfile 28.63% Shell 50.29% Vim Script 21.08%

docker-spacevim-cpp's Introduction

A neovim with SpaceVim and my customized configuration.

https://hub.docker.com/r/thawk/spacevim-cpp

Based on: https://hub.docker.com/r/thawk/spacevim-base

Usage

You can use the dvim script to mount $HOME and use this image to edit you file like using a local VIM.

  • dvim

    #!/bin/bash
    # Command for running neovim
    
    docker_image=thawk/spacevim-cpp
    
    cache_home="${XDG_CACHE_HOME:-${HOME}/.cache}"
    data_home="${XDG_DATA_HOME:-${HOME}/.local/share}"
    shada_path="${data_home}/nvim/shada"
    
    mkdir -p "${cache_home}"/{neomru,neoyank}
    mkdir -p "${cache_home}"/SpaceVim/{backup,swap,tags,undofile}
    
    if [[ ! -d "${shada_path}" ]]
    then
        mkdir -p "${shada_path}"
        chmod 700 "${shada_path}"
    fi
    
    docker run --rm \
        -it \
        -P \
        -u $(id -u ${USER}):$(id -g ${USER}) \
        -v "${HOME}":"${HOME}" \
        -v "${cache_home}/SpaceVim/backup":"/myhome/.cache/SpaceVim/backup" \
        -v "${cache_home}/SpaceVim/swap":"/myhome/.cache/SpaceVim/swap" \
        -v "${cache_home}/SpaceVim/tags":"/myhome/.cache/SpaceVim/tags" \
        -v "${cache_home}/SpaceVim/undofile":"/myhome/.cache/SpaceVim/undofile" \
        -v "${cache_home}/neomru":"/myhome/.cache/neomru" \
        -v "${cache_home}/neoyank":"/myhome/.cache/neoyank" \
        -v "${data_home}/nvim/shada":"/myhome/.local/share/nvim/shada" \
        -w "${PWD}" \
        "${docker_image}" \
        -- "$@"

    It will mount your home to the corresponded path, and mount some key directory of SpaceVim to work like locally.

  • usage

    dvim path/to/file.txt
  • Or you can simply run it:

    $ docker run -it --rm -v $(pwd):/src thawk/spacevim-cpp test.cpp

docker-spacevim-cpp's People

Contributors

thawk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.