Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golden.vim.4k.mp4

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

Banner

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,oil.nvim-like keybindings for Mini.files filesystem 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.

Quality of life improvements

  • Helix-style edits: yank once (yiw), then mutate freely—dw/ciw/x default to "_ and visual p pastes without polluting the yank; explicit registers like "adw still capture text. Disabled for special buffers (help, prompt, terminal, grug-far) and can be turned off per-buffer with vim.b.blackhole_disable = true.
  • Reliable MacOS system theme detection (dark, light) with adjusting the current Vim colors basing on built-in themes - peachpuff for light and murphy for dark. Including TextMate ports of these themes for bat (see github.com/neg4n/murphy.tmTheme and github.com/neg4n/peachpuff.tmTheme), made exclusively for The Golden Vim
  • Easy copy of particular LSP/Linter diagnostics inside fzf-lua diagnostics window. Very useful for pointing external AI Agents (like OpenAI Codex) to a specific problems.

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

Important

It is strongly encouraged to back up your previous configuration to avoid data loss. If ~/.config/nvim/ is empty directory - you're safe to clone. Otherwise - do a backup.

Other prerequisities before running

Note

The version numbers near the packages do not mean that exactly one particular version is required. The Golden Vim was developed using the mentioned software with these versions and is guaranteed to work there properly. It is extremely likely it will work on other versions as well (depends on the semantic or any local versioning system).

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 ports of murphy and peachpuff themes for bat (previews) can be found on the murphy.tmTheme and peachpuff.tmTheme repositories.

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.

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)()

Coming soon

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

License

The MIT License.

About

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

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Contributors

Languages