Mercurial > vim
changeset 26344:36f3a77e4b8c v8.2.3703
patch 8.2.3703: most people call F# "fsharp" and not "fs"
Commit: https://github.com/vim/vim/commit/53ba95e4f0a82f6dab1791bb01f6cddc9b3f61b3
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 30 13:02:58 2021 +0000
patch 8.2.3703: most people call F# "fsharp" and not "fs"
Problem: Most people call F# "fsharp" and not "fs".
Solution: Rename filetype "fs" to "fsharp".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 30 Nov 2021 14:15:04 +0100 |
parents | b50663eefd00 |
children | 1707aa6d46a2 |
files | runtime/autoload/dist/ft.vim runtime/filetype.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 4 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -231,7 +231,7 @@ func dist#ft#FTfs() \ || line =~ '^\s*: \S' setf forth else - setf fs + setf fsharp endif endif endfunc
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -634,9 +634,6 @@ au BufNewFile,BufRead *.mas,*.master se " Forth au BufNewFile,BufRead *.ft,*.fth setf forth -" F# or Forth -au BufNewFile,BufRead *.fs call dist#ft#FTfs() - " Reva Forth au BufNewFile,BufRead *.frt setf reva @@ -652,6 +649,12 @@ au BufNewFile,BufRead *.fsl setf frame " FStab au BufNewFile,BufRead fstab,mtab setf fstab +" F# or Forth +au BufNewFile,BufRead *.fs call dist#ft#FTfs() + +" F# +au BufNewFile,BufRead *.fsi,*.fsx setf fsharp + " GDB command files au BufNewFile,BufRead .gdbinit,gdbinit setf gdb
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -187,7 +187,7 @@ let s:filename_checks = { \ 'fpcmake': ['file.fpc'], \ 'framescript': ['file.fsl'], \ 'freebasic': ['file.fb', 'file.bi'], - \ 'fs': ['file.fs'], + \ 'fsharp': ['file.fs', 'file.fsi', 'file.fsx'], \ 'fstab': ['fstab', 'mtab'], \ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'], \ 'gdb': ['.gdbinit', 'gdbinit'], @@ -977,7 +977,7 @@ func Test_fs_file() call writefile(['looks like F#'], 'Xfile.fs') split Xfile.fs - call assert_equal('fs', &filetype) + call assert_equal('fsharp', &filetype) bwipe! let g:filetype_fs = 'forth'