From 780d2bca89b769bc6a1b8d3dbe22a6bb4616f733 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 15 Aug 2024 20:56:51 +0800 Subject: Update --- snippets/html_script | 1 + snippets/html_template_map_leaderline | 135 ++++++++++++++++++++++++++++++++++ vim/init/config.vim | 2 +- vim/init/keymaps.vim | 6 +- vim/mini.lua | 102 ++++++++++++------------- 5 files changed, 191 insertions(+), 55 deletions(-) create mode 100644 snippets/html_script create mode 100644 snippets/html_template_map_leaderline diff --git a/snippets/html_script b/snippets/html_script new file mode 100644 index 0000000..f975727 --- /dev/null +++ b/snippets/html_script @@ -0,0 +1 @@ + diff --git a/snippets/html_template_map_leaderline b/snippets/html_template_map_leaderline new file mode 100644 index 0000000..afcec6d --- /dev/null +++ b/snippets/html_template_map_leaderline @@ -0,0 +1,135 @@ + + + + + + Leader Line with Markdown + + + + + + + + + + + + + +
+
+
# Some Markdown rendered Content
+[Place 1]
+
+## Title 2
+
+- item
+- subitem
+- subusb
+
+Text before link [Place 2]
+![](https://i.ibb.co/3N65X9n/2021-05-27-6-21-48.png)
+
+[Place 1]: geo:12.55,55.66
+[Place 2]: geo:13,55.8
+  
+ + + + + diff --git a/vim/init/config.vim b/vim/init/config.vim index de7ee22..74cbd39 100644 --- a/vim/init/config.vim +++ b/vim/init/config.vim @@ -24,7 +24,7 @@ augroup TerminalSize endif endfunc autocmd VimEnter,VimResized * silent call LayoutForSmallTerminal(20) - autocmd VimLeave * if g:alacritty_extra_padding | call ToggleWinPadding() | endif + autocmd VimLeave,VimSuspend * if g:alacritty_extra_padding | silent call ToggleWinPadding(100) | endif augroup END " }}} diff --git a/vim/init/keymaps.vim b/vim/init/keymaps.vim index a6f75e5..c0af8c8 100644 --- a/vim/init/keymaps.vim +++ b/vim/init/keymaps.vim @@ -756,9 +756,9 @@ nnoremap rtp :Redir echo &rtp:s/,/\r/g let g:tig_explorer_keymap_commit_split = '' let g:tig_explorer_keymap_commit_vsplit = '' -nnoremap Tig -nnoremap s TigStatus -nnoremap b TigBlame +nnoremap silent! Tig +nnoremap s silent! TigStatus +nnoremap b silent! TigBlame " }}} " Tmp: Common system command {{{ diff --git a/vim/mini.lua b/vim/mini.lua index 6f7ba57..92f9efe 100644 --- a/vim/mini.lua +++ b/vim/mini.lua @@ -983,24 +983,24 @@ require("lazy").setup({ end, }, -- }}} - -- markview.nvim {{{ - { - "OXY2DEV/markview.nvim", - lazy = false, - ft = "markdown", - - dependencies = { - -- You may not need this if you don't lazy load - -- Or if the parsers are in your $RUNTIMEPATH - "nvim-treesitter/nvim-treesitter", - - "nvim-tree/nvim-web-devicons" - }, - config = function() - vim.keymap.set('n', '\\m', ":Markview", { buffer = bufnr, desc = '' }) - end - }, - -- }}} + -- -- markview.nvim {{{ + -- { + -- "OXY2DEV/markview.nvim", + -- lazy = false, + -- ft = "markdown", + -- + -- dependencies = { + -- -- You may not need this if you don't lazy load + -- -- Or if the parsers are in your $RUNTIMEPATH + -- "nvim-treesitter/nvim-treesitter", + -- + -- "nvim-tree/nvim-web-devicons" + -- }, + -- config = function() + -- vim.keymap.set('n', '\\m', ":Markview", { buffer = bufnr, desc = '' }) + -- end + -- }, + -- -- }}} -- lspconfig {{{ -- Use :help lspconfig-all to check servers @@ -1412,39 +1412,39 @@ require("lazy").setup({ }, -- }}} - -- lspsaga {{{ - { - 'nvimdev/lspsaga.nvim', - dependencies = { - 'nvim-treesitter/nvim-treesitter', -- optional - 'nvim-tree/nvim-web-devicons', -- optional - }, - config = function() - require('lspsaga').setup({ - autochdir = true, - }) - vim.api.nvim_create_autocmd("LspAttach", { - group = custom_autocommands, - pattern = "*", - callback = function(args) - local map = vim.api.nvim_buf_set_keymap - map(0, "n", "gd", "Lspsaga goto_definition", { silent = true, noremap = true }) - map(0, "n", "gR", "Lspsaga rename", { silent = true, noremap = true }) - map(0, "n", "gx", "Lspsaga code_action", { silent = true, noremap = true }) - map(0, "x", "gx", ":Lspsaga range_code_action", { silent = true, noremap = true }) - map(0, "n", "K", "Lspsaga hover_doc", { silent = true, noremap = true }) - map(0, "n", "go", "Lspsaga show_line_diagnostics", { silent = true, noremap = true }) - map(0, "n", "gj", "Lspsaga diagnostic_jump_next", { silent = true, noremap = true }) - map(0, "n", "gk", "Lspsaga diagnostic_jump_prev", { silent = true, noremap = true }) - - -- Don't know why... Everytime when modeline is set and insert a single char - -- while inside a fold, the fold closes. - vim.opt_local.modeline = false - end, - }) - end - }, - -- }}} + -- -- lspsaga {{{ + -- { + -- 'nvimdev/lspsaga.nvim', + -- dependencies = { + -- 'nvim-treesitter/nvim-treesitter', -- optional + -- 'nvim-tree/nvim-web-devicons', -- optional + -- }, + -- config = function() + -- require('lspsaga').setup({ + -- autochdir = true, + -- }) + -- vim.api.nvim_create_autocmd("LspAttach", { + -- group = custom_autocommands, + -- pattern = "*", + -- callback = function(args) + -- local map = vim.api.nvim_buf_set_keymap + -- map(0, "n", "gd", "Lspsaga goto_definition", { silent = true, noremap = true }) + -- map(0, "n", "gR", "Lspsaga rename", { silent = true, noremap = true }) + -- map(0, "n", "gx", "Lspsaga code_action", { silent = true, noremap = true }) + -- map(0, "x", "gx", ":Lspsaga range_code_action", { silent = true, noremap = true }) + -- map(0, "n", "K", "Lspsaga hover_doc", { silent = true, noremap = true }) + -- map(0, "n", "go", "Lspsaga show_line_diagnostics", { silent = true, noremap = true }) + -- map(0, "n", "gj", "Lspsaga diagnostic_jump_next", { silent = true, noremap = true }) + -- map(0, "n", "gk", "Lspsaga diagnostic_jump_prev", { silent = true, noremap = true }) + -- + -- -- Don't know why... Everytime when modeline is set and insert a single char + -- -- while inside a fold, the fold closes. + -- vim.opt_local.modeline = false + -- end, + -- }) + -- end + -- }, + -- -- }}} -- -- conform {{{ -- { -- "stevearc/conform.nvim", -- cgit v1.2.3-70-g09d2