From f3aae5f72b36688f7c8122a3da3c378fc8aedf02 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 14 Nov 2017 23:43:04 +0100 Subject: [PATCH] README: show a screenshot and document what this plugin does fixes #1589 --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/airline.txt | 5 ++--- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0077edb..ee3b1f3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,56 @@ Lean & mean status/tabline for vim that's light as air. ![img](https://github.com/vim-airline/vim-airline/wiki/screenshots/demo.gif) +When the plugin is correctly loaded, Vim will draw a nice statusline at the +bottom of each window. + +That line consists of several sections, each one displaying some piece of +information. By default (without configuration) this line will look like this: + +``` ++-----------------------------------------------------------------------------+ +|~ | +|~ | +|~ VIM - Vi IMproved | +|~ | +|~ version 8.0 | +|~ by Bram Moolenaar et al. | +|~ Vim is open source and freely distributable | +|~ | +|~ type :h :q to exit | +|~ type :help or for on-line help | +|~ type :help version8 for version info | +|~ | +|~ | ++-----------------------------------------------------------------------------+ +| A | B | C X | Y | Z | [...] | ++-----------------------------------------------------------------------------+ +``` + +The statusline is the colored line at the bottom, which contains the sections +(possibly in different colors): + +section|meaning (example) +-------------------------- + A | displays the mode + additional flags like crypt/spell/paste (INSERT) + B | VCS information (branch, hunk summary) (master) + C | filename + read-only flag (~/.vim/vimrc RO) + X | filetype (vim) + Y | file encoding[fileformat] (utf-8[unix]) + Z | current position in the file + | percentage % ☰ current line/number of lines ln : column + | So this: 10% ☰ 10/100 ln : 20 means: > + | 10% - 10 percent + | ☰ 10 - current line 10 + | /100 ln - of 100 lines + | : 20 - current column 20 + [...] | additional sections (warning/errors/statistics) + | from external plugins (e.g. YCM/syntastic/...) + +For a better look, those sections can be colored differently, depending on various conditions +(e.g. the mode or whether the current file is 'modified') + + # Features * Tiny core written with extensibility in mind ([open/closed principle][8]). diff --git a/doc/airline.txt b/doc/airline.txt index 178537c..b829872 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -32,9 +32,8 @@ INTRODUCTION *airline-intro* vim-airline is a fast and lightweight alternative to powerline, written in 100% vimscript with no outside dependencies. -When the plugin is correctly loaded, and Vim is configured for drawing a -'statusline' (set 'laststatus' to 2, to always display the airline -statusline) Vim will draw a nice statusline at the bottom of each window. +When the plugin is correctly loaded, Vim will draw a nice statusline at the +bottom of each window. That line consists of several sections, each one displaying some piece of information. By default (without configuration) this line will look like this: >