diff --git a/roles/vim.nix b/roles/vim.nix index 6715ca9..3d1e4c2 100644 --- a/roles/vim.nix +++ b/roles/vim.nix @@ -74,9 +74,6 @@ vim_configurable.customize { autocmd BufWritePost,FileWritePost *.gpg u augroup END - " Add files ending in md to the list of files recognised as markdown: - autocmd BufNewFile,BufFilePre,BufRead *.md set filetype=markdown - " My Markdown environment function! MarkdownSettings() set textwidth=79 @@ -119,6 +116,16 @@ vim_configurable.customize { endfunction autocmd BufNewFile,BufFilePre,BufRead *.nix :call NixSettings() + " Settings for my Crystal environment: + function! CrystalSettings() + set tabstop=2 + set shiftwidth=2 + set expandtab + set textwidth=79 + set filetype=crystal + endfunction + autocmd BufNewFile,BufFilePre,BufRead *.cr :call CrystalSettings() + " Settings for my Golang environment: function! GoSettings() set tabstop=7