Giter Site home page Giter Site logo

typoel's People

Contributors

akoehn avatar andersjohansson avatar djolereject avatar jack8472 avatar joewreschnig avatar jorgenschaefer avatar leafac avatar mykolan avatar wilx avatar zahardzhan 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

typoel's Issues

Typo mode doesn't work after a < character.

I have a document with about 130 lines of text and noticed that after a certain line typo-mode doesn't work anymore. This is the line:

“A one-way ANOVA showed ... (p<0.001)."

I played a bit with this to find out what's causing the problem and it seems the < character is the trigger. Typo-mode works before that character but not after. When I replace p<0.001 by p < 0.001 the problem is gone.

I'm using the most recent version of typo-mode from MELPA and a very recent development version of Emacs.

Thanks for typo-mode, by the way. I love it!

Add function to wrap region in quotes (with example)

Hello,

This would behave like smartparens using parentheses. I have bound this to the ' key.
It sets the mark so that to change to basic quotes after inserting fancy quotes, one can use C-x C-x.

(defun my-typo-fancy-quote-dwim (&optional arg)
      (interactive)
      (if (use-region-p)
          (cl-flet ((check (forward char)
                           (let ((checked (char-after (if forward (point) (1- (point))))))
                             (cond ((eq char checked)
                                    (delete-char (if forward 1 -1))
                                    (insert-char ?')
                                    0)
                                   ((eq ?' checked)
                                    (delete-char (if forward 1 -1))
                                    (insert-char char)
                                    0)
                                   (t
                                    (insert-char char)
                                    1)))))
            (let* ((beg (region-beginning))
                   (end (region-end))
                   (start-beg (eq (point) beg)))
              (goto-char beg)
              (setq end (+ end (check t ?‘)))
              (goto-char end)
              (setq end (+ end (check nil ?’)))
              (if start-beg
                  (progn (goto-char beg) (set-mark end))
                (progn (goto-char end) (set-mark beg)))))
        (if (looking-back (rx (or line-start blank)) 0 nil)
            (typo-cycle-left-single-quotation-mark arg)
          (typo-cycle-right-single-quotation-mark arg))))

Thank you.

Ukrainian language

Hi! Could you please add Ukrainian to the list of languages?
("Ukrainian" "«" "»" "„" "“")

Multilingual support

So, I'm a bit of a polyglot, and I've been having to mix, say, German and English in the same paragraphs or even quotations within quotations. I've used typo-mode for my simpler needs for some time, but sadly I'm not sure how to configure it to better support my workflow, other than perhaps modifying the globally-accessible key map, but by then, that kind of defeats the point of me using typo-mode.

Here is a small example, after (typo-change-language "German"):

„Guten Tag!“ the German man said. [now run (typo-change-language "English")] ‘How do you do?’ replied the American.

As you can see, the quotation marks for English are messed up.

typo apostrophes break forward-word and friends

without typo-mode, a word with a ' in it like there'll counts as one word, with typo it counts as two.

would it be possible for typo-mode to modify find-word-boundary-function-table or something to handle this better?

[syntax tables are not my forté!]

Option to turn off some bindings?

I'd like to add options to selectively turn on characters. For example, I might only want the hyphen shortcut, but none of the others. Does this seem like a good idea/would you consider merging such a feature?

Support U+02BC for apostrophes

Hi, thank you for this package, it's great.

The current handling of apostrophes (replacing them with right quotes) led me down a path of trying to get right quotes to behave like apostrophes in emacs:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30815

My conclusion from that is based on this article:

https://tedclancy.wordpress.com/2015/06/03/which-unicode-character-should-represent-the-english-apostrophe-and-why-the-unicode-committee-is-very-wrong/

If I'm going to use something other than ' for an apostrophe, I'd rather use U+02BC as it works out of the box in emacs and doesn't have the problems described in the article above.

What would you think about adding support for that to typo?

Thanks!

Arrow not inserted

Hi, looking at the code I see that with -> it should insert an arrow, but for me it's not working (while ...) is.
Can you confirm it is working? Thanks

Easier customization

I would like to customize some cycles and especially depending on the current major mode.

One global change I would like to make is in the space cycle replacing THIN SPACE with THIN NO-BREAK SPACE. And for HTML and Markdown I would like to cycle through ("&lt;" "<" "«" "‹") with <, but only in these modes.

This would be much easier if the cycle lists would be variables which can become buffer local.

typo ignores `org-tags-column` in org-mode

Hello, I have saw this bug for quite long time and just recently I realized it only happens when typo-mode is activated.

The problem: When inserting a character handled by typo-mode (e.g., a period) at a heading in org-mode, tags in that heading are not kept aligned as specified in the variable org-tags-column. It happens for both positive and negative values of org-tags-column.

To reproduce: Set org-tags-column to -80. Open a buffer in org-mode. Start typo-mode. Start a org-mode heading in the buffer. Add a tag to the heading. Continue typing letters and numbers in the heading. You will see that the tag is kept aligned. Type a character handled by typo-mode, e.g., a . (period), a - (dash), etc. You will see that the tag is one character off to the right and it have not been kept aligned as expected. This behavior does not happens when typo-mode is deactivated.

Inconvenience: This behavior is annoying for who usually type a character handled by typo-mode as the last character in the heading, e.g., a . (period).

Thanks for typo.el! It is really handy!

Don't replace ligatures

In the README, you say that you may add support for ligatures in the future. I agree, that ligatures should rather be a display issue. A concrete problem with replacing ligatures is that a search for things like fi would fail. For instance, when I search for occurrences of artificial in a document that wouldn't turn up anything because the fi sequence has been replaced by the corresponding ligature. Another problem is that most people use mono-spaced fonts in Emacs and ligatures arguably don't make sense in mono-space fonts.

easy entering '--' instead of '–'

Hello,

I'm very happy with typoel package which allows easy entry of typographical stuff in my text...

Now, have a problem for which I do not find easy solution: I'm using Hugo static-site generator along with Asciidoc(tor) markup and in order to mark summary separator for blog post one has to enter the following:

<!--more-->

which consists of few 'special' combinations like '--' and '->' recognized by typoel which are converted into their typographical equivalents, so the question is what would be recommended way to enter the above code easily?

So far, I've created "C-x t" binding in order to able to quickly switch on/off typo-mode. Anything else?

French quotation marks require spaces

French quotation marks require spaces (ideally, no-break space) after the opening and before the closing one. Would be nice if typo.el would insert those by itself.

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.