mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
No commits in common. "696466469b4f9210db7e55b5dcb978629f3107ca" and "acb423984a2647e716d4fcfdc6c7496159493538" have entirely different histories.
696466469b
...
acb423984a
@ -43,7 +43,9 @@ vim.g.mapleader = ','
|
|||||||
vim.g.vimsyn_embed = 'l'
|
vim.g.vimsyn_embed = 'l'
|
||||||
|
|
||||||
-- Use English as main language
|
-- Use English as main language
|
||||||
vim.cmd [[language en_US.utf-8]]
|
if not vim.g.is_mac then
|
||||||
|
vim.cmd [[language en_US.utf-8]]
|
||||||
|
end
|
||||||
|
|
||||||
-- Disable loading certain plugins
|
-- Disable loading certain plugins
|
||||||
|
|
||||||
|
|||||||
@ -85,15 +85,16 @@ keymap.set("n", "<leader>ev", "<cmd>tabnew $MYVIMRC <bar> tcd %:h<cr>", {
|
|||||||
desc = "open init.lua",
|
desc = "open init.lua",
|
||||||
})
|
})
|
||||||
|
|
||||||
keymap.set("n", "<leader>sv", function()
|
keymap.set("n", "<leader>sv", "", {
|
||||||
vim.cmd([[
|
silent = true,
|
||||||
|
desc = "reload init.lua",
|
||||||
|
callback = function()
|
||||||
|
vim.cmd([[
|
||||||
update $MYVIMRC
|
update $MYVIMRC
|
||||||
source $MYVIMRC
|
source $MYVIMRC
|
||||||
]])
|
]])
|
||||||
vim.notify("Nvim config successfully reloaded!", vim.log.levels.INFO, { title = "nvim-config" })
|
vim.notify("Nvim config successfully reloaded!", vim.log.levels.INFO, { title = "nvim-config" })
|
||||||
end, {
|
end,
|
||||||
silent = true,
|
|
||||||
desc = "reload init.lua",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Reselect the text that has just been pasted, see also https://stackoverflow.com/a/4317090/6064933.
|
-- Reselect the text that has just been pasted, see also https://stackoverflow.com/a/4317090/6064933.
|
||||||
@ -172,23 +173,25 @@ keymap.set({ "x", "o" }, "iu", "<cmd>call text_obj#URL()<cr>", { desc = "URL tex
|
|||||||
keymap.set({ "x", "o" }, "iB", "<cmd>call text_obj#Buffer()<cr>", { desc = "buffer text object" })
|
keymap.set({ "x", "o" }, "iB", "<cmd>call text_obj#Buffer()<cr>", { desc = "buffer text object" })
|
||||||
|
|
||||||
-- Do not move my cursor when joining lines.
|
-- Do not move my cursor when joining lines.
|
||||||
keymap.set("n", "J", function()
|
keymap.set("n", "J", "", {
|
||||||
vim.cmd([[
|
desc = "join line",
|
||||||
|
callback = function()
|
||||||
|
vim.cmd([[
|
||||||
normal! mzJ`z
|
normal! mzJ`z
|
||||||
delmarks z
|
delmarks z
|
||||||
]])
|
]])
|
||||||
end, {
|
end,
|
||||||
desc = "join line",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
keymap.set("n", "gJ", function()
|
keymap.set("n", "gJ", "mzgJ`z", {
|
||||||
-- we must use `normal!`, otherwise it will trigger recursive mapping
|
desc = "join visual lines",
|
||||||
vim.cmd([[
|
callback = function()
|
||||||
|
-- we must use `normal!`, otherwise it will trigger recursive mapping
|
||||||
|
vim.cmd([[
|
||||||
normal! zmgJ`z
|
normal! zmgJ`z
|
||||||
delmarks z
|
delmarks z
|
||||||
]])
|
]])
|
||||||
end, {
|
end,
|
||||||
desc = "join visual lines",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Break inserted text into smaller undo units when we insert some punctuation chars.
|
-- Break inserted text into smaller undo units when we insert some punctuation chars.
|
||||||
|
|||||||
@ -75,7 +75,6 @@ set scrolloff=3
|
|||||||
" Use mouse to select and resize windows, etc.
|
" Use mouse to select and resize windows, etc.
|
||||||
set mouse=nic " Enable mouse in several mode
|
set mouse=nic " Enable mouse in several mode
|
||||||
set mousemodel=popup " Set the behaviour of mouse
|
set mousemodel=popup " Set the behaviour of mouse
|
||||||
set mousescroll=ver:1,hor:6
|
|
||||||
|
|
||||||
" Disable showing current mode on command line since statusline plugins can show it.
|
" Disable showing current mode on command line since statusline plugins can show it.
|
||||||
set noshowmode
|
set noshowmode
|
||||||
|
|||||||
@ -440,9 +440,3 @@ Postgres
|
|||||||
plpgsql
|
plpgsql
|
||||||
postgres
|
postgres
|
||||||
PySpark
|
PySpark
|
||||||
winbar
|
|
||||||
cmdline
|
|
||||||
shada
|
|
||||||
async
|
|
||||||
localhost
|
|
||||||
JetBrains
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user