2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-15 12:12:58 +00:00
steffen-dotfiles/nvim/lua/autocommands.lua
Steffen Rademacker b6afe3d45c lua lualua
2021-12-05 19:06:21 +01:00

17 lines
437 B
Lua

local cmd = vim.cmd
cmd([[
augroup init
autocmd!
" Remember last location/cursor in file
autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
" Autoresize windows/splits when vim resizes
autocmd VimResized * wincmd =
" When opening temporary mails in mutt, automatically set filetype to mail
autocmd BufNewFile,BufRead neomutt-* set ft=mail
augroup END
]])