Skip to content

Commit

Permalink
Add keybinding to open rails routes | fzf in a tmux split
Browse files Browse the repository at this point in the history
Quicker searching of Rails routes.
  • Loading branch information
jordelver committed Sep 8, 2023
1 parent 4e8cec9 commit 8c5fa8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/nvim/lua/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ vim.keymap.set('', '<leader>gb', '<cmd>Git blame<cr>', { noremap = true })
-- Open a Rails console in a tmux split
vim.keymap.set('n', '<leader>rc', ":silent !tmux split-window 'bin/rails c'<cr>", { silent = true, desc = 'Open a Rails console' })

-- Open fuzzily searchable Rails routes in a tmux split
vim.keymap.set('n', '<leader>rr', ":silent !tmux split-window 'bin/rails routes | fzf'<cr>", { silent = true, desc = 'Search `rails routes`' })

-- Toggle spellcheck
vim.keymap.set('n', '<leader>s', ':set spell!<cr>', { desc = 'Toggle spellcheck' })

Expand Down

0 comments on commit 8c5fa8c

Please sign in to comment.