Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/erickm13/Salchipapa.Dots/llms.txt

Use this file to discover all available pages before exploring further.

Custom keymaps are defined in lua/config/keymaps.lua and loaded automatically on the VeryLazy event. They supplement the LazyVim defaults and cover plugin-specific bindings for tmux navigation, Obsidian, oil.nvim, visual grep, buffer management, and discipline training. The cowboy discipline module is also activated from this file.

General keymaps

KeyModeDescription
<C-b>InsertDelete to end of word without leaving insert mode (<C-o>de)
<C-c>Insert / Normal / VisualEscape to normal mode
<C-s>NormalSave file via the custom SaveFile() function
<leader>ukNormalToggle Screenkey overlay
<leader>bqNormalDelete all buffers except the current one
<leader>mdNormalDelete all marks (delmarks! + delmarks A-Z0-9)

Tmux navigation

Navigation between Neovim splits and tmux panes is handled by nvim-tmux-navigation. All bindings are in Normal mode.
KeyDirection
<C-h>Left pane
<C-j>Down pane
<C-k>Up pane
<C-l>Right pane
<C-\>Last active pane
<C-Space>Next pane

Obsidian

All Obsidian keymaps are Normal mode and use the <leader>o prefix.
KeyDescription
<leader>ocCheck / cycle checkbox state
<leader>otInsert template
<leader>ooOpen current note in the Obsidian app
<leader>obShow backlinks
<leader>olShow links
<leader>onCreate a new note
<leader>osSearch the vault
<leader>oqQuick switch (fuzzy-find a note by title)
These commands map directly to :Obsidian <subcommand>. The Obsidian plugin only loads when ~/.config/obsidian exists as a directory.

oil.nvim

KeyModeDescription
-NormalOpen parent directory in oil
<leader>ENormalOpen oil in a floating window
<leader>-NormalOpen oil in the current file’s directory

Grep on selection

Both bindings are Visual mode and work on single-line or multi-line selections. Special regex characters in the selection are automatically escaped. The picker used is snacks (preferred) with fzf-lua as a fallback.
KeyModeDescription
<leader>sgVisualGrep selected text in the current working directory
<leader>sGVisualGrep selected text from the git root (falls back to cwd)

Disabled mappings

The following key combinations are explicitly set to <Nop> (no operation) to prevent accidental use:
KeyModes
<A-j>Normal, Insert, Visual
<A-k>Normal, Insert, Visual
JVisual
KVisual

Cowboy discipline mode

The discipline.cowboy() function is called at the top of keymaps.lua. It remaps the motion keys h, j, k, l, +, and - in Normal mode so that pressing any of them 10 or more times in a 2-second window triggers a warning:
function M.cowboy()
  local ok = true
  for _, key in ipairs({ "h", "j", "k", "l", "+", "-" }) do
    local count = 0
    local timer = assert(vim.uv.new_timer())
    local map = key
    vim.keymap.set("n", key, function()
      if vim.v.count > 0 then
        count = 0
      end
      if count >= 10 and vim.bo.buftype ~= "nofile" then
        ok = pcall(vim.notify, "Hold it Cowboy!", vim.log.levels.WARN, {
          icon = "🤠",
          id = "cowboy",
          keep = function()
            return count >= 10
          end,
        })
        if not ok then
          return map
        end
      else
        count = count + 1
        timer:start(2000, 0, function()
          count = 0
        end)
        return map
      end
    end, { expr = true, silent = true })
  end
end
The warning “Hold it Cowboy! 🤠” stays visible until the count drops below 10. Using a numeric prefix (e.g., 10j) resets the counter and bypasses the warning, encouraging the use of count-prefixed motions instead of repeated single-key presses. The discipline check is skipped when vim.bo.buftype == "nofile" (special buffers such as the lazy.nvim UI, oil, etc.).

SaveFile function

<C-s> calls a global Lua function defined in keymaps.lua instead of the bare :write command. It checks that a named file buffer is actually open before saving, and shows a custom notification rather than Neovim’s default write message:
function SaveFile()
  -- Check if a buffer with a file is open
  if vim.fn.empty(vim.fn.expand("%:t")) == 1 then
    vim.notify("No file to save", vim.log.levels.WARN)
    return
  end

  local filename = vim.fn.expand("%:t") -- Get only the filename
  local success, err = pcall(function()
    vim.cmd("silent! write") -- Try to save without showing the default message
  end)

  if success then
    vim.notify(filename .. " Saved!")
  else
    vim.notify("Error: " .. err, vim.log.levels.ERROR)
  end
end
  • If no file is associated with the buffer, a WARN notification fires and the save is skipped.
  • On success, a notification shows "<filename> Saved!".
  • On failure, the error message is surfaced as an ERROR notification.

Build docs developers (and LLMs) love