Git Product home page Git Product logo

shoji's Introduction

shoji logo for the shoji vim theme

A vim theme that conveys syntax with colorful background highlighting (instead of colored text).

Crafted with the magnificent Colortemplate.

variants

The shoji "theme" is actually a pair of themes.

shoji_niji is the exuberant one, showering syntactic rainbows.

screenshot of the shoji_niji vim theme

shoji_shiro is the restrained one, content with pristine black-and-white, except where color is unavoidably practical.

screenshot of the shoji_shiro vim theme

installation

If you don’t have a preferred plugin helper, consider trying vim-plug, which can be installed with:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

With vim-plug, shoji can be installed by adding the following to the top of your vimrc...

call plug#begin('~/.vim/plugged')
Plug 'haystackandroid/shoji'
call plug#end()

...then restarting vim and running PlugUpdate (from the vim command line).

activation

To activate a shoji theme, add one of the following to your vimrc:

  • colorscheme shoji_niji
  • colorscheme shoji_shiro

A keybinding for the ShojiToggle() function can be used to switch between the two shoji themes:

noremap <C-s> :call ShojiToggle()<return>

Change <C-s> (which denotes the keystroke [ctrl+s]) to suit your preference.

terminal cursor

shape

To set mode-specific cursor shapes in terminal vim, see the vim tips wiki.

For instance, to set cursor shapes in vte-compatible terminals (like urxvt):

let &t_SI = "\<Esc>[6 q"
let &t_SR = "\<Esc>[4 q"
let &t_EI = "\<Esc>[2 q"

This sets the cursor to a vertical line for insert mode, underline for replace mode, and block for normal mode.

color

To set cursor color in (vte-compatible) terminal vim, wrap the vim command in a shell function.

For bash/zsh, add the following to ~/.bashrc or ~/.zshrc:

vim() {
  printf "%b" "\033]11;#fafafa\007\033]12;#2a2a2a\007"
  sh -c "vim $*"
  clear
  printf "%b" "\033]11;#2e3440\007\033]12;#d8dee9\007"
}

For fish, add the following to ~/.config/fish/config.fish:

function vim
  printf "%b" "\033]11;#fafafa\007\033]12;#2a2a2a\007"
  sh -c "vim $argv"
  clear
  printf "%b" "\033]11;#2e3440\007\033]12;#d8dee9\007"
end

Replace 2e3440 and d8dee9 with the background and foreground colors of your terminal theme.

For neovim, substitute vim with nvim.

language samples

These samples (drawn from Rosetta Code) use vim's built-in syntax detection for each filetype.

clojure

screenshot of clojure code highlighted with the shoji_niji vim theme

erlang

screenshot of erlang code highlighted with the shoji_niji vim theme

lisp

screenshot of lisp code highlighted with the shoji_niji vim theme

php

screenshot of php code highlighted with the shoji_niji vim theme

r

screenshot of r code highlighted with the shoji_niji vim theme

rust

screenshot of rust code highlighted with the shoji_niji vim theme

shoji's People

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.