From e26b48bde6e116eb288893454d2876cdad2db1f9 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 15 Oct 2022 10:12:25 +0200 Subject: vim-patch:9.0.0752: Rprofile files are not recognized (#20658) Problem: Rprofile files are not recognized. Solution: Recognize Rprofile files as "r". (closes vim/vim#11369) https://github.com/vim/vim/commit/7e120ffccbf81ae8acac28f11fbd5eab79a1630d --- runtime/filetype.vim | 3 +++ runtime/lua/vim/filetype.lua | 3 +++ 2 files changed, 6 insertions(+) (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 8abec398db..8dfecfbdcc 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1629,6 +1629,9 @@ else au BufNewFile,BufRead *.rmd,*.smd setf rmd endif +" R profile file +au BufNewFile,BufRead .Rprofile,Rprofile,Rprofile.site setf r + " RSS looks like XML au BufNewFile,BufRead *.rss setf xml diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index ea39f66393..d2840b3a7e 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1540,6 +1540,9 @@ local filename = { ['.pythonstartup'] = 'python', ['.pythonrc'] = 'python', SConstruct = 'python', + ['.Rprofile'] = 'r', + ['Rprofile'] = 'r', + ['Rprofile.site'] = 'r', ratpoisonrc = 'ratpoison', ['.ratpoisonrc'] = 'ratpoison', inputrc = 'readline', -- cgit