{"id":13768036,"url":"https://github.com/JuliaEditorSupport/julia-vim","last_synced_at":"2025-05-10T23:31:00.491Z","repository":{"id":2506759,"uuid":"3481901","full_name":"JuliaEditorSupport/julia-vim","owner":"JuliaEditorSupport","description":"Vim support for Julia.","archived":false,"fork":false,"pushed_at":"2024-05-28T16:21:08.000Z","size":1349,"stargazers_count":755,"open_issues_count":47,"forks_count":94,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-10-29T15:47:44.566Z","etag":null,"topics":["julia","latex","unicode","vim","vim-plugin"],"latest_commit_sha":null,"homepage":"http://julialang.org/","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaEditorSupport.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://numfocus.salsalabs.org/donate-to-julia/index.html"}},"created_at":"2012-02-18T23:11:23.000Z","updated_at":"2024-10-10T08:53:15.000Z","dependencies_parsed_at":"2023-01-11T16:10:34.100Z","dependency_job_id":"f5906bc6-63de-444a-857a-ff852ef8a4ba","html_url":"https://github.com/JuliaEditorSupport/julia-vim","commit_stats":{"total_commits":473,"total_committers":36,"mean_commits":13.13888888888889,"dds":"0.12473572938689215","last_synced_commit":"fca7e3e59e6f9417d3fd77bac50d4b820a3e8bc4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaEditorSupport%2Fjulia-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaEditorSupport%2Fjulia-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaEditorSupport%2Fjulia-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaEditorSupport%2Fjulia-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaEditorSupport","download_url":"https://codeload.github.com/JuliaEditorSupport/julia-vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253497296,"owners_count":21917683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["julia","latex","unicode","vim","vim-plugin"],"created_at":"2024-08-03T16:01:15.721Z","updated_at":"2025-05-10T23:31:00.131Z","avatar_url":"https://github.com/JuliaEditorSupport.png","language":"Vim Script","readme":"# julia-vim\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"logo.png\" alt=\"julia-vim logo\"/\u003e\u003c/p\u003e\n\n[Julia] support for Vim.\n\n**[INSTALLATION INSTRUCTIONS]**\n\n[Julia]: http://julialang.org/\n[Installation instructions]: INSTALL.md\n\n## Complete documentation\n\nThe full documentation is available from Vim: after installation, you just need to type `:help julia-vim`.\n\nThe remainder of this README will only give an overview of some of the features:\n\n* [Latex-to-Unicode substitutions](#latex-to-unicode-substitutions)\n* [Block-wise movements and block text-objects](#block-wise-movements-and-block-text-objects)\n\n## LaTeX-to-Unicode substitutions\n\nThis plug-in adds some functionality to substitute LaTeX code sequences (e.g. `\\alpha`) with corresponding\nUnicode symbols (e.g. `α`). By default, these substitutions must be triggered explicitly by pressing the\n\u003ckbd\u003eTab\u003c/kbd\u003e key, as in the Julia command line (the REPL); however, an automatic, as-you-type mode can also\nbe activated, and a method based on keymap is also available.\n\nThis feature also works in command mode, e.g. when searching the files with the `/` or `?` commands, but the\nas-you-type mode is not available (the keymap-based version works though, and it also works with some Vim\ncommands like `f` and `t`).\n\nBy default, this feature is only active when editing Julia files. However, it can be also enabled with\nother file types, and even turned on/off on the fly regardless of the file type.\n\nThese features only work as described with Vim version 7.4 or higher. Tab completion can still be made\navailable on lower Vim versions, see below for more details. Also note that this functionality is incompatible\nwith plugins that force lazy-loading, such as [filetype.nvim] (most of the code is loaded lazily anyway).\n\nThe following sections provide details on these features. The complete documentation is provided by calling\n`:help julia-vim` from within Vim. A complete reference table of the available substitution can be\naccessed by calling `:help L2U-ref` from within Vim.\n\n[filetype.nvim]: https://github.com/nathom/filetype.nvim\n\n### LaTeX-to-Unicode via Tab key\n\nThis plug-in adds a mapping to the \u003ckbd\u003eTab\u003c/kbd\u003e key which makes it behave like the Julia REPL, i.e. when\nthe cursor is at the end of a recognized LaTeX symbol (e.g. `\\alpha`) in insert mode, pressing\nthe \u003ckbd\u003eTab\u003c/kbd\u003e key will substitute it with the corresponding Unicode symbol (e.g. `α`). If a partial match\nis found (e.g. `\\al`), a list of possible completions is suggested (e.g. `\\aleph`, `\\allequal`,\n`\\alpha`), and it will be refined while you enter more characters; when only one match is left, pressing\n\u003ckbd\u003eTab\u003c/kbd\u003e will complete it and pressing it again will perform the substitution to Unicode.\n\nIf no suitable substitution is found, the action will fall back to whatever mapping was previously\ndefined: by default, inserting a literal `\u003cTab\u003e` character, or invoking some other action if another\nplug-in is installed, e.g. [supertab] or [YouCompleteMe].\n\nNote that the [YouCompleteMe], [neocomplcache], [neocomplete] and [deoplete] plug-ins do not work well\nwith the suggestion of possible completions for partial matches, and therefore this feature is disabled\nif those plug-ins are detected.\n\nA literal tab can always be forced by using \u003ckbd\u003eCTRL-V\u003c/kbd\u003e and then \u003ckbd\u003eTab\u003c/kbd\u003e.\n\nOn the Vim command line, e.g. when searching the file with the `/` or `?` commands, the feature is\nalso activated by \u003ckbd\u003eTab\u003c/kbd\u003e, but falls-back to the Vim built-in behavior if no suitable substitution\nis found: if you had defined a mapping for \u003ckbd\u003eTab\u003c/kbd\u003e in command mode, it will be overridden. This\ncan be prevented by choosing a different value for the mapping keys, see the full documentation.\n\nTo disable this mapping, you can use the command `:let g:latex_to_unicode_tab = \"off\"`, e.g. by putting\nit into your `.vimrc` file. You can also change this setting from the Vim command-line, but you will\nalso need to give the command `:call LaTeXtoUnicode#Init()` for the change to take effect.\n\nYou can further fine-tune the `g:latex_to_unicode_tab` option: to selectively enable the \u003ckbd\u003eTab\u003c/kbd\u003e\nmapping only in the command line set it to `\"command\"`, or set it to `\"insert\"` to get the mapping only\nin insert mode. (The default setting is `\"on\"`, which applies to both.)\n\nEven when the mapping is disabled, the feature is still available (in insert mode) via the\ncompletion mechanism, i.e. by pressing \u003ckbd\u003eCTRL-X\u003c/kbd\u003e and then \u003ckbd\u003eCTRL-U\u003c/kbd\u003e.\n\nTo disable the suggestions of partial matches completions, use the command\n`:let g:latex_to_unicode_suggestions = 0`.\n\nIn general, suggestions try not to get in the way, and so if an exact match is detected (e.g. `\\ne`) when\n\u003ckbd\u003eTab\u003c/kbd\u003e is pressed, the substitution will be done even when there would be other symbols with the same prefix\n(e.g. `\\neg`). This behaviour can be changed by the command `:let g:latex_to_unicode_eager = 0`, in\nwhich case hitting \u003ckbd\u003eTab\u003c/kbd\u003e will first produce a suggestion list, and only pressing it again will trigger the\nsubstitution to Unicode.\n\n[supertab]: https://github.com/ervandew/supertab\n[YouCompleteMe]: https://github.com/Valloric/YouCompleteMe\n[neocomplcache]: https://github.com/Shougo/neocomplcache.vim\n[neocomplete]: https://github.com/Shougo/neocomplete.vim\n[deoplete]: https://github.com/Shougo/deoplete.nvim\n\n#### Using this feature on Vim versions lower than 7.4\n\nThe automatic remapping of the \u003ckbd\u003eTab\u003c/kbd\u003e key is not performed if Vim version is lower than 7.4. However, the\nfunctionality can still be used via the completion mechanism, i.e. by using \u003ckbd\u003eCTRL-X\u003c/kbd\u003e\u003ckbd\u003eCTRL-U\u003c/kbd\u003e. You can\nmap this to some more convenient key combination, e.g. you may want to add something like this line to your\n`.vimrc` file:\n\n```\ninoremap \u003cC-Tab\u003e \u003cC-X\u003e\u003cC-U\u003e\n```\n\nThis would map the functionality to \u003ckbd\u003eCTRL-Tab\u003c/kbd\u003e. However, if you try to map this to \u003ckbd\u003eTab\u003c/kbd\u003e, you'd only be\nable to use literal \u003ckbd\u003eTab\u003c/kbd\u003e by using \u003ckbd\u003eCTRL-V\u003c/kbd\u003e\u003ckbd\u003eTab\u003c/kbd\u003e.\n\n### LaTeX-to-Unicode as you type\n\nAn automatic substitution mode can be activated by using the command `:let g:latex_to_unicode_auto = 1`,\ne.g. by putting it into your `.vimrc` file. You can also change this setting from the Vim command-line, but\nyou will also need to give the command `:call LaTeXtoUnicode#Init()` for the change to take effect.\n\nIn this mode, symbols will be substituted as you type, as soon as some extra character appears after the symbol\nand a LaTeX sequence can unambiguously be identified.\n\nFor example, if you type `a \\ne b` the `\\ne` will be changed to `≠` right after the space, before you input\nthe `b`.\n\nThis does not interfere with the \u003ckbd\u003eTab\u003c/kbd\u003e mapping discussed above. It only works in insert mode, and it\ndoesn't work with emojis.\n\nThis feature is not available with Vim versions lower then 7.4.\n\n### LaTeX-to-Unicode via keymap\n\nA different susbstitution mode based on keymaps can be activated with `:let g:latex_to_unicode_keymap = 1`,\ne.g. by putting it into your `.vimrc` file. This works similarly to the as-you-type method described above,\nbut it has the advantage that it works under more circumstances, e.g. in command-line mode when searching with\n`/` or `?`, and when using the `f` and `t` commands.\nThe main disadvantage is that you don't see the whole sequence as you're typing it, and you can't fix mistakes\nwith backspace, for example.\nAnother difference is that there is a timeout like for any other mapping.\nIn any case, it is possible to use this method in parallel with the other two methods, they don't interfere.\nSo if you have the \u003ckbd\u003eTab\u003c/kbd\u003e mapping (discussed above) activated, you still get to see completions and\nsuggestions. If you have the as-you-type substitution active, and you make a mistake, you can simply press\nbackspace and keep going, at least in insert mode, and so on.\n\nThis feature might with Vim versions lower then 7.4, but it hasn't been tested.\n\n### LaTeX-to-Unicode on other file types\n\nBy default, the LaTeX-to-Unicode substitutions are only active when editing Julia files. However, you can use\nthe variable `g:latex_to_unicode_file_types` to specify for which file types this feature is active by default.\nThe variable must be set to a string containing a pattern (a regular expression) which matches the desired file\ntypes, or to a list of such patterns. For example, to activate the feature on all file types, you could put\n`let g:latex_to_unicode_file_types = \".*\"` in your `.vimrc` file.\nBe aware, however, that enabling the functionality overrides the `completefunc` setting.\n\n### Enabling and disabling the LaTeX-to-Unicode functionality\n\nRegardless of the type of the file you are editing and of the `g:latex_to_unicode_file_types` setting, the\nLaTeX-to-Unicode substitutions can be enabled/disabled/toggled by calling the functions\n`LaTeXtoUnicode#Enable()`, `LaTeXtoUnicode#Disable()`, `LaTeXtoUnicode#Toggle()`. For example, you could use\nthe mappings:\n\n```\nnoremap \u003cexpr\u003e \u003cF7\u003e LaTeXtoUnicode#Toggle()\nnoremap! \u003cexpr\u003e \u003cF7\u003e LaTeXtoUnicode#Toggle()\n```\n\nand then use the \u003ckbd\u003eF7\u003c/kbd\u003e key to quickly turn the feature on and off.\n\n## Block-wise movements and block text-objects\n\nThis plug-in defines mappings to move around julia blocks (e.g. `if/end`, `function/end` etc.) and to\nmanipulate them as a whole (analogously to the standard `w`, `b` etc. commands to move on words, and to\nthe `aw`, `iw` commands which allow to manipulate them). These require the `matchit` plugin, which is usually\ndistributed with ViM but must be explicitly enabled, e.g. adding this to your `.vimrc` file:\n\n```vim\nruntime macros/matchit.vim\n```\n\nThe default mappings use `]]`, `][`, `[[`, `[]`, `]j`, `]J`, `[j`, and `[J` for the movements\nand `aj`, `ij` for the selections. These can be disabled collectively by setting `g:julia_blocks` to `0`,\nor they can be remapped and/or disabled individually by defining a `g:julia_blocks_mapping` variable.\nSee the documentation for details.\n\nNote that this feature requires Vim version 7.4 or higher.\n","funding_links":["https://numfocus.salsalabs.org/donate-to-julia/index.html"],"categories":["Utilities","Vim Script"],"sub_categories":["Syntax"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJuliaEditorSupport%2Fjulia-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJuliaEditorSupport%2Fjulia-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJuliaEditorSupport%2Fjulia-vim/lists"}