mappings.lua: Code style fixes | Cleanup options.lua
This commit is contained in:
parent
fcfb814594
commit
bb04ba07cb
|
@ -27,15 +27,15 @@ vim.api.nvim_set_keymap("t", "jk", "<esc>", {})
|
||||||
map("v", "p", '"_dP', opt)
|
map("v", "p", '"_dP', opt)
|
||||||
|
|
||||||
-- OPEN TERMINALS --
|
-- OPEN TERMINALS --
|
||||||
map("n", "<C-l>", [[<Cmd> vnew +terminal | setlocal nobuflisted <CR>]], opt) -- term over right
|
map("n", "<C-l>", ":vnew +terminal | setlocal nobuflisted <CR>", opt) -- term over right
|
||||||
map("n", "<C-x>", [[<Cmd> 10new +terminal | setlocal nobuflisted <CR>]], opt) -- term bottom
|
map("n", "<C-x>", ":10new +terminal | setlocal nobuflisted <CR>", opt) -- term bottom
|
||||||
map("n", "<C-t>t", [[<Cmd> terminal <CR>]], opt) -- term buffer
|
map("n", "<C-t>t", ":<Cmd> terminal <CR>", opt) -- term buffer
|
||||||
|
|
||||||
-- copy whole file content
|
-- copy whole file content
|
||||||
map("n", "<C-a>", [[ <Cmd> %y+<CR>]], opt)
|
map("n", "<C-a>", ":%y+<CR>", opt)
|
||||||
|
|
||||||
-- toggle numbers
|
-- toggle numbers
|
||||||
map("n", "<leader>n", [[ <Cmd> set nu!<CR>]], opt)
|
map("n", "<leader>n", ":set nu!<CR>", opt)
|
||||||
|
|
||||||
-- Truezen.nvim
|
-- Truezen.nvim
|
||||||
map("n", "<leader>zz", ":TZAtaraxis<CR>", opt)
|
map("n", "<leader>zz", ":TZAtaraxis<CR>", opt)
|
||||||
|
@ -113,24 +113,24 @@ map("i", "<CR>", "v:lua.completions()", {expr = true})
|
||||||
map("n", "<C-n>", ":NvimTreeToggle<CR>", opt)
|
map("n", "<C-n>", ":NvimTreeToggle<CR>", opt)
|
||||||
|
|
||||||
-- format code
|
-- format code
|
||||||
map("n", "<Leader>fm", [[<Cmd> Neoformat<CR>]], opt)
|
map("n", "<Leader>fm", ":Neoformat<CR>", opt)
|
||||||
|
|
||||||
-- dashboard stuff
|
-- dashboard stuff
|
||||||
map("n", "<Leader>fw", [[<Cmd> Telescope live_grep<CR>]], opt)
|
map("n", "<Leader>db", ":Dashboard<CR>", opt)
|
||||||
map("n", "<Leader>db", [[<Cmd> Dashboard<CR>]], opt)
|
map("n", "<Leader>fn", ":DashboardNewFile<CR>", opt)
|
||||||
map("n", "<Leader>fn", [[<Cmd> DashboardNewFile<CR>]], opt)
|
map("n", "<Leader>bm", ":DashboardJumpMarks<CR>", opt)
|
||||||
map("n", "<Leader>bm", [[<Cmd> DashboardJumpMarks<CR>]], opt)
|
map("n", "<C-s>l", ":SessionLoad<CR>", opt)
|
||||||
map("n", "<C-s>l", [[<Cmd> SessionLoad<CR>]], opt)
|
map("n", "<C-s>s", ":SessionSave<CR>", opt)
|
||||||
map("n", "<C-s>s", [[<Cmd> SessionSave<CR>]], opt)
|
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
map("n", "<Leader>gt", [[<Cmd> Telescope git_status <CR>]], opt)
|
map("n", "<Leader>fw", ":Telescope live_grep<CR>", opt)
|
||||||
map("n", "<Leader>cm", [[<Cmd> Telescope git_commits <CR>]], opt)
|
map("n", "<Leader>gt", ":Telescope git_status <CR>", opt)
|
||||||
map("n", "<Leader>ff", [[<Cmd> Telescope find_files <CR>]], opt)
|
map("n", "<Leader>cm", ":Telescope git_commits <CR>", opt)
|
||||||
map("n", "<Leader>fp", [[<Cmd>lua require('telescope').extensions.media_files.media_files()<CR>]], opt)
|
map("n", "<Leader>ff", ":Telescope find_files <CR>", opt)
|
||||||
map("n", "<Leader>fb", [[<Cmd>Telescope buffers<CR>]], opt)
|
map("n", "<Leader>fp", ":lua require('telescope').extensions.media_files.media_files()<CR>", opt)
|
||||||
map("n", "<Leader>fh", [[<Cmd>Telescope help_tags<CR>]], opt)
|
map("n", "<Leader>fb", ":Telescope buffers<CR>", opt)
|
||||||
map("n", "<Leader>fo", [[<Cmd>Telescope oldfiles<CR>]], opt)
|
map("n", "<Leader>fh", ":Telescope help_tags<CR>", opt)
|
||||||
|
map("n", "<Leader>fo", ":Telescope oldfiles<CR>", opt)
|
||||||
|
|
||||||
-- bufferline tab stuff
|
-- bufferline tab stuff
|
||||||
map("n", "<S-t>", ":enew<CR>", opt) -- new buffer
|
map("n", "<S-t>", ":enew<CR>", opt) -- new buffer
|
||||||
|
@ -138,8 +138,8 @@ map("n", "<C-t>b", ":tabnew<CR>", opt) -- new tab
|
||||||
map("n", "<S-x>", ":bd!<CR>", opt) -- close tab
|
map("n", "<S-x>", ":bd!<CR>", opt) -- close tab
|
||||||
|
|
||||||
-- move between tabs
|
-- move between tabs
|
||||||
map("n", "<TAB>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
|
map("n", "<TAB>", ":BufferLineCycleNext<CR>", opt)
|
||||||
map("n", "<S-TAB>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)
|
map("n", "<S-TAB>", ":BufferLineCyclePrev<CR>", opt)
|
||||||
|
|
||||||
-- use ESC to turn off search highlighting
|
-- use ESC to turn off search highlighting
|
||||||
map("n", "<Esc>", ":noh<CR>", opt)
|
map("n", "<Esc>", ":noh<CR>", opt)
|
||||||
|
|
|
@ -71,9 +71,5 @@ for _, plugin in pairs(disabled_built_ins) do
|
||||||
vim.g["loaded_" .. plugin] = 1
|
vim.g["loaded_" .. plugin] = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
-- file extension specific tabbing
|
-- file extension specific tabbing
|
||||||
-- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]])
|
-- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]])
|
||||||
|
|
||||||
return M
|
|
||||||
|
|
Loading…
Reference in New Issue