aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/c.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin/c.lua')
-rw-r--r--runtime/ftplugin/c.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/ftplugin/c.lua b/runtime/ftplugin/c.lua
index 0ddbf09470..09e286201b 100644
--- a/runtime/ftplugin/c.lua
+++ b/runtime/ftplugin/c.lua
@@ -1,5 +1,5 @@
-- These are the default option values in Vim, but not in Nvim, so must be set explicitly.
-vim.bo.commentstring = '/*%s*/'
+vim.bo.commentstring = '// %s'
vim.bo.define = '^\\s*#\\s*define'
vim.bo.include = '^\\s*#\\s*include'
@@ -11,4 +11,4 @@ if vim.fn.isdirectory('/usr/include') == 1 then
]])
end
-vim.b.undo_ftplugin = vim.b.undo_ftplugin .. '|setl path<'
+vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '') .. '\n setl commentstring< define< include< path<'