aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-10 12:23:42 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-12 22:01:28 +0100
commit4f8941c1a5f1ef6caa410feeb52e343db22763ce (patch)
tree6e801079d088533198d526cb9aac8eb7981dc568
parent353a4be7e84fdc101318215bdcc8a7e780d737fe (diff)
downloadrneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.tar.gz
rneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.tar.bz2
rneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.zip
refactor: replace manual header guards with #pragma once
It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard.
-rw-r--r--runtime/doc/dev_style.txt16
-rwxr-xr-xscripts/update_terminfo.sh8
-rwxr-xr-xsrc/clint.py222
-rw-r--r--src/nvim/api/autocmd.h4
-rw-r--r--src/nvim/api/buffer.h4
-rw-r--r--src/nvim/api/command.h4
-rw-r--r--src/nvim/api/deprecated.h4
-rw-r--r--src/nvim/api/extmark.h4
-rw-r--r--src/nvim/api/keysets.h5
-rw-r--r--src/nvim/api/options.h5
-rw-r--r--src/nvim/api/private/converter.h5
-rw-r--r--src/nvim/api/private/defs.h5
-rw-r--r--src/nvim/api/private/dispatch.h5
-rw-r--r--src/nvim/api/private/helpers.h5
-rw-r--r--src/nvim/api/private/validate.h5
-rw-r--r--src/nvim/api/tabpage.h4
-rw-r--r--src/nvim/api/ui.h4
-rw-r--r--src/nvim/api/ui_events.in.h4
-rw-r--r--src/nvim/api/vim.h4
-rw-r--r--src/nvim/api/vimscript.h4
-rw-r--r--src/nvim/api/win_config.h4
-rw-r--r--src/nvim/api/window.h4
-rw-r--r--src/nvim/arabic.h4
-rw-r--r--src/nvim/arglist.h5
-rw-r--r--src/nvim/arglist_defs.h5
-rw-r--r--src/nvim/ascii.h5
-rw-r--r--src/nvim/assert.h5
-rw-r--r--src/nvim/autocmd.h5
-rw-r--r--src/nvim/base64.h5
-rw-r--r--src/nvim/buffer.h5
-rw-r--r--src/nvim/buffer_defs.h5
-rw-r--r--src/nvim/buffer_updates.h5
-rw-r--r--src/nvim/bufwrite.h5
-rw-r--r--src/nvim/change.h5
-rw-r--r--src/nvim/channel.h5
-rw-r--r--src/nvim/charset.h4
-rw-r--r--src/nvim/cmdexpand.h4
-rw-r--r--src/nvim/cmdexpand_defs.h5
-rw-r--r--src/nvim/cmdhist.h4
-rw-r--r--src/nvim/context.h5
-rw-r--r--src/nvim/cursor.h5
-rw-r--r--src/nvim/cursor_shape.h4
-rw-r--r--src/nvim/debugger.h4
-rw-r--r--src/nvim/decoration.h5
-rw-r--r--src/nvim/decoration_provider.h5
-rw-r--r--src/nvim/diff.h4
-rw-r--r--src/nvim/digraph.h4
-rw-r--r--src/nvim/drawline.h4
-rw-r--r--src/nvim/drawscreen.h4
-rw-r--r--src/nvim/edit.h4
-rw-r--r--src/nvim/eval.h4
-rw-r--r--src/nvim/eval/buffer.h4
-rw-r--r--src/nvim/eval/decode.h4
-rw-r--r--src/nvim/eval/encode.h4
-rw-r--r--src/nvim/eval/executor.h4
-rw-r--r--src/nvim/eval/funcs.h4
-rw-r--r--src/nvim/eval/gc.h4
-rw-r--r--src/nvim/eval/typval.h5
-rw-r--r--src/nvim/eval/typval_defs.h5
-rw-r--r--src/nvim/eval/typval_encode.h5
-rw-r--r--src/nvim/eval/userfunc.h4
-rw-r--r--src/nvim/eval/vars.h4
-rw-r--r--src/nvim/eval/window.h4
-rw-r--r--src/nvim/event/defs.h5
-rw-r--r--src/nvim/event/libuv_process.h4
-rw-r--r--src/nvim/event/loop.h5
-rw-r--r--src/nvim/event/multiqueue.h4
-rw-r--r--src/nvim/event/process.h4
-rw-r--r--src/nvim/event/rstream.h4
-rw-r--r--src/nvim/event/signal.h4
-rw-r--r--src/nvim/event/socket.h4
-rw-r--r--src/nvim/event/stream.h4
-rw-r--r--src/nvim/event/time.h4
-rw-r--r--src/nvim/event/wstream.h4
-rw-r--r--src/nvim/ex_cmds.h4
-rw-r--r--src/nvim/ex_cmds2.h4
-rw-r--r--src/nvim/ex_cmds_defs.h5
-rw-r--r--src/nvim/ex_docmd.h4
-rw-r--r--src/nvim/ex_eval.h4
-rw-r--r--src/nvim/ex_eval_defs.h5
-rw-r--r--src/nvim/ex_getln.h4
-rw-r--r--src/nvim/ex_session.h5
-rw-r--r--src/nvim/extmark.h5
-rw-r--r--src/nvim/extmark_defs.h5
-rw-r--r--src/nvim/file_search.h4
-rw-r--r--src/nvim/fileio.h4
-rw-r--r--src/nvim/fold.h4
-rw-r--r--src/nvim/fold_defs.h5
-rw-r--r--src/nvim/garray.h5
-rw-r--r--src/nvim/getchar.h4
-rw-r--r--src/nvim/getchar_defs.h5
-rw-r--r--src/nvim/gettext.h5
-rw-r--r--src/nvim/globals.h5
-rw-r--r--src/nvim/grid.h4
-rw-r--r--src/nvim/grid_defs.h5
-rw-r--r--src/nvim/hashtab.h5
-rw-r--r--src/nvim/help.h4
-rw-r--r--src/nvim/highlight.h5
-rw-r--r--src/nvim/highlight_defs.h5
-rw-r--r--src/nvim/highlight_group.h5
-rw-r--r--src/nvim/iconv.h5
-rw-r--r--src/nvim/indent.h4
-rw-r--r--src/nvim/indent_c.h4
-rw-r--r--src/nvim/input.h4
-rw-r--r--src/nvim/insexpand.h4
-rw-r--r--src/nvim/keycodes.h4
-rw-r--r--src/nvim/lib/queue.h5
-rw-r--r--src/nvim/lib/ringbuf.h6
-rw-r--r--src/nvim/linematch.h5
-rw-r--r--src/nvim/log.h4
-rw-r--r--src/nvim/lua/base64.h5
-rw-r--r--src/nvim/lua/converter.h4
-rw-r--r--src/nvim/lua/executor.h5
-rw-r--r--src/nvim/lua/secure.h5
-rw-r--r--src/nvim/lua/spell.h5
-rw-r--r--src/nvim/lua/stdlib.h5
-rw-r--r--src/nvim/lua/treesitter.h5
-rw-r--r--src/nvim/lua/xdiff.h5
-rw-r--r--src/nvim/macros.h5
-rw-r--r--src/nvim/main.h4
-rw-r--r--src/nvim/map.h5
-rw-r--r--src/nvim/mapping.h4
-rw-r--r--src/nvim/mapping_defs.h5
-rw-r--r--src/nvim/mark.h4
-rw-r--r--src/nvim/mark_defs.h5
-rw-r--r--src/nvim/marktree.h5
-rw-r--r--src/nvim/match.h5
-rw-r--r--src/nvim/math.h4
-rw-r--r--src/nvim/mbyte.h4
-rw-r--r--src/nvim/mbyte_defs.h5
-rw-r--r--src/nvim/memfile.h4
-rw-r--r--src/nvim/memfile_defs.h5
-rw-r--r--src/nvim/memline.h4
-rw-r--r--src/nvim/memline_defs.h5
-rw-r--r--src/nvim/memory.h5
-rw-r--r--src/nvim/menu.h4
-rw-r--r--src/nvim/menu_defs.h5
-rw-r--r--src/nvim/message.h4
-rw-r--r--src/nvim/mouse.h5
-rw-r--r--src/nvim/move.h4
-rw-r--r--src/nvim/msgpack_rpc/channel.h4
-rw-r--r--src/nvim/msgpack_rpc/channel_defs.h5
-rw-r--r--src/nvim/msgpack_rpc/helpers.h5
-rw-r--r--src/nvim/msgpack_rpc/server.h4
-rw-r--r--src/nvim/msgpack_rpc/unpacker.h5
-rw-r--r--src/nvim/normal.h4
-rw-r--r--src/nvim/ops.h5
-rw-r--r--src/nvim/option.h4
-rw-r--r--src/nvim/option_defs.h5
-rw-r--r--src/nvim/option_vars.h5
-rw-r--r--src/nvim/optionstr.h4
-rw-r--r--src/nvim/os/dl.h4
-rw-r--r--src/nvim/os/fileio.h4
-rw-r--r--src/nvim/os/fs.h4
-rw-r--r--src/nvim/os/fs_defs.h5
-rw-r--r--src/nvim/os/input.h4
-rw-r--r--src/nvim/os/lang.h4
-rw-r--r--src/nvim/os/os.h5
-rw-r--r--src/nvim/os/os_defs.h5
-rw-r--r--src/nvim/os/os_win_console.h5
-rw-r--r--src/nvim/os/process.h5
-rw-r--r--src/nvim/os/pty_conpty_win.h5
-rw-r--r--src/nvim/os/pty_process.h4
-rw-r--r--src/nvim/os/pty_process_unix.h5
-rw-r--r--src/nvim/os/pty_process_win.h5
-rw-r--r--src/nvim/os/shell.h4
-rw-r--r--src/nvim/os/signal.h4
-rw-r--r--src/nvim/os/stdpaths_defs.h5
-rw-r--r--src/nvim/os/time.h4
-rw-r--r--src/nvim/os/tty.h4
-rw-r--r--src/nvim/os/unix_defs.h5
-rw-r--r--src/nvim/os/win_defs.h5
-rw-r--r--src/nvim/path.h4
-rw-r--r--src/nvim/plines.h4
-rw-r--r--src/nvim/popupmenu.h4
-rw-r--r--src/nvim/pos.h5
-rw-r--r--src/nvim/profile.h5
-rw-r--r--src/nvim/quickfix.h4
-rw-r--r--src/nvim/rbuffer.h5
-rw-r--r--src/nvim/regexp.h5
-rw-r--r--src/nvim/regexp_defs.h5
-rw-r--r--src/nvim/runtime.h4
-rw-r--r--src/nvim/search.h4
-rw-r--r--src/nvim/sha256.h4
-rw-r--r--src/nvim/shada.h4
-rw-r--r--src/nvim/sign.h4
-rw-r--r--src/nvim/sign_defs.h5
-rw-r--r--src/nvim/spell.h4
-rw-r--r--src/nvim/spell_defs.h5
-rw-r--r--src/nvim/spellfile.h4
-rw-r--r--src/nvim/spellsuggest.h4
-rw-r--r--src/nvim/state.h5
-rw-r--r--src/nvim/statusline.h5
-rw-r--r--src/nvim/statusline_defs.h5
-rw-r--r--src/nvim/strings.h4
-rw-r--r--src/nvim/syntax.h5
-rw-r--r--src/nvim/syntax_defs.h5
-rw-r--r--src/nvim/tag.h4
-rw-r--r--src/nvim/terminal.h4
-rw-r--r--src/nvim/testing.h4
-rw-r--r--src/nvim/textformat.h4
-rw-r--r--src/nvim/textobject.h4
-rw-r--r--src/nvim/tui/input.h5
-rw-r--r--src/nvim/tui/input_defs.h5
-rw-r--r--src/nvim/tui/terminfo.h5
-rw-r--r--src/nvim/tui/terminfo_defs.h8
-rw-r--r--src/nvim/tui/tui.h5
-rw-r--r--src/nvim/types.h5
-rw-r--r--src/nvim/ugrid.h4
-rw-r--r--src/nvim/ui.h4
-rw-r--r--src/nvim/ui_client.h5
-rw-r--r--src/nvim/ui_compositor.h4
-rw-r--r--src/nvim/undo.h4
-rw-r--r--src/nvim/undo_defs.h5
-rw-r--r--src/nvim/usercmd.h4
-rw-r--r--src/nvim/version.h4
-rw-r--r--src/nvim/vim.h5
-rw-r--r--src/nvim/viml/parser/expressions.h5
-rw-r--r--src/nvim/viml/parser/parser.h5
-rw-r--r--src/nvim/window.h4
220 files changed, 227 insertions, 998 deletions
diff --git a/runtime/doc/dev_style.txt b/runtime/doc/dev_style.txt
index d6c465ef91..cb28f1a845 100644
--- a/runtime/doc/dev_style.txt
+++ b/runtime/doc/dev_style.txt
@@ -32,19 +32,13 @@ but we nonetheless keep things as they are in order to preserve consistency.
Header Files *dev-style-header*
-The #define Guard ~
+Header guard ~
-All header files should have `#define` guards to prevent multiple inclusion.
-The format of the symbol name should be `NVIM_<DIRECTORY>_<FILE>_H`.
+All header files should start with `#pragma once` to prevent multiple inclusion.
In foo/bar.h:
>c
- #ifndef NVIM_FOO_BAR_H
- #define NVIM_FOO_BAR_H
-
- ...
-
- #endif // NVIM_FOO_BAR_H
+ #pragma once
<
@@ -245,15 +239,13 @@ contain only non-static function declarations. >c
// src/nvim/foo.h file
- #ifndef NVIM_FOO_H
- #define NVIM_FOO_H
+ #pragma once
…
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "foo.h.generated.h"
#endif
- #endif // NVIM_FOO_H
64-bit Portability ~
diff --git a/scripts/update_terminfo.sh b/scripts/update_terminfo.sh
index 2840334e99..e12365ba8f 100755
--- a/scripts/update_terminfo.sh
+++ b/scripts/update_terminfo.sh
@@ -63,12 +63,9 @@ sorted_terms="$(echo "${!entries[@]}" | tr ' ' '\n' | sort | xargs)"
cat > "$target" <<EOF
// uncrustify:off
-//
// Generated by scripts/update_terminfo.sh and $(tic -V)
-//
-#ifndef NVIM_TUI_TERMINFO_DEFS_H
-#define NVIM_TUI_TERMINFO_DEFS_H
+#pragma once
#include <stdint.h>
EOF
@@ -87,7 +84,4 @@ for term in $sorted_terms; do
printf '};\n'
done >> "$target"
-cat >> "$target" <<EOF
-#endif // NVIM_TUI_TERMINFO_DEFS_H
-EOF
print_bold 'done\n'
diff --git a/src/clint.py b/src/clint.py
index 0b72317305..0a54bfc927 100755
--- a/src/clint.py
+++ b/src/clint.py
@@ -510,29 +510,6 @@ class FileInfo:
# Don't know what to do; header guard warnings may be wrong...
return fullname
- def Split(self):
- """Splits the file into the directory, basename, and extension.
-
- For 'chrome/browser/browser.cc', Split() would
- return ('chrome/browser', 'browser', '.cc')
-
- Returns:
- A tuple of (directory, basename, extension).
- """
-
- googlename = self.RelativePath()
- project, rest = os.path.split(googlename)
- return (project,) + os.path.splitext(rest)
-
- def BaseName(self):
- """File base name - text after the final slash, before final period."""
- return self.Split()[1]
-
- def Extension(self):
- """File extension - text following the final period."""
- return self.Split()[2]
-
-
def _ShouldPrintError(category, confidence, linenum):
"""If confidence >= verbose, category passes filter and isn't suppressed."""
@@ -886,110 +863,8 @@ def CloseExpression(clean_lines, linenum, pos):
return (line, clean_lines.NumLines(), -1)
-def FindStartOfExpressionInLine(line, endpos, depth, startchar, endchar):
- """Find position at the matching startchar.
-
- This is almost the reverse of FindEndOfExpressionInLine, but note
- that the input position and returned position differs by 1.
-
- Args:
- line: a CleansedLines line.
- endpos: start searching at this position.
- depth: nesting level at endpos.
- startchar: expression opening character.
- endchar: expression closing character.
-
- Returns:
- On finding matching startchar: (index at matching startchar, 0)
- Otherwise: (-1, new depth at beginning of this line)
- """
- for i in range(endpos, -1, -1):
- if line[i] == endchar:
- depth += 1
- elif line[i] == startchar:
- depth -= 1
- if depth == 0:
- return (i, 0)
- return (-1, depth)
-
-
-def ReverseCloseExpression(clean_lines, linenum, pos):
- """If input points to ) or } or ] or >, finds the position that opens it.
-
- If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the
- linenum/pos that correspond to the opening of the expression.
-
- Args:
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- pos: A position on the line.
-
- Returns:
- A tuple (line, linenum, pos) pointer *at* the opening brace, or
- (line, 0, -1) if we never find the matching opening brace. Note
- we ignore strings and comments when matching; and the line we
- return is the 'cleansed' line at linenum.
- """
- line = clean_lines.elided[linenum]
- endchar = line[pos]
- startchar = None
- if endchar not in ')}]>':
- return (line, 0, -1)
- if endchar == ')':
- startchar = '('
- if endchar == ']':
- startchar = '['
- if endchar == '}':
- startchar = '{'
- if endchar == '>':
- startchar = '<'
-
- # Check last line
- (start_pos, num_open) = FindStartOfExpressionInLine(
- line, pos, 0, startchar, endchar)
- if start_pos > -1:
- return (line, linenum, start_pos)
-
- # Continue scanning backward
- while linenum > 0:
- linenum -= 1
- line = clean_lines.elided[linenum]
- (start_pos, num_open) = FindStartOfExpressionInLine(
- line, len(line) - 1, num_open, startchar, endchar)
- if start_pos > -1:
- return (line, linenum, start_pos)
-
- # Did not find startchar before beginning of file, give up
- return (line, 0, -1)
-
-
-def GetHeaderGuardCPPVariable(filename):
- """Returns the CPP variable that should be used as a header guard.
-
- Args:
- filename: The name of a C++ header file.
-
- Returns:
- The CPP variable that should be used as a header guard in the
- named file.
-
- """
-
- # Restores original filename in case that cpplint is invoked from Emacs's
- # flymake.
- filename = re.sub(r'_flymake\.h$', '.h', filename)
- filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename)
-
- fileinfo = FileInfo(filename)
- file_path_from_root = fileinfo.RelativePath()
- return 'NVIM_' + re.sub(r'[-./\s]', '_', file_path_from_root).upper()
-
-
def CheckForHeaderGuard(filename, lines, error):
- """Checks that the file contains a header guard.
-
- Logs an error if no #ifndef header guard is present. For other
- headers, checks that the full pathname is used.
+ """Checks that the file contains "#pragma once".
Args:
filename: The name of the C++ header file.
@@ -1001,65 +876,9 @@ def CheckForHeaderGuard(filename, lines, error):
}:
return
- cppvar = GetHeaderGuardCPPVariable(filename)
-
- ifndef = None
- ifndef_linenum = 0
- define = None
- endif = None
- endif_linenum = 0
- for linenum, line in enumerate(lines):
- linesplit = line.split()
- if len(linesplit) >= 2:
- # find the first occurrence of #ifndef and #define, save arg
- if not ifndef and linesplit[0] == '#ifndef':
- # set ifndef to the header guard presented on the #ifndef line.
- ifndef = linesplit[1]
- ifndef_linenum = linenum
- if not define and linesplit[0] == '#define':
- define = linesplit[1]
- # find the last occurrence of #endif, save entire line
- if line.startswith('#endif'):
- endif = line
- endif_linenum = linenum
-
- if not ifndef:
+ if "#pragma once" not in lines:
error(filename, 0, 'build/header_guard', 5,
- 'No #ifndef header guard found, suggested CPP variable is: %s' %
- cppvar)
- return
-
- if not define:
- error(filename, 0, 'build/header_guard', 5,
- 'No #define header guard found, suggested CPP variable is: %s' %
- cppvar)
- return
-
- # The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__
- # for backward compatibility.
- if ifndef != cppvar:
- error_level = 0
- if ifndef != cppvar + '_':
- error_level = 5
-
- ParseNolintSuppressions(lines[ifndef_linenum], ifndef_linenum)
- error(filename, ifndef_linenum, 'build/header_guard', error_level,
- '#ifndef header guard has wrong style, please use: %s' % cppvar)
-
- if define != ifndef:
- error(filename, 0, 'build/header_guard', 5,
- '#ifndef and #define don\'t match, suggested CPP variable is: %s'
- % cppvar)
- return
-
- if endif != ('#endif // %s' % cppvar):
- error_level = 0
- if endif != ('#endif // %s' % (cppvar + '_')):
- error_level = 5
-
- ParseNolintSuppressions(lines[endif_linenum], endif_linenum)
- error(filename, endif_linenum, 'build/header_guard', error_level,
- '#endif line should be "#endif // %s"' % cppvar)
+ 'No "#pragma once" found in header')
def CheckForBadCharacters(filename, lines, error):
@@ -1982,41 +1801,6 @@ def CheckSpacing(filename, clean_lines, linenum, error):
# braces. And since you should never have braces at the beginning of a line,
# this is an easy test.
match = Match(r'^(.*[^ ({]){', line)
- if match:
- # Try a bit harder to check for brace initialization. This
- # happens in one of the following forms:
- # Constructor() : initializer_list_{} { ... }
- # Constructor{}.MemberFunction()
- # Type variable{};
- # FunctionCall(type{}, ...);
- # LastArgument(..., type{});
- # LOG(INFO) << type{} << " ...";
- # map_of_type[{...}] = ...;
- #
- # We check for the character following the closing brace, and
- # silence the warning if it's one of those listed above, i.e.
- # "{.;,)<]".
- #
- # To account for nested initializer list, we allow any number of
- # closing braces up to "{;,)<". We can't simply silence the
- # warning on first sight of closing brace, because that would
- # cause false negatives for things that are not initializer lists.
- # Silence this: But not this:
- # Outer{ if (...) {
- # Inner{...} if (...){ // Missing space before {
- # }; }
- #
- # There is a false negative with this approach if people inserted
- # spurious semicolons, e.g. "if (cond){};", but we will catch the
- # spurious semicolon with a separate check.
- (endline, endlinenum, endpos) = CloseExpression(
- clean_lines, linenum, len(match.group(1)))
- trailing_text = ''
- if endpos > -1:
- trailing_text = endline[endpos:]
- for offset in range(endlinenum + 1,
- min(endlinenum + 3, clean_lines.NumLines() - 1)):
- trailing_text += clean_lines.elided[offset]
# Make sure '} else {' has spaces.
if Search(r'}else', line):
diff --git a/src/nvim/api/autocmd.h b/src/nvim/api/autocmd.h
index 3273ca5759..8aefd45793 100644
--- a/src/nvim/api/autocmd.h
+++ b/src/nvim/api/autocmd.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_AUTOCMD_H
-#define NVIM_API_AUTOCMD_H
+#pragma once
#include <stdint.h>
@@ -9,4 +8,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/autocmd.h.generated.h"
#endif
-#endif // NVIM_API_AUTOCMD_H
diff --git a/src/nvim/api/buffer.h b/src/nvim/api/buffer.h
index db58239af8..0f18f5368e 100644
--- a/src/nvim/api/buffer.h
+++ b/src/nvim/api/buffer.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_BUFFER_H
-#define NVIM_API_BUFFER_H
+#pragma once
#include <lauxlib.h>
@@ -10,4 +9,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/buffer.h.generated.h"
#endif
-#endif // NVIM_API_BUFFER_H
diff --git a/src/nvim/api/command.h b/src/nvim/api/command.h
index f16bd0acde..78af5cbf64 100644
--- a/src/nvim/api/command.h
+++ b/src/nvim/api/command.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_COMMAND_H
-#define NVIM_API_COMMAND_H
+#pragma once
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
@@ -9,4 +8,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/command.h.generated.h"
#endif
-#endif // NVIM_API_COMMAND_H
diff --git a/src/nvim/api/deprecated.h b/src/nvim/api/deprecated.h
index 79095167e1..5541a4dac3 100644
--- a/src/nvim/api/deprecated.h
+++ b/src/nvim/api/deprecated.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_DEPRECATED_H
-#define NVIM_API_DEPRECATED_H
+#pragma once
#include <stdint.h>
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/deprecated.h.generated.h"
#endif
-#endif // NVIM_API_DEPRECATED_H
diff --git a/src/nvim/api/extmark.h b/src/nvim/api/extmark.h
index 7c300350e1..88f1e9e8ad 100644
--- a/src/nvim/api/extmark.h
+++ b/src/nvim/api/extmark.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_EXTMARK_H
-#define NVIM_API_EXTMARK_H
+#pragma once
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
@@ -14,4 +13,3 @@ EXTERN handle_T next_namespace_id INIT( = 1);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/extmark.h.generated.h"
#endif
-#endif // NVIM_API_EXTMARK_H
diff --git a/src/nvim/api/keysets.h b/src/nvim/api/keysets.h
index 0da2239847..e59eda5686 100644
--- a/src/nvim/api/keysets.h
+++ b/src/nvim/api/keysets.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_KEYSETS_H
-#define NVIM_API_KEYSETS_H
+#pragma once
#include "nvim/api/private/defs.h"
@@ -314,5 +313,3 @@ typedef struct {
typedef struct {
Boolean output;
} Dict(exec_opts);
-
-#endif // NVIM_API_KEYSETS_H
diff --git a/src/nvim/api/options.h b/src/nvim/api/options.h
index 7be72d3708..79aeead205 100644
--- a/src/nvim/api/options.h
+++ b/src/nvim/api/options.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_OPTIONS_H
-#define NVIM_API_OPTIONS_H
+#pragma once
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/options.h.generated.h"
#endif
-
-#endif // NVIM_API_OPTIONS_H
diff --git a/src/nvim/api/private/converter.h b/src/nvim/api/private/converter.h
index 28ae71983b..47e1d5a6bb 100644
--- a/src/nvim/api/private/converter.h
+++ b/src/nvim/api/private/converter.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_PRIVATE_CONVERTER_H
-#define NVIM_API_PRIVATE_CONVERTER_H
+#pragma once
#include "nvim/api/private/defs.h"
#include "nvim/eval/typval_defs.h"
@@ -7,5 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/private/converter.h.generated.h"
#endif
-
-#endif // NVIM_API_PRIVATE_CONVERTER_H
diff --git a/src/nvim/api/private/defs.h b/src/nvim/api/private/defs.h
index b467ce75a9..067592ed4e 100644
--- a/src/nvim/api/private/defs.h
+++ b/src/nvim/api/private/defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_PRIVATE_DEFS_H
-#define NVIM_API_PRIVATE_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -139,5 +138,3 @@ typedef struct {
} KeySetLink;
typedef KeySetLink *(*FieldHashfn)(const char *str, size_t len);
-
-#endif // NVIM_API_PRIVATE_DEFS_H
diff --git a/src/nvim/api/private/dispatch.h b/src/nvim/api/private/dispatch.h
index 78fcf88d7b..49332bfecc 100644
--- a/src/nvim/api/private/dispatch.h
+++ b/src/nvim/api/private/dispatch.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_PRIVATE_DISPATCH_H
-#define NVIM_API_PRIVATE_DISPATCH_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -30,5 +29,3 @@ extern const MsgpackRpcRequestHandler method_handlers[];
# include "api/private/dispatch_wrappers.h.generated.h"
# include "keysets_defs.generated.h"
#endif
-
-#endif // NVIM_API_PRIVATE_DISPATCH_H
diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h
index 8911e145e7..82c24b7c65 100644
--- a/src/nvim/api/private/helpers.h
+++ b/src/nvim/api/private/helpers.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_PRIVATE_HELPERS_H
-#define NVIM_API_PRIVATE_HELPERS_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -199,5 +198,3 @@ typedef struct {
current_channel_id = save_channel_id; \
current_sctx = save_current_sctx; \
} while (0);
-
-#endif // NVIM_API_PRIVATE_HELPERS_H
diff --git a/src/nvim/api/private/validate.h b/src/nvim/api/private/validate.h
index 089b8d2f9c..29ca6242f3 100644
--- a/src/nvim/api/private/validate.h
+++ b/src/nvim/api/private/validate.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_PRIVATE_VALIDATE_H
-#define NVIM_API_PRIVATE_VALIDATE_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -95,5 +94,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/private/validate.h.generated.h"
#endif
-
-#endif // NVIM_API_PRIVATE_VALIDATE_H
diff --git a/src/nvim/api/tabpage.h b/src/nvim/api/tabpage.h
index 2689cf6ae6..b9357df10a 100644
--- a/src/nvim/api/tabpage.h
+++ b/src/nvim/api/tabpage.h
@@ -1,9 +1,7 @@
-#ifndef NVIM_API_TABPAGE_H
-#define NVIM_API_TABPAGE_H
+#pragma once
#include "nvim/api/private/defs.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/tabpage.h.generated.h"
#endif
-#endif // NVIM_API_TABPAGE_H
diff --git a/src/nvim/api/ui.h b/src/nvim/api/ui.h
index b3fe0fa2bb..0101e5d31b 100644
--- a/src/nvim/api/ui.h
+++ b/src/nvim/api/ui.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_UI_H
-#define NVIM_API_UI_H
+#pragma once
#include <stdint.h>
@@ -11,4 +10,3 @@
# include "api/ui.h.generated.h"
# include "ui_events_remote.h.generated.h"
#endif
-#endif // NVIM_API_UI_H
diff --git a/src/nvim/api/ui_events.in.h b/src/nvim/api/ui_events.in.h
index 6ca5024a04..bda0c72423 100644
--- a/src/nvim/api/ui_events.in.h
+++ b/src/nvim/api/ui_events.in.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_UI_EVENTS_IN_H
-#define NVIM_API_UI_EVENTS_IN_H
+#pragma once
// This file is not compiled, just parsed for definitions
#ifdef INCLUDE_GENERATED_DECLARATIONS
@@ -170,4 +169,3 @@ void msg_history_clear(void)
void error_exit(Integer status)
FUNC_API_SINCE(12);
-#endif // NVIM_API_UI_EVENTS_IN_H
diff --git a/src/nvim/api/vim.h b/src/nvim/api/vim.h
index c305749ba0..81cb563aaf 100644
--- a/src/nvim/api/vim.h
+++ b/src/nvim/api/vim.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_VIM_H
-#define NVIM_API_VIM_H
+#pragma once
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/vim.h.generated.h"
#endif
-#endif // NVIM_API_VIM_H
diff --git a/src/nvim/api/vimscript.h b/src/nvim/api/vimscript.h
index 99ef43454b..ee056999ed 100644
--- a/src/nvim/api/vimscript.h
+++ b/src/nvim/api/vimscript.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_VIMSCRIPT_H
-#define NVIM_API_VIMSCRIPT_H
+#pragma once
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/vimscript.h.generated.h"
#endif
-#endif // NVIM_API_VIMSCRIPT_H
diff --git a/src/nvim/api/win_config.h b/src/nvim/api/win_config.h
index 426a74fb3e..f9befa6806 100644
--- a/src/nvim/api/win_config.h
+++ b/src/nvim/api/win_config.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_WIN_CONFIG_H
-#define NVIM_API_WIN_CONFIG_H
+#pragma once
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/win_config.h.generated.h"
#endif
-#endif // NVIM_API_WIN_CONFIG_H
diff --git a/src/nvim/api/window.h b/src/nvim/api/window.h
index 046d64c1a4..1a3da7be75 100644
--- a/src/nvim/api/window.h
+++ b/src/nvim/api/window.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_API_WINDOW_H
-#define NVIM_API_WINDOW_H
+#pragma once
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/window.h.generated.h"
#endif
-#endif // NVIM_API_WINDOW_H
diff --git a/src/nvim/arabic.h b/src/nvim/arabic.h
index 3c34de1449..2d09531331 100644
--- a/src/nvim/arabic.h
+++ b/src/nvim/arabic.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_ARABIC_H
-#define NVIM_ARABIC_H
+#pragma once
#include <stdbool.h>
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "arabic.h.generated.h"
#endif
-#endif // NVIM_ARABIC_H
diff --git a/src/nvim/arglist.h b/src/nvim/arglist.h
index bd5cfb4a11..82c7dd54ef 100644
--- a/src/nvim/arglist.h
+++ b/src/nvim/arglist.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_ARGLIST_H
-#define NVIM_ARGLIST_H
+#pragma once
#include "nvim/arglist_defs.h"
#include "nvim/cmdexpand_defs.h"
@@ -10,5 +9,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "arglist.h.generated.h"
#endif
-
-#endif // NVIM_ARGLIST_H
diff --git a/src/nvim/arglist_defs.h b/src/nvim/arglist_defs.h
index 28f2c3cf69..02651954db 100644
--- a/src/nvim/arglist_defs.h
+++ b/src/nvim/arglist_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_ARGLIST_DEFS_H
-#define NVIM_ARGLIST_DEFS_H
+#pragma once
#include "nvim/garray.h"
@@ -18,5 +17,3 @@ typedef struct argentry {
char *ae_fname; ///< file name as specified
int ae_fnum; ///< buffer number with expanded file name
} aentry_T;
-
-#endif // NVIM_ARGLIST_DEFS_H
diff --git a/src/nvim/ascii.h b/src/nvim/ascii.h
index 96d6fe214a..efe00d5e4d 100644
--- a/src/nvim/ascii.h
+++ b/src/nvim/ascii.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_ASCII_H
-#define NVIM_ASCII_H
+#pragma once
#include <stdbool.h>
@@ -184,5 +183,3 @@ static inline bool ascii_isspace(int c)
{
return (c >= 9 && c <= 13) || c == ' ';
}
-
-#endif // NVIM_ASCII_H
diff --git a/src/nvim/assert.h b/src/nvim/assert.h
index 90d242fd3e..6048b8f30b 100644
--- a/src/nvim/assert.h
+++ b/src/nvim/assert.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_ASSERT_H
-#define NVIM_ASSERT_H
+#pragma once
#include "auto/config.h"
@@ -165,5 +164,3 @@
# define STRICT_SUB(a, b, c, t) \
do { *(c) = (t)((a) - (b)); } while (0)
#endif
-
-#endif // NVIM_ASSERT_H
diff --git a/src/nvim/autocmd.h b/src/nvim/autocmd.h
index 0992fca929..57e2e15fc3 100644
--- a/src/nvim/autocmd.h
+++ b/src/nvim/autocmd.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_AUTOCMD_H
-#define NVIM_AUTOCMD_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -101,5 +100,3 @@ EXTERN pos_T last_cursormoved INIT( = { 0, 0, 0 });
/// Iterates over all the events for auto commands
#define FOR_ALL_AUEVENTS(event) \
for (event_T event = (event_T)0; (int)event < (int)NUM_EVENTS; event = (event_T)((int)event + 1)) // NOLINT
-
-#endif // NVIM_AUTOCMD_H
diff --git a/src/nvim/base64.h b/src/nvim/base64.h
index 2162fd9ba2..39e04b3565 100644
--- a/src/nvim/base64.h
+++ b/src/nvim/base64.h
@@ -1,10 +1,7 @@
-#ifndef NVIM_BASE64_H
-#define NVIM_BASE64_H
+#pragma once
#include <stddef.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "base64.h.generated.h"
#endif
-
-#endif // NVIM_BASE64_H
diff --git a/src/nvim/buffer.h b/src/nvim/buffer.h
index 2b0e6b2525..83c9e20041 100644
--- a/src/nvim/buffer.h
+++ b/src/nvim/buffer.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_BUFFER_H
-#define NVIM_BUFFER_H
+#pragma once
#include <assert.h>
#include <stdbool.h>
@@ -140,5 +139,3 @@ static inline bool buf_is_empty(buf_T *buf)
return buf->b_ml.ml_line_count == 1
&& *ml_get_buf(buf, 1) == '\0';
}
-
-#endif // NVIM_BUFFER_H
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h
index 812ac60eb0..cf77cea621 100644
--- a/src/nvim/buffer_defs.h
+++ b/src/nvim/buffer_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_BUFFER_DEFS_H
-#define NVIM_BUFFER_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -1340,5 +1339,3 @@ struct window_S {
#define CHANGEDTICK(buf) \
(=== Include buffer.h & use buf_(get|set|inc) _changedtick ===)
// uncrustify:on
-
-#endif // NVIM_BUFFER_DEFS_H
diff --git a/src/nvim/buffer_updates.h b/src/nvim/buffer_updates.h
index 961fec879b..f072434e81 100644
--- a/src/nvim/buffer_updates.h
+++ b/src/nvim/buffer_updates.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_BUFFER_UPDATES_H
-#define NVIM_BUFFER_UPDATES_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/extmark.h"
@@ -7,5 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "buffer_updates.h.generated.h"
#endif
-
-#endif // NVIM_BUFFER_UPDATES_H
diff --git a/src/nvim/bufwrite.h b/src/nvim/bufwrite.h
index 0845abf4ee..f8b9d93318 100644
--- a/src/nvim/bufwrite.h
+++ b/src/nvim/bufwrite.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_BUFWRITE_H
-#define NVIM_BUFWRITE_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/ex_cmds_defs.h"
@@ -7,5 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "bufwrite.h.generated.h"
#endif
-
-#endif // NVIM_BUFWRITE_H
diff --git a/src/nvim/change.h b/src/nvim/change.h
index d1d016c630..e6a78e966f 100644
--- a/src/nvim/change.h
+++ b/src/nvim/change.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CHANGE_H
-#define NVIM_CHANGE_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/pos.h"
@@ -15,5 +14,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "change.h.generated.h"
#endif
-
-#endif // NVIM_CHANGE_H
diff --git a/src/nvim/channel.h b/src/nvim/channel.h
index 281e1aa2be..a042faeb82 100644
--- a/src/nvim/channel.h
+++ b/src/nvim/channel.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CHANNEL_H
-#define NVIM_CHANNEL_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -161,5 +160,3 @@ static inline Stream *channel_outstream(Channel *chan)
}
abort();
}
-
-#endif // NVIM_CHANNEL_H
diff --git a/src/nvim/charset.h b/src/nvim/charset.h
index d615012cd5..79ae20c29b 100644
--- a/src/nvim/charset.h
+++ b/src/nvim/charset.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CHARSET_H
-#define NVIM_CHARSET_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -57,4 +56,3 @@ static inline bool vim_isbreak(int c)
{
return breakat_flags[(uint8_t)c];
}
-#endif // NVIM_CHARSET_H
diff --git a/src/nvim/cmdexpand.h b/src/nvim/cmdexpand.h
index 81e323c97b..ebdffc9b80 100644
--- a/src/nvim/cmdexpand.h
+++ b/src/nvim/cmdexpand.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CMDEXPAND_H
-#define NVIM_CMDEXPAND_H
+#pragma once
#include "nvim/cmdexpand_defs.h"
#include "nvim/eval/typval_defs.h"
@@ -45,4 +44,3 @@ enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "cmdexpand.h.generated.h"
#endif
-#endif // NVIM_CMDEXPAND_H
diff --git a/src/nvim/cmdexpand_defs.h b/src/nvim/cmdexpand_defs.h
index 0e830a016f..7dda7bb031 100644
--- a/src/nvim/cmdexpand_defs.h
+++ b/src/nvim/cmdexpand_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CMDEXPAND_DEFS_H
-#define NVIM_CMDEXPAND_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -112,5 +111,3 @@ enum {
/// Type used by ExpandGeneric()
typedef char *(*CompleteListItemGetter)(expand_T *, int);
-
-#endif // NVIM_CMDEXPAND_DEFS_H
diff --git a/src/nvim/cmdhist.h b/src/nvim/cmdhist.h
index 2b7e47e38e..260730f7df 100644
--- a/src/nvim/cmdhist.h
+++ b/src/nvim/cmdhist.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CMDHIST_H
-#define NVIM_CMDHIST_H
+#pragma once
#include "nvim/cmdexpand_defs.h"
#include "nvim/eval/typval_defs.h"
@@ -31,4 +30,3 @@ typedef struct hist_entry {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "cmdhist.h.generated.h"
#endif
-#endif // NVIM_CMDHIST_H
diff --git a/src/nvim/context.h b/src/nvim/context.h
index 7a1224d876..f39399e806 100644
--- a/src/nvim/context.h
+++ b/src/nvim/context.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CONTEXT_H
-#define NVIM_CONTEXT_H
+#pragma once
#include <msgpack.h>
#include <msgpack/sbuffer.h>
@@ -45,5 +44,3 @@ extern int kCtxAll;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "context.h.generated.h"
#endif
-
-#endif // NVIM_CONTEXT_H
diff --git a/src/nvim/cursor.h b/src/nvim/cursor.h
index 1cbe8a609e..1baa83d327 100644
--- a/src/nvim/cursor.h
+++ b/src/nvim/cursor.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CURSOR_H
-#define NVIM_CURSOR_H
+#pragma once
#include <stdbool.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "cursor.h.generated.h"
#endif
-
-#endif // NVIM_CURSOR_H
diff --git a/src/nvim/cursor_shape.h b/src/nvim/cursor_shape.h
index 33d0344c2d..1d4e1796f6 100644
--- a/src/nvim/cursor_shape.h
+++ b/src/nvim/cursor_shape.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_CURSOR_SHAPE_H
-#define NVIM_CURSOR_SHAPE_H
+#pragma once
#include "nvim/api/private/defs.h"
#include "nvim/types.h"
@@ -58,4 +57,3 @@ extern cursorentry_T shape_table[SHAPE_IDX_COUNT];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "cursor_shape.h.generated.h"
#endif
-#endif // NVIM_CURSOR_SHAPE_H
diff --git a/src/nvim/debugger.h b/src/nvim/debugger.h
index 1f1139b3bc..8b79fcf955 100644
--- a/src/nvim/debugger.h
+++ b/src/nvim/debugger.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_DEBUGGER_H
-#define NVIM_DEBUGGER_H
+#pragma once
#include <stdbool.h>
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "debugger.h.generated.h"
#endif
-#endif // NVIM_DEBUGGER_H
diff --git a/src/nvim/decoration.h b/src/nvim/decoration.h
index b82beaeef3..2e224135ed 100644
--- a/src/nvim/decoration.h
+++ b/src/nvim/decoration.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_DECORATION_H
-#define NVIM_DECORATION_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -128,5 +127,3 @@ static inline bool decor_has_sign(Decoration *decor)
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "decoration.h.generated.h"
#endif
-
-#endif // NVIM_DECORATION_H
diff --git a/src/nvim/decoration_provider.h b/src/nvim/decoration_provider.h
index 2ee476ba45..284de9b20d 100644
--- a/src/nvim/decoration_provider.h
+++ b/src/nvim/decoration_provider.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_DECORATION_PROVIDER_H
-#define NVIM_DECORATION_PROVIDER_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -34,5 +33,3 @@ EXTERN bool provider_active INIT( = false);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "decoration_provider.h.generated.h"
#endif
-
-#endif // NVIM_DECORATION_PROVIDER_H
diff --git a/src/nvim/diff.h b/src/nvim/diff.h
index eda0fac5cb..a9c80333ec 100644
--- a/src/nvim/diff.h
+++ b/src/nvim/diff.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_DIFF_H
-#define NVIM_DIFF_H
+#pragma once
#include <stdbool.h>
@@ -17,4 +16,3 @@ EXTERN bool need_diff_redraw INIT( = false); // need to call diff_redraw()
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "diff.h.generated.h"
#endif
-#endif // NVIM_DIFF_H
diff --git a/src/nvim/digraph.h b/src/nvim/digraph.h
index 71330ae9b1..d7662785fe 100644
--- a/src/nvim/digraph.h
+++ b/src/nvim/digraph.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_DIGRAPH_H
-#define NVIM_DIGRAPH_H
+#pragma once
#include "nvim/ex_cmds_defs.h"
#include "nvim/types.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "digraph.h.generated.h"
#endif
-#endif // NVIM_DIGRAPH_H
diff --git a/src/nvim/drawline.h b/src/nvim/drawline.h
index 8345596e6f..747e062bf9 100644
--- a/src/nvim/drawline.h
+++ b/src/nvim/drawline.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_DRAWLINE_H
-#define NVIM_DRAWLINE_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -38,4 +37,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "drawline.h.generated.h"
#endif
-#endif // NVIM_DRAWLINE_H
diff --git a/src/nvim/drawscreen.h b/src/nvim/drawscreen.h
index f3044e693a..8640f7b7fc 100644
--- a/src/nvim/drawscreen.h
+++ b/src/nvim/drawscreen.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_DRAWSCREEN_H
-#define NVIM_DRAWSCREEN_H
+#pragma once
#include <stdbool.h>
@@ -31,4 +30,3 @@ EXTERN match_T screen_search_hl INIT( = { 0 }); // used for 'hlsearch' hig
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "drawscreen.h.generated.h"
#endif
-#endif // NVIM_DRAWSCREEN_H
diff --git a/src/nvim/edit.h b/src/nvim/edit.h
index 91c519f015..e64e45bec1 100644
--- a/src/nvim/edit.h
+++ b/src/nvim/edit.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EDIT_H
-#define NVIM_EDIT_H
+#pragma once
#include "nvim/autocmd.h"
#include "nvim/vim.h"
@@ -29,4 +28,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "edit.h.generated.h"
#endif
-#endif // NVIM_EDIT_H
diff --git a/src/nvim/eval.h b/src/nvim/eval.h
index 837a64fc81..90e51c5c12 100644
--- a/src/nvim/eval.h
+++ b/src/nvim/eval.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_H
-#define NVIM_EVAL_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -282,4 +281,3 @@ EXTERN evalarg_T EVALARG_EVALUATE INIT( = { EVAL_EVALUATE, NULL, NULL, NULL });
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval.h.generated.h"
#endif
-#endif // NVIM_EVAL_H
diff --git a/src/nvim/eval/buffer.h b/src/nvim/eval/buffer.h
index 4a2f8f9e94..fdd146885a 100644
--- a/src/nvim/eval/buffer.h
+++ b/src/nvim/eval/buffer.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_BUFFER_H
-#define NVIM_EVAL_BUFFER_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/eval/typval_defs.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/buffer.h.generated.h"
#endif
-#endif // NVIM_EVAL_BUFFER_H
diff --git a/src/nvim/eval/decode.h b/src/nvim/eval/decode.h
index 7455130221..3000cd3211 100644
--- a/src/nvim/eval/decode.h
+++ b/src/nvim/eval/decode.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_DECODE_H
-#define NVIM_EVAL_DECODE_H
+#pragma once
#include <msgpack.h>
#include <stddef.h>
@@ -10,4 +9,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/decode.h.generated.h"
#endif
-#endif // NVIM_EVAL_DECODE_H
diff --git a/src/nvim/eval/encode.h b/src/nvim/eval/encode.h
index b589b8b13f..a30016e724 100644
--- a/src/nvim/eval/encode.h
+++ b/src/nvim/eval/encode.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_ENCODE_H
-#define NVIM_EVAL_ENCODE_H
+#pragma once
#include <msgpack.h>
#include <msgpack/pack.h>
@@ -74,4 +73,3 @@ extern const char *const encode_special_var_names[];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/encode.h.generated.h"
#endif
-#endif // NVIM_EVAL_ENCODE_H
diff --git a/src/nvim/eval/executor.h b/src/nvim/eval/executor.h
index e8bf147245..58edf7216b 100644
--- a/src/nvim/eval/executor.h
+++ b/src/nvim/eval/executor.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_EXECUTOR_H
-#define NVIM_EVAL_EXECUTOR_H
+#pragma once
#include "nvim/eval/typval_defs.h"
@@ -8,4 +7,3 @@ extern char *e_list_index_out_of_range_nr;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/executor.h.generated.h"
#endif
-#endif // NVIM_EVAL_EXECUTOR_H
diff --git a/src/nvim/eval/funcs.h b/src/nvim/eval/funcs.h
index 5f6132f68c..858da53e13 100644
--- a/src/nvim/eval/funcs.h
+++ b/src/nvim/eval/funcs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_FUNCS_H
-#define NVIM_EVAL_FUNCS_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -31,4 +30,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/funcs.h.generated.h"
#endif
-#endif // NVIM_EVAL_FUNCS_H
diff --git a/src/nvim/eval/gc.h b/src/nvim/eval/gc.h
index 66e959ced5..ea91952fff 100644
--- a/src/nvim/eval/gc.h
+++ b/src/nvim/eval/gc.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_GC_H
-#define NVIM_EVAL_GC_H
+#pragma once
#include "nvim/eval/typval_defs.h"
@@ -9,4 +8,3 @@ extern list_T *gc_first_list;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/gc.h.generated.h"
#endif
-#endif // NVIM_EVAL_GC_H
diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h
index d2baabb424..751b9646b3 100644
--- a/src/nvim/eval/typval.h
+++ b/src/nvim/eval/typval.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_TYPVAL_H
-#define NVIM_EVAL_TYPVAL_H
+#pragma once
#include <assert.h>
#include <stdbool.h>
@@ -492,5 +491,3 @@ EXTERN const size_t kTVTranslate INIT( = TV_TRANSLATE);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/typval.h.generated.h"
#endif
-
-#endif // NVIM_EVAL_TYPVAL_H
diff --git a/src/nvim/eval/typval_defs.h b/src/nvim/eval/typval_defs.h
index c0b5416a05..996dac20bc 100644
--- a/src/nvim/eval/typval_defs.h
+++ b/src/nvim/eval/typval_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_TYPVAL_DEFS_H
-#define NVIM_EVAL_TYPVAL_DEFS_H
+#pragma once
#include <inttypes.h>
#include <limits.h>
@@ -385,5 +384,3 @@ typedef struct list_stack_S {
list_T *list;
struct list_stack_S *prev;
} list_stack_T;
-
-#endif // NVIM_EVAL_TYPVAL_DEFS_H
diff --git a/src/nvim/eval/typval_encode.h b/src/nvim/eval/typval_encode.h
index cf01926030..743acd8800 100644
--- a/src/nvim/eval/typval_encode.h
+++ b/src/nvim/eval/typval_encode.h
@@ -2,8 +2,7 @@
///
/// Contains common definitions for eval/typval_encode.c.h. Most of time should
/// not be included directly.
-#ifndef NVIM_EVAL_TYPVAL_ENCODE_H
-#define NVIM_EVAL_TYPVAL_ENCODE_H
+#pragma once
#include <assert.h>
#include <inttypes.h>
@@ -140,5 +139,3 @@ static inline size_t tv_strlen(const typval_T *const tv)
/// Name of the dummy const dict_T *const variable
#define TYPVAL_ENCODE_NODICT_VAR \
_TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _nodict_var)
-
-#endif // NVIM_EVAL_TYPVAL_ENCODE_H
diff --git a/src/nvim/eval/userfunc.h b/src/nvim/eval/userfunc.h
index c3fe56d30c..7f77b55f27 100644
--- a/src/nvim/eval/userfunc.h
+++ b/src/nvim/eval/userfunc.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_USERFUNC_H
-#define NVIM_EVAL_USERFUNC_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -97,4 +96,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/userfunc.h.generated.h"
#endif
-#endif // NVIM_EVAL_USERFUNC_H
diff --git a/src/nvim/eval/vars.h b/src/nvim/eval/vars.h
index 12ff5b11cb..124d73825b 100644
--- a/src/nvim/eval/vars.h
+++ b/src/nvim/eval/vars.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_VARS_H
-#define NVIM_EVAL_VARS_H
+#pragma once
#include "nvim/ex_cmds_defs.h"
#include "nvim/option_defs.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/vars.h.generated.h"
#endif
-#endif // NVIM_EVAL_VARS_H
diff --git a/src/nvim/eval/window.h b/src/nvim/eval/window.h
index 671c8fbf79..8502978ac1 100644
--- a/src/nvim/eval/window.h
+++ b/src/nvim/eval/window.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVAL_WINDOW_H
-#define NVIM_EVAL_WINDOW_H
+#pragma once
#include <stdbool.h>
#include <string.h>
@@ -76,4 +75,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/window.h.generated.h"
#endif
-#endif // NVIM_EVAL_WINDOW_H
diff --git a/src/nvim/event/defs.h b/src/nvim/event/defs.h
index cf079681d0..571f61dfdb 100644
--- a/src/nvim/event/defs.h
+++ b/src/nvim/event/defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_DEFS_H
-#define NVIM_EVENT_DEFS_H
+#pragma once
#include <assert.h>
#include <stdarg.h>
@@ -34,5 +33,3 @@ static inline Event event_create(argv_callback cb, int argc, ...)
VA_EVENT_INIT(&event, cb, argc);
return event;
}
-
-#endif // NVIM_EVENT_DEFS_H
diff --git a/src/nvim/event/libuv_process.h b/src/nvim/event/libuv_process.h
index 4472839944..e3e2bfeb76 100644
--- a/src/nvim/event/libuv_process.h
+++ b/src/nvim/event/libuv_process.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_LIBUV_PROCESS_H
-#define NVIM_EVENT_LIBUV_PROCESS_H
+#pragma once
#include <uv.h>
@@ -24,4 +23,3 @@ static inline LibuvProcess libuv_process_init(Loop *loop, void *data)
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/libuv_process.h.generated.h"
#endif
-#endif // NVIM_EVENT_LIBUV_PROCESS_H
diff --git a/src/nvim/event/loop.h b/src/nvim/event/loop.h
index 7b4b724359..58216f7ec3 100644
--- a/src/nvim/event/loop.h
+++ b/src/nvim/event/loop.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_LOOP_H
-#define NVIM_EVENT_LOOP_H
+#pragma once
#include <stdint.h>
#include <uv.h>
@@ -85,5 +84,3 @@ typedef struct loop {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/loop.h.generated.h"
#endif
-
-#endif // NVIM_EVENT_LOOP_H
diff --git a/src/nvim/event/multiqueue.h b/src/nvim/event/multiqueue.h
index 2c5ba9d436..e01ee1e710 100644
--- a/src/nvim/event/multiqueue.h
+++ b/src/nvim/event/multiqueue.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_MULTIQUEUE_H
-#define NVIM_EVENT_MULTIQUEUE_H
+#pragma once
#include <uv.h>
@@ -15,4 +14,3 @@ typedef void (*PutCallback)(MultiQueue *multiq, void *data);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/multiqueue.h.generated.h"
#endif
-#endif // NVIM_EVENT_MULTIQUEUE_H
diff --git a/src/nvim/event/process.h b/src/nvim/event/process.h
index 69fe229b0e..234fc815af 100644
--- a/src/nvim/event/process.h
+++ b/src/nvim/event/process.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_PROCESS_H
-#define NVIM_EVENT_PROCESS_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -83,4 +82,3 @@ static inline bool process_is_stopped(Process *proc)
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/process.h.generated.h"
#endif
-#endif // NVIM_EVENT_PROCESS_H
diff --git a/src/nvim/event/rstream.h b/src/nvim/event/rstream.h
index 23ed00bfea..b2a62acf83 100644
--- a/src/nvim/event/rstream.h
+++ b/src/nvim/event/rstream.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_RSTREAM_H
-#define NVIM_EVENT_RSTREAM_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -11,4 +10,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/rstream.h.generated.h"
#endif
-#endif // NVIM_EVENT_RSTREAM_H
diff --git a/src/nvim/event/signal.h b/src/nvim/event/signal.h
index f9adf62c20..946de1b4f0 100644
--- a/src/nvim/event/signal.h
+++ b/src/nvim/event/signal.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_SIGNAL_H
-#define NVIM_EVENT_SIGNAL_H
+#pragma once
#include <uv.h>
@@ -23,4 +22,3 @@ struct signal_watcher {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/signal.h.generated.h"
#endif
-#endif // NVIM_EVENT_SIGNAL_H
diff --git a/src/nvim/event/socket.h b/src/nvim/event/socket.h
index c6fcdec4bb..504af3c7a8 100644
--- a/src/nvim/event/socket.h
+++ b/src/nvim/event/socket.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_SOCKET_H
-#define NVIM_EVENT_SOCKET_H
+#pragma once
#include <uv.h>
@@ -39,4 +38,3 @@ struct socket_watcher {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/socket.h.generated.h"
#endif
-#endif // NVIM_EVENT_SOCKET_H
diff --git a/src/nvim/event/stream.h b/src/nvim/event/stream.h
index 33d2d6e775..d02707dc45 100644
--- a/src/nvim/event/stream.h
+++ b/src/nvim/event/stream.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_STREAM_H
-#define NVIM_EVENT_STREAM_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -61,4 +60,3 @@ struct stream {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/stream.h.generated.h"
#endif
-#endif // NVIM_EVENT_STREAM_H
diff --git a/src/nvim/event/time.h b/src/nvim/event/time.h
index e84488fdd6..3514566901 100644
--- a/src/nvim/event/time.h
+++ b/src/nvim/event/time.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_TIME_H
-#define NVIM_EVENT_TIME_H
+#pragma once
#include <stdbool.h>
#include <uv.h>
@@ -23,4 +22,3 @@ struct time_watcher {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/time.h.generated.h"
#endif
-#endif // NVIM_EVENT_TIME_H
diff --git a/src/nvim/event/wstream.h b/src/nvim/event/wstream.h
index ef1311c619..4cba7bde8f 100644
--- a/src/nvim/event/wstream.h
+++ b/src/nvim/event/wstream.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EVENT_WSTREAM_H
-#define NVIM_EVENT_WSTREAM_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -23,4 +22,3 @@ struct wbuffer {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/wstream.h.generated.h"
#endif
-#endif // NVIM_EVENT_WSTREAM_H
diff --git a/src/nvim/ex_cmds.h b/src/nvim/ex_cmds.h
index f101c1b710..493b17431c 100644
--- a/src/nvim/ex_cmds.h
+++ b/src/nvim/ex_cmds.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EX_CMDS_H
-#define NVIM_EX_CMDS_H
+#pragma once
#include <stdbool.h>
@@ -34,4 +33,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_cmds.h.generated.h"
#endif
-#endif // NVIM_EX_CMDS_H
diff --git a/src/nvim/ex_cmds2.h b/src/nvim/ex_cmds2.h
index 3a41e105f3..ad5008f310 100644
--- a/src/nvim/ex_cmds2.h
+++ b/src/nvim/ex_cmds2.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EX_CMDS2_H
-#define NVIM_EX_CMDS2_H
+#pragma once
#include "nvim/ex_cmds_defs.h"
@@ -15,4 +14,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_cmds2.h.generated.h"
#endif
-#endif // NVIM_EX_CMDS2_H
diff --git a/src/nvim/ex_cmds_defs.h b/src/nvim/ex_cmds_defs.h
index e15ba673ce..9359c6ed12 100644
--- a/src/nvim/ex_cmds_defs.h
+++ b/src/nvim/ex_cmds_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EX_CMDS_DEFS_H
-#define NVIM_EX_CMDS_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -230,5 +229,3 @@ typedef struct {
bool bar;
} magic;
} CmdParseInfo;
-
-#endif // NVIM_EX_CMDS_DEFS_H
diff --git a/src/nvim/ex_docmd.h b/src/nvim/ex_docmd.h
index 59f45fce88..1ccd112e2a 100644
--- a/src/nvim/ex_docmd.h
+++ b/src/nvim/ex_docmd.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EX_DOCMD_H
-#define NVIM_EX_DOCMD_H
+#pragma once
#include <stdbool.h>
@@ -41,4 +40,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_docmd.h.generated.h"
#endif
-#endif // NVIM_EX_DOCMD_H
diff --git a/src/nvim/ex_eval.h b/src/nvim/ex_eval.h
index d3053ae0d4..bf39341ce4 100644
--- a/src/nvim/ex_eval.h
+++ b/src/nvim/ex_eval.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EX_EVAL_H
-#define NVIM_EX_EVAL_H
+#pragma once
#include "nvim/ex_cmds_defs.h"
#include "nvim/ex_eval_defs.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_eval.h.generated.h"
#endif
-#endif // NVIM_EX_EVAL_H
diff --git a/src/nvim/ex_eval_defs.h b/src/nvim/ex_eval_defs.h
index 16b8d2f02b..61ef4508ef 100644
--- a/src/nvim/ex_eval_defs.h
+++ b/src/nvim/ex_eval_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EX_EVAL_DEFS_H
-#define NVIM_EX_EVAL_DEFS_H
+#pragma once
#include <stdbool.h>
@@ -128,5 +127,3 @@ struct exception_state_S {
int estate_trylevel;
int estate_did_emsg;
};
-
-#endif // NVIM_EX_EVAL_DEFS_H
diff --git a/src/nvim/ex_getln.h b/src/nvim/ex_getln.h
index 61bbd5b9e1..af4593a0d3 100644
--- a/src/nvim/ex_getln.h
+++ b/src/nvim/ex_getln.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EX_GETLN_H
-#define NVIM_EX_GETLN_H
+#pragma once
#include <stdbool.h>
@@ -84,4 +83,3 @@ enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_getln.h.generated.h"
#endif
-#endif // NVIM_EX_GETLN_H
diff --git a/src/nvim/ex_session.h b/src/nvim/ex_session.h
index 7ee2894c6e..51917ebfb2 100644
--- a/src/nvim/ex_session.h
+++ b/src/nvim/ex_session.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EX_SESSION_H
-#define NVIM_EX_SESSION_H
+#pragma once
#include <stdio.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_session.h.generated.h"
#endif
-
-#endif // NVIM_EX_SESSION_H
diff --git a/src/nvim/extmark.h b/src/nvim/extmark.h
index 6b7292465c..771edf3983 100644
--- a/src/nvim/extmark.h
+++ b/src/nvim/extmark.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EXTMARK_H
-#define NVIM_EXTMARK_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -103,5 +102,3 @@ struct undo_object {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "extmark.h.generated.h"
#endif
-
-#endif // NVIM_EXTMARK_H
diff --git a/src/nvim/extmark_defs.h b/src/nvim/extmark_defs.h
index 51b60dcf6d..6615551df4 100644
--- a/src/nvim/extmark_defs.h
+++ b/src/nvim/extmark_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_EXTMARK_DEFS_H
-#define NVIM_EXTMARK_DEFS_H
+#pragma once
#include "klib/kvec.h"
#include "nvim/types.h"
@@ -28,5 +27,3 @@ typedef enum {
kDecorLevelVisible = 1,
kDecorLevelVirtLine = 2,
} DecorLevel;
-
-#endif // NVIM_EXTMARK_DEFS_H
diff --git a/src/nvim/file_search.h b/src/nvim/file_search.h
index b69a6fa154..a63711c1fa 100644
--- a/src/nvim/file_search.h
+++ b/src/nvim/file_search.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_FILE_SEARCH_H
-#define NVIM_FILE_SEARCH_H
+#pragma once
#include <stdlib.h>
@@ -14,4 +13,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "file_search.h.generated.h"
#endif
-#endif // NVIM_FILE_SEARCH_H
diff --git a/src/nvim/fileio.h b/src/nvim/fileio.h
index 92ea866239..85d41e466a 100644
--- a/src/nvim/fileio.h
+++ b/src/nvim/fileio.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_FILEIO_H
-#define NVIM_FILEIO_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/eval/typval_defs.h"
@@ -47,4 +46,3 @@ enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "fileio.h.generated.h"
#endif
-#endif // NVIM_FILEIO_H
diff --git a/src/nvim/fold.h b/src/nvim/fold.h
index 5a1ef836d3..43eb152fc0 100644
--- a/src/nvim/fold.h
+++ b/src/nvim/fold.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_FOLD_H
-#define NVIM_FOLD_H
+#pragma once
#include <stdio.h>
@@ -15,4 +14,3 @@ EXTERN int disable_fold_update INIT( = 0);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "fold.h.generated.h"
#endif
-#endif // NVIM_FOLD_H
diff --git a/src/nvim/fold_defs.h b/src/nvim/fold_defs.h
index c528d25348..f11481ead6 100644
--- a/src/nvim/fold_defs.h
+++ b/src/nvim/fold_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_FOLD_DEFS_H
-#define NVIM_FOLD_DEFS_H
+#pragma once
#include "nvim/pos.h"
@@ -13,5 +12,3 @@ typedef struct foldinfo {
// line
linenr_T fi_lines;
} foldinfo_T;
-
-#endif // NVIM_FOLD_DEFS_H
diff --git a/src/nvim/garray.h b/src/nvim/garray.h
index d3e04cd761..d5322053bb 100644
--- a/src/nvim/garray.h
+++ b/src/nvim/garray.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_GARRAY_H
-#define NVIM_GARRAY_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -72,5 +71,3 @@ static inline void *ga_append_via_ptr(garray_T *gap, size_t item_size)
///
/// @param gap the garray to be freed
#define GA_DEEP_CLEAR_PTR(gap) GA_DEEP_CLEAR(gap, void *, FREE_PTR_PTR)
-
-#endif // NVIM_GARRAY_H
diff --git a/src/nvim/getchar.h b/src/nvim/getchar.h
index 55b5657dc8..c97c7d6d74 100644
--- a/src/nvim/getchar.h
+++ b/src/nvim/getchar.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_GETCHAR_H
-#define NVIM_GETCHAR_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -25,4 +24,3 @@ extern FileDescriptor *scriptin[NSCRIPT];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "getchar.h.generated.h"
#endif
-#endif // NVIM_GETCHAR_H
diff --git a/src/nvim/getchar_defs.h b/src/nvim/getchar_defs.h
index 0ec662441a..5e6db7d9f3 100644
--- a/src/nvim/getchar_defs.h
+++ b/src/nvim/getchar_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_GETCHAR_DEFS_H
-#define NVIM_GETCHAR_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -62,5 +61,3 @@ enum RemapValues {
REMAP_SCRIPT = -2, ///< Remap script-local mappings only.
REMAP_SKIP = -3, ///< No remapping for first char.
};
-
-#endif // NVIM_GETCHAR_DEFS_H
diff --git a/src/nvim/gettext.h b/src/nvim/gettext.h
index 9f3fe115db..6ce40f4a85 100644
--- a/src/nvim/gettext.h
+++ b/src/nvim/gettext.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_GETTEXT_H
-#define NVIM_GETTEXT_H
+#pragma once
#ifdef HAVE_WORKING_LIBINTL
# include <libintl.h>
@@ -24,5 +23,3 @@
# define bind_textdomain_codeset(x, y) // empty
# define textdomain(x) // empty
#endif
-
-#endif // NVIM_GETTEXT_H
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index 9e09555a1b..0cab3d1f8c 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_GLOBALS_H
-#define NVIM_GLOBALS_H
+#pragma once
#include <inttypes.h>
#include <stdbool.h>
@@ -1103,5 +1102,3 @@ EXTERN bool skip_win_fix_cursor INIT( = false);
EXTERN bool skip_win_fix_scroll INIT( = false);
/// Skip update_topline() call while executing win_fix_scroll().
EXTERN bool skip_update_topline INIT( = false);
-
-#endif // NVIM_GLOBALS_H
diff --git a/src/nvim/grid.h b/src/nvim/grid.h
index 6e3c4fd770..ef9c4e1b87 100644
--- a/src/nvim/grid.h
+++ b/src/nvim/grid.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_GRID_H
-#define NVIM_GRID_H
+#pragma once
#include <stdbool.h>
#include <string.h>
@@ -59,4 +58,3 @@ static inline schar_T schar_from_char(int c)
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "grid.h.generated.h"
#endif
-#endif // NVIM_GRID_H
diff --git a/src/nvim/grid_defs.h b/src/nvim/grid_defs.h
index 390b2a848a..11e736fc0c 100644
--- a/src/nvim/grid_defs.h
+++ b/src/nvim/grid_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_GRID_DEFS_H
-#define NVIM_GRID_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -130,5 +129,3 @@ typedef struct {
int clear_width;
bool wrap;
} GridLineEvent;
-
-#endif // NVIM_GRID_DEFS_H
diff --git a/src/nvim/hashtab.h b/src/nvim/hashtab.h
index 0a50fb2ef8..ca17b36a20 100644
--- a/src/nvim/hashtab.h
+++ b/src/nvim/hashtab.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_HASHTAB_H
-#define NVIM_HASHTAB_H
+#pragma once
#include <stddef.h>
@@ -94,5 +93,3 @@ typedef struct hashtable_S {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "hashtab.h.generated.h"
#endif
-
-#endif // NVIM_HASHTAB_H
diff --git a/src/nvim/help.h b/src/nvim/help.h
index 21e11392ee..7e65e9e133 100644
--- a/src/nvim/help.h
+++ b/src/nvim/help.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_HELP_H
-#define NVIM_HELP_H
+#pragma once
#include <stdbool.h>
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "help.h.generated.h"
#endif
-#endif // NVIM_HELP_H
diff --git a/src/nvim/highlight.h b/src/nvim/highlight.h
index fc311b4269..9c3a07d7ab 100644
--- a/src/nvim/highlight.h
+++ b/src/nvim/highlight.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_HIGHLIGHT_H
-#define NVIM_HIGHLIGHT_H
+#pragma once
#include <stdbool.h>
@@ -31,5 +30,3 @@ static inline int win_hl_attr(win_T *wp, int hlf)
rgb_bg = rgb_bg != -1 ? rgb_bg : (dark_ ? 0x000000 : 0xFFFFFF); \
rgb_sp = rgb_sp != -1 ? rgb_sp : 0xFF0000; \
} while (0);
-
-#endif // NVIM_HIGHLIGHT_H
diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h
index 6277dc0527..faec66b2bc 100644
--- a/src/nvim/highlight_defs.h
+++ b/src/nvim/highlight_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_HIGHLIGHT_DEFS_H
-#define NVIM_HIGHLIGHT_DEFS_H
+#pragma once
#include <inttypes.h>
@@ -253,5 +252,3 @@ typedef struct {
int hl_id;
int priority;
} HlPriId;
-
-#endif // NVIM_HIGHLIGHT_DEFS_H
diff --git a/src/nvim/highlight_group.h b/src/nvim/highlight_group.h
index 369864552c..f40a741003 100644
--- a/src/nvim/highlight_group.h
+++ b/src/nvim/highlight_group.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_HIGHLIGHT_GROUP_H
-#define NVIM_HIGHLIGHT_GROUP_H
+#pragma once
#include "nvim/api/keysets.h"
#include "nvim/api/private/helpers.h"
@@ -18,5 +17,3 @@ extern color_name_table_T color_name_table[];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "highlight_group.h.generated.h"
#endif
-
-#endif // NVIM_HIGHLIGHT_GROUP_H
diff --git a/src/nvim/iconv.h b/src/nvim/iconv.h
index f5f3f25786..02470c4207 100644
--- a/src/nvim/iconv.h
+++ b/src/nvim/iconv.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_ICONV_H
-#define NVIM_ICONV_H
+#pragma once
#include <errno.h>
#include <iconv.h>
@@ -14,5 +13,3 @@
#define ICONV_E2BIG E2BIG
#define ICONV_EINVAL EINVAL
#define ICONV_EILSEQ EILSEQ
-
-#endif // NVIM_ICONV_H
diff --git a/src/nvim/indent.h b/src/nvim/indent.h
index f807bbb42b..0da2fbea47 100644
--- a/src/nvim/indent.h
+++ b/src/nvim/indent.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_INDENT_H
-#define NVIM_INDENT_H
+#pragma once
#include "nvim/vim.h"
@@ -14,4 +13,3 @@ typedef int (*IndentGetter)(void);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "indent.h.generated.h"
#endif
-#endif // NVIM_INDENT_H
diff --git a/src/nvim/indent_c.h b/src/nvim/indent_c.h
index bd6eeed67d..140faaa33d 100644
--- a/src/nvim/indent_c.h
+++ b/src/nvim/indent_c.h
@@ -1,9 +1,7 @@
-#ifndef NVIM_INDENT_C_H
-#define NVIM_INDENT_C_H
+#pragma once
#include "nvim/vim.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "indent_c.h.generated.h"
#endif
-#endif // NVIM_INDENT_C_H
diff --git a/src/nvim/input.h b/src/nvim/input.h
index 7975f21215..fbb8dec265 100644
--- a/src/nvim/input.h
+++ b/src/nvim/input.h
@@ -1,9 +1,7 @@
-#ifndef NVIM_INPUT_H
-#define NVIM_INPUT_H
+#pragma once
#include "nvim/vim.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "input.h.generated.h"
#endif
-#endif // NVIM_INPUT_H
diff --git a/src/nvim/insexpand.h b/src/nvim/insexpand.h
index e09004f032..9098c50499 100644
--- a/src/nvim/insexpand.h
+++ b/src/nvim/insexpand.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_INSEXPAND_H
-#define NVIM_INSEXPAND_H
+#pragma once
#include <stdbool.h>
@@ -10,4 +9,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "insexpand.h.generated.h"
#endif
-#endif // NVIM_INSEXPAND_H
diff --git a/src/nvim/keycodes.h b/src/nvim/keycodes.h
index 9806808438..3b944d4680 100644
--- a/src/nvim/keycodes.h
+++ b/src/nvim/keycodes.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_KEYCODES_H
-#define NVIM_KEYCODES_H
+#pragma once
#include <stddef.h>
@@ -501,4 +500,3 @@ enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "keycodes.h.generated.h"
#endif
-#endif // NVIM_KEYCODES_H
diff --git a/src/nvim/lib/queue.h b/src/nvim/lib/queue.h
index c6d3f74ec1..40769e44b5 100644
--- a/src/nvim/lib/queue.h
+++ b/src/nvim/lib/queue.h
@@ -17,8 +17,7 @@
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#ifndef NVIM_LIB_QUEUE_H
-#define NVIM_LIB_QUEUE_H
+#pragma once
#include <stddef.h>
@@ -91,5 +90,3 @@ static inline void QUEUE_REMOVE(QUEUE *const q) FUNC_ATTR_ALWAYS_INLINE
q->prev->next = q->next;
q->next->prev = q->prev;
}
-
-#endif // NVIM_LIB_QUEUE_H
diff --git a/src/nvim/lib/ringbuf.h b/src/nvim/lib/ringbuf.h
index 907018a06e..c8abccfeb4 100644
--- a/src/nvim/lib/ringbuf.h
+++ b/src/nvim/lib/ringbuf.h
@@ -12,8 +12,8 @@
/// - idx_p: get pointer to the element at given index.
/// - insert: insert element at given position.
/// - remove: remove element from given position.
-#ifndef NVIM_LIB_RINGBUF_H
-#define NVIM_LIB_RINGBUF_H
+
+#pragma once
#include <assert.h>
#include <stddef.h>
@@ -288,5 +288,3 @@
rb->first = _RINGBUF_NEXT(rb, rb->first); \
} \
}
-
-#endif // NVIM_LIB_RINGBUF_H
diff --git a/src/nvim/linematch.h b/src/nvim/linematch.h
index 129d2c7125..a2c72d26e7 100644
--- a/src/nvim/linematch.h
+++ b/src/nvim/linematch.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LINEMATCH_H
-#define NVIM_LINEMATCH_H
+#pragma once
#include <stddef.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "linematch.h.generated.h"
#endif
-
-#endif // NVIM_LINEMATCH_H
diff --git a/src/nvim/log.h b/src/nvim/log.h
index 6866680de2..b03c7dbc26 100644
--- a/src/nvim/log.h
+++ b/src/nvim/log.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LOG_H
-#define NVIM_LOG_H
+#pragma once
#include <stdbool.h>
#include <stdio.h>
@@ -53,4 +52,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "log.h.generated.h"
#endif
-#endif // NVIM_LOG_H
diff --git a/src/nvim/lua/base64.h b/src/nvim/lua/base64.h
index 570d9eb677..feb409ef38 100644
--- a/src/nvim/lua/base64.h
+++ b/src/nvim/lua/base64.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LUA_BASE64_H
-#define NVIM_LUA_BASE64_H
+#pragma once
#include <lauxlib.h>
#include <lua.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/base64.h.generated.h"
#endif
-
-#endif // NVIM_LUA_BASE64_H
diff --git a/src/nvim/lua/converter.h b/src/nvim/lua/converter.h
index d1d6b9d62a..501db36dbe 100644
--- a/src/nvim/lua/converter.h
+++ b/src/nvim/lua/converter.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LUA_CONVERTER_H
-#define NVIM_LUA_CONVERTER_H
+#pragma once
#include <lua.h>
#include <stdbool.h>
@@ -16,4 +15,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/converter.h.generated.h"
#endif
-#endif // NVIM_LUA_CONVERTER_H
diff --git a/src/nvim/lua/executor.h b/src/nvim/lua/executor.h
index 4b4d1dded8..91775e0322 100644
--- a/src/nvim/lua/executor.h
+++ b/src/nvim/lua/executor.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LUA_EXECUTOR_H
-#define NVIM_LUA_EXECUTOR_H
+#pragma once
#include <lauxlib.h>
#include <lua.h>
@@ -47,5 +46,3 @@ typedef struct {
EXTERN nlua_ref_state_t *nlua_global_refs INIT( = NULL);
EXTERN bool nlua_disable_preload INIT( = false);
-
-#endif // NVIM_LUA_EXECUTOR_H
diff --git a/src/nvim/lua/secure.h b/src/nvim/lua/secure.h
index 87c468538e..b363a243a5 100644
--- a/src/nvim/lua/secure.h
+++ b/src/nvim/lua/secure.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LUA_SECURE_H
-#define NVIM_LUA_SECURE_H
+#pragma once
#include <lua.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/secure.h.generated.h"
#endif
-
-#endif // NVIM_LUA_SECURE_H
diff --git a/src/nvim/lua/spell.h b/src/nvim/lua/spell.h
index 8f798a5191..adf3e9dd60 100644
--- a/src/nvim/lua/spell.h
+++ b/src/nvim/lua/spell.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LUA_SPELL_H
-#define NVIM_LUA_SPELL_H
+#pragma once
#include <lauxlib.h>
#include <lua.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/spell.h.generated.h"
#endif
-
-#endif // NVIM_LUA_SPELL_H
diff --git a/src/nvim/lua/stdlib.h b/src/nvim/lua/stdlib.h
index 17aec6714d..b2be54af90 100644
--- a/src/nvim/lua/stdlib.h
+++ b/src/nvim/lua/stdlib.h
@@ -1,10 +1,7 @@
-#ifndef NVIM_LUA_STDLIB_H
-#define NVIM_LUA_STDLIB_H
+#pragma once
#include <lua.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/stdlib.h.generated.h"
#endif
-
-#endif // NVIM_LUA_STDLIB_H
diff --git a/src/nvim/lua/treesitter.h b/src/nvim/lua/treesitter.h
index b69fb9dfae..c1c78b8a6a 100644
--- a/src/nvim/lua/treesitter.h
+++ b/src/nvim/lua/treesitter.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LUA_TREESITTER_H
-#define NVIM_LUA_TREESITTER_H
+#pragma once
#include <lauxlib.h>
#include <lua.h>
@@ -10,5 +9,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/treesitter.h.generated.h"
#endif
-
-#endif // NVIM_LUA_TREESITTER_H
diff --git a/src/nvim/lua/xdiff.h b/src/nvim/lua/xdiff.h
index b172d2f922..9cb5cabbfb 100644
--- a/src/nvim/lua/xdiff.h
+++ b/src/nvim/lua/xdiff.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_LUA_XDIFF_H
-#define NVIM_LUA_XDIFF_H
+#pragma once
#include <lauxlib.h>
#include <lua.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/xdiff.h.generated.h"
#endif
-
-#endif // NVIM_LUA_XDIFF_H
diff --git a/src/nvim/macros.h b/src/nvim/macros.h
index 6a999489e2..a7af2f91c3 100644
--- a/src/nvim/macros.h
+++ b/src/nvim/macros.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MACROS_H
-#define NVIM_MACROS_H
+#pragma once
#include "auto/config.h"
@@ -211,5 +210,3 @@
#endif
#define EMPTY_POS(a) ((a).lnum == 0 && (a).col == 0 && (a).coladd == 0)
-
-#endif // NVIM_MACROS_H
diff --git a/src/nvim/main.h b/src/nvim/main.h
index 2d54837872..6aeb62712a 100644
--- a/src/nvim/main.h
+++ b/src/nvim/main.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MAIN_H
-#define NVIM_MAIN_H
+#pragma once
#include <stdbool.h>
@@ -51,4 +50,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "main.h.generated.h"
#endif
-#endif // NVIM_MAIN_H
diff --git a/src/nvim/map.h b/src/nvim/map.h
index 2d5517c552..3251a53fdc 100644
--- a/src/nvim/map.h
+++ b/src/nvim/map.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MAP_H
-#define NVIM_MAP_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -225,5 +224,3 @@ MAP_DECLS(ColorKey, ColorItem)
}
void pmap_del2(PMap(cstr_t) *map, const char *key);
-
-#endif // NVIM_MAP_H
diff --git a/src/nvim/mapping.h b/src/nvim/mapping.h
index 860bbad272..68f272ee42 100644
--- a/src/nvim/mapping.h
+++ b/src/nvim/mapping.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MAPPING_H
-#define NVIM_MAPPING_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -25,4 +24,3 @@ enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "mapping.h.generated.h"
#endif
-#endif // NVIM_MAPPING_H
diff --git a/src/nvim/mapping_defs.h b/src/nvim/mapping_defs.h
index ff0633308b..80c1edf0f2 100644
--- a/src/nvim/mapping_defs.h
+++ b/src/nvim/mapping_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MAPPING_DEFS_H
-#define NVIM_MAPPING_DEFS_H
+#pragma once
#include <stdbool.h>
@@ -25,5 +24,3 @@ struct mapblock {
char *m_desc; ///< description of mapping
bool m_replace_keycodes; ///< replace keycodes in result of expression
};
-
-#endif // NVIM_MAPPING_DEFS_H
diff --git a/src/nvim/mark.h b/src/nvim/mark.h
index d84f6a8bb0..c74e81df0e 100644
--- a/src/nvim/mark.h
+++ b/src/nvim/mark.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MARK_H
-#define NVIM_MARK_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -121,4 +120,3 @@ static inline void clearpos(pos_T *a)
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "mark.h.generated.h"
#endif
-#endif // NVIM_MARK_H
diff --git a/src/nvim/mark_defs.h b/src/nvim/mark_defs.h
index 54e3a9cbb4..0e4fcc5889 100644
--- a/src/nvim/mark_defs.h
+++ b/src/nvim/mark_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MARK_DEFS_H
-#define NVIM_MARK_DEFS_H
+#pragma once
#include "nvim/eval/typval_defs.h"
#include "nvim/os/time.h"
@@ -88,5 +87,3 @@ typedef struct xfilemark {
/// Global marks (marks with file number or name)
EXTERN xfmark_T namedfm[NGLOBALMARKS] INIT( = { 0 });
-
-#endif // NVIM_MARK_DEFS_H
diff --git a/src/nvim/marktree.h b/src/nvim/marktree.h
index 82cb95d8e3..126f743e92 100644
--- a/src/nvim/marktree.h
+++ b/src/nvim/marktree.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MARKTREE_H
-#define NVIM_MARKTREE_H
+#pragma once
#include <assert.h>
#include <stdbool.h>
@@ -190,5 +189,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "marktree.h.generated.h"
#endif
-
-#endif // NVIM_MARKTREE_H
diff --git a/src/nvim/match.h b/src/nvim/match.h
index 22a848bfdf..3e5ab04ddf 100644
--- a/src/nvim/match.h
+++ b/src/nvim/match.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MATCH_H
-#define NVIM_MATCH_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/ex_cmds_defs.h"
@@ -7,5 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "match.h.generated.h"
#endif
-
-#endif // NVIM_MATCH_H
diff --git a/src/nvim/math.h b/src/nvim/math.h
index 7969323905..c88ce1e03d 100644
--- a/src/nvim/math.h
+++ b/src/nvim/math.h
@@ -1,7 +1,5 @@
-#ifndef NVIM_MATH_H
-#define NVIM_MATH_H
+#pragma once
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "math.h.generated.h"
#endif
-#endif // NVIM_MATH_H
diff --git a/src/nvim/mbyte.h b/src/nvim/mbyte.h
index 01a7d0d6ae..1d1a9439ad 100644
--- a/src/nvim/mbyte.h
+++ b/src/nvim/mbyte.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MBYTE_H
-#define NVIM_MBYTE_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -39,4 +38,3 @@ static inline int mb_strcmp_ic(bool ic, const char *s1, const char *s2)
{
return (ic ? mb_stricmp(s1, s2) : strcmp(s1, s2));
}
-#endif // NVIM_MBYTE_H
diff --git a/src/nvim/mbyte_defs.h b/src/nvim/mbyte_defs.h
index e913e20f9f..bd73694f97 100644
--- a/src/nvim/mbyte_defs.h
+++ b/src/nvim/mbyte_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MBYTE_DEFS_H
-#define NVIM_MBYTE_DEFS_H
+#pragma once
#include <stdbool.h>
@@ -50,5 +49,3 @@ typedef struct {
bool vc_fail; ///< What to do with invalid characters: if true, fail,
///< otherwise use '?'.
} vimconv_T;
-
-#endif // NVIM_MBYTE_DEFS_H
diff --git a/src/nvim/memfile.h b/src/nvim/memfile.h
index 085fa22f12..fb453778cc 100644
--- a/src/nvim/memfile.h
+++ b/src/nvim/memfile.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MEMFILE_H
-#define NVIM_MEMFILE_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/memfile_defs.h"
@@ -13,4 +12,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "memfile.h.generated.h"
#endif
-#endif // NVIM_MEMFILE_H
diff --git a/src/nvim/memfile_defs.h b/src/nvim/memfile_defs.h
index bf9bb208a4..1ed5a1cb62 100644
--- a/src/nvim/memfile_defs.h
+++ b/src/nvim/memfile_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MEMFILE_DEFS_H
-#define NVIM_MEMFILE_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -67,5 +66,3 @@ typedef struct memfile {
unsigned mf_page_size; ///< number of bytes in a page
mfdirty_T mf_dirty;
} memfile_T;
-
-#endif // NVIM_MEMFILE_DEFS_H
diff --git a/src/nvim/memline.h b/src/nvim/memline.h
index f4190f0210..97a1f99b85 100644
--- a/src/nvim/memline.h
+++ b/src/nvim/memline.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MEMLINE_H
-#define NVIM_MEMLINE_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/pos.h"
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "memline.h.generated.h"
#endif
-#endif // NVIM_MEMLINE_H
diff --git a/src/nvim/memline_defs.h b/src/nvim/memline_defs.h
index 028c9b8915..f95dc7a2e5 100644
--- a/src/nvim/memline_defs.h
+++ b/src/nvim/memline_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MEMLINE_DEFS_H
-#define NVIM_MEMLINE_DEFS_H
+#pragma once
#include "nvim/memfile_defs.h"
@@ -69,5 +68,3 @@ typedef struct memline {
int ml_numchunks;
int ml_usedchunks;
} memline_T;
-
-#endif // NVIM_MEMLINE_DEFS_H
diff --git a/src/nvim/memory.h b/src/nvim/memory.h
index 862f7d9273..100d991656 100644
--- a/src/nvim/memory.h
+++ b/src/nvim/memory.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MEMORY_H
-#define NVIM_MEMORY_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -72,5 +71,3 @@ typedef struct {
*ptr_ = NULL; \
(void)(*ptr_); \
} while (0)
-
-#endif // NVIM_MEMORY_H
diff --git a/src/nvim/menu.h b/src/nvim/menu.h
index 8d7a98d270..7da78a64a3 100644
--- a/src/nvim/menu.h
+++ b/src/nvim/menu.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MENU_H
-#define NVIM_MENU_H
+#pragma once
#include <stdbool.h>
@@ -11,4 +10,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "menu.h.generated.h"
#endif
-#endif // NVIM_MENU_H
diff --git a/src/nvim/menu_defs.h b/src/nvim/menu_defs.h
index 1e010c07ba..b870055238 100644
--- a/src/nvim/menu_defs.h
+++ b/src/nvim/menu_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MENU_DEFS_H
-#define NVIM_MENU_DEFS_H
+#pragma once
#include <stdbool.h>
@@ -60,5 +59,3 @@ struct VimMenu {
vimmenu_T *parent; ///< Parent of menu
vimmenu_T *next; ///< Next item in menu
};
-
-#endif // NVIM_MENU_DEFS_H
diff --git a/src/nvim/message.h b/src/nvim/message.h
index efa2aa9ee8..95e83adb63 100644
--- a/src/nvim/message.h
+++ b/src/nvim/message.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MESSAGE_H
-#define NVIM_MESSAGE_H
+#pragma once
#include <stdarg.h>
#include <stdbool.h>
@@ -74,4 +73,3 @@ EXTERN int msg_listdo_overwrite INIT( = 0);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "message.h.generated.h"
#endif
-#endif // NVIM_MESSAGE_H
diff --git a/src/nvim/mouse.h b/src/nvim/mouse.h
index 8b2d7e0acd..0e38f279aa 100644
--- a/src/nvim/mouse.h
+++ b/src/nvim/mouse.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MOUSE_H
-#define NVIM_MOUSE_H
+#pragma once
#include <stdbool.h>
@@ -56,5 +55,3 @@ enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "mouse.h.generated.h"
#endif
-
-#endif // NVIM_MOUSE_H
diff --git a/src/nvim/move.h b/src/nvim/move.h
index dd944e39ee..846a316309 100644
--- a/src/nvim/move.h
+++ b/src/nvim/move.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MOVE_H
-#define NVIM_MOVE_H
+#pragma once
#include <stdbool.h>
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "move.h.generated.h"
#endif
-#endif // NVIM_MOVE_H
diff --git a/src/nvim/msgpack_rpc/channel.h b/src/nvim/msgpack_rpc/channel.h
index 2a6626a6e1..e2b7f5d8d1 100644
--- a/src/nvim/msgpack_rpc/channel.h
+++ b/src/nvim/msgpack_rpc/channel.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MSGPACK_RPC_CHANNEL_H
-#define NVIM_MSGPACK_RPC_CHANNEL_H
+#pragma once
#include <stdbool.h>
#include <uv.h>
@@ -22,4 +21,3 @@ EXTERN MultiQueue *ch_before_blocking_events INIT( = NULL);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "msgpack_rpc/channel.h.generated.h"
#endif
-#endif // NVIM_MSGPACK_RPC_CHANNEL_H
diff --git a/src/nvim/msgpack_rpc/channel_defs.h b/src/nvim/msgpack_rpc/channel_defs.h
index 79aa8c1b13..0bbffb8beb 100644
--- a/src/nvim/msgpack_rpc/channel_defs.h
+++ b/src/nvim/msgpack_rpc/channel_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
-#define NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
+#pragma once
#include <msgpack.h>
#include <stdbool.h>
@@ -49,5 +48,3 @@ typedef struct {
Dictionary info;
ClientType client_type;
} RpcState;
-
-#endif // NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
diff --git a/src/nvim/msgpack_rpc/helpers.h b/src/nvim/msgpack_rpc/helpers.h
index dab8a16b6b..dd2096f305 100644
--- a/src/nvim/msgpack_rpc/helpers.h
+++ b/src/nvim/msgpack_rpc/helpers.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MSGPACK_RPC_HELPERS_H
-#define NVIM_MSGPACK_RPC_HELPERS_H
+#pragma once
#include <msgpack.h>
#include <stdbool.h>
@@ -19,5 +18,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "msgpack_rpc/helpers.h.generated.h"
#endif
-
-#endif // NVIM_MSGPACK_RPC_HELPERS_H
diff --git a/src/nvim/msgpack_rpc/server.h b/src/nvim/msgpack_rpc/server.h
index 5446e40e0b..c6a240cd55 100644
--- a/src/nvim/msgpack_rpc/server.h
+++ b/src/nvim/msgpack_rpc/server.h
@@ -1,9 +1,7 @@
-#ifndef NVIM_MSGPACK_RPC_SERVER_H
-#define NVIM_MSGPACK_RPC_SERVER_H
+#pragma once
#include <stdio.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "msgpack_rpc/server.h.generated.h"
#endif
-#endif // NVIM_MSGPACK_RPC_SERVER_H
diff --git a/src/nvim/msgpack_rpc/unpacker.h b/src/nvim/msgpack_rpc/unpacker.h
index b8b2d38d3b..72e1b04511 100644
--- a/src/nvim/msgpack_rpc/unpacker.h
+++ b/src/nvim/msgpack_rpc/unpacker.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_MSGPACK_RPC_UNPACKER_H
-#define NVIM_MSGPACK_RPC_UNPACKER_H
+#pragma once
#include <inttypes.h>
#include <stdbool.h>
@@ -49,5 +48,3 @@ struct Unpacker {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "msgpack_rpc/unpacker.h.generated.h"
#endif
-
-#endif // NVIM_MSGPACK_RPC_UNPACKER_H
diff --git a/src/nvim/normal.h b/src/nvim/normal.h
index 3d7782c05c..9b82bb8182 100644
--- a/src/nvim/normal.h
+++ b/src/nvim/normal.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_NORMAL_H
-#define NVIM_NORMAL_H
+#pragma once
#include <stdbool.h>
@@ -82,4 +81,3 @@ EXTERN char showcmd_buf[SHOWCMD_BUFLEN];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "normal.h.generated.h"
#endif
-#endif // NVIM_NORMAL_H
diff --git a/src/nvim/ops.h b/src/nvim/ops.h
index 425b760108..dfd3946432 100644
--- a/src/nvim/ops.h
+++ b/src/nvim/ops.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OPS_H
-#define NVIM_OPS_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -138,5 +137,3 @@ static inline bool is_literal_register(const int regname)
#endif
EXTERN LuaRef repeat_luaref INIT( = LUA_NOREF); ///< LuaRef for "."
-
-#endif // NVIM_OPS_H
diff --git a/src/nvim/option.h b/src/nvim/option.h
index 9e936f39ca..f60810f8de 100644
--- a/src/nvim/option.h
+++ b/src/nvim/option.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OPTION_H
-#define NVIM_OPTION_H
+#pragma once
#include <stdint.h>
@@ -116,4 +115,3 @@ typedef enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "option.h.generated.h"
#endif
-#endif // NVIM_OPTION_H
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index 461277c1fa..4ea543e79e 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OPTION_DEFS_H
-#define NVIM_OPTION_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -115,5 +114,3 @@ typedef struct {
/// Note: If returned FAIL or *numMatches is 0, *matches will NOT be freed by
/// caller.
typedef int (*opt_expand_cb_T)(optexpand_T *args, int *numMatches, char ***matches);
-
-#endif // NVIM_OPTION_DEFS_H
diff --git a/src/nvim/option_vars.h b/src/nvim/option_vars.h
index 5df30b5e80..f8f6fa5670 100644
--- a/src/nvim/option_vars.h
+++ b/src/nvim/option_vars.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OPTION_VARS_H
-#define NVIM_OPTION_VARS_H
+#pragma once
#include "nvim/macros.h"
#include "nvim/types.h"
@@ -946,5 +945,3 @@ enum {
#define MAX_NUMBERWIDTH 20 // used for 'numberwidth' and 'statuscolumn'
#define TABSTOP_MAX 9999
-
-#endif // NVIM_OPTION_VARS_H
diff --git a/src/nvim/optionstr.h b/src/nvim/optionstr.h
index a481ed1d07..03d6f840b4 100644
--- a/src/nvim/optionstr.h
+++ b/src/nvim/optionstr.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OPTIONSTR_H
-#define NVIM_OPTIONSTR_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/cmdexpand_defs.h"
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "optionstr.h.generated.h"
#endif
-#endif // NVIM_OPTIONSTR_H
diff --git a/src/nvim/os/dl.h b/src/nvim/os/dl.h
index 302e4e6678..9c41a28f69 100644
--- a/src/nvim/os/dl.h
+++ b/src/nvim/os/dl.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_DL_H
-#define NVIM_OS_DL_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/dl.h.generated.h"
#endif
-#endif // NVIM_OS_DL_H
diff --git a/src/nvim/os/fileio.h b/src/nvim/os/fileio.h
index 5e47bbf921..72e7984c8a 100644
--- a/src/nvim/os/fileio.h
+++ b/src/nvim/os/fileio.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_FILEIO_H
-#define NVIM_OS_FILEIO_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -75,4 +74,3 @@ enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/fileio.h.generated.h"
#endif
-#endif // NVIM_OS_FILEIO_H
diff --git a/src/nvim/os/fs.h b/src/nvim/os/fs.h
index 75c24b8db2..4fe54215ba 100644
--- a/src/nvim/os/fs.h
+++ b/src/nvim/os/fs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_FS_H
-#define NVIM_OS_FS_H
+#pragma once
#include "nvim/os/fs_defs.h"
#include "nvim/types.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/fs.h.generated.h"
#endif
-#endif // NVIM_OS_FS_H
diff --git a/src/nvim/os/fs_defs.h b/src/nvim/os/fs_defs.h
index f4929b12b1..e5355ddefd 100644
--- a/src/nvim/os/fs_defs.h
+++ b/src/nvim/os/fs_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_FS_DEFS_H
-#define NVIM_OS_FS_DEFS_H
+#pragma once
#include <uv.h>
@@ -26,5 +25,3 @@ typedef struct {
#define NODE_WRITABLE 1 // something we can write to (character
// device, fifo, socket, ..)
#define NODE_OTHER 2 // non-writable thing (e.g., block device)
-
-#endif // NVIM_OS_FS_DEFS_H
diff --git a/src/nvim/os/input.h b/src/nvim/os/input.h
index d42da010f0..113dbbb8d5 100644
--- a/src/nvim/os/input.h
+++ b/src/nvim/os/input.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_INPUT_H
-#define NVIM_OS_INPUT_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -13,4 +12,3 @@ EXTERN bool used_stdin INIT( = false);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/input.h.generated.h"
#endif
-#endif // NVIM_OS_INPUT_H
diff --git a/src/nvim/os/lang.h b/src/nvim/os/lang.h
index ad64b38916..dd32378c69 100644
--- a/src/nvim/os/lang.h
+++ b/src/nvim/os/lang.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_LANG_H
-#define NVIM_OS_LANG_H
+#pragma once
#include "nvim/cmdexpand_defs.h"
#include "nvim/ex_cmds_defs.h"
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/lang.h.generated.h"
#endif
-#endif // NVIM_OS_LANG_H
diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h
index 006dfbfc04..54fff5c8e3 100644
--- a/src/nvim/os/os.h
+++ b/src/nvim/os/os.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_OS_H
-#define NVIM_OS_OS_H
+#pragma once
#include <stdbool.h>
#include <uv.h>
@@ -21,5 +20,3 @@
#define ENV_LOGFILE "NVIM_LOG_FILE"
#define ENV_NVIM "NVIM"
-
-#endif // NVIM_OS_OS_H
diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h
index 1e0f5b77f8..e5060a5e6a 100644
--- a/src/nvim/os/os_defs.h
+++ b/src/nvim/os/os_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_OS_DEFS_H
-#define NVIM_OS_OS_DEFS_H
+#pragma once
#include <ctype.h>
#include <stdio.h>
@@ -104,5 +103,3 @@
# define S_ISLNK(m) 0
# endif
#endif
-
-#endif // NVIM_OS_OS_DEFS_H
diff --git a/src/nvim/os/os_win_console.h b/src/nvim/os/os_win_console.h
index 7b5800afa8..098267312a 100644
--- a/src/nvim/os/os_win_console.h
+++ b/src/nvim/os/os_win_console.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_OS_WIN_CONSOLE_H
-#define NVIM_OS_OS_WIN_CONSOLE_H
+#pragma once
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/os_win_console.h.generated.h"
@@ -8,5 +7,3 @@
#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT
# define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200
#endif
-
-#endif // NVIM_OS_OS_WIN_CONSOLE_H
diff --git a/src/nvim/os/process.h b/src/nvim/os/process.h
index faa4762cf1..61a5009fd8 100644
--- a/src/nvim/os/process.h
+++ b/src/nvim/os/process.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_PROCESS_H
-#define NVIM_OS_PROCESS_H
+#pragma once
#include <stddef.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/process.h.generated.h"
#endif
-
-#endif // NVIM_OS_PROCESS_H
diff --git a/src/nvim/os/pty_conpty_win.h b/src/nvim/os/pty_conpty_win.h
index c47857bdd9..aa04cd1e84 100644
--- a/src/nvim/os/pty_conpty_win.h
+++ b/src/nvim/os/pty_conpty_win.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_PTY_CONPTY_WIN_H
-#define NVIM_OS_PTY_CONPTY_WIN_H
+#pragma once
#include "klib/kvec.h"
#include "nvim/os/input.h"
@@ -21,5 +20,3 @@ typedef struct conpty {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/pty_conpty_win.h.generated.h"
#endif
-
-#endif // NVIM_OS_PTY_CONPTY_WIN_H
diff --git a/src/nvim/os/pty_process.h b/src/nvim/os/pty_process.h
index 07d346be22..2c7a5f66bd 100644
--- a/src/nvim/os/pty_process.h
+++ b/src/nvim/os/pty_process.h
@@ -1,9 +1,7 @@
-#ifndef NVIM_OS_PTY_PROCESS_H
-#define NVIM_OS_PTY_PROCESS_H
+#pragma once
#ifdef MSWIN
# include "nvim/os/pty_process_win.h"
#else
# include "nvim/os/pty_process_unix.h"
#endif
-#endif // NVIM_OS_PTY_PROCESS_H
diff --git a/src/nvim/os/pty_process_unix.h b/src/nvim/os/pty_process_unix.h
index 0cc68cf3e9..344e0a3423 100644
--- a/src/nvim/os/pty_process_unix.h
+++ b/src/nvim/os/pty_process_unix.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_PTY_PROCESS_UNIX_H
-#define NVIM_OS_PTY_PROCESS_UNIX_H
+#pragma once
#include <stdint.h>
#include <sys/ioctl.h>
@@ -27,5 +26,3 @@ static inline PtyProcess pty_process_init(Loop *loop, void *data)
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/pty_process_unix.h.generated.h"
#endif
-
-#endif // NVIM_OS_PTY_PROCESS_UNIX_H
diff --git a/src/nvim/os/pty_process_win.h b/src/nvim/os/pty_process_win.h
index ed7d765ac7..71190380fd 100644
--- a/src/nvim/os/pty_process_win.h
+++ b/src/nvim/os/pty_process_win.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_PTY_PROCESS_WIN_H
-#define NVIM_OS_PTY_PROCESS_WIN_H
+#pragma once
#include <uv.h>
@@ -37,5 +36,3 @@ static inline PtyProcess pty_process_init(Loop *loop, void *data)
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/pty_process_win.h.generated.h"
#endif
-
-#endif // NVIM_OS_PTY_PROCESS_WIN_H
diff --git a/src/nvim/os/shell.h b/src/nvim/os/shell.h
index 48503f2601..498c72e63d 100644
--- a/src/nvim/os/shell.h
+++ b/src/nvim/os/shell.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_SHELL_H
-#define NVIM_OS_SHELL_H
+#pragma once
#include <stdio.h>
@@ -19,4 +18,3 @@ typedef enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/shell.h.generated.h"
#endif
-#endif // NVIM_OS_SHELL_H
diff --git a/src/nvim/os/signal.h b/src/nvim/os/signal.h
index 5d8cc6f661..83a0a9c91b 100644
--- a/src/nvim/os/signal.h
+++ b/src/nvim/os/signal.h
@@ -1,7 +1,5 @@
-#ifndef NVIM_OS_SIGNAL_H
-#define NVIM_OS_SIGNAL_H
+#pragma once
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/signal.h.generated.h"
#endif
-#endif // NVIM_OS_SIGNAL_H
diff --git a/src/nvim/os/stdpaths_defs.h b/src/nvim/os/stdpaths_defs.h
index f94c511fe7..985688390d 100644
--- a/src/nvim/os/stdpaths_defs.h
+++ b/src/nvim/os/stdpaths_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_STDPATHS_DEFS_H
-#define NVIM_OS_STDPATHS_DEFS_H
+#pragma once
/// List of possible XDG variables
typedef enum {
@@ -12,5 +11,3 @@ typedef enum {
kXDGConfigDirs, ///< XDG_CONFIG_DIRS
kXDGDataDirs, ///< XDG_DATA_DIRS
} XDGVarType;
-
-#endif // NVIM_OS_STDPATHS_DEFS_H
diff --git a/src/nvim/os/time.h b/src/nvim/os/time.h
index 1b6c667dbb..8f8b5511bd 100644
--- a/src/nvim/os/time.h
+++ b/src/nvim/os/time.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_TIME_H
-#define NVIM_OS_TIME_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -10,4 +9,3 @@ typedef uint64_t Timestamp;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/time.h.generated.h"
#endif
-#endif // NVIM_OS_TIME_H
diff --git a/src/nvim/os/tty.h b/src/nvim/os/tty.h
index d771e63768..3a78573189 100644
--- a/src/nvim/os/tty.h
+++ b/src/nvim/os/tty.h
@@ -1,7 +1,5 @@
-#ifndef NVIM_OS_TTY_H
-#define NVIM_OS_TTY_H
+#pragma once
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/tty.h.generated.h"
#endif
-#endif // NVIM_OS_TTY_H
diff --git a/src/nvim/os/unix_defs.h b/src/nvim/os/unix_defs.h
index 8d002fc5e9..42d649d773 100644
--- a/src/nvim/os/unix_defs.h
+++ b/src/nvim/os/unix_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_UNIX_DEFS_H
-#define NVIM_OS_UNIX_DEFS_H
+#pragma once
#include <sys/param.h>
#include <unistd.h>
@@ -21,5 +20,3 @@
// Character that separates entries in $PATH.
#define ENV_SEPCHAR ':'
#define ENV_SEPSTR ":"
-
-#endif // NVIM_OS_UNIX_DEFS_H
diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h
index 4f8a242a51..e1bc1a727b 100644
--- a/src/nvim/os/win_defs.h
+++ b/src/nvim/os/win_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_OS_WIN_DEFS_H
-#define NVIM_OS_WIN_DEFS_H
+#pragma once
#ifndef MSWIN
# error Header must be included only when compiling for Windows.
@@ -86,5 +85,3 @@ typedef int mode_t;
#ifndef STDERR_FILENO
# define STDERR_FILENO 2
#endif
-
-#endif // NVIM_OS_WIN_DEFS_H
diff --git a/src/nvim/path.h b/src/nvim/path.h
index eaadc7f37d..48cbeaf684 100644
--- a/src/nvim/path.h
+++ b/src/nvim/path.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_PATH_H
-#define NVIM_PATH_H
+#pragma once
#include "nvim/func_attr.h"
#include "nvim/garray.h"
@@ -40,4 +39,3 @@ typedef enum file_comparison {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "path.h.generated.h"
#endif
-#endif // NVIM_PATH_H
diff --git a/src/nvim/plines.h b/src/nvim/plines.h
index ba04ef4554..c4832be94c 100644
--- a/src/nvim/plines.h
+++ b/src/nvim/plines.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_PLINES_H
-#define NVIM_PLINES_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -27,4 +26,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "plines.h.generated.h"
#endif
-#endif // NVIM_PLINES_H
diff --git a/src/nvim/popupmenu.h b/src/nvim/popupmenu.h
index 4354330a48..737e3b2f68 100644
--- a/src/nvim/popupmenu.h
+++ b/src/nvim/popupmenu.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_POPUPMENU_H
-#define NVIM_POPUPMENU_H
+#pragma once
#include <stdbool.h>
@@ -29,4 +28,3 @@ EXTERN struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "popupmenu.h.generated.h"
#endif
-#endif // NVIM_POPUPMENU_H
diff --git a/src/nvim/pos.h b/src/nvim/pos.h
index 1b7e6273fd..98a1762a5c 100644
--- a/src/nvim/pos.h
+++ b/src/nvim/pos.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_POS_H
-#define NVIM_POS_H
+#pragma once
#include <inttypes.h>
@@ -39,5 +38,3 @@ typedef struct {
linenr_T lnum; ///< line number
colnr_T col; ///< column number
} lpos_T;
-
-#endif // NVIM_POS_H
diff --git a/src/nvim/profile.h b/src/nvim/profile.h
index 7450a0dfdc..117e15d4bc 100644
--- a/src/nvim/profile.h
+++ b/src/nvim/profile.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_PROFILE_H
-#define NVIM_PROFILE_H
+#pragma once
#include <stdint.h>
#include <time.h>
@@ -15,5 +14,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "profile.h.generated.h"
#endif
-
-#endif // NVIM_PROFILE_H
diff --git a/src/nvim/quickfix.h b/src/nvim/quickfix.h
index 70b013be9c..e406679dcb 100644
--- a/src/nvim/quickfix.h
+++ b/src/nvim/quickfix.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_QUICKFIX_H
-#define NVIM_QUICKFIX_H
+#pragma once
#include "nvim/ex_cmds_defs.h"
#include "nvim/option_defs.h"
@@ -13,4 +12,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "quickfix.h.generated.h"
#endif
-#endif // NVIM_QUICKFIX_H
diff --git a/src/nvim/rbuffer.h b/src/nvim/rbuffer.h
index dddf34b095..0a73fdf7d3 100644
--- a/src/nvim/rbuffer.h
+++ b/src/nvim/rbuffer.h
@@ -11,8 +11,7 @@
// stopped(automatic backpressure handling)
//
// Reference: http://en.wikipedia.org/wiki/Circular_buffer
-#ifndef NVIM_RBUFFER_H
-#define NVIM_RBUFFER_H
+#pragma once
#include <stddef.h>
#include <stdint.h>
@@ -86,5 +85,3 @@ struct rbuffer {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "rbuffer.h.generated.h"
#endif
-
-#endif // NVIM_RBUFFER_H
diff --git a/src/nvim/regexp.h b/src/nvim/regexp.h
index 5760b4a4fa..f025584460 100644
--- a/src/nvim/regexp.h
+++ b/src/nvim/regexp.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_REGEXP_H
-#define NVIM_REGEXP_H
+#pragma once
#include "nvim/buffer_defs.h"
#include "nvim/regexp_defs.h"
@@ -20,5 +19,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "regexp.h.generated.h"
#endif
-
-#endif // NVIM_REGEXP_H
diff --git a/src/nvim/regexp_defs.h b/src/nvim/regexp_defs.h
index 8c2f5e4cd7..28e861dbaf 100644
--- a/src/nvim/regexp_defs.h
+++ b/src/nvim/regexp_defs.h
@@ -7,8 +7,7 @@
//
// NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
-#ifndef NVIM_REGEXP_DEFS_H
-#define NVIM_REGEXP_DEFS_H
+#pragma once
#include <stdbool.h>
@@ -177,5 +176,3 @@ struct regengine {
#define REGSUB_COPY 1
#define REGSUB_MAGIC 2
#define REGSUB_BACKSLASH 4
-
-#endif // NVIM_REGEXP_DEFS_H
diff --git a/src/nvim/runtime.h b/src/nvim/runtime.h
index 8286a11f89..cf098bcdab 100644
--- a/src/nvim/runtime.h
+++ b/src/nvim/runtime.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_RUNTIME_H
-#define NVIM_RUNTIME_H
+#pragma once
#include <stdbool.h>
@@ -120,4 +119,3 @@ typedef kvec_t(char *) CharVec;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "runtime.h.generated.h"
#endif
-#endif // NVIM_RUNTIME_H
diff --git a/src/nvim/search.h b/src/nvim/search.h
index 4fcd7e522a..8dd123432a 100644
--- a/src/nvim/search.h
+++ b/src/nvim/search.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SEARCH_H
-#define NVIM_SEARCH_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -109,4 +108,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "search.h.generated.h"
#endif
-#endif // NVIM_SEARCH_H
diff --git a/src/nvim/sha256.h b/src/nvim/sha256.h
index eeb4031509..d0e6fb2a4e 100644
--- a/src/nvim/sha256.h
+++ b/src/nvim/sha256.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SHA256_H
-#define NVIM_SHA256_H
+#pragma once
#include <stddef.h>
#include <stdint.h>
@@ -18,4 +17,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "sha256.h.generated.h"
#endif
-#endif // NVIM_SHA256_H
diff --git a/src/nvim/shada.h b/src/nvim/shada.h
index 2a945a06bc..234006bde4 100644
--- a/src/nvim/shada.h
+++ b/src/nvim/shada.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SHADA_H
-#define NVIM_SHADA_H
+#pragma once
#include <msgpack.h>
@@ -15,4 +14,3 @@ typedef enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "shada.h.generated.h"
#endif
-#endif // NVIM_SHADA_H
diff --git a/src/nvim/sign.h b/src/nvim/sign.h
index 89d765bf38..ac69b9f866 100644
--- a/src/nvim/sign.h
+++ b/src/nvim/sign.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SIGN_H
-#define NVIM_SIGN_H
+#pragma once
#include <stdbool.h>
@@ -11,4 +10,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "sign.h.generated.h"
#endif
-#endif // NVIM_SIGN_H
diff --git a/src/nvim/sign_defs.h b/src/nvim/sign_defs.h
index 274158faad..65ab7a72f6 100644
--- a/src/nvim/sign_defs.h
+++ b/src/nvim/sign_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SIGN_DEFS_H
-#define NVIM_SIGN_DEFS_H
+#pragma once
#include <stdbool.h>
@@ -50,5 +49,3 @@ typedef enum {
SIGN_NUMHL,
SIGN_TEXT,
} SignType;
-
-#endif // NVIM_SIGN_DEFS_H
diff --git a/src/nvim/spell.h b/src/nvim/spell.h
index f941f0e5e7..5e7eaba3ae 100644
--- a/src/nvim/spell.h
+++ b/src/nvim/spell.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SPELL_H
-#define NVIM_SPELL_H
+#pragma once
#include <stdbool.h>
@@ -11,4 +10,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "spell.h.generated.h"
#endif
-#endif // NVIM_SPELL_H
diff --git a/src/nvim/spell_defs.h b/src/nvim/spell_defs.h
index 5c2ef67a96..8b5412b3ad 100644
--- a/src/nvim/spell_defs.h
+++ b/src/nvim/spell_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SPELL_DEFS_H
-#define NVIM_SPELL_DEFS_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -253,5 +252,3 @@ typedef struct wordcount_S {
// Remember what "z?" replaced.
extern char *repl_from;
extern char *repl_to;
-
-#endif // NVIM_SPELL_DEFS_H
diff --git a/src/nvim/spellfile.h b/src/nvim/spellfile.h
index 235bc07f61..ba5f193f33 100644
--- a/src/nvim/spellfile.h
+++ b/src/nvim/spellfile.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SPELLFILE_H
-#define NVIM_SPELLFILE_H
+#pragma once
#include <stdbool.h>
@@ -10,4 +9,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "spellfile.h.generated.h"
#endif
-#endif // NVIM_SPELLFILE_H
diff --git a/src/nvim/spellsuggest.h b/src/nvim/spellsuggest.h
index 8813a5b3f1..5b7278563c 100644
--- a/src/nvim/spellsuggest.h
+++ b/src/nvim/spellsuggest.h
@@ -1,9 +1,7 @@
-#ifndef NVIM_SPELLSUGGEST_H
-#define NVIM_SPELLSUGGEST_H
+#pragma once
#include "nvim/garray.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "spellsuggest.h.generated.h"
#endif
-#endif // NVIM_SPELLSUGGEST_H
diff --git a/src/nvim/state.h b/src/nvim/state.h
index 76a38b0dab..326beaa9d9 100644
--- a/src/nvim/state.h
+++ b/src/nvim/state.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_STATE_H
-#define NVIM_STATE_H
+#pragma once
#include <stddef.h>
@@ -18,5 +17,3 @@ struct vim_state {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "state.h.generated.h"
#endif
-
-#endif // NVIM_STATE_H
diff --git a/src/nvim/statusline.h b/src/nvim/statusline.h
index 5bb1d6c5bd..7fcdddf580 100644
--- a/src/nvim/statusline.h
+++ b/src/nvim/statusline.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_STATUSLINE_H
-#define NVIM_STATUSLINE_H
+#pragma once
#include <stddef.h>
@@ -15,5 +14,3 @@ EXTERN size_t tab_page_click_defs_size INIT( = 0);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "statusline.h.generated.h"
#endif
-
-#endif // NVIM_STATUSLINE_H
diff --git a/src/nvim/statusline_defs.h b/src/nvim/statusline_defs.h
index a9483216de..f502f33c49 100644
--- a/src/nvim/statusline_defs.h
+++ b/src/nvim/statusline_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_STATUSLINE_DEFS_H
-#define NVIM_STATUSLINE_DEFS_H
+#pragma once
#include <stddef.h>
@@ -75,5 +74,3 @@ struct statuscol {
foldinfo_T foldinfo; ///< fold information
SignTextAttrs *sattrs; ///< sign attributes
};
-
-#endif // NVIM_STATUSLINE_DEFS_H
diff --git a/src/nvim/strings.h b/src/nvim/strings.h
index f4ccf9b30c..a2e8d04b30 100644
--- a/src/nvim/strings.h
+++ b/src/nvim/strings.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_STRINGS_H
-#define NVIM_STRINGS_H
+#pragma once
#include <stdarg.h>
#include <stdbool.h>
@@ -31,4 +30,3 @@ typedef kvec_t(char) StringBuilder;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "strings.h.generated.h"
#endif
-#endif // NVIM_STRINGS_H
diff --git a/src/nvim/syntax.h b/src/nvim/syntax.h
index c56624bc37..4fcfaac074 100644
--- a/src/nvim/syntax.h
+++ b/src/nvim/syntax.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SYNTAX_H
-#define NVIM_SYNTAX_H
+#pragma once
#include <stdbool.h>
@@ -37,5 +36,3 @@ extern const char *const highlight_init_cmdline[];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "syntax.h.generated.h"
#endif
-
-#endif // NVIM_SYNTAX_H
diff --git a/src/nvim/syntax_defs.h b/src/nvim/syntax_defs.h
index 218cd3623d..ae4997154e 100644
--- a/src/nvim/syntax_defs.h
+++ b/src/nvim/syntax_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_SYNTAX_DEFS_H
-#define NVIM_SYNTAX_DEFS_H
+#pragma once
#include "nvim/highlight_defs.h"
@@ -59,5 +58,3 @@ struct syn_state {
linenr_T sst_change_lnum; // when non-zero, change in this line
// may have made the state invalid
};
-
-#endif // NVIM_SYNTAX_DEFS_H
diff --git a/src/nvim/tag.h b/src/nvim/tag.h
index 90ef0384a1..c5178503f1 100644
--- a/src/nvim/tag.h
+++ b/src/nvim/tag.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TAG_H
-#define NVIM_TAG_H
+#pragma once
#include "nvim/ex_cmds_defs.h"
#include "nvim/option_defs.h"
@@ -43,4 +42,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "tag.h.generated.h"
#endif
-#endif // NVIM_TAG_H
diff --git a/src/nvim/terminal.h b/src/nvim/terminal.h
index a83929e224..0704423f1f 100644
--- a/src/nvim/terminal.h
+++ b/src/nvim/terminal.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TERMINAL_H
-#define NVIM_TERMINAL_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -23,4 +22,3 @@ typedef struct {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "terminal.h.generated.h"
#endif
-#endif // NVIM_TERMINAL_H
diff --git a/src/nvim/testing.h b/src/nvim/testing.h
index 69ceeb16b5..64e74bc46a 100644
--- a/src/nvim/testing.h
+++ b/src/nvim/testing.h
@@ -1,9 +1,7 @@
-#ifndef NVIM_TESTING_H
-#define NVIM_TESTING_H
+#pragma once
#include "nvim/eval/typval_defs.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "testing.h.generated.h"
#endif
-#endif // NVIM_TESTING_H
diff --git a/src/nvim/textformat.h b/src/nvim/textformat.h
index fcc9c2d6f4..809e509db6 100644
--- a/src/nvim/textformat.h
+++ b/src/nvim/textformat.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TEXTFORMAT_H
-#define NVIM_TEXTFORMAT_H
+#pragma once
#include "nvim/normal.h"
#include "nvim/pos.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "textformat.h.generated.h"
#endif
-#endif // NVIM_TEXTFORMAT_H
diff --git a/src/nvim/textobject.h b/src/nvim/textobject.h
index e31557f297..cc8e22d6ef 100644
--- a/src/nvim/textobject.h
+++ b/src/nvim/textobject.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TEXTOBJECT_H
-#define NVIM_TEXTOBJECT_H
+#pragma once
#include "nvim/normal.h"
#include "nvim/pos.h"
@@ -8,4 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "textobject.h.generated.h"
#endif
-#endif // NVIM_TEXTOBJECT_H
diff --git a/src/nvim/tui/input.h b/src/nvim/tui/input.h
index f631860e74..8b4d1ba74b 100644
--- a/src/nvim/tui/input.h
+++ b/src/nvim/tui/input.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TUI_INPUT_H
-#define NVIM_TUI_INPUT_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -47,5 +46,3 @@ typedef enum {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "tui/input.h.generated.h"
#endif
-
-#endif // NVIM_TUI_INPUT_H
diff --git a/src/nvim/tui/input_defs.h b/src/nvim/tui/input_defs.h
index 846cf45350..9aea8460c8 100644
--- a/src/nvim/tui/input_defs.h
+++ b/src/nvim/tui/input_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TUI_INPUT_DEFS_H
-#define NVIM_TUI_INPUT_DEFS_H
+#pragma once
typedef enum {
KITTY_KEY_ESCAPE = 57344,
@@ -114,5 +113,3 @@ typedef enum {
KITTY_KEY_ISO_LEVEL3_SHIFT = 57453,
KITTY_KEY_ISO_LEVEL5_SHIFT = 57454,
} KittyKey;
-
-#endif // NVIM_TUI_INPUT_DEFS_H
diff --git a/src/nvim/tui/terminfo.h b/src/nvim/tui/terminfo.h
index 178d384457..f435926dd7 100644
--- a/src/nvim/tui/terminfo.h
+++ b/src/nvim/tui/terminfo.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TUI_TERMINFO_H
-#define NVIM_TUI_TERMINFO_H
+#pragma once
#include <unibilium.h>
@@ -8,5 +7,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "tui/terminfo.h.generated.h"
#endif
-
-#endif // NVIM_TUI_TERMINFO_H
diff --git a/src/nvim/tui/terminfo_defs.h b/src/nvim/tui/terminfo_defs.h
index d010b41574..e221e80d1e 100644
--- a/src/nvim/tui/terminfo_defs.h
+++ b/src/nvim/tui/terminfo_defs.h
@@ -1,11 +1,8 @@
// uncrustify:off
-//
-// Generated by scripts/update_terminfo.sh and ncurses 6.3.20211021
-//
+// Generated by scripts/update_terminfo.sh and ncurses 6.4.20221231
-#ifndef NVIM_TUI_TERMINFO_DEFS_H
-#define NVIM_TUI_TERMINFO_DEFS_H
+#pragma once
#include <stdint.h>
@@ -2306,4 +2303,3 @@ static const int8_t win32con_terminfo[] = {
static const int8_t xterm_256colour_terminfo[] = {
30,2,37,0,38,0,15,0,-99,1,51,6,120,116,101,114,109,45,50,53,54,99,111,108,111,114,124,120,116,101,114,109,32,119,105,116,104,32,50,53,54,32,99,111,108,111,114,115,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0,0,0,1,0,80,0,0,0,8,0,0,0,24,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,0,0,0,0,1,0,0,0,4,0,6,0,8,0,25,0,30,0,38,0,42,0,46,0,-1,-1,57,0,74,0,76,0,80,0,87,0,-1,-1,89,0,102,0,-1,-1,106,0,110,0,120,0,124,0,-1,-1,-1,-1,-128,0,-124,0,-119,0,-114,0,-1,-1,-96,0,-91,0,-86,0,-1,-1,-81,0,-76,0,-71,0,-66,0,-57,0,-53,0,-46,0,-1,-1,-28,0,-23,0,-17,0,-11,0,-1,-1,-1,-1,-1,-1,7,1,-1,-1,-1,-1,-1,-1,25,1,-1,-1,29,1,-1,-1,-1,-1,-1,-1,31,1,-1,-1,36,1,-1,-1,-1,-1,-1,-1,-1,-1,40,1,44,1,50,1,54,1,58,1,62,1,68,1,74,1,80,1,86,1,92,1,96,1,-1,-1,101,1,-1,-1,105,1,110,1,115,1,119,1,126,1,-1,-1,-123,1,-119,1,-111,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-103,1,-94,1,-85,1,-1,-1,-82,1,-73,1,-64,1,-55,1,-46,1,-37,1,-28,1,-19,1,-10,1,-1,1,-1,-1,-1,-1,-1,-1,8,2,12,2,17,2,22,2,42,2,51,2,-1,-1,-1,-1,69,2,72,2,83,2,86,2,88,2,91,2,-72,2,-1,-1,-69,2,-1,-1,-1,-1,-1,-1,-1,-1,-67,2,-63,2,-59,2,-55,2,-51,2,-1,-1,-1,-1,-47,2,-1,-1,6,3,-1,-1,-1,-1,10,3,16,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,22,3,26,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,30,3,-1,-1,-1,-1,37,3,-1,-1,-1,-1,-1,-1,-1,-1,44,3,51,3,58,3,-1,-1,-1,-1,65,3,-1,-1,72,3,-1,-1,-1,-1,-1,-1,79,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,86,3,92,3,98,3,105,3,112,3,119,3,126,3,-122,3,-114,3,-106,3,-98,3,-90,3,-82,3,-74,3,-66,3,-59,3,-52,3,-45,3,-38,3,-30,3,-22,3,-14,3,-6,3,2,4,10,4,18,4,26,4,33,4,40,4,47,4,54,4,62,4,70,4,78,4,86,4,94,4,102,4,110,4,118,4,125,4,-124,4,-117,4,-110,4,-102,4,-94,4,-86,4,-78,4,-70,4,-62,4,-54,4,-46,4,-39,4,-32,4,-25,4,-20,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-13,4,-2,4,3,5,22,5,26,5,35,5,42,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-120,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-115,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-109,5,-1,-1,-1,-1,-1,-1,-105,5,-42,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,22,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,45,6,48,6,27,91,90,0,7,0,13,0,27,91,37,105,37,112,49,37,100,59,37,112,50,37,100,114,0,27,91,51,103,0,27,91,72,27,91,50,74,0,27,91,75,0,27,91,74,0,27,91,37,105,37,112,49,37,100,71,0,27,91,37,105,37,112,49,37,100,59,37,112,50,37,100,72,0,10,0,27,91,72,0,27,91,63,50,53,108,0,8,0,27,91,63,49,50,108,27,91,63,50,53,104,0,27,91,67,0,27,91,65,0,27,91,63,49,50,59,50,53,104,0,27,91,80,0,27,91,77,0,27,40,48,0,27,91,53,109,0,27,91,49,109,0,27,91,63,49,48,52,57,104,27,91,50,50,59,48,59,48,116,0,27,91,50,109,0,27,91,52,104,0,27,91,56,109,0,27,91,55,109,0,27,91,55,109,0,27,91,52,109,0,27,91,37,112,49,37,100,88,0,27,40,66,0,27,40,66,27,91,109,0,27,91,63,49,48,52,57,108,27,91,50,51,59,48,59,48,116,0,27,91,52,108,0,27,91,50,55,109,0,27,91,50,52,109,0,27,91,63,53,104,36,60,49,48,48,47,62,27,91,63,53,108,0,27,91,33,112,27,91,63,51,59,52,108,27,91,52,108,27,62,0,27,91,76,0,8,0,27,91,51,126,0,27,79,66,0,27,79,80,0,27,91,50,49,126,0,27,79,81,0,27,79,82,0,27,79,83,0,27,91,49,53,126,0,27,91,49,55,126,0,27,91,49,56,126,0,27,91,49,57,126,0,27,91,50,48,126,0,27,79,72,0,27,91,50,126,0,27,79,68,0,27,91,54,126,0,27,91,53,126,0,27,79,67,0,27,91,49,59,50,66,0,27,91,49,59,50,65,0,27,79,65,0,27,91,63,49,108,27,62,0,27,91,63,49,104,27,61,0,27,91,63,49,48,51,52,108,0,27,91,63,49,48,51,52,104,0,27,69,0,27,91,37,112,49,37,100,80,0,27,91,37,112,49,37,100,77,0,27,91,37,112,49,37,100,66,0,27,91,37,112,49,37,100,64,0,27,91,37,112,49,37,100,83,0,27,91,37,112,49,37,100,76,0,27,91,37,112,49,37,100,68,0,27,91,37,112,49,37,100,67,0,27,91,37,112,49,37,100,84,0,27,91,37,112,49,37,100,65,0,27,91,105,0,27,91,52,105,0,27,91,53,105,0,37,112,49,37,99,27,91,37,112,50,37,123,49,125,37,45,37,100,98,0,27,99,27,93,49,48,52,7,0,27,91,33,112,27,91,63,51,59,52,108,27,91,52,108,27,62,0,27,56,0,27,91,37,105,37,112,49,37,100,100,0,27,55,0,10,0,27,77,0,37,63,37,112,57,37,116,27,40,48,37,101,27,40,66,37,59,27,91,48,37,63,37,112,54,37,116,59,49,37,59,37,63,37,112,53,37,116,59,50,37,59,37,63,37,112,50,37,116,59,52,37,59,37,63,37,112,49,37,112,51,37,124,37,116,59,55,37,59,37,63,37,112,52,37,116,59,53,37,59,37,63,37,112,55,37,116,59,56,37,59,109,0,27,72,0,9,0,27,79,119,0,27,79,121,0,27,79,117,0,27,79,113,0,27,79,115,0,96,96,97,97,102,102,103,103,105,105,106,106,107,107,108,108,109,109,110,110,111,111,112,112,113,113,114,114,115,115,116,116,117,117,118,118,119,119,120,120,121,121,122,122,123,123,124,124,125,125,126,126,0,27,91,90,0,27,91,63,55,104,0,27,91,63,55,108,0,27,79,70,0,27,79,77,0,27,91,51,59,50,126,0,27,91,49,59,50,70,0,27,91,49,59,50,72,0,27,91,50,59,50,126,0,27,91,49,59,50,68,0,27,91,54,59,50,126,0,27,91,53,59,50,126,0,27,91,49,59,50,67,0,27,91,50,51,126,0,27,91,50,52,126,0,27,91,49,59,50,80,0,27,91,49,59,50,81,0,27,91,49,59,50,82,0,27,91,49,59,50,83,0,27,91,49,53,59,50,126,0,27,91,49,55,59,50,126,0,27,91,49,56,59,50,126,0,27,91,49,57,59,50,126,0,27,91,50,48,59,50,126,0,27,91,50,49,59,50,126,0,27,91,50,51,59,50,126,0,27,91,50,52,59,50,126,0,27,91,49,59,53,80,0,27,91,49,59,53,81,0,27,91,49,59,53,82,0,27,91,49,59,53,83,0,27,91,49,53,59,53,126,0,27,91,49,55,59,53,126,0,27,91,49,56,59,53,126,0,27,91,49,57,59,53,126,0,27,91,50,48,59,53,126,0,27,91,50,49,59,53,126,0,27,91,50,51,59,53,126,0,27,91,50,52,59,53,126,0,27,91,49,59,54,80,0,27,91,49,59,54,81,0,27,91,49,59,54,82,0,27,91,49,59,54,83,0,27,91,49,53,59,54,126,0,27,91,49,55,59,54,126,0,27,91,49,56,59,54,126,0,27,91,49,57,59,54,126,0,27,91,50,48,59,54,126,0,27,91,50,49,59,54,126,0,27,91,50,51,59,54,126,0,27,91,50,52,59,54,126,0,27,91,49,59,51,80,0,27,91,49,59,51,81,0,27,91,49,59,51,82,0,27,91,49,59,51,83,0,27,91,49,53,59,51,126,0,27,91,49,55,59,51,126,0,27,91,49,56,59,51,126,0,27,91,49,57,59,51,126,0,27,91,50,48,59,51,126,0,27,91,50,49,59,51,126,0,27,91,50,51,59,51,126,0,27,91,50,52,59,51,126,0,27,91,49,59,52,80,0,27,91,49,59,52,81,0,27,91,49,59,52,82,0,27,91,49,75,0,27,91,63,54,57,108,0,27,91,37,105,37,100,59,37,100,82,0,27,91,54,110,0,27,91,63,37,91,59,48,49,50,51,52,53,54,55,56,57,93,99,0,27,91,99,0,27,91,51,57,59,52,57,109,0,27,93,49,48,52,7,0,27,93,52,59,37,112,49,37,100,59,114,103,98,58,37,112,50,37,123,50,53,53,125,37,42,37,123,49,48,48,48,125,37,47,37,50,46,50,88,47,37,112,51,37,123,50,53,53,125,37,42,37,123,49,48,48,48,125,37,47,37,50,46,50,88,47,37,112,52,37,123,50,53,53,125,37,42,37,123,49,48,48,48,125,37,47,37,50,46,50,88,27,92,0,27,91,51,109,0,27,91,50,51,109,0,27,91,60,0,27,91,37,63,37,112,49,37,123,56,125,37,60,37,116,51,37,112,49,37,100,37,101,37,112,49,37,123,49,54,125,37,60,37,116,57,37,112,49,37,123,56,125,37,45,37,100,37,101,51,56,59,53,59,37,112,49,37,100,37,59,109,0,27,91,37,63,37,112,49,37,123,56,125,37,60,37,116,52,37,112,49,37,100,37,101,37,112,49,37,123,49,54,125,37,60,37,116,49,48,37,112,49,37,123,56,125,37,45,37,100,37,101,52,56,59,53,59,37,112,49,37,100,37,59,109,0,27,91,63,54,57,104,27,91,37,105,37,112,49,37,100,59,37,112,50,37,100,115,0,27,108,0,27,109,0,0,2,0,0,0,74,0,-106,0,-84,3,1,1,0,0,7,0,19,0,24,0,42,0,48,0,58,0,90,0,97,0,104,0,111,0,118,0,125,0,-124,0,-117,0,-110,0,-103,0,-96,0,-89,0,-82,0,-75,0,-68,0,-61,0,-54,0,-47,0,-40,0,-33,0,-26,0,-19,0,-12,0,-5,0,2,1,9,1,16,1,23,1,30,1,37,1,44,1,51,1,58,1,65,1,72,1,79,1,86,1,93,1,100,1,107,1,114,1,121,1,-128,1,-121,1,-114,1,-107,1,-100,1,-93,1,-86,1,-79,1,-72,1,-65,1,-58,1,-54,1,-50,1,-46,1,-42,1,-38,1,-34,1,-30,1,-26,1,-22,1,-18,1,-14,1,-10,1,-4,1,1,2,0,0,3,0,6,0,9,0,12,0,15,0,18,0,21,0,24,0,27,0,32,0,37,0,42,0,47,0,52,0,56,0,61,0,66,0,71,0,76,0,81,0,87,0,93,0,99,0,105,0,111,0,117,0,123,0,-127,0,-121,0,-115,0,-110,0,-105,0,-100,0,-95,0,-90,0,-84,0,-78,0,-72,0,-66,0,-60,0,-54,0,-48,0,-42,0,-36,0,-30,0,-24,0,-18,0,-12,0,-6,0,0,1,6,1,12,1,18,1,24,1,30,1,34,1,39,1,44,1,49,1,54,1,59,1,63,1,67,1,71,1,75,1,79,1,85,1,91,1,97,1,103,1,109,1,115,1,121,1,126,1,-125,1,27,93,49,49,50,7,0,27,93,49,50,59,37,112,49,37,115,7,0,27,91,51,74,0,27,93,53,50,59,37,112,49,37,115,59,37,112,50,37,115,7,0,27,91,50,32,113,0,27,91,37,112,49,37,100,32,113,0,27,91,63,49,48,48,54,59,49,48,48,48,37,63,37,112,49,37,123,49,125,37,61,37,116,104,37,101,108,37,59,0,27,91,51,59,51,126,0,27,91,51,59,52,126,0,27,91,51,59,53,126,0,27,91,51,59,54,126,0,27,91,51,59,55,126,0,27,91,49,59,50,66,0,27,91,49,59,51,66,0,27,91,49,59,52,66,0,27,91,49,59,53,66,0,27,91,49,59,54,66,0,27,91,49,59,55,66,0,27,91,49,59,51,70,0,27,91,49,59,52,70,0,27,91,49,59,53,70,0,27,91,49,59,54,70,0,27,91,49,59,55,70,0,27,91,49,59,51,72,0,27,91,49,59,52,72,0,27,91,49,59,53,72,0,27,91,49,59,54,72,0,27,91,49,59,55,72,0,27,91,50,59,51,126,0,27,91,50,59,52,126,0,27,91,50,59,53,126,0,27,91,50,59,54,126,0,27,91,50,59,55,126,0,27,91,49,59,51,68,0,27,91,49,59,52,68,0,27,91,49,59,53,68,0,27,91,49,59,54,68,0,27,91,49,59,55,68,0,27,91,54,59,51,126,0,27,91,54,59,52,126,0,27,91,54,59,53,126,0,27,91,54,59,54,126,0,27,91,54,59,55,126,0,27,91,53,59,51,126,0,27,91,53,59,52,126,0,27,91,53,59,53,126,0,27,91,53,59,54,126,0,27,91,53,59,55,126,0,27,91,49,59,51,67,0,27,91,49,59,52,67,0,27,91,49,59,53,67,0,27,91,49,59,54,67,0,27,91,49,59,55,67,0,27,91,49,59,50,65,0,27,91,49,59,51,65,0,27,91,49,59,52,65,0,27,91,49,59,53,65,0,27,91,49,59,54,65,0,27,91,49,59,55,65,0,27,79,120,0,27,79,116,0,27,79,118,0,27,79,114,0,27,79,69,0,27,79,107,0,27,79,108,0,27,79,111,0,27,79,110,0,27,79,106,0,27,79,109,0,27,79,112,0,27,91,50,57,109,0,27,91,57,109,0,27,91,60,37,105,37,112,51,37,100,59,37,112,49,37,100,59,37,112,50,37,100,59,37,63,37,112,52,37,116,77,37,101,109,37,59,0,65,88,0,88,84,0,67,114,0,67,115,0,69,51,0,77,115,0,83,101,0,83,115,0,88,77,0,107,68,67,51,0,107,68,67,52,0,107,68,67,53,0,107,68,67,54,0,107,68,67,55,0,107,68,78,0,107,68,78,51,0,107,68,78,52,0,107,68,78,53,0,107,68,78,54,0,107,68,78,55,0,107,69,78,68,51,0,107,69,78,68,52,0,107,69,78,68,53,0,107,69,78,68,54,0,107,69,78,68,55,0,107,72,79,77,51,0,107,72,79,77,52,0,107,72,79,77,53,0,107,72,79,77,54,0,107,72,79,77,55,0,107,73,67,51,0,107,73,67,52,0,107,73,67,53,0,107,73,67,54,0,107,73,67,55,0,107,76,70,84,51,0,107,76,70,84,52,0,107,76,70,84,53,0,107,76,70,84,54,0,107,76,70,84,55,0,107,78,88,84,51,0,107,78,88,84,52,0,107,78,88,84,53,0,107,78,88,84,54,0,107,78,88,84,55,0,107,80,82,86,51,0,107,80,82,86,52,0,107,80,82,86,53,0,107,80,82,86,54,0,107,80,82,86,55,0,107,82,73,84,51,0,107,82,73,84,52,0,107,82,73,84,53,0,107,82,73,84,54,0,107,82,73,84,55,0,107,85,80,0,107,85,80,51,0,107,85,80,52,0,107,85,80,53,0,107,85,80,54,0,107,85,80,55,0,107,97,50,0,107,98,49,0,107,98,51,0,107,99,50,0,107,112,53,0,107,112,65,68,68,0,107,112,67,77,65,0,107,112,68,73,86,0,107,112,68,79,84,0,107,112,77,85,76,0,107,112,83,85,66,0,107,112,90,82,79,0,114,109,120,120,0,115,109,120,120,0,120,109,0
};
-#endif // NVIM_TUI_TERMINFO_DEFS_H
diff --git a/src/nvim/tui/tui.h b/src/nvim/tui/tui.h
index 88ea73e99c..c89053d053 100644
--- a/src/nvim/tui/tui.h
+++ b/src/nvim/tui/tui.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TUI_TUI_H
-#define NVIM_TUI_TUI_H
+#pragma once
#include "nvim/cursor_shape.h"
#include "nvim/ui.h"
@@ -9,5 +8,3 @@ typedef struct TUIData TUIData;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "tui/tui.h.generated.h"
#endif
-
-#endif // NVIM_TUI_TUI_H
diff --git a/src/nvim/types.h b/src/nvim/types.h
index 96034d13af..0e5f8e6504 100644
--- a/src/nvim/types.h
+++ b/src/nvim/types.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_TYPES_H
-#define NVIM_TYPES_H
+#pragma once
#include <stdbool.h>
#include <stdint.h>
@@ -47,5 +46,3 @@ typedef enum {
typedef struct Decoration Decoration;
typedef int64_t OptInt;
-
-#endif // NVIM_TYPES_H
diff --git a/src/nvim/ugrid.h b/src/nvim/ugrid.h
index a71179d74f..53278dbf7a 100644
--- a/src/nvim/ugrid.h
+++ b/src/nvim/ugrid.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_UGRID_H
-#define NVIM_UGRID_H
+#pragma once
#include "nvim/globals.h"
#include "nvim/grid_defs.h"
@@ -35,4 +34,3 @@ struct ugrid {
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ugrid.h.generated.h"
#endif
-#endif // NVIM_UGRID_H
diff --git a/src/nvim/ui.h b/src/nvim/ui.h
index 807bc6241c..d399802c99 100644
--- a/src/nvim/ui.h
+++ b/src/nvim/ui.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_UI_H
-#define NVIM_UI_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -127,4 +126,3 @@ typedef struct ui_event_callback {
// uncrustify:on
EXTERN MultiQueue *resize_events;
-#endif // NVIM_UI_H
diff --git a/src/nvim/ui_client.h b/src/nvim/ui_client.h
index 26bb037511..fbee942cdf 100644
--- a/src/nvim/ui_client.h
+++ b/src/nvim/ui_client.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_UI_CLIENT_H
-#define NVIM_UI_CLIENT_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -47,5 +46,3 @@ EXTERN bool ui_client_forward_stdin INIT( = false);
# include "ui_events_client.h.generated.h"
#endif
// uncrustify:on
-
-#endif // NVIM_UI_CLIENT_H
diff --git a/src/nvim/ui_compositor.h b/src/nvim/ui_compositor.h
index 01538105cb..7b177838e4 100644
--- a/src/nvim/ui_compositor.h
+++ b/src/nvim/ui_compositor.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_UI_COMPOSITOR_H
-#define NVIM_UI_COMPOSITOR_H
+#pragma once
#include "nvim/event/defs.h"
#include "nvim/ui.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui_compositor.h.generated.h"
#endif
-#endif // NVIM_UI_COMPOSITOR_H
diff --git a/src/nvim/undo.h b/src/nvim/undo.h
index f494d4de86..d9b8cbaff4 100644
--- a/src/nvim/undo.h
+++ b/src/nvim/undo.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_UNDO_H
-#define NVIM_UNDO_H
+#pragma once
#include "nvim/ex_cmds_defs.h"
#include "nvim/undo_defs.h"
@@ -7,4 +6,3 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "undo.h.generated.h"
#endif
-#endif // NVIM_UNDO_H
diff --git a/src/nvim/undo_defs.h b/src/nvim/undo_defs.h
index 7dd29d3ea4..de925c3937 100644
--- a/src/nvim/undo_defs.h
+++ b/src/nvim/undo_defs.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_UNDO_DEFS_H
-#define NVIM_UNDO_DEFS_H
+#pragma once
#include <time.h>
@@ -73,5 +72,3 @@ struct u_header {
#define UH_CHANGED 0x01 // b_changed flag before undo/after redo
#define UH_EMPTYBUF 0x02 // buffer was empty
#define UH_RELOAD 0x04 // buffer was reloaded
-
-#endif // NVIM_UNDO_DEFS_H
diff --git a/src/nvim/usercmd.h b/src/nvim/usercmd.h
index 34f1439b10..afda0b9d49 100644
--- a/src/nvim/usercmd.h
+++ b/src/nvim/usercmd.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_USERCMD_H
-#define NVIM_USERCMD_H
+#pragma once
#include <stdint.h>
@@ -33,4 +32,3 @@ extern garray_T ucmds;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "usercmd.h.generated.h"
#endif
-#endif // NVIM_USERCMD_H
diff --git a/src/nvim/version.h b/src/nvim/version.h
index e0c7b76700..0e313bb30c 100644
--- a/src/nvim/version.h
+++ b/src/nvim/version.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_VERSION_H
-#define NVIM_VERSION_H
+#pragma once
#include "nvim/ex_cmds_defs.h"
#include "nvim/macros.h"
@@ -32,4 +31,3 @@ extern char *version_cflags;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "version.h.generated.h"
#endif
-#endif // NVIM_VERSION_H
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index 22db3751cd..4c6129f0db 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_VIM_H
-#define NVIM_VIM_H
+#pragma once
#include "nvim/pos.h"
#include "nvim/types.h"
@@ -203,5 +202,3 @@ enum { FOLD_TEXT_LEN = 51, }; //!< buffer size for get_foldtext()
// Replacement for nchar used by nv_replace().
#define REPLACE_CR_NCHAR (-1)
#define REPLACE_NL_NCHAR (-2)
-
-#endif // NVIM_VIM_H
diff --git a/src/nvim/viml/parser/expressions.h b/src/nvim/viml/parser/expressions.h
index 245f4c500c..cc0aeff322 100644
--- a/src/nvim/viml/parser/expressions.h
+++ b/src/nvim/viml/parser/expressions.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_VIML_PARSER_EXPRESSIONS_H
-#define NVIM_VIML_PARSER_EXPRESSIONS_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -387,5 +386,3 @@ extern const char *const expr_asgn_type_tab[];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "viml/parser/expressions.h.generated.h"
#endif
-
-#endif // NVIM_VIML_PARSER_EXPRESSIONS_H
diff --git a/src/nvim/viml/parser/parser.h b/src/nvim/viml/parser/parser.h
index f387301c2d..cd5a493643 100644
--- a/src/nvim/viml/parser/parser.h
+++ b/src/nvim/viml/parser/parser.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_VIML_PARSER_PARSER_H
-#define NVIM_VIML_PARSER_PARSER_H
+#pragma once
#include <assert.h>
#include <stdbool.h>
@@ -227,5 +226,3 @@ static inline void viml_parser_highlight(ParserState *const pstate, const Parser
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "viml/parser/parser.h.generated.h"
#endif
-
-#endif // NVIM_VIML_PARSER_PARSER_H
diff --git a/src/nvim/window.h b/src/nvim/window.h
index 3abfb4d379..734fa71d72 100644
--- a/src/nvim/window.h
+++ b/src/nvim/window.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_WINDOW_H
-#define NVIM_WINDOW_H
+#pragma once
#include <stdbool.h>
#include <stddef.h>
@@ -37,4 +36,3 @@ EXTERN bool p_ch_was_zero INIT( = false);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "window.h.generated.h"
#endif
-#endif // NVIM_WINDOW_H