From 2b483acf565db921e784c2a2a28a6288be3e2d90 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Sat, 23 Dec 2023 20:14:12 -0700 Subject: [PATCH] Update: pretty comments in vim --- vim/.vim/init_scripts/key_mappings.vim | 11 +++++++---- vim/.vim/plugin/pretty_section_comment.vim | 7 +++++++ vim/.vim/plugin/statusbars/statusline.vim | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/vim/.vim/init_scripts/key_mappings.vim b/vim/.vim/init_scripts/key_mappings.vim index 37f940b..725a671 100644 --- a/vim/.vim/init_scripts/key_mappings.vim +++ b/vim/.vim/init_scripts/key_mappings.vim @@ -123,6 +123,9 @@ nnoremap = :vertical resize 84 " Show full file path nnoremap 1 + " Change cwd to current buffer's +nnoremap gf :cd %:p:h + " Editing remaps ======================================== " Uppercase previous word from Insert mode inoremap vbU`>a @@ -156,11 +159,11 @@ nnoremap ourl :silent call OpenURL() command! Url :silent call OpenURL() " Create a pretty block comment. Supports 3 types of comments -nnoremap opretty :call PrettySectionComment() -command! Pretty :call PrettySectionComment('#') -command! Prettyc :call PrettySectionComment('/*') +command! Prettypy :call PrettySectionComment('#') +command! Prettyhtml :call PrettySectionComment("") elseif a:type ==# '//' call append(line(".") - 1, \ "//╔────────────────────────────────────────────────────────────────────────────╗") @@ -41,6 +46,8 @@ function! PrettySectionComment(type) " Paste back in commented text if a:type ==# '/*' exe "normal! 0i│ \\"\" + elseif a:type ==# "