local map = vim.keymap.set options = { noremap = true } -- FILE NAVIGATION local builtin = require('telescope.builtin') map('n', 'f', builtin.find_files, options) map('n', 'af', builtin.git_files, options) -- Grep project file contents with live results, respecting .gitignore map('n', 'g', builtin.live_grep, options) -- Telescope fuzzy search for buffers map('n', 'b', builtin.buffers, options) map('n', 'ga', '', options) -- ga to switch to last used buffer -- Quick Fix Lists -- global -- using control map('n', '', 'cnextzz', options) -- Go to next item in global qfixlist map('n', '', 'cprevzz', options) -- Go to previous item in global qfixlist -- Toggle the window if there are items in the qfixlist; allow recursive map('n', 'Q', 'call ToggleQFList(1)', {}) -- see plugin/navigation.vim for ToggleQFList definition -- local -- using leader map('n', 'j', 'lnextzz', options) -- Go to next item in local qfixlist map('n', 'k', 'lprevzz', options) -- Go to previous item in global qfixlist -- Toggle the window if there are items in the qfixlist; allow recursive map('n', 'q', 'call ToggleQFList(0)', {}) -- see plugin/navigation.vim for ToggleQFList definition -- GIT -- top level commands map('n', 'gs', 'keepalt Git', options) -- Show git status map('n', 'gc', 'G commit -v', options) -- git commit map('n', 'gp', 'G push', {}) -- git push map('n', 'gd', 'G diff', options) map('n', 'gds', 'G diff --staged', options) -- staging map('n', 'dp', 'diffput', options) -- merge map('n', 'gh', 'diffget //2', options) -- merge from left pane map('n', 'gl', 'diffget //3', options) -- merge from right pane