diff --git a/Doxyfile b/Doxyfile index 0c620c2296..23a3d8308f 100644 --- a/Doxyfile +++ b/Doxyfile @@ -42,7 +42,7 @@ PROJECT_NUMBER = PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is +# With the PROJECT_LOGO tag one can specify a logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. @@ -1670,7 +1670,7 @@ PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# generate an inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. diff --git a/clint.py b/clint.py index 13d2d8cbe9..28b51fbc9c 100755 --- a/clint.py +++ b/clint.py @@ -1393,7 +1393,7 @@ class _NestingState(object): token = matched.group(1) if token == '{': - # If namespace or class hasn't seen a opening brace yet, mark + # If namespace or class hasn't seen an opening brace yet, mark # namespace/class head as complete. Push a new block onto the # stack otherwise. if not self.SeenOpenBrace(): @@ -3030,7 +3030,7 @@ def ParseArguments(args): try: _valid_extensions = set(val.split(',')) except ValueError: - PrintUsage('Extensions must be comma seperated list.') + PrintUsage('Extensions must be comma separated list.') if not filenames: PrintUsage('No files were specified.') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index d5681eabec..ddd151f45a 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1215,7 +1215,7 @@ void enter_buffer(buf_T *buf) /* Make sure the buffer is loaded. */ if (curbuf->b_ml.ml_mfp == NULL) { /* need to load the file */ /* If there is no filetype, allow for detecting one. Esp. useful for - * ":ball" used in a autocommand. If there already is a filetype we + * ":ball" used in an autocommand. If there already is a filetype we * might prefer to keep it. */ if (*curbuf->b_p_ft == NUL) did_filetype = FALSE; diff --git a/src/nvim/farsi.c b/src/nvim/farsi.c index 1cb20c71d6..bc25d0535a 100644 --- a/src/nvim/farsi.c +++ b/src/nvim/farsi.c @@ -2204,7 +2204,7 @@ static int F_isterm(int c) return FALSE; } -/// Convert the given Farsi character into a ending type. +/// Convert the given Farsi character into an ending type. /// /// @param c The character to convert. /// diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c index 4e2a9cb5d9..2e6cc616e5 100644 --- a/src/nvim/file_search.c +++ b/src/nvim/file_search.c @@ -130,7 +130,7 @@ typedef struct ff_visited { * 3) search from Vims current directory downwards for the file "tags" * As you can see, the first and the third search are for the same file, so for * the third search we can use the visited list of the first search. For the - * second search we must start from a empty visited list. + * second search we must start from an empty visited list. * The struct ff_visited_list_hdr is used to manage a linked list of already * visited lists. */ @@ -1089,7 +1089,7 @@ static int ff_check_visited(ff_visited_T **visited_list, char_u *fname, char_u * bool url = false; FileInfo file_info; - // For an URL we only compare the name, otherwise we compare the + // For a URL we only compare the name, otherwise we compare the // device/inode. if (path_with_url(fname)) { vim_strncpy(ff_expand_buffer, fname, MAXPATHL - 1); diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index f86eae6a48..8b53ab3d31 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1001,7 +1001,7 @@ retry: * We allocate as much space for the file as we can get, plus * space for the old line plus room for one terminating NUL. * The amount is limited by the fact that read() only can read - * upto max_unsigned characters (and other things). + * up to max_unsigned characters (and other things). */ { if (!skip_read) { diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 6b41dde827..b0e5a20506 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -2414,7 +2414,7 @@ inchar ( } /* - * Don't reset these when at the hit-return prompt, otherwise a endless + * Don't reset these when at the hit-return prompt, otherwise an endless * recursive loop may result (write error in swapfile, hit-return, timeout * on char wait, flush swapfile, write error....). */ diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c index aeac5e0b8b..605cb5457c 100644 --- a/src/nvim/indent_c.c +++ b/src/nvim/indent_c.c @@ -2121,7 +2121,7 @@ int get_c_indent(void) */ if (curwin->w_cursor.lnum <= ourscope) { /* we reached end of scope: - * if looking for a enum or structure initialization + * if looking for an enum or structure initialization * go further back: * if it is an initializer (enum xxx or xxx =), then * don't add ind_continuation, otherwise it is a variable @@ -2184,7 +2184,7 @@ int get_c_indent(void) if (terminated == ',') break; - /* if it es a enum declaration or an assignment, + /* if it is an enum declaration or an assignment, * we are done. */ if (terminated != ';' && cin_isinit()) @@ -2472,7 +2472,7 @@ int get_c_indent(void) * 123, * sizeof * here - * Otherwise check whether it is a enumeration or structure + * Otherwise check whether it is an enumeration or structure * initialisation (not indented) or a variable declaration * (indented). */ diff --git a/src/nvim/memline.c b/src/nvim/memline.c index 63a05e7b59..1bb968b5d0 100644 --- a/src/nvim/memline.c +++ b/src/nvim/memline.c @@ -2973,7 +2973,7 @@ static int ml_add_stack(buf_T *buf) * Update the pointer blocks on the stack for inserted/deleted lines. * The stack itself is also updated. * - * When a insert/delete line action fails, the line is not inserted/deleted, + * When an insert/delete line action fails, the line is not inserted/deleted, * but the pointer blocks have already been updated. That is fixed here by * walking through the stack. * @@ -3383,7 +3383,7 @@ findswapname ( process_still_running = FALSE; #endif /* - * If there is an SwapExists autocommand and we can handle + * If there is a SwapExists autocommand and we can handle * the response, trigger it. It may return 0 to ask the * user anyway. */ diff --git a/src/nvim/message.c b/src/nvim/message.c index 96be3bb17d..1c7687fa69 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -2806,7 +2806,7 @@ copy_char ( /// /// @param message Message which will be part of the confirm_msg /// @param buttons String containing button names -/// @param[out] has_hotkey A element in this array is set to true if +/// @param[out] has_hotkey An element in this array is set to true if /// corresponding button has a hotkey /// /// @return Pointer to memory allocated for storing hotkeys @@ -2885,7 +2885,7 @@ static char_u *msg_show_console_dialog(char_u *message, char_u *buttons, int dfl /// @param message Message which will be part of the confirm_msg /// @param buttons String containing button names /// @param default_button_idx Number of default button -/// @param has_hotkey A element in this array is true if corresponding button +/// @param has_hotkey An element in this array is true if corresponding button /// has a hotkey /// @param[out] hotkeys_ptr Pointer to the memory location where hotkeys will be copied static void copy_hotkeys_and_msg(const char_u *message, char_u *buttons, diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 67eb6df1bc..46f70cf23e 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -334,7 +334,7 @@ static void shift_block(oparg_T *oap, int amount) * 3. Divvy into TABs & spp * 4. Construct new string */ - total += bd.pre_whitesp; /* all virtual WS upto & incl a split TAB */ + total += bd.pre_whitesp; /* all virtual WS up to & incl a split TAB */ ws_vcol = bd.start_vcol - bd.pre_whitesp; if (bd.startspaces) { if (has_mbyte) diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index 6d20028c05..b87d561fa6 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -63,7 +63,7 @@ int64_t os_get_pid() #endif } -/// Get the hostname of the machine runing Neovim. +/// Get the hostname of the machine running Neovim. /// /// @param hostname Buffer to store the hostname. /// @param len Length of `hostname`. diff --git a/src/nvim/os/event.c b/src/nvim/os/event.c index cdf40541d5..2ebf28f436 100644 --- a/src/nvim/os/event.c +++ b/src/nvim/os/event.c @@ -74,7 +74,7 @@ bool event_poll(int32_t ms) // Timeout passed as argument to the timer timer.data = &timed_out; // We only start the timer after the loop is running, for that we - // use an prepare handle(pass the interval as data to it) + // use a prepare handle(pass the interval as data to it) timer_prepare.data = &ms; uv_prepare_start(&timer_prepare, timer_prepare_cb); } else if (ms == 0) { diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index bdf20f22eb..48bc75cb8e 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -148,7 +148,7 @@ static bool is_executable_in_path(const char_u *name) /// Get stat information for a file. /// -/// @return OK on success, FAIL if an failure occured. +/// @return OK on success, FAIL if a failure occurred. int os_stat(const char_u *name, uv_stat_t *statbuf) { uv_fs_t request; @@ -299,7 +299,7 @@ int os_remove(const char *path) /// /// @param file_descriptor File descriptor of the file. /// @param[out] file_info Pointer to a FileInfo to put the information in. -/// @return `true` on sucess, `false` for failure. +/// @return `true` on success, `false` for failure. bool os_get_file_info(const char *path, FileInfo *file_info) { if (os_stat((char_u *)path, &(file_info->stat)) == OK) { @@ -312,7 +312,7 @@ bool os_get_file_info(const char *path, FileInfo *file_info) /// /// @param path Path to the file. /// @param[out] file_info Pointer to a FileInfo to put the information in. -/// @return `true` on sucess, `false` for failure. +/// @return `true` on success, `false` for failure. bool os_get_file_info_link(const char *path, FileInfo *file_info) { uv_fs_t request; @@ -329,7 +329,7 @@ bool os_get_file_info_link(const char *path, FileInfo *file_info) /// /// @param file_descriptor File descriptor of the file. /// @param[out] file_info Pointer to a FileInfo to put the information in. -/// @return `true` on sucess, `false` for failure. +/// @return `true` on success, `false` for failure. bool os_get_file_info_fd(int file_descriptor, FileInfo *file_info) { uv_fs_t request; diff --git a/src/nvim/os/msgpack_rpc.h b/src/nvim/os/msgpack_rpc.h index 4d8d51699b..c8f243e2cf 100644 --- a/src/nvim/os/msgpack_rpc.h +++ b/src/nvim/os/msgpack_rpc.h @@ -53,7 +53,7 @@ void msgpack_rpc_error(char *msg, msgpack_packer *res) /// /// @param obj The object to convert /// @param[out] arg A pointer to the avalue -/// @return true if the convertion succeeded, false otherwise +/// @return true if the conversion succeeded, false otherwise bool msgpack_rpc_to_boolean(msgpack_object *obj, Boolean *arg) FUNC_ATTR_NONNULL_ALL; bool msgpack_rpc_to_integer(msgpack_object *obj, Integer *arg) diff --git a/src/nvim/os/rstream.c b/src/nvim/os/rstream.c index 9b2cea52a5..1025201f7a 100644 --- a/src/nvim/os/rstream.c +++ b/src/nvim/os/rstream.c @@ -110,7 +110,7 @@ void rstream_set_file(RStream *rstream, uv_file file) } if (rstream->file_type == UV_FILE) { - // Non-blocking file reads are simulated with a idle handle that reads + // Non-blocking file reads are simulated with an idle handle that reads // in chunks of rstream->buffer_size, giving time for other events to // be processed between reads. rstream->fread_idle = xmalloc(sizeof(uv_idle_t)); diff --git a/src/nvim/os/server.c b/src/nvim/os/server.c index b5d8d8af64..4bbe81ad01 100644 --- a/src/nvim/os/server.c +++ b/src/nvim/os/server.c @@ -115,7 +115,7 @@ void server_start(char *endpoint) uint32_t addr_len = ip_end - addr; if (addr_len > sizeof(ip) - 1) { - // Maximum length of a ip address buffer is 15(eg: 255.255.255.255) + // Maximum length of an IP address buffer is 15(eg: 255.255.255.255) addr_len = sizeof(ip); } diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index 766b055450..ed842ba8b2 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -393,7 +393,7 @@ static void alloc_cb(uv_handle_t *handle, size_t suggested, uv_buf_t *buf) static void read_cb(uv_stream_t *stream, ssize_t cnt, const uv_buf_t *buf) { // TODO(tarruda): avoid using a growable array for this, refactor the - // algorithm to call `ml_append` directly(skip unecessary copies/resizes) + // algorithm to call `ml_append` directly(skip unnecessary copies/resizes) int i; ProcessData *pdata = (ProcessData *)stream->data; diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 5471a2216f..18838ddd41 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -1504,7 +1504,7 @@ typedef int (*INTPROCINT)(int); */ int mch_libcall(char_u *libname, char_u *funcname, - char_u *argstring, /* NULL when using a argint */ + char_u *argstring, /* NULL when using an argint */ int argint, char_u **string_result, /* NULL when using number_result */ int *number_result) diff --git a/src/nvim/path.c b/src/nvim/path.c index 4ada2e7f5b..cbddde3434 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1905,12 +1905,12 @@ int path_full_dir_name(char *directory, char *buffer, int len) } if (os_chdir(directory) != SUCCESS) { - // Do not return immediatly since we may be in the wrong directory. + // Do not return immediately since we may be in the wrong directory. retval = FAIL; } if (retval == FAIL || os_dirname((char_u *) buffer, len) == FAIL) { - // Do not return immediatly since we are in the wrong directory. + // Do not return immediately since we are in the wrong directory. retval = FAIL; } diff --git a/src/nvim/search.c b/src/nvim/search.c index af43f356e0..f4b034d3f6 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -60,7 +60,7 @@ * String searches * * The string search functions are divided into two levels: - * lowest: searchit(); uses an pos_T for starting position and found match. + * lowest: searchit(); uses a pos_T for starting position and found match. * Highest: do_search(); uses curwin->w_cursor; calls searchit(). * * The last search pattern is remembered for repeating the same search. @@ -1475,7 +1475,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int maxtravel) /* * if initc given, look in the table for the matching character * '/' and '*' are special cases: look for start or end of comment. - * When '/' is used, we ignore running backwards into an star-slash, for + * When '/' is used, we ignore running backwards into a star-slash, for * "[*" command, we just want to find any comment. */ if (initc == '/' || initc == '*') { @@ -2091,7 +2091,7 @@ int findsent(int dir, long count) while (count--) { /* - * if on an empty line, skip upto a non-empty line + * if on an empty line, skip up to a non-empty line */ if (gchar_pos(&pos) == NUL) { do diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 3202fff79f..5ab5e198bf 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -309,7 +309,7 @@ do_tag ( tagstackidx = oldtagstackidx; /* back to old posn */ goto end_do_tag; } - /* An BufReadPost autocommand may jump to the '" mark, but + /* A BufReadPost autocommand may jump to the '" mark, but * we don't what that here. */ curwin->w_cursor.lnum = saved_fmark.mark.lnum; } else { diff --git a/src/nvim/window.c b/src/nvim/window.c index 16127186ff..7b9eb72468 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -3252,7 +3252,7 @@ win_goto_ver ( foundfr = curwin->w_frame; while (count--) { /* - * First go upwards in the tree of frames until we find a upwards or + * First go upwards in the tree of frames until we find an upwards or * downwards neighbor. */ fr = foundfr; diff --git a/test/unit/formatc.lua b/test/unit/formatc.lua index 64e651e8da..e63ff369f2 100644 --- a/test/unit/formatc.lua +++ b/test/unit/formatc.lua @@ -36,7 +36,7 @@ local tokens = P { "tokens"; -- Single line comment line_comment = Ct(P"//" * C((1 - V"newline")^0) * Cc"comment_line"), - -- Single platform independant line break which increments line number + -- Single platform independent line break which increments line number newline = (P"\r\n" + P"\n\r" + S"\r\n") * (Cp() * Carg(1)) / function(pos, state) state.line = state.line + 1 state.line_start = pos diff --git a/test/unit/os/env.moon b/test/unit/os/env.moon index 545c1e84db..43fd663d9a 100644 --- a/test/unit/os/env.moon +++ b/test/unit/os/env.moon @@ -93,7 +93,7 @@ describe 'env function', -> pid = tonumber (stat_str\match '%d+') eq pid, tonumber env.os_get_pid! else - -- /proc is not avaliable on all systems, test if pid is nonzero. + -- /proc is not available on all systems, test if pid is nonzero. eq true, (env.os_get_pid! > 0) describe 'os_get_hostname', -> diff --git a/test/unit/os/fs.moon b/test/unit/os/fs.moon index d4d82661a3..7f61145501 100644 --- a/test/unit/os/fs.moon +++ b/test/unit/os/fs.moon @@ -283,7 +283,7 @@ describe 'fs function', -> fs.os_rmdir (to_cstr path) describe 'os_mkdir', -> - it 'returns non-zero when given a already existing directory', -> + it 'returns non-zero when given an already existing directory', -> mode = ffi.C.kS_IRUSR + ffi.C.kS_IWUSR + ffi.C.kS_IXUSR neq 0, (os_mkdir 'unit-test-directory', mode) @@ -315,7 +315,7 @@ describe 'fs function', -> file_info[0].stat.st_ino > 0 and file_info[0].stat.st_dev > 0 describe 'os_get_file_info', -> - it 'returns false if given an non-existing file', -> + it 'returns false if given a non-existing file', -> file_info = file_info_new! assert.is_false (fs.os_get_file_info '/non-existent', file_info) @@ -334,7 +334,7 @@ describe 'fs function', -> eq ffi.C.kS_IFREG, (bit.band mode, ffi.C.kS_IFMT) describe 'os_get_file_info_link', -> - it 'returns false if given an non-existing file', -> + it 'returns false if given a non-existing file', -> file_info = file_info_new! assert.is_false (fs.os_get_file_info_link '/non-existent', file_info) @@ -357,7 +357,7 @@ describe 'fs function', -> file_info = file_info_new! assert.is_false (fs.os_get_file_info_fd -1, file_info) - it 'returns true if given an file descriptor and fills file_info', -> + it 'returns true if given a file descriptor and fills file_info', -> file_info = file_info_new! path = 'unit-test-directory/test.file' fd = ffi.C.open path, 0 diff --git a/test/unit/path.moon b/test/unit/path.moon index 20bef4071c..762bad09a2 100644 --- a/test/unit/path.moon +++ b/test/unit/path.moon @@ -64,20 +64,20 @@ describe 'path function', -> neq NULL, res ffi.string res - it 'returns the tail of a file together with its seperator', -> + it 'returns the tail of a file together with its separator', -> eq '///file.txt', path_tail_with_sep 'directory///file.txt' it 'returns an empty string when given an empty file name', -> eq '', path_tail_with_sep '' - it 'returns only the seperator if there is a traling seperator', -> + it 'returns only the separator if there is a trailing separator', -> eq '/', path_tail_with_sep 'some/directory/' - it 'cuts a leading seperator', -> + it 'cuts a leading separator', -> eq 'file.txt', path_tail_with_sep '/file.txt' eq '', path_tail_with_sep '/' - it 'returns the whole file name if there is no seperator', -> + it 'returns the whole file name if there is no separator', -> eq 'file.txt', path_tail_with_sep 'file.txt' describe 'path_next_component', -> @@ -89,7 +89,7 @@ describe 'path function', -> it 'returns', -> eq 'directory/file.txt', path_next_component 'some/directory/file.txt' - it 'returns empty string if given file contains no seperator', -> + it 'returns empty string if given file contains no separator', -> eq '', path_next_component 'file.txt' describe 'path_shorten_fname', -> diff --git a/test/unit/preprocess.moon b/test/unit/preprocess.moon index cf98ac3c8b..aa74b8ce24 100644 --- a/test/unit/preprocess.moon +++ b/test/unit/preprocess.moon @@ -38,7 +38,7 @@ parse_make_deps = (deps) -> -- remove redundant spaces deps = deps\gsub(" +", " ") - -- split acording to token (space in this case) + -- split according to token (space in this case) headers = {} for token in deps\gmatch("[^%s]+") -- headers[token] = true diff --git a/test/unit/set.moon b/test/unit/set.moon index daa312a2f4..affbd5c29a 100644 --- a/test/unit/set.moon +++ b/test/unit/set.moon @@ -27,7 +27,7 @@ class Set for k,v in pairs(t) @add(v) - -- substracts the argument Set from this Set + -- subtracts the argument Set from this Set diff: (other) => if other\size! > @size! -- this set is smaller than the other set diff --git a/uncrustify.cfg b/uncrustify.cfg index f3c1492fca..11da34d59a 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -109,7 +109,7 @@ indent_ctor_init = 0 # number # True=indent the 'if' one level indent_else_if = false # false/true -# Amount to indent variable declarations after a open brace. neg=relative, pos=absolute +# Amount to indent variable declarations after an open brace. neg=relative, pos=absolute indent_var_def_blk = 0 # number # Indent continued variable declarations instead of aligning. @@ -1496,7 +1496,7 @@ cmt_insert_func_header = "" # string # Will substitute $(class) with the class name. cmt_insert_class_header = "" # string -# The filename that contains text to insert before a Obj-C message specification if the method isn't preceeded with a C/C++ comment. +# The filename that contains text to insert before an Obj-C message specification if the method isn't preceded with a C/C++ comment. # Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff. cmt_insert_oc_msg_header = "" # string