From 167d94e98c98ff0a6f5dbe33f634f6a2ea6246c1 Mon Sep 17 00:00:00 2001 From: Jason Swank <632526+jswank@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:13:09 +0000 Subject: [PATCH] nvim: shortcut for toc / tf fmt --- nvim/.config/nvim/init.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index daa67ce..007f2a0 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -37,8 +37,11 @@ let g:UltiSnipsListSnippets="" " typing idate inserts the current date iab idate =strftime("%Y-%m-%d") -" use Ctrl-M to insert a table of contents for markdown from the current line to EOF -noremap .put =execute('.,$write !gh-md-toc --hide-header --hide-footer') +" use \ toc to insert a table of contents for markdown from the current line to EOF +nmap toc .put =execute('.,$write !gh-md-toc --hide-header --hide-footer') + +" use \ tf to format a buffer as terraform +nmap tf !terraform fmt % set lazyredraw " redraw only when req'd set wildmenu " visual auto-complete