the-golden-vim

template
Lua
Oct 26, 2025
Overview

https://github.com/user-attachments/assets/835d7d6e-80fb-4d4e-ab8d-cbbadfa78f69

A tribute to the era before bloat. Vim, reinterpreted.

Features

  • Written entirely in Lua - the language that stays out of your way.
  • Uncomplicated. No lazy-loading nonsense or dependency pyramids that break on edit. In modern "Vim frameworks", even the smallest change can trigger an avalanche.
  • Built on NeoVim v0.11 and the mini.nvim ecosystem. Because oldschool doesn't mean outdated.
  • Enhanced with LuaFun - for .map(), .filter(), and other table operations, familiar to anyone fluent in functional programming or JavaScript.
  • No dopamine-driven plugins. Only what matters for daily work.
  • Uses the classic murphy theme - already included in Vim and Neovim. Old colors, new context.
  • Straightforward, top-to-bottom configuration. No maze of directories or 999 files for 999 plugins.
  • Relies on proven tools that already do the job (rg, fzf, bat, and friends). No pointless Lua re-implementations "just because".
  • Smart, but never intrusive - LSPs, diagnostics, formatters, Git integration.
  • Packed with QoL features: enhanced :Bdelete commands, synced terminal colors (MiniMisc.sync_termbg), scoped live ripgrep with fzf, smarter closing of oil buffers, and more.
  • No attempts to imitate a GUI IDE. No file tree, no icons, no floating clutter.
  • Focused and reliable - works in any stack, any size. Tested inside large monorepos.

Customization

The codebase is small enough to understand in one sitting, and flexible enough to rebuild from scratch.
Fork it, strip it down, or change it into something unrecognizable - it’s still yours. If you wish to use different LSP servers or formatters, search codebase for conform and blink keywords.

Installation

NeoVim

If you're starting with Vim or you're getting back after the years, please install the 0.11 version through bob (a NeoVim version manager). This brilliant utility will save you a lot of time and struggle to get started.

Once you have bob installed on your machine run bob install 0.11 in a terminal of your choice.

Cloning The Golden Vim

Clone the configuration into your NeoVim config directory

  • Via git
    git clone https://github.com/neg4n/the-golden-vim ~/.config/nvim/ && cd ~/.config/nvim/
    
  • Via GitHub CLI (gh)
    gh repo clone neg4n/the-golden-vim ~/.config/nvim && cd ~/.config/nvim
    

Other prerequisities before running

Optional enhancements

The Golden Vim was created with mind of Ghostty terminal emulator and Berkeley Mono typeface by U.S. Graphics Company. It'll work flawlessly in other setups but if you wish to replicate the look from the media resources - use these!

The port of murphy theme for bat (previews) can be found on the murphy.tmTheme repository

Keymaps and bindings

Short intro

  • Leader key is Space.
  • Normal <leader>n – open MiniNotify history.
  • Normal - – toggle the Oil file explorer in a float.
  • Normal gd – jump to LSP definition.
  • Normal gra - LSP code action.
  • Normal grn - LSP rename.
  • Normal <leader>r – format the current buffer asynchronously.
  • Normal <leader>ld – fzf-lua diagnostics picker with yank support.
  • Normal <leader>f – fzf-lua files.
  • Normal <leader>s – fzf-lua document symbols.
  • Normal <leader>b – fzf-lua buffers.
  • Normal <leader>/ – scoped live ripgrep.
  • Normal <leader>? – pick directories, then live ripgrep.
  • Normal <leader>g – fzf-lua Git diff view.
  • Normal <leader>vh – fzf-lua help tags.
  • Oil buffer q / <Esc> – close the floating Oil window.

More

For the Git integration, type :Git <any-command> and explore by yourself. Refer to the mini.git docs eventually. The Golden Vim works best if you are used to manage Git via terminal (it also respects your git aliases) and GitHub via GitHub CLI

Further customization

Here are some utilities that were in The Golden Vim originally but were removed due to clean up purposes. They may be useful if you want to customize the configuration.

<summary>

Smart path shortening function for better visual displays.

<details>
F.path = (function()
  local FP = {}

  ---@class ShortenOpts
  ---@field keep_last integer?  -- how many last segments to keep unshortened (default 1)
  ---@field preserve_tilde boolean? -- keep leading "~" untouched (default true)
  ---@field preserve_dot_segments boolean? -- keep "." and ".." untouched (default true)

  ---@param path string
  ---@param opts ShortenOpts|nil
  ---@return string
  FP.shorten = function(path, opts)
    assert(type(path) == "string", "path must be a string")
    -- Add more validation here (opts)?

    opts = opts or {}
    local keep_last = opts.keep_last or 1
    local preserve_tilde = opts.preserve_tilde ~= false
    local preserve_dot_segments = opts.preserve_dot_segments ~= false

    if path == "" or path == "/" then
      return path
    end

    local is_abs = path:sub(1, 1) == "/"
    local has_trailing = path:sub(-1) == "/" and path ~= "/"

    local parts = {}
    for seg in path:gmatch "[^/]+" do
      table.insert(parts, seg)
    end
    local n = #parts
    if n == 0 then
      return is_abs and "/" or ""
    end

    local mapped = fun.iter(parts):enumerate():map(function(i, seg)
      if i > n - keep_last then
        return seg
      end

      if preserve_dot_segments and (seg == "." or seg == "..") then
        return seg
      end

      if preserve_tilde and i == 1 and seg == "~" then
        return seg
      end

      return seg:sub(1, 1)
    end)

    local joined = mapped:reduce(function(acc, seg)
      if acc == "" then
        return seg
      else
        return acc .. "/" .. seg
      end
    end, "")

    if is_abs then
      joined = "/" .. joined
    end
    if has_trailing then
      joined = joined .. "/"
    end
    return joined
  end

  return FP
end)()
</details> </summary>

Coming soon

  • Detailed technical decisions breakdown
  • More documentation (e.g. keymaps) and extended Further Customization section.

The MIT License.

More Projects

Explore other projects that might interest you

View all