From 7095372c4b7ae274db16b24ab3c99b21ab4a599e Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 1 Jun 2024 15:40:03 +0900 Subject: [PATCH] Add colorscheme example (should be loaded after plug#end()) --- README.md | 20 ++++++++++++++------ doc/plug.txt | 22 +++++++++++++++------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5403a4b..be98722 100644 --- a/README.md +++ b/README.md @@ -160,11 +160,11 @@ call plug#begin() " Make sure you use single quotes -" Shorthand notation for GitHub; translates to https://github.com/junegunn/vim-easy-align -Plug 'junegunn/vim-easy-align' +" Shorthand notation for GitHub; translates to https://github.com/junegunn/seoul256.vim.git +Plug 'junegunn/seoul256.vim' " Any valid git URL is allowed -Plug 'https://github.com/junegunn/seoul256.vim.git' +Plug 'https://github.com/junegunn/vim-easy-align.git' " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) Plug 'fatih/vim-go', { 'tag': '*' } @@ -199,6 +199,10 @@ call plug#end() " You can revert the settings after the call like so: " filetype indent off " Disable file-type-specific indentation " syntax off " Disable syntax highlighting + +" Color schemes should be loaded after plug#end(). +" We prepend it with 'silent!' to ignore errors when it's not yet installed. +silent! colorscheme seoul256 ``` ### Lua example for Neovim @@ -213,11 +217,11 @@ local Plug = vim.fn['plug#'] vim.call('plug#begin') --- Shorthand notation for GitHub; translates to https://github.com/junegunn/vim-easy-align -Plug('junegunn/vim-easy-align') +-- Shorthand notation for GitHub; translates to https://github.com/junegunn/seoul256.vim.git +Plug('junegunn/seoul256.vim') -- Any valid git URL is allowed -Plug('https://github.com/junegunn/seoul256.vim.git') +Plug('https://github.com/junegunn/vim-easy-align.git') -- Using a tagged release; wildcard allowed (requires git 1.9.2 or above) Plug('fatih/vim-go', { ['tag'] = '*' }) @@ -249,6 +253,10 @@ Plug('tpope/vim-fireplace', { ['for'] = 'clojure' }) Plug('~/my-prototype-plugin') vim.call('plug#end') + +-- Color schemes should be loaded after plug#end(). +-- We prepend it with 'silent!' to ignore errors when it's not yet installed. +vim.cmd('silent! colorscheme seoul256') ``` ## Commands diff --git a/doc/plug.txt b/doc/plug.txt index 06d985f..980a1b6 100644 --- a/doc/plug.txt +++ b/doc/plug.txt @@ -1,4 +1,4 @@ -plug.txt plug Last change: May 15 2024 +plug.txt plug Last change: Jun 1 2024 PLUG - TABLE OF CONTENTS *plug* *plug-toc* ============================================================================== @@ -121,11 +121,11 @@ The following examples demonstrate the additional features of vim-plug. " Make sure you use single quotes - " Shorthand notation for GitHub; translates to https://github.com/junegunn/vim-easy-align - Plug 'junegunn/vim-easy-align' + " Shorthand notation for GitHub; translates to https://github.com/junegunn/seoul256.vim.git + Plug 'junegunn/seoul256.vim' " Any valid git URL is allowed - Plug 'https://github.com/junegunn/seoul256.vim.git' + Plug 'https://github.com/junegunn/vim-easy-align.git' " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) Plug 'fatih/vim-go', { 'tag': '*' } @@ -160,6 +160,10 @@ The following examples demonstrate the additional features of vim-plug. " You can revert the settings after the call like so: " filetype indent off " Disable file-type-specific indentation " syntax off " Disable syntax highlighting + + " Color schemes should be loaded after plug#end(). + " We prepend it with 'silent!' to ignore errors when it's not yet installed. + silent! colorscheme seoul256 < < Lua example for Neovim >____________________________________________________~ @@ -174,11 +178,11 @@ example above. vim.call('plug#begin') - -- Shorthand notation for GitHub; translates to https://github.com/junegunn/vim-easy-align - Plug('junegunn/vim-easy-align') + -- Shorthand notation for GitHub; translates to https://github.com/junegunn/seoul256.vim.git + Plug('junegunn/seoul256.vim') -- Any valid git URL is allowed - Plug('https://github.com/junegunn/seoul256.vim.git') + Plug('https://github.com/junegunn/vim-easy-align.git') -- Using a tagged release; wildcard allowed (requires git 1.9.2 or above) Plug('fatih/vim-go', { ['tag'] = '*' }) @@ -210,6 +214,10 @@ example above. Plug('~/my-prototype-plugin') vim.call('plug#end') + + -- Color schemes should be loaded after plug#end(). + -- We prepend it with 'silent!' to ignore errors when it's not yet installed. + vim.cmd('silent! colorscheme seoul256') < COMMANDS *plug-commands*