Skip to content

Commit

Permalink
Netrw toggle and <leader>cd to change working dir to the currently op…
Browse files Browse the repository at this point in the history
…en file.
  • Loading branch information
kglundgren committed Oct 18, 2024
1 parent bd97cd4 commit 7f2a4c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ map('t', '<A-l>', [[<C-\><C-n><C-w>l]], map_opts)
map('t', '<C-q>', [[<C-\><C-n>:q<CR>]], map_opts)

-- netrw
-- Toggle left-side netrw with <leader>e.
map('n', '<leader>e', ':Lexplore<CR>', map_opts)

-- Change working directory to that of the current file.
map('n', '<leader>cd', ':cd %:p:h<CR>', map_opts)

-- fzf
vim.keymap.set('n', '<C-p>', require('fzf-lua').files, { desc = 'Fzf Files'})
vim.keymap.set('n', '<C-f>', require('fzf-lua').live_grep, { desc = 'Fzf Grep'})
Expand Down

0 comments on commit 7f2a4c4

Please sign in to comment.