A minimal Vim setup built entirely on Vim’s native features — no plugins, no plugin manager.
- Neovim-like dynamic cursor shapes
- Recursive file search with native tab completion
- Enhanced Netrw (vim-vinegar style navigation + auto
cdon quit)
- Add
.vimrcto your home directory
${HOME}/.vimrc- (Optional) Add the following to your
${HOME}/.bashrcto enable cd-on-quit behavior:
export VIM_LASTDIR_FILE="${HOME}/.vim_lastdir"
vim() {
command vim "$@"
if [[ -f "$VIM_LASTDIR_FILE" ]]; then
local last_dir=$(cat "$VIM_LASTDIR_FILE")
if [[ -d "$last_dir" ]]; then
cd "$last_dir"
fi
fi
}Different cursor shapes for each mode:
- Normal mode → Block cursor
- Insert mode → Vertical bar
- Replace mode → Underline
Works in most modern terminals that support cursor shape escape sequences.
Search files recursively from the current working directory:
:find filename
:find *partial*Press <Tab> to cycle through matches.
(Vim-vinegar style navigation + auto cd-on-quit)
Open the file explorer:
vim .<Enter>: Open a file or enter a directory-: Go to parent directory (vim-vinegar style)j,k: Move down/upgh: Toggle hidden files and directoriesgx: Open a file withxdg-open/: Search by name (n/<Shift+n>to navigate matches)!<command>: Run a custom shell command<Ctrl+l>: Refresh the directory listing
For additional commands, see the built-in Netrw help.
When quitting Vim from a Netrw buffer, your shell automatically switches to the last directory recorded during the session.
This allows Vim to function as a lightweight directory navigator, making it especially convenient when exploring projects directly from the terminal.