Skip to content

tuffgniuz/simplezen.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

simplezen

GitHub code size in bytes GitHub commit activity

Summary

simplezen.nvim is a lightweight Neovim plugin designed to provide a distraction-free "Zen Mode" for focused coding and writing. It centers your current buffer, hides various UI elements, and creates seamless margins to create a clean, minimalist editing environment. All settings are restored when Zen Mode is toggled off.

Features:

  • Content Centering: Centers your current buffer by creating dynamic margins.
  • Distraction-Free UI: Hides laststatus, showmode, ruler, and showtabline.
  • Configurable Width: Allows you to set your preferred content width.
  • State Restoration: Restores all original global and window-local settings upon exit.
  • Auto-Resizing: Adjusts margins automatically when Neovim window is resized.

Installation

lazy.nvim

return {
  {
    "tuffgniuz/simplezen", -- Or your actual GitHub username/repo name
    config = function()
      require("simplezen").setup({
        text_width = 100, -- Optional: Customize your preferred text width (default is 110)
      })
    end,
    keys = {
      { "<leader>zz", "<cmd>lua require('simplezen').toggle()<CR>", desc = "Toggle Zen Mode" },
    },
  },
}

Usage

Once installed, you can toggle Zen Mode on and off using the M.toggle() function. If you've set up the keybinding as shown in the installation example, simply press <leader>zz (or your chosen keybind).

  • <leader>zz: Toggles Zen Mode on/off.

Configuration

simplezen.nvim can be configured via its setup() function. The available options are:

  • text_width (number, default: 110): The maximum width for your centered text content.

Example Configuration:

require("simplezen").setup({
  text_width = 90, -- Set content width to 90 characters
})

Development Status

simplezen.nvim is currently under active development. While efforts are made to ensure stability, bugs or unexpected behavior may occur. Your feedback and contributions are welcome!

About

Distraction free writing / coding in neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages