mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Moved things around with nvim to allow multiple configurations, with nvims command
This commit is contained in:
16
nvim/m-housh/lua/autocmd.lua
Normal file
16
nvim/m-housh/lua/autocmd.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
-- 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