Monday, April 25, 2016

Re: strikethrough text in gvim

Hi Ken!

On Mo, 25 Apr 2016, Ken Takata wrote:

> Hi Christian,
>
> 2016/4/26 Tue 1:53:17 UTC+9 Christian Brabandt wrote:
> > Hi Ken!
> >
> > On Do, 10 Mär 2016, Ken Takata wrote:
> >
> > > Hi,
> > >
> > > 2013/10/12 Sat 23:25:06 UTC+9 Ken Takata wrote:
> > > > Hi Christian,
> > > >
> > > > 2013/07/31 Wed 4:56:39 UTC+9 Christian Brabandt wrote:
> > > > > Attached is a patch to try out. It seems to work for me with GTK
> > > > > and Motif Gui. I am a Unix gui and can't say for sure the code for
> > > > > Windows and Mac is actually correct and works, though.
> > > >
> > > > I checked your patch on Windows. It works fine. I checked it with
> > > > the following process:
> > > >
> > > > > gvim -N foo.html
> > > > :syn enable :syn region htmlStrike start="<del\>" end="</del>"me=e-6
> > > > contains=@htmlTop :hi def htmlStrike term=strikethrough
> > > > cterm=strikethrough gui=strikethrough i<del>foo</del>
> > > >
> > > >
> > > > > Secondly, I am unsure about the changes to term.c and term.h I
> > > > > don't know, if these changes are actually needed, so I simply took
> > > > > the undercurl code as an example and changed it so it would fit
> > > > > for strikethrough.
> > > >
> > > > I think it is better to add term cap entries. Currently, termcap
> > > > doesn't support strikethrough attributes, so we have to use our own
> > > > attribute names. (E.g. 't_Ts'/'t_Te' or 't_SS'/'t_SE') I also think
> > > > that a new flag (e.g. 't' or 'S') should be added in the 'highlight'
> > > > option.
> > > >
> > > > I and Hayaki Saito updated your patch to add them. After applying
> > > > this patch and setting escape sequences properly,
> > > >
> > > > let &t_Ts="\e[9m" let &t_Te="\e[29m"
> > > >
> > > > some terminals (*) will show strikethrough lines.
> > > >
> > > > (*) RLogin: http://nanno.dip.jp/softlib/man/rlogin/ (Japanese)
> > > > pangoterm: https://launchpad.net/pangoterm/
> > >
> > > I found that this patch cannot be used for GTK3, but I don't know how
> > > to fix it. I hope someone can fix this.
> >
> > Seems like you did fix this with the latest version here:
> > https://bitbucket.org/k_takata/vim-ktakata-mq/src/9e19c0c57c4812557e7750629de02986249a5246/strikethrough.diff?fileviewer=file-view-default
>
> I made a fix but I haven't tested it yet.
>
> > Seems to work fine for me. Bram, I think this might be a nice addition
> > for vim 8.
>
> Thank you for checking. Does it work both with GTK2 and GTK3?

,----
| :syn region htmlStrike start="<del>"ms=s+5 end="</del>"me=e-6
| :hi def htmlStrike gui=strikethrough term=strikethrough
| i<del>foobar</del>
`----

This works in GTK2 and GTK3 gui but I couldn't check the terminal, since
I don't have a terminal that has this capability


Best,
Christian
--
Frauen sind das beste in dieser Art.
-- Curt Goetz

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment