Giter Club home page Giter Club logo

Comments (9)

carlobaldassi avatar carlobaldassi commented on May 22, 2024

I have oftentimes wanted that too. The proper way to have that would seem to be factoring out the relevant bits in an independent plugin. Except that 1) vim lacks a plugin manager which allows to specify dependencies, and I'd really hate to need to specify in the README (which nobody reads anyway usually) that you need to download something else to get the full functionality, and 2) the LaTeX labels are somehow Julia-specific. The second point is very minor, of course, but the first one is what blocked me. Even more relevant, after Julia 1.0 I hope to have the plugin shipped with vim by default, in which case the chances of someone looking into the README and discovering that they need to get another plugin basically get to 0. In other words, it should just work, like now, anything else is a regression in my opinion.

So the alternative could be to provide a configuration option which enables the feature for any file via autoload, perhaps via a whitelist/blacklist pair of options to specify filetypes. It's a bit strange to do this from a filetype-specific plugin though. But unless someone has a better idea, or simply objects to this kind of plan, I may try going down that road, with some refactoring it may be feasible.

from julia-vim.

jovaha avatar jovaha commented on May 22, 2024

The idea of making it available via a configuration option sounds like a good idea. Considering your goal of including it in vim and the usefulness of this feature not involving Julia I think an unorthodox way of making it available is merited.

The quality of this feature is impressive and really useful for general scientific work, so it would be sad if it couldn't be used without ft=julia.

P.S. I am just commenting as a user. I hope that is ok

from julia-vim.

carlobaldassi avatar carlobaldassi commented on May 22, 2024

P.S. I am just commenting as a user. I hope that is ok

Totally ok, no worries!

from julia-vim.

carlobaldassi avatar carlobaldassi commented on May 22, 2024

Ok, I went through a major refactoring and now LaTeX-to-Unicode should be available on all file types. It's a bit of a weird arrangement, basically the L2U stuff is a "guest-plugin" inside the Julia one, but I hope it's useful. Of course, I immediately set

let g:latex_to_unicode_file_types = ".*"

in my .vimrc :)

I hope everything works as intended.

from julia-vim.

carlobaldassi avatar carlobaldassi commented on May 22, 2024

Ah and of course refer to the documentation for the details.

from julia-vim.

jovaha avatar jovaha commented on May 22, 2024

Updated, and works perfectly. Thanks for grate response

from julia-vim.

mbaz avatar mbaz commented on May 22, 2024

How do you specify just some file types? I'd like to have this functionality only for Julia and Latex files. I have tried combinations such as "julia, tex", "julia tex", "*jl *tex", but they don't work.

from julia-vim.

carlobaldassi avatar carlobaldassi commented on May 22, 2024

@mbaz Like this:

let g:latex_to_unicode_file_types = ["julia", "tex", "plaintex"]

see also the help (or better :help julia-vim-L2U-file-types).

from julia-vim.

mbaz avatar mbaz commented on May 22, 2024

@carlobaldassi Thanks! and sorry for missing the documentation. I went by the project's readme, which only has ".*" as an example, and I didn't know how to specify a list.

from julia-vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.