Git Product home page Git Product logo

Comments (5)

Quitlox avatar Quitlox commented on June 15, 2024 1

I was also stumped by this, but I've found a cleaner way to get the vim configuration working.

First of all, you don't need the base16-vim plugin. The only thing the plugin does is add precompiled themes to the <install dir>/vim/colors/ folder (themes in this folder are automatically picked up by vim). The Base16 Universal Manager already takes care of generating these themes.

So in theory, what you want is that Base16 Universal Manager just generates a theme and places it under $HOME/.config/vim/colors/base16_<theme>.vim.

The problem is that the name of the theme file (base16_<theme>.vim) has to correspond to the line let g:colors_name = "base16_<theme>" within that file, and your vimrc should specify this theme with the line colorscheme base16_<theme>.

So instead of figuring out how to get the correct theme name in the three places just mentioned, I've made it so that the theme name is statically set to the generic name base16_theme (notice the lack of <>).

So for this setup you need Base16 Universal Manager to generate the file $HOME/.config/vim/colors/base16_theme.vim and you add colorscheme base16_theme to your vimrc. The only problem left is that the file generated by the Manager contains the line let g:colors_name = "base16_<actual theme>", which I overwrite by taking advantage of the replace functionality.

~/.config/base16-universal-manager/config.yaml

vim:
    enabled: true
    files:
        default:
            path: ~/.config/vim/colors/base16_theme.vim
            mode: replace
            start_marker: "\" <<<<<"
            end_marker: "\" >>>>>"

~/.config/vim/colors/base16_theme.vim

" <<<<<
" Theme generated by Base16 Universal Manager goes here
" >>>>>
let g:colors_name="base16_theme"

vimrc

let g:colors_name="base16_theme"

from base16-universal-manager.

pinpox avatar pinpox commented on June 15, 2024 1

Unfortunately, the wiki doesn't allow for being pushed onto by people other than you. You'd need to run the commands from the first message as suggested in another ticket too.

Done! The wiki is updated, feel free to reopen if I missed something.

from base16-universal-manager.

paul-ri avatar paul-ri commented on June 15, 2024

Thanks @Quitlox , I've updated the vim entry in my wiki here: https://github.com/paul-ri/base16-universal-manager/wiki/Configuration-examples#vim it works nicely. The latest official wiki entry for vim doesn't work for me: https://github.com/pinpox/base16-universal-manager/wiki/Configuration-examples#vim

I've also added a config for foot which will work once chriskempson/base16-templates-source#97 is merged in.

Rebased on origin/master

@pinpox : let me know if you want me to edit some entries.

from base16-universal-manager.

pinpox avatar pinpox commented on June 15, 2024

@paul-ri Thanks for updating the docs! Would be great to have that in the wiki of the repository

from base16-universal-manager.

paul-ri avatar paul-ri commented on June 15, 2024

Unfortunately, the wiki doesn't allow for being pushed onto by people other than you. You'd need to run the commands from the first message as suggested in another ticket too.

from base16-universal-manager.

Related Issues (20)

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.