{"id":20096390,"url":"https://github.com/nomad-software/vim-win","last_synced_at":"2026-03-03T23:32:23.745Z","repository":{"id":16904466,"uuid":"19665425","full_name":"nomad-software/vim-win","owner":"nomad-software","description":"Customised Vim for Windows","archived":false,"fork":false,"pushed_at":"2018-03-29T20:31:57.000Z","size":37152,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T16:35:06.554Z","etag":null,"topics":["editor-theme","editorconfig"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nomad-software.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-11T12:13:16.000Z","updated_at":"2020-07-02T21:46:19.000Z","dependencies_parsed_at":"2022-08-26T16:21:17.692Z","dependency_job_id":null,"html_url":"https://github.com/nomad-software/vim-win","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nomad-software/vim-win","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-software%2Fvim-win","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-software%2Fvim-win/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-software%2Fvim-win/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-software%2Fvim-win/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomad-software","download_url":"https://codeload.github.com/nomad-software/vim-win/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomad-software%2Fvim-win/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30065818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["editor-theme","editorconfig"],"created_at":"2024-11-13T16:58:42.071Z","updated_at":"2026-03-03T23:32:23.700Z","avatar_url":"https://github.com/nomad-software.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"README for the Vim source code\n\nHere are a few hints for finding your way around the source code.  This\ndoesn't make it less complex than it is, but it gets you started.\n\nYou might also want to read \":help development\".\n\n\nJUMPING AROUND\n\nFirst of all, use \":make tags\" to generate a tags file, so that you can use\nthe \":tag\" command to jump around the source code.\n\nTo jump to a function or variable definition, move the cursor on the name and\nuse the CTRL-] command.  Use CTRL-T or CTRL-O to jump back.\n\nTo jump to a file, move the cursor on its name and use the \"gf\" command.\n\nMost code can be found in a file with an obvious name (incomplete list):\n\tbuffer.c\tmanipulating buffers (loaded files)\n\tdiff.c\t\tdiff mode (vimdiff)\n\teval.c\t\texpression evaluation\n\tfileio.c\treading and writing files\n\tfold.c\t\tfolding\n\tgetchar.c\tgetting characters and key mapping\n\tmark.c\t\tmarks\n\tmbyte.c\t\tmulti-byte character handling\n\tmemfile.c\tstoring lines for buffers in a swapfile\n\tmemline.c\tstoring lines for buffers in memory\n\tmenu.c\t\tmenus\n\tmessage.c\t(error) messages\n\tops.c\t\thandling operators (\"d\", \"y\", \"p\")\n\toption.c\toptions\n\tquickfix.c\tquickfix commands (\":make\", \":cn\")\n\tregexp.c\tpattern matching\n\tscreen.c\tupdating the windows\n\tsearch.c\tpattern searching\n\tspell.c\t\tspell checking\n\tsyntax.c\tsyntax and other highlighting\n\ttag.c\t\ttags\n\tterm.c\t\tterminal handling, termcap codes\n\tundo.c\t\tundo and redo\n\twindow.c\thandling split windows\n\n\nIMPORTANT VARIABLES\n\nThe current mode is stored in \"State\".  The values it can have are NORMAL,\nINSERT, CMDLINE, and a few others.\n\nThe current window is \"curwin\".  The current buffer is \"curbuf\".  These point\nto structures with the cursor position in the window, option values, the file\nname, etc.  These are defined in structs.h.\n\nAll the global variables are declared in globals.h.\n\n\nTHE MAIN LOOP\n\nThis is conveniently called main_loop().  It updates a few things and then\ncalls normal_cmd() to process a command.  This returns when the command is\nfinished.\n\nThe basic idea is that Vim waits for the user to type a character and\nprocesses it until another character is needed.  Thus there are several places\nwhere Vim waits for a character to be typed.  The vgetc() function is used for\nthis.  It also handles mapping.\n\nUpdating the screen is mostly postponed until a command or a sequence of\ncommands has finished.  The work is done by update_screen(), which calls\nwin_update() for every window, which calls win_line() for every line.\nSee the start of screen.c for more explanations.\n\n\nCOMMAND-LINE MODE\n\nWhen typing a \":\", normal_cmd() will call getcmdline() to obtain a line with\nan Ex command.  getcmdline() contains a loop that will handle each typed\ncharacter.  It returns when hitting \u003cCR\u003e or \u003cEsc\u003e or some other character that\nends the command line mode.\n\n\nEX COMMANDS\n\nEx commands are handled by the function do_cmdline().  It does the generic\nparsing of the \":\" command line and calls do_one_cmd() for each separate\ncommand.  It also takes care of while loops.\n\ndo_one_cmd() parses the range and generic arguments and puts them in the\nexarg_t and passes it to the function that handles the command.\n\nThe \":\" commands are listed in ex_cmds.h.  The third entry of each item is the\nname of the function that handles the command.  The last entry are the flags\nthat are used for the command.\n\n\nNORMAL MODE COMMANDS\n\nThe Normal mode commands are handled by the normal_cmd() function.  It also\nhandles the optional count and an extra character for some commands.  These\nare passed in a cmdarg_t to the function that handles the command.\n\nThere is a table nv_cmds in normal.c which lists the first character of every\ncommand.  The second entry of each item is the name of the function that\nhandles the command.\n\n\nINSERT MODE COMMANDS\n\nWhen doing an \"i\" or \"a\" command, normal_cmd() will call the edit() function.\nIt contains a loop that waits for the next character and handles it.  It\nreturns when leaving Insert mode.\n\n\nOPTIONS\n\nThere is a list with all option names in option.c, called options[].\n\n\nTHE GUI\n\nMost of the GUI code is implemented like it was a clever terminal.  Typing a\ncharacter, moving a scrollbar, clicking the mouse, etc. are all translated\ninto events which are written in the input buffer.  These are read by the\nmain code, just like reading from a terminal.  The code for this is scattered\nthrough gui.c.  For example: gui_send_mouse_event() for a mouse click and\ngui_menu_cb() for a menu action.  Key hits are handled by the system-specific\nGUI code, which calls add_to_input_buf() to send the key code.\n\nUpdating the GUI window is done by writing codes in the output buffer, just\nlike writing to a terminal.  When the buffer gets full or is flushed,\ngui_write() will parse the codes and draw the appropriate items.  Finally the\nsystem-specific GUI code will be called to do the work.\n\n\nDEBUGGING THE GUI\n\nRemember to prevent that gvim forks and the debugger thinks Vim has exited,\nadd the \"-f\" argument.  In gdb: \"run -f -g\".\n\nWhen stepping through display updating code, the focus event is triggered\nwhen going from the debugger to Vim and back.  To avoid this, recompile with\nsome code in gui_focus_change() disabled.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomad-software%2Fvim-win","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomad-software%2Fvim-win","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomad-software%2Fvim-win/lists"}