# lightline.vim: A Minimal, Self-Contained Statusline Plugin for Vim

> lightline.vim provides a configurable statusline and tabline for Vim that changes color based on mode, ships multiple colorschemes, and deliberately avoids integrating with other plugins, leaving those connections to the user's vimrc.

**itchyny/lightline.vim** — A light and configurable statusline/tabline plugin for Vim

- Repository: https://github.com/itchyny/lightline.vim
- Stars: 6,873 · Forks: 316
- Language: Vim Script
- License: MIT
- Published: 2026-09-22 · Updated: 2026-09-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/itchyny-lightline-vim

## What lightline.vim Solves and Who It Is For

Vim's default statusline shows basic file information but does not change color based on editing mode or provide a visual indicator of insert mode, visual mode, or replace mode. lightline.vim replaces the default statusline with one that changes color automatically as modes change. Typing into a file, entering visual mode, and replacing text all produce distinct statusline colors without any additional configuration beyond installing the plugin.

The README describes three design principles: minimalism (the core script is small), configurability (users can create components and place them anywhere on the statusline or tabline), and orthogonality (the plugin does not rely on or integrate with other plugins by default).

The intended audience is Vim users who want a polished statusline without the automatic integrations that other statusline plugins provide. The README compares lightline.vim with vim-powerline (deprecated), powerline (hard to configure), and vim-airline (integrates with too many other plugins). lightline.vim is the option for those who prefer to write their own integrations explicitly.

## How It Works: Components, Colorschemes, and Mode Colors

The statusline is composed of components. Each component is a named unit that produces a string for the statusline. By default the statusline shows mode, paste flag, filename, modified status, and readonly status on the left, and file format, encoding, filetype, and cursor position on the right.

Components are configured via the g:lightline dictionary in vimrc. A component can be any Vim 'statusline' expression. The README shows a minimal example that adds a static string to the statusline:

```vim
let g:lightline = {
      \ 'colorscheme': 'wombat',
      \ 'active': {
      \   'left': [ [ 'mode', 'paste' ],
      \             [ 'readonly', 'filename', 'modified', 'helloworld' ] ]
      \ },
      \ 'component': {
      \   'helloworld': 'Hello, world!'
      \ },
      \ }
```

The colorscheme field sets which lightline colorscheme to use. Lightline colorschemes are independent of the editor colorscheme. The editor colorscheme controls how code looks in buffers; the lightline colorscheme controls how the statusline looks. The README notes that colorscheme settings should be placed before the editor colorscheme in vimrc if colors fail to apply.

Mode colors are handled automatically. The statusline changes to a different palette as the editor mode changes. This removes the need for the `-- INSERT --` message in the command line; the README shows how to disable it:

```vim
set noshowmode
```

## Installation

lightline.vim supports all major Vim plugin managers. For Vim's built-in packages system (available since Vim 7.4.1528):

```
git clone https://github.com/itchyny/lightline.vim ~/.vim/pack/plugins/start/lightline
```

For vim-plug, add to vimrc and run :PlugInstall:

```vim
Plug 'itchyny/lightline.vim'
```

For Vundle, add to vimrc and run :PluginInstall:

```vim
Plugin 'itchyny/lightline.vim'
```

After installation and restarting Vim, if the statusline does not appear, add to vimrc:

```vim
set laststatus=2
```

If the statusline appears but shows no color, set the terminal to 256-color mode. The README shows the fix in the shell configuration file:

```sh
export TERM=xterm-256color
```

And in vimrc:

```vim
if !has('gui_running')
  set t_Co=256
endif
```

## The Orthogonality Principle and What It Means in Practice

lightline.vim deliberately does not integrate with git, linters, LSP clients, or other plugins. The README explains the reasoning: once a plugin integrates with famous plugins, it must be kept updated to follow their changes, must accept integration requests for new plugins, and suffers performance regressions from plugin availability checks.

Instead, lightline.vim provides a function-based component API. Any information that a function returns as a string can become a statusline component. The README shows how to integrate with other plugins using this API: define a function that calls the other plugin's API, register the function as a component, and add the component to the active statusline configuration.

This design places responsibility on the user. A lightline.vim setup that shows git branch information or LSP diagnostics requires the user to write Vimscript functions that fetch those values. For users who prefer not to write those functions, vim-airline provides built-in integrations for many plugins at the cost of the performance checks lightline.vim avoids.

## Colorscheme Configuration and Available Themes

The plugin ships multiple built-in colorschemes. The README lists powerline (default), wombat, solarized (with dark and light background variants), PaperColor (dark and light), and one (dark and light) as examples, and references a separate colorscheme.md file in the repository for screenshots of all available colorschemes.

To select a colorscheme, set it in the g:lightline configuration:

```vim
let g:lightline = {
      \ 'colorscheme': 'wombat',
      \ }
```

The editor colorscheme and the lightline colorscheme are independent settings. Changing the editor colorscheme (via colorscheme wombat in vimrc) does not automatically change the statusline appearance. Users must set the lightline colorscheme explicitly.

Custom colorschemes can be created by following the format of existing colorscheme files. The plugin colorschemes are located in the autoload/ directory of the plugin.

## Limitations and When vim-airline Is the Better Choice

lightline.vim has no built-in integrations. Showing git branch, lint diagnostics, or LSP status requires user-written Vimscript or Lua functions. For Vim users who want those integrations without writing code, vim-airline ships them pre-built for many common plugins.

The README notes that the tabline feature is also configurable, following the same component model as the statusline. Configuring both correctly requires understanding the g:lightline dictionary structure, which involves several nested keys. The README covers this, but it is more involved than a default-configured alternative.

The plugin targets Vim and is written in Vim Script. Neovim users can use lightline.vim, but Neovim's ecosystem also includes statusline plugins written in Lua such as lualine.nvim that take advantage of Neovim-specific APIs. The README does not mention Neovim-specific features.

## Maintenance Status and License

The repository is not archived. The last push was on 2026-07-01. GitHub Actions workflows are present in the .github/ directory. The plugin includes a test/ directory, which is uncommon for Vim plugins and reflects the project's attention to correctness.

The license is MIT. The doc/ directory contains the plugin's help documentation, accessible in Vim via :h lightline. The autoload/ directory holds the plugin's Vim Script source. The plugin/ directory holds the initialization entry point.

## Conclusion

lightline.vim suits Vim users who want a statusline that shows mode, filename, and file metadata with color that changes per mode, without the plugin automatically integrating with other tools. The orthogonality design is a genuine trade-off: users gain full control and avoid hidden performance costs, but every plugin integration (git branch, lint errors, LSP status) must be written by the user in vimrc. The README explicitly says this is intentional. The last push was on 2026-07-01. Verify that your terminal supports 256 colors before trying colorschemes other than the default.

## FAQ

### What is lightline.vim?

lightline.vim is a lightweight Vim statusline and tabline plugin that changes color based on the current editing mode, ships multiple colorschemes, and provides a component API for adding custom information. It does not integrate with other plugins by default, leaving those connections to user configuration.

### How do I make the statusline visible in Vim after installing lightline.vim?

Add `set laststatus=2` to your vimrc. Without this setting, Vim only shows the statusline when multiple windows are open. If the statusline appears but shows no color, also add `export TERM=xterm-256color` to your shell configuration and `set t_Co=256` to your vimrc.

### Does lightline.vim integrate with git or LSP plugins automatically?

No. The plugin's orthogonality design means it does not integrate with other plugins by default. To show git branch or LSP status in the statusline, users write Vimscript functions that call those plugins' APIs and register them as lightline components in the g:lightline configuration.

## Sources

- [Issues](https://github.com/itchyny/lightline.vim/issues)
- [itchyny/lightline.vim on GitHub](https://github.com/itchyny/lightline.vim)
- [License: MIT](https://github.com/itchyny/lightline.vim/blob/master/LICENSE)
- [README](https://github.com/itchyny/lightline.vim/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/itchyny-lightline-vim
