aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-12-06 09:20:32 +0100
committerChristian Clason <ch.clason+github@icloud.com>2024-12-06 09:40:44 +0100
commit812d02970206d5a65819e076bcddedd92e083a19 (patch)
tree50d666080aa903f377414cd00a83f7af3b946bbc /runtime/ftplugin
parentbf5c1346c52f801636d55b9077d26231409e4d76 (diff)
downloadrneovim-812d02970206d5a65819e076bcddedd92e083a19.tar.gz
rneovim-812d02970206d5a65819e076bcddedd92e083a19.tar.bz2
rneovim-812d02970206d5a65819e076bcddedd92e083a19.zip
vim-patch:9.1.0906: filetype: Nvidia PTX files are not recognized
Problem: filetype: Nvidia PTX files are not recognized Solution: detect '*.ptx' files as ptx filetype (Yinzuo Jiang) Reference: https://docs.nvidia.com/cuda/parallel-thread-execution/ closes: vim/vim#16171 https://github.com/vim/vim/commit/bdb5f85a5189534653f36e92b1bc780ca8d25218 Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/ptx.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/ftplugin/ptx.vim b/runtime/ftplugin/ptx.vim
new file mode 100644
index 0000000000..12b127c8fc
--- /dev/null
+++ b/runtime/ftplugin/ptx.vim
@@ -0,0 +1,16 @@
+" Vim filetype plugin file
+" Language: Nvidia PTX (Parellel Thread Execution)
+" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
+" Last Change: 2024-12-05
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let b:did_ftplugin = 1
+
+" Comments in PTX follow C/C++ syntax
+" See: https://docs.nvidia.com/cuda/parallel-thread-execution/#syntax
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl commentstring<'