On 13/06/12 17:01, Christian Brabandt wrote:
On Wed, June 13, 2012 16:25, ping wrote:
(Hi ping, please don't top poste)
thanks Tony.
however I think I need a way to just "not display" instead of modifying
the file -- it might need to be shared with other people working in
other OS..
thanks anyway.
FYI attached is a file of mine with ^M displayed on beginning&ending of
each line.
a :%/\r//g will clear all ^M and make it looks clean...but I'm not sure
how it will display in windows..
Take the output of :hi Normal.
It will output something like this for me (gvim, colorscheme desert):
,----
| Normal xxx guifg=White guibg=grey20 ctermfg=251 ctermbg=16
`----
Now you can define your own hilight group:
hi MyIgnore guifg=grey20 ctermfg=16 term=NONE
(I explicitly set ctermfg and guifg to the bg color of the Normal
group, so it will effectively be hidden.
...but the space it occupies will still be there, and it will, I think,
reappear if you make it part of a visual selection.
You may try to use NONE
instead, but this did not work for me)
Then you can use:
:call matchadd('MyIgnore', '^M')
and the ^M should be hidden.
regards,
Christian
Best regards,
Tony.
--
In India, "cold weather" is merely a conventional phrase and has come
into use through the necessity of having some way to distinguish
between weather which will melt a brass door-knob and weather which
will only make it mushy.
-- Mark Twain
--
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