vim-patch:8.2.3703: most people call F# "fsharp" and not "fs" (#16469)

Problem:    Most people call F# "fsharp" and not "fs".
Solution:   Rename filetype "fs" to "fsharp".
53ba95e4f0
This commit is contained in:
zeertzjq
2021-11-30 21:51:17 +08:00
committed by GitHub
parent 04c7b55038
commit caf41a7ac9
3 changed files with 9 additions and 6 deletions

View File

@@ -231,7 +231,7 @@ func dist#ft#FTfs()
\ || line =~ '^\s*: \S' \ || line =~ '^\s*: \S'
setf forth setf forth
else else
setf fs setf fsharp
endif endif
endif endif
endfunc endfunc

View File

@@ -630,9 +630,6 @@ au BufNewFile,BufRead *.mas,*.master setf master
" Forth " Forth
au BufNewFile,BufRead *.ft,*.fth setf forth au BufNewFile,BufRead *.ft,*.fth setf forth
" F# or Forth
au BufNewFile,BufRead *.fs call dist#ft#FTfs()
" Reva Forth " Reva Forth
au BufNewFile,BufRead *.frt setf reva au BufNewFile,BufRead *.frt setf reva
@@ -648,6 +645,12 @@ au BufNewFile,BufRead *.fsl setf framescript
" FStab " FStab
au BufNewFile,BufRead fstab,mtab setf 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 " GDB command files
au BufNewFile,BufRead .gdbinit,gdbinit setf gdb au BufNewFile,BufRead .gdbinit,gdbinit setf gdb

View File

@@ -187,7 +187,7 @@ let s:filename_checks = {
\ 'fpcmake': ['file.fpc'], \ 'fpcmake': ['file.fpc'],
\ 'framescript': ['file.fsl'], \ 'framescript': ['file.fsl'],
\ 'freebasic': ['file.fb', 'file.bi'], \ 'freebasic': ['file.fb', 'file.bi'],
\ 'fs': ['file.fs'], \ 'fsharp': ['file.fs', 'file.fsi', 'file.fsx'],
\ 'fstab': ['fstab', 'mtab'], \ 'fstab': ['fstab', 'mtab'],
\ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'], \ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'],
\ 'gdb': ['.gdbinit', 'gdbinit'], \ 'gdb': ['.gdbinit', 'gdbinit'],
@@ -952,7 +952,7 @@ func Test_fs_file()
call writefile(['looks like F#'], 'Xfile.fs') call writefile(['looks like F#'], 'Xfile.fs')
split Xfile.fs split Xfile.fs
call assert_equal('fs', &filetype) call assert_equal('fsharp', &filetype)
bwipe! bwipe!
let g:filetype_fs = 'forth' let g:filetype_fs = 'forth'