From 6dbc3c949441181574b67f2529b3f661d5d6d795 Mon Sep 17 00:00:00 2001 From: Ashkan Kiani Date: Fri, 4 Oct 2019 16:59:39 -0700 Subject: [PATCH] Update README.md --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4eaa59b..a4017bf 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,28 @@ Programmatic lua library for setting [base16](https://github.com/chriskempson/base16) themes in [Neovim](https://github.com/neovim/neovim). +## Demo + +```lua +local theme_names = base16.theme_names() +base16_position = 1 +function cycle_theme() + base16_position = (base16_position % #theme_names) + 1 + base16(base16.themes[theme_names[base16_position]], true) +end +``` + +![Cycle themes](https://raw.githubusercontent.com/norcalli/github-assets/master/nvim-base16.lua-demo.webm) + ## Usage -Basic usage: +Install via your plugin manager. e.g. + +```vim +Plug "norcalli/nvim-base16.lua" +``` + +### Basic usage ```lua lua << EOF