diff --git a/vim/.vim/lua/config/zip.lua b/vim/.vim/lua/config/zip.lua new file mode 100644 index 0000000..ff8b482 --- /dev/null +++ b/vim/.vim/lua/config/zip.lua @@ -0,0 +1,6 @@ +vim.api.nvim_create_autocmd({ "BufReadCmd" }, { + pattern = "*.srcjar", + callback = function() + vim.api.nvim_command("call zip#Browse(expand(''))") + end, +}) diff --git a/vim/.vim/lua/plugin_init.lua b/vim/.vim/lua/plugin_init.lua index 3a1c67a..885d28d 100644 --- a/vim/.vim/lua/plugin_init.lua +++ b/vim/.vim/lua/plugin_init.lua @@ -14,3 +14,4 @@ package.path = package.path .. ";" .. vim.env.HOME .. "/.vim/lua/?.lua" require("lazy").setup("plugins") require("config.clipboard") +require("config.zip") diff --git a/vim/.vim/lua/plugins/whichkey.lua b/vim/.vim/lua/plugins/whichkey.lua index 201d69c..ba9dee8 100644 --- a/vim/.vim/lua/plugins/whichkey.lua +++ b/vim/.vim/lua/plugins/whichkey.lua @@ -7,14 +7,11 @@ return { end, config = function() require("which-key").setup({}) - -- local wk = require("which-key") - -- - -- wk.register({ [";"] = { ":" } }, { mode = "v" }) - -- wk.register({ [";"] = { ":" } }, { mode = "n" }) - -- - -- wk.register({ - -- ["%%"] = { '=fnameescape(expand("%:p:h")."/")', "Current File Directory" }, - -- }, { mode = "c" }) + local wk = require("which-key") + wk.register({ + ["%%"] = { '=fnameescape(expand("%:p:h")."/")', "Current File Directory" }, + ["%."] = { "%", "Current File" }, + }, { mode = "c" }) -- -- wk.register({ -- ["jk"] = { "" }, diff --git a/vim/.vim/prefs/mappings.vim b/vim/.vim/prefs/mappings.vim index e144e92..17035c7 100644 --- a/vim/.vim/prefs/mappings.vim +++ b/vim/.vim/prefs/mappings.vim @@ -12,8 +12,6 @@ map [D " remove mapping to be used in nerdtree inoremap -cnoremap %% =fnameescape(expand("%:p:h")."/") - " move vertically by visual line " nnoremap j gj " nnoremap k gk