nvim: shortcut for toc / tf fmt

This commit is contained in:
Jason Swank 2025-01-15 21:13:09 +00:00
parent 3970628dac
commit 167d94e98c
No known key found for this signature in database

View File

@ -37,8 +37,11 @@ let g:UltiSnipsListSnippets="<c-l>"
" typing idate inserts the current date
iab idate <c-r>=strftime("%Y-%m-%d")<cr>
" use Ctrl-M to insert a table of contents for markdown from the current line to EOF
noremap <c-m> <cmd>.put =execute('.,$write !gh-md-toc --hide-header --hide-footer')<cr>
" use \ toc to insert a table of contents for markdown from the current line to EOF
nmap <leader>toc <cmd>.put =execute('.,$write !gh-md-toc --hide-header --hide-footer')<cr>
" use \ tf to format a buffer as terraform
nmap <leader>tf <cmd>!terraform fmt %<cr>
set lazyredraw " redraw only when req'd
set wildmenu " visual auto-complete