From dc81332d014e4f745d09ef7676c57383cab79d6a Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sun, 21 Jan 2024 22:05:03 -0500 Subject: [PATCH] Add lua Also configure jsx, tsx, and go in vimrc --- fake_home/.vim/templates/skeleton.lua | 9 +++++++++ fake_home/.vimrc | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 fake_home/.vim/templates/skeleton.lua diff --git a/fake_home/.vim/templates/skeleton.lua b/fake_home/.vim/templates/skeleton.lua new file mode 100644 index 0000000..7c70d7b --- /dev/null +++ b/fake_home/.vim/templates/skeleton.lua @@ -0,0 +1,9 @@ +local table = { + ["hello"] = "world!", + ["goodnight"] = "moon", + twoPlusTwo = 4 +} + +for key,val in pairs(table) do + print(string.format("%s: %s", key, val)) +end diff --git a/fake_home/.vimrc b/fake_home/.vimrc index 9d5381c..129dca4 100644 --- a/fake_home/.vimrc +++ b/fake_home/.vimrc @@ -164,11 +164,15 @@ if has ("autocmd") autocmd BufNewFile *.sh 0r ~/.vim/templates/skeleton.sh autocmd BufNewFile *.py 0r ~/.vim/templates/skeleton.py autocmd BufNewFile *.rb 0r ~/.vim/templates/skeleton.rb + autocmd BufNewFile *.lua 0r ~/.vim/templates/skeleton.lua autocmd BufNewFile *.md 0r ~/.vim/templates/skeleton.md autocmd BufNewFile *.html 0r ~/.vim/templates/skeleton.html autocmd BufNewFile *.java 0r ~/.vim/templates/skeleton.java autocmd BufNewFile *.js 0r ~/.vim/templates/skeleton.js + autocmd BufNewFile *.jsx 0r ~/.vim/templates/skeleton.jsx + autocmd BufNewFile *.tsx 0r ~/.vim/templates/skeleton.tsx autocmd BufNewFile *.json 0r ~/.vim/templates/skeleton.json + autocmd BufNewFile *.go 0r ~/.vim/templates/skeleton.go autocmd BufNewFile Makefile 0r ~/.vim/templates/Makefile autocmd BufNewFile Dockerfile 0r ~/.vim/templates/Dockerfile augroup END