mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-09-10 19:56:24 +00:00
Egrepify and some keybindings
This commit is contained in:
@@ -118,3 +118,12 @@ vim.api.nvim_create_autocmd('User', {
|
||||
deps_job:start()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'NeogitBranchCheckout',
|
||||
group = group,
|
||||
callback = function ()
|
||||
deps_job:and_then(compile_job)
|
||||
deps_job:start()
|
||||
end,
|
||||
})
|
||||
|
@@ -40,6 +40,12 @@ nnoremap('<leader>tk', '<C-w>t<C-w>K')
|
||||
|
||||
-- Keybindings below this are neovim cli only
|
||||
if vim.g.vscode then
|
||||
-- Toggle Comment
|
||||
vim.keymap.set('x', 'gc', '<Plug>VSCodeCommentary', {})
|
||||
vim.keymap.set('n', 'gc', '<Plug>VSCodeCommentary', {})
|
||||
vim.keymap.set('o', 'gc', '<Plug>VSCodeCommentary', {})
|
||||
vim.keymap.set('n', 'gcc', '<Plug>VSCodeCommentaryLine', {})
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
@@ -65,6 +71,16 @@ nnoremap('<S-TAB>', ':bprevious<CR>')
|
||||
nnoremap('[q', ':cprev<CR>')
|
||||
nnoremap(']q', ':cnext<CR>')
|
||||
|
||||
-- no arrow keys
|
||||
nnoremap("<up>", "<nop>")
|
||||
nnoremap("<down>", "<nop>")
|
||||
nnoremap("<left>", "<nop>")
|
||||
nnoremap("<right>", "<nop>")
|
||||
|
||||
inoremap("<up>", "<nop>")
|
||||
inoremap("<down>", "<nop>")
|
||||
inoremap("<left>", "<nop>")
|
||||
inoremap("<right>", "<nop>")
|
||||
|
||||
-- Tagbar
|
||||
nnoremap('<Leader>hl', ':nohl<CR>')
|
||||
|
@@ -7,7 +7,8 @@ local nnoremap = Remap.nnoremap
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
nnoremap("<leader>gg", function()
|
||||
builtin.live_grep()
|
||||
-- builtin.live_grep()
|
||||
require "telescope".extensions.egrepify.egrepify { sorting_strategy = 'ascending' }
|
||||
end)
|
||||
nnoremap("<C-p>", function()
|
||||
builtin.commands()
|
||||
|
Reference in New Issue
Block a user