Code Monkey home page Code Monkey logo

latex-unicoder.vim's People

Contributors

ddrake avatar erikdsjostrom avatar f0rki avatar fmoralesc avatar isbadawi avatar joom avatar lgaeher avatar mrgriffin avatar robertp-indeed avatar rsaarelm avatar shuber2 avatar whonore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

latex-unicoder.vim's Issues

Back to LaTeX from Unicode

Is it possible to invert the operation?
I would like to be able to select symbols and
convert them back into commands.

Parsing $ Symbols

(1) While \alpha correctly converts to α, it's not the case that $\alpha$ converts to α nor even $α$.

(2) It would also be cool to go in the reverse direction too: that is to go from α to $\alpha$in the code (giving you a way to preview latex files within vim by going back and forth between $\alpha$ and α).

Overall fixing (1) would be much more useful (at least to me) than (2) :)

Is there a way to avoid key bindings?

When I add latex-unicoder to my init.vim I lost my desired behaviour for <C-l> shortcut. is there a way to avoid this?

I try adding:

" ========= latex unicoder ==========
let g:unicoder_cancel_normal = 1
let g:unicoder_cancel_insert = 1
let g:unicoder_cancel_visual = 1
nnoremap <F3> :call unicoder#start(0)<CR>
inoremap <F3> <Esc>:call unicoder#start(1)<CR>
vnoremap <F3> :<C-u>call unicoder#selection()<CR>

but not takes effect.

Add support to visual select the input

It would be great to be able to visually select an already written latex-symbol in the file and use ctrl-L to substitute the selection with the unicode symbol, instead of typing it out into the prompt again.

Diacritics do not work

For example:

\dot{a} \dota a\dot
\hat{o} \hato o\hat

converts into

ẋ{𝑎} ẋ𝑎 𝑎ẋ
x̂{𝑜} x̂𝑜 𝑜x̂

In Unicode diacritics are combining characters but in s:presymbols they are listed as already combined with x.

cursor goes to next line after inputting symbol

Whenever I use latex-unicoder to input a symbol, the cursor always ends up moving to the next line after the symbol gets inputted. Which is to say that this happens:

  1. I press C-l
  2. I type something, e.g. \lambda
  3. I press
  4. λ gets inserted at the cursor
  5. The cursor moves down to the first character of the next line.

The desired behaviour would of course be that the cursor just moves so that it's immediately after the symbol.

C-l clobbers user mappings

Pull request incoming to fix this issue. Involves mapping commands not to <C-l> directly but to <Plug>Unicoder, and then only setting <C-l> to <Plug>Unicoder if g:unicoder_no_map isn't set. The the user's .vimrc can then look like

" Unicoder stop clobbering my C-l
let g:unicoder_no_map = 1
map <C-g> <Plug>Unicoder

Not available in insert mode

The documentation says that the map would also work in insert mode, but it does not. Note that :map only works in normal, visual, select and operator-pending modes. One should either change the documentation or the :map call.

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.