All Projects → rbong → Vim Crystalline

rbong / Vim Crystalline

Functions for taking the monotony out of building your own fancy statusline in Vim

Projects that are alternatives of or similar to Vim Crystalline

Vim Vide
Lightest vimrc, while strong enough. 最轻的vim配置,却足够强!
Stars: ✭ 649 (+145.83%)
Mutual labels:  powerline, plugin, statusline
Hyper Statusline
Status Line Plugin for Hyper
Stars: ✭ 366 (+38.64%)
Mutual labels:  plugin, statusline
Pureline
A Pure Bash Powerline PS1 Command Prompt
Stars: ✭ 342 (+29.55%)
Mutual labels:  powerline, statusline
barow
A minimalist statusline for n/vim
Stars: ✭ 31 (-88.26%)
Mutual labels:  powerline, statusline
Powerline Extra Symbols
▶️ Extra glyphs for your powerline separators
Stars: ✭ 778 (+194.7%)
Mutual labels:  powerline, statusline
Vim Devicons
Adds file type icons to Vim plugins such as: NERDTree, vim-airline, CtrlP, unite, Denite, lightline, vim-startify and many more
Stars: ✭ 4,473 (+1594.32%)
Mutual labels:  powerline, statusline
Nerd Fonts
Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
Stars: ✭ 31,778 (+11937.12%)
Mutual labels:  powerline, statusline
Powerline
Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
Stars: ✭ 12,989 (+4820.08%)
Mutual labels:  powerline, statusline
powerline mem segment
No description or website provided.
Stars: ✭ 15 (-94.32%)
Mutual labels:  powerline
Damnwebscanner
Another web vulnerabilities scanner, this extension works on Chrome and Opera
Stars: ✭ 254 (-3.79%)
Mutual labels:  plugin
feline.nvim
A minimal, stylish and customizable statusline for Neovim written in Lua
Stars: ✭ 867 (+228.41%)
Mutual labels:  statusline
github-notifications.nvim
Statusline + Telescope integration for viewing and interacting with GitHub notifications
Stars: ✭ 70 (-73.48%)
Mutual labels:  statusline
Tmux Powerline
A hackable statusbar for tmux consisting of dynamic & beautiful looking segments, inspired by vim-powerlline, written purely in bash.
Stars: ✭ 2,802 (+961.36%)
Mutual labels:  powerline
dotfiles
🔧 .files - different setups separated in branches
Stars: ✭ 168 (-36.36%)
Mutual labels:  powerline
Runtimeunityeditor
In-game inspector and debugging tools for applications made with Unity3D game engine
Stars: ✭ 254 (-3.79%)
Mutual labels:  plugin
onestatus
an api to customize tmux from vim
Stars: ✭ 82 (-68.94%)
Mutual labels:  powerline
Motrix Webextension
A chrome extension for the Motrix Download Manager
Stars: ✭ 253 (-4.17%)
Mutual labels:  plugin
Cathook
Training Software for the game Team Fortress 2
Stars: ✭ 256 (-3.03%)
Mutual labels:  plugin
fishline
A powerline prompt framework for the fish-shell built in fish-shell.
Stars: ✭ 66 (-75%)
Mutual labels:  powerline
windline.nvim
Animation statusline, floating window statusline. Use lua + luv make some wind
Stars: ✭ 308 (+16.67%)
Mutual labels:  statusline

vim-crystalline

Build Status

Want a nice statusline in vim? vim-airline too slow? lightline.vim too verbose? vim-crystalline is for you.

vim-crystalline lets you build your own statusline and tabline in a vanilla vim style. It also comes with a bufferline!

Obligatory Colorful Theme Screenshots

default

img

badwolf

img

dracula

img

gruvbox (dark)

img

gruvbox (light)

img

hybrid (dark)

img

hybrid (light)

img

jellybeans

img

molokai

img

onedark

img

papercolor

img

solarized (dark)

img

solarized (light)

img

Making your own theme

To make your own theme, see :help crystalline-themes. If you'd like to port an airline theme, see Porting Airline Themes on the wiki.

Installation

Using vim-plug, put this in your .vimrc between plug#begin() and plug#end():

Plug 'rbong/vim-crystalline'

Now run :PlugInstall after restarting vim. Refer to your plugin manager of choice's documentation if you don't use vim-plug.

The default version of vim-crystalline requires Vim 8. To install on vim-7, use:

Plug 'rbong/vim-crystalline', { 'branch': 'vim-7' }

Examples

Jump straight to the last example if you just want to see everything crystalline can do. All examples go in your .vimrc before vim-crystalline is loaded.

See :help statusline for more information on the statusline syntax used in these examples.

Basic Vim Syntax

function! StatusLine()
  return ' %f%h%w%m%r '
endfunction
set statusline=%!StatusLine()
set laststatus=2

Statusline Mode Colors

function! StatusLine(...)
  return crystalline#mode() . ' %f%h%w%m%r '
endfunction
let g:crystalline_statusline_fn = 'StatusLine'
let g:crystalline_theme = 'default'
set laststatus=2

Hiding Sections In Inactive Windows

function! StatusLine(current)
  return ' %f%h%w%m%r '
        \ . (a:current ? '%= %{&ft}[%{&fenc!=#""?&fenc:&enc}][%{&ff}] %l/%L %c%V %P ' : '')
endfunction
let g:crystalline_statusline_fn = 'StatusLine'
set laststatus=2

Using Themes

function! StatusLine(...)
  return '%#Crystalline# %f%h%w%m%r %#CrystallineFill#'
        \ . '%=%#Crystalline# %{&ft}[%{&fenc!=#""?&fenc:&enc}][%{&ff}] %l/%L %c%V %P '
endfunction
let g:crystalline_statusline_fn = 'StatusLine'
let g:crystalline_theme = 'default'
set laststatus=2

Adding More Statusline Information

function! StatusLine(...)
  return ' %f%h%w%m%r %{fugitive#head()} %{&paste ?"PASTE ":""}%{&spell?"SPELL ":""}'
endfunction
let g:crystalline_statusline_fn = 'StatusLine'
set laststatus=2

Hiding Sections Based on Window Width

function! StatusLine(current, width)
  return ' %f%h%w%m%r '
        \ . (a:width > 80 ? '%= %{&ft}[%{&fenc!=#""?&fenc:&enc}][%{&ff}] %l/%L %c%V %P ' : '')
endfunction
let g:crystalline_statusline_fn = 'StatusLine'
set laststatus=2

Adding Powerline-Style Separators Between Sections

function! StatusLine(...)
  return crystalline#mode() . crystalline#right_mode_sep('')
        \ . ' %f%h%w%m%r ' . crystalline#right_sep('', 'Fill') . '%='
        \ . crystalline#left_sep('', 'Fill') . ' %{&ft}[%{&fenc!=#""?&fenc:&enc}][%{&ff}] %l/%L %c%V %P '
endfunction
let g:crystalline_enable_sep = 1
let g:crystalline_statusline_fn = 'StatusLine'
let g:crystalline_theme = 'default'
set laststatus=2

The strings passed to separator functions are groups from :help crystalline-highlight-groups with Crystalline omitted.

Using the Bufferline

set tabline=%!crystalline#bufferline()
set showtabline=2

Enabling the Bufferline in Gvim

set tabline=%!crystalline#bufferline()
set showtabline=2
set guioptions-=e

Bufferline Current Tab Mode Colors

function! TabLine()
  return crystalline#bufferline(0, 0, 1)
endfunction
let g:crystalline_tabline_fn = 'TabLine'
set showtabline=2

Adding More Tabline Information

function! TabLine()
  let l:vimlabel = has('nvim') ?  ' NVIM ' : ' VIM '
  return crystalline#bufferline(2, len(l:vimlabel), 1) . '%=%#CrystallineTab# ' . l:vimlabel
endfunction
let g:crystalline_tabline_fn = 'TabLine'
set showtabline=2

The first two options to the bufferline indicate the number of % items used and the character width used.

Full Example

function! StatusLine(current, width)
  let l:s = ''

  if a:current
    let l:s .= crystalline#mode() . crystalline#right_mode_sep('')
  else
    let l:s .= '%#CrystallineInactive#'
  endif
  let l:s .= ' %f%h%w%m%r '
  if a:current
    let l:s .= crystalline#right_sep('', 'Fill') . ' %{fugitive#head()}'
  endif

  let l:s .= '%='
  if a:current
    let l:s .= crystalline#left_sep('', 'Fill') . ' %{&paste ?"PASTE ":""}%{&spell?"SPELL ":""}'
    let l:s .= crystalline#left_mode_sep('')
  endif
  if a:width > 80
    let l:s .= ' %{&ft}[%{&fenc!=#""?&fenc:&enc}][%{&ff}] %l/%L %c%V %P '
  else
    let l:s .= ' '
  endif

  return l:s
endfunction

function! TabLine()
  let l:vimlabel = has('nvim') ?  ' NVIM ' : ' VIM '
  return crystalline#bufferline(2, len(l:vimlabel), 1) . '%=%#CrystallineTab# ' . l:vimlabel
endfunction

let g:crystalline_enable_sep = 1
let g:crystalline_statusline_fn = 'StatusLine'
let g:crystalline_tabline_fn = 'TabLine'
let g:crystalline_theme = 'default'

set showtabline=2
set guioptions-=e
set laststatus=2

More Info

See :help crystalline for more information.

Don't hesitate to post an issue if you have any questions, suggestions, or bugs.

Feel free to make a pull request if you'd like to to contribute. It's much appreciated.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].