diff --git a/.vim/templates/md b/.vim/templates/md index ba0e242..0d35297 100644 --- a/.vim/templates/md +++ b/.vim/templates/md @@ -1,9 +1,8 @@ :insert -# title +# filename - Created : - Updated : --- - diff --git a/.vim/templates/readinglist b/.vim/templates/readinglist index 4fe37f6..db9f4cb 100644 --- a/.vim/templates/readinglist +++ b/.vim/templates/readinglist @@ -1,8 +1,8 @@ :insert -* *Title*: -* *Author*: -* *Started*: -* *Finished*: +* *Title*: +* *Author*: +* *Started*: +* *Finished*: * [Goodreads Link]() # Highlights / Notes diff --git a/.vimrc b/.vimrc index 25d0c8d..59ff468 100644 --- a/.vimrc +++ b/.vimrc @@ -99,13 +99,18 @@ Plug 'junegunn/fzf.vim' " Fugitive is the premier Vim plugin for Git. Or maybe it's the premier Git plugin for Vim? Either way, " it's so awesome, it should be illegal. That's why it's called Fugitive -" https://github.com/tpope/vim-fugitivefugitive.vim for git +" https://github.com/tpope/vim-fugitive Plug 'tpope/vim-fugitive' " ALE displays warnings and errors in files being edited before being saved back to the filesystem " https://github.com/dense-analysis/ale "Plug 'dense-analysis/ale' +" Vim surround +" I tried to do this from scratch, but it seems this is the best alternative +" https://github.com/tpope/vim-surround +Plug 'tpope/vim-surround' + " Vim Markdown " Suggestions from [Writing Markdown in Vim](https://codeinthehole.com/tips/writing-markdown-in-vim/) " [Vim Markdown](https://github.com/preservim/vim-markdown) @@ -269,13 +274,13 @@ imap =strftime("%H:%M") " ==> Keymaps: Autoclosing " Autoclose brackets, parens...etc " from: https://stackoverflow.com/a/34992101 -inoremap " "" -inoremap ' '' -inoremap ( () -inoremap [ [] -inoremap { {} -inoremap { {}O -inoremap {; {};O +"inoremap " "" +"inoremap ' '' +"inoremap ( () +"inoremap [ [] +"inoremap { {} +"inoremap { {}O +"inoremap {; {};O " --------------------------------------------------------------------------------------------------------------------- " --------------------------------------------------------------------------------------------------------------------- @@ -323,7 +328,7 @@ hi SpellCap cterm=underline ctermbg=black ctermfg=red " ==> Templates: markdown documents (.md) autocmd BufNewFile *.md so $HOME/.vim/templates/md -autocmd BufNewFile *.md %s/title/\=expand('%:t:r')/g +autocmd BufNewFile *.md %s/filename/\=expand('%:t:r')/g autocmd BufNewFile *.md exe "g/^- Created :.*/s//- Created : " .strftime("%Y-%m-%d") autocmd BufNewFile *.md exe "normal Go" autocmd BufWritePre,filewritepre *.md execute "normal ma" @@ -358,7 +363,7 @@ nnoremap ,begend :-1read $HOME/.vim/templates/begendjA nnoremap ,rl :0read $HOME/.vim/templates/readinglist :1dd $ " section markdown file header -nnoremap ,md :0read $HOME/.vim/templates/md :1dd :%s/title/\=expand('%:t:r')/g +nnoremap ,md :0read $HOME/.vim/templates/md :1dd :%s/filename/\=expand('%:t:r')/g " --------------------------------------------------------------------------------------------------------------------- " ==> NetrwTreeListing readonly fix (https://vi.stackexchange.com/a/13012) @@ -373,12 +378,4 @@ autocmd FileType netrw setl bufhidden=delete "autocmd BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml "autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab -" --------------------------------------------------------------------------------------------------------------------- -" ==> VimWiki -" Use MarkDown -" Default directory -"let g:vimwiki_list = [{'path': '$HOME/repos/thevimwiki/', 'syntax': 'markdown', 'ext': '.md'}] -"let g:vimwiki_global_ext = 0 -"let g:vimwiki_autowriteall = 1 -"au FileType vimwiki setlocal shiftwidth=6 tabstop=6 noexpandtab