mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
Working on install script(s)
This commit is contained in:
15
nvim/lua/autocmd.lua
Normal file
15
nvim/lua/autocmd.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Remove all trailing whitespace on save
|
||||
vim.api.nvim_exec([[
|
||||
augroup TrimWhiteSpace
|
||||
au!
|
||||
autocmd BufWritePre * :%s/\s\+$//e
|
||||
augroup END
|
||||
]], false)
|
||||
|
||||
-- Prevent new line to also start with a comment
|
||||
vim.api.nvim_exec([[
|
||||
augroup NewLineComment
|
||||
au!
|
||||
au FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
augroup END
|
||||
]], false)
|
||||
Reference in New Issue
Block a user