backup
This commit is contained in:
parent
d17ee40a70
commit
e2f456d3cd
4 changed files with 57 additions and 5 deletions
29
ginit.vim
Normal file
29
ginit.vim
Normal file
|
@ -0,0 +1,29 @@
|
|||
" Enable Mouse
|
||||
set mouse=a
|
||||
|
||||
" Set Editor Font
|
||||
if exists(':GuiFont')
|
||||
" Use GuiFont! to ignore font errors
|
||||
GuiFont {font_name}:h{size}
|
||||
endif
|
||||
|
||||
" Disable GUI Tabline
|
||||
if exists(':GuiTabline')
|
||||
GuiTabline 0
|
||||
endif
|
||||
|
||||
" Disable GUI Popupmenu
|
||||
if exists(':GuiPopupmenu')
|
||||
GuiPopupmenu 0
|
||||
endif
|
||||
|
||||
" Enable GUI ScrollBar
|
||||
if exists(':GuiScrollBar')
|
||||
GuiScrollBar 1
|
||||
endif
|
||||
|
||||
" Right Click Context Menu (Copy-Cut-Paste)
|
||||
nnoremap <silent><RightMouse> :call GuiShowContextMenu()<CR>
|
||||
inoremap <silent><RightMouse> <Esc>:call GuiShowContextMenu()<CR>
|
||||
xnoremap <silent><RightMouse> :call GuiShowContextMenu()<CR>gv
|
||||
snoremap <silent><RightMouse> <C-G>:call GuiShowContextMenu()<CR>gv
|
|
@ -18,13 +18,29 @@ vim.api.nvim_create_autocmd({"User"}, {
|
|||
if data.data == "gitsigns.nvim" then
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
map("n", "[h", gs.prev_hunk)
|
||||
map("n", "]h", gs.next_hunk)
|
||||
map("n", "<leader>gd", gs.preview_hunk)
|
||||
map("n", "<leader>gu", gs.reset_hunk)
|
||||
map("n", "[h", gs.prev_hunk, { desc = "Next Hunk" })
|
||||
map("n", "]h", gs.next_hunk, { desc = "Previous Hunk"})
|
||||
map("n", "<leader>gd", gs.preview_hunk, { desc = "Diff Hunk"})
|
||||
map("n", "<leader>gu", gs.reset_hunk, { desc = "Undo Hunk"})
|
||||
|
||||
elseif data.data == "nvim-spectre" then
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
map('n', '<leader>S', '<cmd>lua require("spectre").toggle()<CR>', {
|
||||
desc = "Toggle Spectre"
|
||||
})
|
||||
map('n', '<leader>sw', '<cmd>lua require("spectre").open_visual({select_word=true})<CR>', {
|
||||
desc = "Search current word"
|
||||
})
|
||||
map('v', '<leader>sw', '<esc><cmd>lua require("spectre").open_visual()<CR>', {
|
||||
desc = "Search current word"
|
||||
})
|
||||
map('n', '<leader>sp', '<cmd>lua require("spectre").open_file_search({select_word=true})<CR>', {
|
||||
desc = "Search on current file"
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "nvchad.options"
|
||||
|
||||
vim.opt.foldmethod = "marker"
|
||||
vim.opt.foldmethod = "manual"
|
||||
vim.opt.colorcolumn = "81"
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
return {
|
||||
{
|
||||
"nvim-pack/nvim-spectre",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"folke/trouble.nvim"
|
||||
},
|
||||
},
|
||||
{
|
||||
"kdheepak/lazygit.nvim",
|
||||
cmd = {
|
||||
|
|
Loading…
Reference in a new issue