diff --git a/README.md b/README.md index 8cd7db6..e97da75 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,8 @@ Unicode symbols (e.g. `α`). By default, these substitutions must be triggered e `` key, as in the Julia command line (the REPL); however, an automatic, as-you-type mode can also be activated. -These features are only available with Vim version 7.4 or higher. +These features only work as described with Vim version 7.4 or higher. Tab completion can still be made +available on lower Vim versions, see below for more details. The following sections provide details on this features. The complete documentation is provided by calling `:help julia-vim` from within Vim. @@ -88,6 +89,20 @@ substitution to Unicode. [YouCompleteMe]: https://github.com/Valloric/YouCompleteMe [neocomplcache]: https://github.com/Shougo/neocomplcache.vim +#### Using this feature on Vim versions lower than 7.4 + +The automatic remapping of the `` key is not performed if Vim version is lower than 7.4. However, the +functionality can still be used via the omnicompletion mechanism, i.e. by using `CTRL-X + CTRL-O`. You can +map this to some more convenient key combination, e.g. you may want to add something like this line to your +`.vimrc` file: + +``` +inoremap +``` + +This would map the functionality to `CTRL-Tab`. However, if you try to map this to ``, you'd only be +able to use literal `` by using `CTRL-V + `. + ### LaTeX-to-Unicode as you type An automatic substitution mode can be activated by using the command `:let g:julia_auto_latex_to_unicode = 1`, @@ -104,3 +119,5 @@ This does not interfere with the `` mapping discussed above. The `g:julia_auto_latex_to_unicode` setting can also be changed from the Vim command-line, but you will also need to give the command `:call JuliaLaTeXtoUnicodeInit()` for the change to take effect. + +This feature is not available with Vim versions lower then 7.4. diff --git a/doc/julia-vim.txt b/doc/julia-vim.txt index 12fe392..85fa0a1 100644 --- a/doc/julia-vim.txt +++ b/doc/julia-vim.txt @@ -58,7 +58,9 @@ This Vim plug-in extends this functionality: - optionally, symbols are substituted on the fly as you type them, see |julia-vim-L2U-as-you-type| -These features are only available with Vim version 7.4 or higher. +These features only work as described with Vim version 7.4 or higher. Tab +completion can still be made available on lower Vim versions, see +|julia-vim-L2U-workaround|. ------------------------------------------------------------------------------ LATEX TO UNICODE VIA TAB KEY *julia-vim-L2U-tab* @@ -116,14 +118,29 @@ match for `\nequiv` (`≢`). By default, if finds an exact match performs the substitution, but this can be controlled by the |g:julia_latex_to_unicode_eager| setting. +Vim versions lower than 7.4 *julia-vim-L2U-workaround* + +The key remapping is not performed by default with Vim versions lower +than 7.4. However, the functionality is still available via onmicompletion, +which is accessible by the CTRL-X CTRL-O key combination. You can map some +other key combination to this by adding something like +> + inoremap +< +in your |.vimrc| file. If you'd map directly, then you'd need to use +CTRL-V to insert a literal . + +The settings |g:julia_latex_to_unicode_eager| and +|g:julia_latex_suggestions_enabled| are still meaningful in this case. ------------------------------------------------------------------------------ LATEX TO UNICODE AS YOU TYPE *julia-vim-L2U-as-you-type* -This feature is disabled by default, see |g:julia_auto_latex_to_unicode|. It -consists in substituting valid LaTeX sequences with Unicode symbols -automatically as the typing progresses, as soon as the sequences is -unambiguously complete. For example, when typing: +This feature is disabled by default, see |g:julia_auto_latex_to_unicode|, and +it is only available with Vim version 7.4 or higher. It consists in +substituting valid LaTeX sequences with Unicode symbols automatically as the +typing progresses, as soon as the sequences is unambiguously complete. For +example, when typing: > \chi\^2 = 1 <