Skip to content

Latest commit

 

History

308 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LTVIM (AKA lighting vim or let's vim)

A modern, out-of-the-box vim/neovim toolkit bundle for personal use, featuring neovim, vim, tmux, and terminal utilities configured for a daily-driver host.

License: MIT

What's Included

Core Tools

  • Neovim - modern editor with Lua configuration
  • Vim - classic editor with a base configuration
  • Tmux - terminal multiplexer with optimized settings
  • Ghostty - fast terminal emulator configuration
  • Zoxide - smarter cd (mapped to j)
  • n - Node.js version manager
  • uv - fast Python package installer
  • Ripgrep / FD - fast search and find

Shell Environment

  • One shared ~/.ltenv, sourced from your bash/zsh rc files
  • Homebrew / Node / Go mirrors tuned for China (USTC, goproxy.cn, aliyun)
  • wt helper (git worktree + tmux) with shell integration

Quick Start

Clone and run the single entry point; it detects the platform (macOS or Ubuntu/Debian) and runs the matching installer. With no arguments it shows an interactive menu.

git clone https://github.com/yourusername/ltvim.git
cd ltvim

./setup.sh                        # detect platform, interactive menu
./setup.sh --all -y               # full, non-interactive system setup
./setup.sh --all --editor nvim    # system setup + neovim config

Run ./setup.sh --help for the full option list.

setup.sh targets a daily-driver desktop host. If the host looks like a server (no graphical session), it asks for confirmation before continuing; server hosts should use their own provisioning/ops script.

Platform scripts (manual)

./scripts/macos_setup.sh --help    # macOS host setup
./scripts/ubuntu_setup.sh --help   # Ubuntu/Debian host setup
./scripts/setup_vim.sh nvim        # editor config: vim | nvim

Installation Options

System setup

./setup.sh                     # interactive menu (recommended)
./setup.sh --core -y           # essential tools only
./setup.sh --golang            # + Go
./setup.sh --docker            # + Docker            [Ubuntu]
./setup.sh --tailscale         # + Tailscale         [Ubuntu]
./setup.sh --ssh-harden        # + SSH hardening     [Ubuntu]
./setup.sh --ghostty --zed     # + GUI apps          [macOS]
./setup.sh --all -y            # everything

Golang

  • Installed via Homebrew; GOPATH=$HOME/go
  • GOPROXY=goproxy.cn,goproxy.io,direct, GOSUMDB=sum.golang.google.cn

Docker (Ubuntu)

  • Installed via get.docker.com with the USTC mirror
  • /etc/docker/daemon.json sets a registry mirror; the user is added to the docker group (re-login required)

Editor configuration

scripts/setup_vim.sh installs the vim or neovim configuration by symlinking the repo into $HOME (existing config is backed up first):

./scripts/setup_vim.sh             # interactive: choose vim or nvim
./scripts/setup_vim.sh nvim -y     # non-interactive

Directory Structure

ltvim/
├── setup.sh             # Single entry point (auto-detects platform)
├── scripts/
│   ├── lib/common.sh    # Shared helpers (logging, prompts, install steps)
│   ├── macos_setup.sh   # macOS system setup
│   ├── ubuntu_setup.sh  # Ubuntu/Debian system setup
│   └── setup_vim.sh     # Editor (vim/nvim) configuration installer
├── nvim/                # Neovim configuration
├── vim/                 # Vim configuration
├── tmux/                # Tmux configuration
├── ghostty/             # Ghostty terminal configuration
└── docs/                # Installation guide + changelog

The shared shell environment lives in scripts/ltenv/env and is deployed to ~/.ltenv by the setup scripts.

Configuration Details

Neovim

  • LazyVim-based setup
  • LSP support for multiple languages
  • Tree-sitter syntax highlighting
  • Telescope fuzzy finding
  • Multiple themes

Tmux

  • Prefix key: Ctrl+Space (instead of Ctrl+B)
  • Mouse support, and vi mode for copy/paste
  • Status bar with a custom theme
  • TPM (Tmux Plugin Manager) cloned on setup

After setup, open tmux and press prefix + I once to install the declared plugins.

Shell Environment (~/.ltenv)

  • Zoxide integration (j) for directory jumping
  • Node.js LTS via n
  • Python packages via uv
  • Go environment with China mirrors
  • wt shell integration for git worktrees

Customization

Adding Neovim Plugins

Add plugins under nvim/lua/plugins/:

return {
  "plugin-name/plugin-repo",
  config = function()
    -- plugin configuration
  end,
}

Shell Environment

Edit scripts/ltenv/env, then re-run any setup target (or copy it to ~/.ltenv). It controls PATH additions, tool environment variables, aliases, and the tmuxa helper.

Troubleshooting

Docker permission

After installing Docker, log out and back in, or:

sudo usermod -aG docker "$USER"
newgrp docker

Missing tools

Re-run the setup; every step is idempotent:

./setup.sh

Fonts

After installing Hack Nerd Font, refresh the cache and restart your terminal:

fc-cache -fv

Documentation

Contributing

Contributions are welcome! Please open an issue or pull request.

License

MIT License - see LICENSE for details.

About

a customized vim and a set of script for setting up my dev env

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages