]> granicus.if.org Git - vim/commitdiff
patch 8.2.3703: most people call F# "fsharp" and not "fs" v8.2.3703
authorBram Moolenaar <Bram@vim.org>
Tue, 30 Nov 2021 13:02:58 +0000 (13:02 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 30 Nov 2021 13:02:58 +0000 (13:02 +0000)
Problem:    Most people call F# "fsharp" and not "fs".
Solution:   Rename filetype "fs" to "fsharp".

runtime/autoload/dist/ft.vim
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 0cbcb1bbb5c5ca7b62d64eaa642312c236fcf4b8..74df871544a3087ad0bc58f7bf0053fbb6361b83 100644 (file)
@@ -231,7 +231,7 @@ func dist#ft#FTfs()
          \ || line =~ '^\s*: \S'
       setf forth
     else
-      setf fs
+      setf fsharp
     endif
   endif
 endfunc
index fd3998b299281342a5e01049609e1cc68d8944e4..f687cc77af4ffb0cac2fdd1c7980711e425429b1 100644 (file)
@@ -634,9 +634,6 @@ au BufNewFile,BufRead *.mas,*.master                setf master
 " 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 framescript
 " 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
 
index 3b875bbb9d34cbe9fdaa0db8ae1639bc4f12f92c..f1966f43e616f4c35f690fb2a5cc18681c7a012c 100644 (file)
@@ -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'
index 302db8e0b3361dc0f97004d569bfe0b43f5dec79..a190af5c9e011112c409f7dc3532ff5eae41932e 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3703,
 /**/
     3702,
 /**/