Prevent the use of italic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Prevent the use of italic

Anton Shepelev
Hello, all

I  am using GVim with a font that has no italic sub-
set.  When I edit markdown (.md) files, however, Vim
tries  to  render  *emphasized* text as italic.  How
can I prevent that?  Is it  configured  in  a  color
file or a syntax file?

--
Please, do not forward replies to the list to my e-mail.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Prevent the use of italic

Alessandro Antonello
This is probably in the syntax file. In 'syntax/markdown.vim' somewhere in the 'runtimepath'.

Em 2 de mar de 2018 4:37 AM, "Anton Shepelev" <[hidden email]> escreveu:
Hello, all

I  am using GVim with a font that has no italic sub-
set.  When I edit markdown (.md) files, however, Vim
tries  to  render  *emphasized* text as italic.  How
can I prevent that?  Is it  configured  in  a  color
file or a syntax file?

--
Please, do not forward replies to the list to my e-mail.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Prevent the use of italic

Oliver Knodel
In reply to this post by Anton Shepelev
Am Freitag, 2. März 2018 08:37:21 UTC+1 schrieb Anton Shepelev:

> Hello, all
>
> I  am using GVim with a font that has no italic sub-
> set.  When I edit markdown (.md) files, however, Vim
> tries  to  render  *emphasized* text as italic.  How
> can I prevent that?  Is it  configured  in  a  color
> file or a syntax file?
>
> --
> Please, do not forward replies to the list to my e-mail.
It is set in the syntax/markdown file and links to htmlItalic:
markdownItalic xxx links to htmlItalic

You can override it in ~/.vim/after/syntax/html.vim:
hi htmlItalic gui=NONE

If you use vim inside terminal, substitute gui with term or cterm.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Prevent the use of italic

Frank Shute
In reply to this post by Anton Shepelev
Do you prefer that gvim doesn't render emphasised text as italic? Or
would you like it to?

If the latter, then you can set gvim to use a font that contains the
italicised glyphs.

:help guifont

I use 'Consolas' on Windows and 'Anonymous Pro' on *nix.



On 27 February 2018 at 13:04, Anton Shepelev <[hidden email]> wrote:

> Hello, all
>
> I  am using GVim with a font that has no italic sub-
> set.  When I edit markdown (.md) files, however, Vim
> tries  to  render  *emphasized* text as italic.  How
> can I prevent that?  Is it  configured  in  a  color
> file or a syntax file?
>
> --
> Please, do not forward replies to the list to my e-mail.
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.



--

Frank

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Prevent the use of italic

Nikolay Aleksandrovich Pavlov
In reply to this post by Oliver Knodel
2018-03-02 19:06 GMT+03:00 Oliver Knodel <[hidden email]>:

> Am Freitag, 2. März 2018 08:37:21 UTC+1 schrieb Anton Shepelev:
>> Hello, all
>>
>> I  am using GVim with a font that has no italic sub-
>> set.  When I edit markdown (.md) files, however, Vim
>> tries  to  render  *emphasized* text as italic.  How
>> can I prevent that?  Is it  configured  in  a  color
>> file or a syntax file?
>>
>> --
>> Please, do not forward replies to the list to my e-mail.
>
> It is set in the syntax/markdown file and links to htmlItalic:
> markdownItalic xxx links to htmlItalic
>
> You can override it in ~/.vim/after/syntax/html.vim:
> hi htmlItalic gui=NONE
>
> If you use vim inside terminal, substitute gui with term or cterm.

There is no need to use after/ directory, and especially after/syntax
which will be constantly reloaded. Sane syntax file authors (and
html.vim other is one of those) define highlight groups with
`:highlight default` which means that if highlighting group is defined
*before* sourcing syntax file then it will not be overridden, so
placing something like `hi link htmlItalic Normal` into the
colorscheme (if it is maintained by the OP) or vimrc is good and will
not create uselessly reloaded oneline files. Usage of the `:highlight
default` in syntax files aims precisely at allowing colorschemes to
provide defaults better suited to the user.

>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Prevent the use of italic

Tony Mechelynck
On Fri, Mar 2, 2018 at 10:47 PM, Nikolay Aleksandrovich Pavlov
<[hidden email]> wrote:

> 2018-03-02 19:06 GMT+03:00 Oliver Knodel <[hidden email]>:
>> Am Freitag, 2. März 2018 08:37:21 UTC+1 schrieb Anton Shepelev:
>>> Hello, all
>>>
>>> I  am using GVim with a font that has no italic sub-
>>> set.  When I edit markdown (.md) files, however, Vim
>>> tries  to  render  *emphasized* text as italic.  How
>>> can I prevent that?  Is it  configured  in  a  color
>>> file or a syntax file?
>>>
>>> --
>>> Please, do not forward replies to the list to my e-mail.
>>
>> It is set in the syntax/markdown file and links to htmlItalic:
>> markdownItalic xxx links to htmlItalic
>>
>> You can override it in ~/.vim/after/syntax/html.vim:
>> hi htmlItalic gui=NONE
>>
>> If you use vim inside terminal, substitute gui with term or cterm.
>
> There is no need to use after/ directory, and especially after/syntax
> which will be constantly reloaded. Sane syntax file authors (and
> html.vim other is one of those) define highlight groups with
> `:highlight default` which means that if highlighting group is defined
> *before* sourcing syntax file then it will not be overridden, so
> placing something like `hi link htmlItalic Normal` into the
> colorscheme (if it is maintained by the OP) or vimrc is good and will
> not create uselessly reloaded oneline files. Usage of the `:highlight
> default` in syntax files aims precisely at allowing colorschemes to
> provide defaults better suited to the user.
Anton Shepelev: this last sentence is important. Rather than linking
htmlItalic to Normal, you might prefer to define your own colorscheme,
defining htmlItalic with some specific colours rather than as italic
text.

I'm attaching my "almost-default" colorscheme, which uses Vim's
defaults for everything not explicitly mentioned. Don't use it
unchanged, but you may add and remove highlight lines until it does
what you like. There are a few lines at beginning and end (lines 1-28
and, I think, 136-end) which should not be removed (but possibly
modified if you change the colorscheme's name). Please also change
lines 2 and 3 (which hold my name and the last change date). Line 4 is
to force it to get a 'fileencoding' of Latin1 because that line would
be invalid in UTF-8. After applying your changes, drop it into
~/.vim/colors/ (on Unix-like systems) or ~/vimfiles/colors (as named
in Vim terminology on Windows), and invoke it with a :colo[rscheme]
statement (see ":help :colorscheme") in your vimrc.

This colorscheme is intentionally written to work well with the
CSApprox plugin if loaded. It predates the invention of the
+termguicolors feature, which I don't use (instead, I use the CSApprox
plugin and I don't touch 'termguicolors', which remains at its FALSE
default if defined).

It also assumes that Vimscript lines whose first nonblank is a
backslash are continuation lines, which is the 'nocompatible' (or
"Vim") default but not the 'compatible' (or "Vi") default. The User1
and User2 highlights are used in my custom text-style tabline (defined
in my vimrc, not here, and used in both "GUI" and "console" operating
modes).

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

almost-default.vim (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Prevent the use of italic

Anton Shepelev
In reply to this post by Frank Shute
Frank Shute:

>Do  you  prefer that gvim doesn't render emphasised
>text as italic? Or would you like it to?

My basic requirement is that vim  shall  ignore  the
Markdown  conventions for italic and render the cor-
responding text  as  usual.   An  improved  solution
would be to have it render italic Markdown in a spe-
cial color.

>If the latter, then you can set gvim to use a  font
>that contains the italicised glyphs.
>
>   :help guifont
>
>I  use 'Consolas' on Windows and 'Anonymous Pro' on
>*nix.

Thanks, but I dislike those fonts and I prefer  true
raster fonts, such as Terminus:

   http://terminus-font.sourceforge.net/

or  pixel-for-pixel conversions of raster fonts into
vector form:

   http://int10h.org/oldschool-pc-fonts/fontlist/

One of my favorite ones is Olympiad:

   http://8088mph.blogspot.ru/2016/03/olympiad-ibm-prototype-fonts-unearthed.html

--
Please, do not forward replies to the list to my e-mail.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Prevent the use of italic

Anton Shepelev
In reply to this post by Oliver Knodel
Oliver Knodel to Anton Shepelev:

>>I  am  using  GVim  with a font that has no italic
>>subset.  When I edit markdown (.md) files,  howev-
>>er, Vim tries to render *emphasized* text as ital-
>>ic.  How can I prevent that?  Is it configured  in
>>a color file or a syntax file?
>
>It  is set in the syntax/markdown file and links to
>htmlItalic: markdownItalic xxx links to htmlItalic
>
>You can override it in
>
>~/.vim/after/syntax/html.vim:
>hi htmlItalic gui=NONE

Thanks.  I have already found and disabled it, right
in the main syntax file.

--
Please, do not forward replies to the list to my e-mail.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.