mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-04 11:48:40 +00:00
chore(docs): update nvim keybindings
This commit is contained in:
23
scripts/create-nvim-keymaps.sh
Executable file
23
scripts/create-nvim-keymaps.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# Create file containing key mappings for Neovim
|
||||
# Usage: ./create-nvim-keymaps.sh
|
||||
|
||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
||||
source "$HOME/.dotfiles/config/exports"
|
||||
source "$HOME/.dotfiles/config/alias"
|
||||
source "$HOME/.dotfiles/config/functions"
|
||||
|
||||
DEST="$HOME/.dotfiles/docs/nvim-keybindings.md"
|
||||
|
||||
{
|
||||
printf "# nvim keybindings\n";
|
||||
printf "\n";
|
||||
printf "\`\`\`txt";
|
||||
} > "$DEST"
|
||||
|
||||
NVIM_APPNAME="nvim-kickstart" nvim -c "redir! >> $DEST" -c 'silent verbose map' -c 'redir END' -c 'q'
|
||||
|
||||
printf "\n\`\`\`\n\n- Generated on %s\n" "$(date)" >> "$DEST"
|
||||
|
||||
# Remove lines with "Last set from" from the file
|
||||
sed -e '/^ Last set from/d' "$DEST" > "$DEST.tmp" && mv "$DEST.tmp" "$DEST"
|
||||
Reference in New Issue
Block a user