From bb04ba07cb36f8ee23212e0e8e04361056313431 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 23 Jul 2021 13:22:53 +0530 Subject: [PATCH] mappings.lua: Code style fixes | Cleanup options.lua --- lua/mappings.lua | 42 +++++++++++++++++++++--------------------- lua/options.lua | 4 ---- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index f5cb5ea0..0ff8a87d 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -27,15 +27,15 @@ vim.api.nvim_set_keymap("t", "jk", "", {}) map("v", "p", '"_dP', opt) -- OPEN TERMINALS -- -map("n", "", [[ vnew +terminal | setlocal nobuflisted ]], opt) -- term over right -map("n", "", [[ 10new +terminal | setlocal nobuflisted ]], opt) -- term bottom -map("n", "t", [[ terminal ]], opt) -- term buffer +map("n", "", ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right +map("n", "", ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom +map("n", "t", ": terminal ", opt) -- term buffer -- copy whole file content -map("n", "", [[ %y+]], opt) +map("n", "", ":%y+", opt) -- toggle numbers -map("n", "n", [[ set nu!]], opt) +map("n", "n", ":set nu!", opt) -- Truezen.nvim map("n", "zz", ":TZAtaraxis", opt) @@ -113,24 +113,24 @@ map("i", "", "v:lua.completions()", {expr = true}) map("n", "", ":NvimTreeToggle", opt) -- format code -map("n", "fm", [[ Neoformat]], opt) +map("n", "fm", ":Neoformat", opt) -- dashboard stuff -map("n", "fw", [[ Telescope live_grep]], opt) -map("n", "db", [[ Dashboard]], opt) -map("n", "fn", [[ DashboardNewFile]], opt) -map("n", "bm", [[ DashboardJumpMarks]], opt) -map("n", "l", [[ SessionLoad]], opt) -map("n", "s", [[ SessionSave]], opt) +map("n", "db", ":Dashboard", opt) +map("n", "fn", ":DashboardNewFile", opt) +map("n", "bm", ":DashboardJumpMarks", opt) +map("n", "l", ":SessionLoad", opt) +map("n", "s", ":SessionSave", opt) -- Telescope -map("n", "gt", [[ Telescope git_status ]], opt) -map("n", "cm", [[ Telescope git_commits ]], opt) -map("n", "ff", [[ Telescope find_files ]], opt) -map("n", "fp", [[lua require('telescope').extensions.media_files.media_files()]], opt) -map("n", "fb", [[Telescope buffers]], opt) -map("n", "fh", [[Telescope help_tags]], opt) -map("n", "fo", [[Telescope oldfiles]], opt) +map("n", "fw", ":Telescope live_grep", opt) +map("n", "gt", ":Telescope git_status ", opt) +map("n", "cm", ":Telescope git_commits ", opt) +map("n", "ff", ":Telescope find_files ", opt) +map("n", "fp", ":lua require('telescope').extensions.media_files.media_files()", opt) +map("n", "fb", ":Telescope buffers", opt) +map("n", "fh", ":Telescope help_tags", opt) +map("n", "fo", ":Telescope oldfiles", opt) -- bufferline tab stuff map("n", "", ":enew", opt) -- new buffer @@ -138,8 +138,8 @@ map("n", "b", ":tabnew", opt) -- new tab map("n", "", ":bd!", opt) -- close tab -- move between tabs -map("n", "", [[BufferLineCycleNext]], opt) -map("n", "", [[BufferLineCyclePrev]], opt) +map("n", "", ":BufferLineCycleNext", opt) +map("n", "", ":BufferLineCyclePrev", opt) -- use ESC to turn off search highlighting map("n", "", ":noh", opt) diff --git a/lua/options.lua b/lua/options.lua index 704a4e8a..cb62d38e 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -71,9 +71,5 @@ for _, plugin in pairs(disabled_built_ins) do vim.g["loaded_" .. plugin] = 1 end -local M = {} - -- file extension specific tabbing -- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) - -return M