whatisgithub

What is goyo.vim?

junegunn/goyo.vim — explained in plain English

Analysis updated 2026-06-26

4,675Vim ScriptAudience · writerComplexity · 2/5LicenseSetup · easy

In one sentence

A Vim plugin that creates a distraction-free writing mode by hiding editor chrome and centering your text in a clean, quiet window. Toggle it on and off with a single command.

Mindmap

mindmap
  root((goyo.vim))
    What it does
      Distraction-free mode
      Centers text
      Hides chrome
    Controls
      Toggle with colon Goyo
      Custom dimensions
      Percentage or fixed
    Integrations
      limelight.vim pairing
      vim-airline hidden
      vim-gitgutter hidden
    Customization
      GoyoEnter callback
      GoyoLeave callback
      Color scheme fix
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Toggle a distraction-free writing mode in Vim to focus on drafting documents or blog posts.

USE CASE 2

Combine with limelight.vim to dim all text except the paragraph you are actively editing.

USE CASE 3

Customize the writing window size using percentage-based or fixed-character dimensions to suit your screen.

USE CASE 4

Add custom startup and shutdown hooks via GoyoEnter/GoyoLeave events to configure your ideal writing environment.

What is it built with?

Vim ScriptVim

How does it compare?

junegunn/goyo.vimmbbill/undotreepangloss/vim-javascript
Stars4,6754,5303,790
LanguageVim ScriptVim ScriptVim Script
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencewriterdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial, just keep the copyright notice.

So what is it?

Goyo is a Vim plugin that creates a focused, distraction-free writing environment inside the Vim text editor. When you activate it with the :Goyo command, it hides all the surrounding chrome, status bars, and line decorations, and centers your text in a clean window so you can concentrate on writing. Typing :Goyo again toggles it off and restores your normal editing environment. The name comes from a Korean word meaning quietness or stillness. The README recommends pairing it with another plugin called limelight.vim, which dims all text except the paragraph you are currently working on. You can control the size and position of the writing window using a dimension expression. This lets you specify width, height, and offsets either as fixed character counts or as percentages. For example, you can set the writing area to 120 characters wide, or center it at 50 percent of the screen width with a 25 percent offset. Several popular Vim plugins that add status bars or gutter indicators are automatically hidden while Goyo is active, including vim-airline, lightline.vim, vim-gitgutter, and vim-signify. For anything not handled automatically, Goyo provides two callback events, GoyoEnter and GoyoLeave, that let you run custom Vim script when the mode turns on and off. The README also includes a FAQ addressing a common issue: if you have custom color tweaks in your Vim config, exiting Goyo can reset them. The solution is to apply your color customizations inside a ColorScheme autocmd rather than directly in the config file. The plugin is licensed under MIT.

Copy-paste prompts

Prompt 1
Set up Goyo in my Vim config with a writing window width of 80 characters and pair it with limelight.vim to dim surrounding text.
Prompt 2
Help me write a GoyoEnter/GoyoLeave autocmd that switches to a minimal color scheme for writing mode and restores it when I exit.
Prompt 3
How do I configure goyo.vim to open at 60 percent of screen width centered with a vertical offset for a comfortable writing layout?
Prompt 4
Write a Vim script snippet that automatically enters Goyo mode whenever I open a Markdown or plain text file.
Prompt 5
How do I fix the issue where exiting Goyo resets my custom color scheme, and what is the correct ColorScheme autocmd approach?

Frequently asked questions

What is goyo.vim?

A Vim plugin that creates a distraction-free writing mode by hiding editor chrome and centering your text in a clean, quiet window. Toggle it on and off with a single command.

What language is goyo.vim written in?

Mainly Vim Script. The stack also includes Vim Script, Vim.

What license does goyo.vim use?

Use freely for any purpose including commercial, just keep the copyright notice.

How hard is goyo.vim to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is goyo.vim for?

Mainly writer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.