julia-vim

Vim support for Julia.
授权协议 View license
开发语言
所属分类 企业应用、 LaTeX排版系统
软件类型 开源软件
地区 不详
投 递 者 亢胤运
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

julia-vim

Julia support for Vim.

INSTALLATION INSTRUCTIONS

Complete documentation

The full documentation is available from Vim: after installation, you just need to type :help julia-vim.

The remainder of this README will only give an overview of some of the features:

LaTeX-to-Unicode substitutions

This plug-in adds some functionality to substitute LaTeX code sequences (e.g. \alpha) with correspondingUnicode symbols (e.g. α). By default, these substitutions must be triggered explicitly by pressing theTab key, as in the Julia command line (the REPL); however, an automatic, as-you-type mode can alsobe activated, and a method based on keymap is also available.

This feature also works in command mode, e.g. when searching the files with the / or ? commands, but theas-you-type mode is not available (the keymap-based version works though, and it also works with some Vimcommands like f and t).

By default, this feature is only active when editing Julia files. However, it can be also enabled withother file types, and even turned on/off on the fly regardless of the file type.

These features only work as described with Vim version 7.4 or higher. Tab completion can still be madeavailable on lower Vim versions, see below for more details.

The following sections provide details on these features. The complete documentation is provided by calling:help julia-vim from within Vim. A complete reference table of the available substitution can beaccessed by calling :help L2U-ref from within Vim.

LaTeX-to-Unicode via Tab key

This plug-in adds a mapping to the Tab key which makes it behave like the Julia REPL, i.e. whenthe cursor is at the end of a recognized LaTeX symbol (e.g. \alpha) in insert mode, pressingthe Tab key will substitute it with the corresponding Unicode symbol (e.g. α). If a partial matchis found (e.g. \al), a list of possible completions is suggested (e.g. \aleph, \allequal,\alpha), and it will be refined while you enter more characters; when only one match is left, pressingTab will complete it and pressing it again will perform the substitution to Unicode.

If no suitable substitution is found, the action will fall back to whatever mapping was previouslydefined: by default, inserting a literal <Tab> character, or invoking some other action if anotherplug-in is installed, e.g. supertab or YouCompleteMe.

Note that the YouCompleteMe, neocomplcache, neocomplete and deoplete plug-ins do not work wellwith the suggestion of possible completions for partial matches, and therefore this feature is disabledif those plug-ins are detected.

A literal tab can always be forced by using CTRL-V and then Tab.

On the Vim command line, e.g. when searching the file with the / or ? commands, the feature isalso activated by Tab, but falls-back to the Vim built-in behavior if no suitable substitutionis found: if you had defined a mapping for Tab in command mode, it will be overridden. Thiscan be prevented by choosing a different value for the mapping keys, see the full documentation.

To disable this mapping, you can use the command :let g:latex_to_unicode_tab = "off", e.g. by puttingit into your .vimrc file. You can also change this setting from the Vim command-line, but you willalso need to give the command :call LaTeXtoUnicode#Init() for the change to take effect.

You can further fine-tune the g:latex_to_unicode_tab option: to selectively enable the Tabmapping only in the command line set it to "command", or set it to "insert" to get the mapping onlyin insert mode. (The default setting is "on", which applies to both.)

Even when the mapping is disabled, the feature is still available (in insert mode) via thecompletion mechanism, i.e. by pressing CTRL-X and then CTRL-U.

To disable the suggestions of partial matches completions, use the command:let g:latex_to_unicode_suggestions = 0.

In general, suggestions try not to get in the way, and so if an exact match is detected (e.g. \ne) whenTab is pressed, the substitution will be done even when there would be other symbols with the same prefix(e.g. \neg). This behaviour can be changed by the command :let g:latex_to_unicode_eager = 0, inwhich case hitting Tab will first produce a suggestion list, and only pressing it again will trigger thesubstitution to Unicode.

Using this feature on Vim versions lower than 7.4

The automatic remapping of the Tab key is not performed if Vim version is lower than 7.4. However, thefunctionality can still be used via the completion mechanism, i.e. by using CTRL-XCTRL-U. You canmap this to some more convenient key combination, e.g. you may want to add something like this line to your.vimrc file:

inoremap <C-Tab> <C-X><C-U>

This would map the functionality to CTRL-Tab. However, if you try to map this to Tab, you'd only beable to use literal Tab by using CTRL-VTab.

LaTeX-to-Unicode as you type

An automatic substitution mode can be activated by using the command :let g:latex_to_unicode_auto = 1,e.g. by putting it into your .vimrc file. You can also change this setting from the Vim command-line, butyou will also need to give the command :call LaTeXtoUnicode#Init() for the change to take effect.

In this mode, symbols will be substituted as you type, as soon as some extra character appears after the symboland a LaTeX sequence can unambiguously be identified.

For example, if you type a \ne b the \ne will be changed to right after the space, before you inputthe b.

This does not interfere with the Tab mapping discussed above. It only works in insert mode, and itdoesn't work with emojis.

This feature is not available with Vim versions lower then 7.4.

LaTeX-to-Unicode via keymap

A different susbstitution mode based on keymaps can be activated with :let g:latex_to_unicode_keymap = 1,e.g. by putting it into your .vimrc file. This works similarly to the as-you-type method described above,but it has the advantage that it works under more circumstances, e.g. in command-line mode when searching with/ or ?, and when using the f and t commands.The main disadvantage is that you don't see the whole sequence as you're typing it, and you can't fix mistakeswith backspace, for example.Another difference is that there is a timeout like for any other mapping.In any case, it is possible to use this method in parallel with the other two methods, they don't interfere.So if you have the Tab mapping (discussed above) activated, you still get to see completions andsuggestions. If you have the as-you-type substitution active, and you make a mistake, you can simply pressbackspace and keep going, at least in insert mode, and so on.

This feature might with Vim versions lower then 7.4, but it hasn't been tested.

LaTeX-to-Unicode on other file types

By default, the LaTeX-to-Unicode substitutions are only active when editing Julia files. However, you can usethe variable g:latex_to_unicode_file_types to specify for which file types this feature is active by default.The variable must be set to a string containing a pattern (a regular expression) which matches the desired filetypes, or to a list of such patterns. For example, to activate the feature on all file types, you could putlet g:latex_to_unicode_file_types = ".*" in your .vimrc file.Be aware, however, that enabling the functionality overrides the completefunc setting.

Enabling and disabling the LaTeX-to-Unicode functionality

Regardless of the type of the file you are editing and of the g:latex_to_unicode_file_types setting, theLaTeX-to-Unicode substitutions can be enabled/disabled/toggled by calling the functionsLaTeXtoUnicode#Enable(), LaTeXtoUnicode#Disable(), LaTeXtoUnicode#Toggle(). For example, you could usethe mappings:

noremap <expr> <F7> LaTeXtoUnicode#Toggle()
noremap! <expr> <F7> LaTeXtoUnicode#Toggle()

and then use the F7 key to quickly turn the feature on and off.

Block-wise movements and block text-objects

This plug-in defines mappings to move around julia blocks (e.g. if/end, function/end etc.) and tomanipulate them as a whole (analogously to the standard w, b etc. commands to move on words, and tothe aw, iw commands which allow to manipulate them). These require the matchit plugin, which is usuallydistributed with ViM but must be explicitly enabled, e.g. adding this to your .vimrc file:

runtime macros/matchit.vim

The default mappings use ]], ][, [[, [], ]j, ]J, [j, and [J for the movementsand aj, ij for the selections. These can be disabled collectively by setting g:julia_blocks to 0,or they can be remapped and/or disabled individually by defining a g:julia_blocks_mapping variable.See the documentation for details.

Note that this feature requires Vim version 7.4 or higher.

  • 一:必备网站 想要学会Julia,Julia中文社区是必须的,社区里有大量的帖子,你可以发布或者查看帖子,来解决你遇到的问题。其中的镜像站教程,可以快速下载Julia的历史版本,并且设置后可以快速导包。 关于下载Julia,不建议下载最新发布的版本,选择上一个版本或者上上个版本,讲道理是更稳定的。在1.0版本后并没有太大的改动,有时候稳定才更有效。 二:运行环境 其实这个分为两个部分,编辑代码和运

  • vim-autoformat Format code with one button press (or automatically on save). This plugin makes use of external formatting programs to achieve the most decent results. Check the list of formatprograms

  • 参考 https://zhuanlan.zhihu.com/p/41953244 还有这篇教程:https://zhuanlan.zhihu.com/p/60889456 详见julia中文文档:http://cn.julialang.org/JuliaZH.jl/latest/ 1. 介绍 1.1 背景 Julia是麻省理工学院计算机科学和人工智能实验室(Csil)开发和孵化的一种免费开放源码语

 相关资料
  • 移动应用开发框架已经有很多,比如PhoneGap、jQuery Touch、Sencha和Titanium。为什么还需要另外一个? PhoneGap,比较出名的一个跨平台解决方案。但是PhoneGap并不支持UI设计,它仅仅是浏览器调用本机代码(比如获取地理位置)的一层接口。UI设计还需要别的JS类库支持。在Google的NexusOne(1G的CPU)上面测试,加载一个PhoneGap和jQue

  • Julia Studio 是 Julia 编程语言的集成开发环境,基于 Qt Creator 和 Qt 框架,除了一个编辑器和集成控制台之外还包括了内置支持 git 版本控制。另外,使用标准 Julia 包可以快速实现数据可视化。 支持的平台 Mac OSX 10.6 及更高版本 Windows XP SP2 及更高版本 (K)Ubuntu Linux 12.04 及更高版本

  • 本文向大家介绍Julia平方数,包括了Julia平方数的使用技巧和注意事项,需要的朋友参考一下 示例 这是定义函数的最简单语法: 要调用函数,请使用方括号(之间没有空格): 函数是Julia中的对象,我们可以像其他任何对象一样在REPL中显示它们: 默认情况下,所有Julia函数都是通用的(也称为多态)。我们的square函数与浮点值同样适用: ...甚至是矩阵:            

  • Julia有一个非常好的特性,可以访问自己的语法树,这使得以编程方式生成新函数变得很容易,但它比普通的Julia代码慢得多。 例如: 有没有办法给提供与普通Julia代码相同的速度? @Ivarne建议我提供我的项目的细节。我想使用Julia的元编程功能来计算符号导数并运行它们。 我编写了一个函数,它接受and表达式和一个参数,并返回一个新表达式,该表达式是相对于的导数。不幸的是,结果需要太长时间

  • Julia 数字图像处理入门 关于 Julia 下图像处理的系列教程: �� JuliaImages 入门 �� 《数字图像处理》[1]和[2]中涉及到的一些例子的Julia实现 参考文献 [1] Gonzalez, Rafael C., Richard E. Woods, and Barry R. Masters. "Digital image processing third edition.

  • 本文向大家介绍Julia匿名功能,包括了Julia匿名功能的使用技巧和注意事项,需要的朋友参考一下 示例 箭头语法 可以使用->语法创建匿名函数。这对于将函数传递给高阶函数(例如函数)很有用map。下面的函数计算数组中每个数字的平方A。 使用此功能的示例: 多行语法 可以使用function语法创建多行匿名函数。例如,以下示例计算第一个n数字的阶乘,但使用匿名函数代替内置函数factorial。