less.vim forces vim to use the default syntax color #18

Closed
ghost opened this Issue Aug 21, 2011 · 5 comments

Comments

Projects
None yet
2 participants
@ghost

ghost commented Aug 21, 2011

Hi,
I found a small problem around the vim-launching process of vimpager.

Although if you are setting your own highlights in your .vimrc, vimpager sets syntax highlights to the default of your colorscheme during the launching process.

See:
https://github.com/rkitover/vimpager/blob/master/vimpager#L177
(Line 177 and 186)

The problem is that since these lines call macros/less.vim after vim starts,
so the syntax on code in macros/less.vim (line 39 on my environment) resets highlights to its default.

I know this is not a big problem, but could you consider about it?
(re-executing ~/.vimrc after loading macros/less.vim might be an easy approach?)

Thanks,
rshhh

@rkitover

This comment has been minimized.

Show comment Hide comment
@rkitover

rkitover Sep 7, 2011

Owner

On 8/21/2011 11:41 AM, rshhh wrote:

Hi,
I found a small problem around the vim-launching process of vimpager.

Although if you are setting your own highlights in your .vimrc, vimpager sets syntax highlights to the default of your colorscheme during the launching process.

See:
https://github.com/rkitover/vimpager/blob/master/vimpager#L177
(Line 177 and 186)

The problem is that since these lines call macros/less.vim after vim starts,
the syntax on code in macros/less.vim (line 39 on my environment) resets highlights to its default.

I know this is not a big problem, but could you consider about it?
(re-executing ~/.vimrc after loading macros/less.vim might be an easy approach?)

Will fix soonish, 2-3 days or so and will let you know.

Thanks,
rshhh

Owner

rkitover commented Sep 7, 2011

On 8/21/2011 11:41 AM, rshhh wrote:

Hi,
I found a small problem around the vim-launching process of vimpager.

Although if you are setting your own highlights in your .vimrc, vimpager sets syntax highlights to the default of your colorscheme during the launching process.

See:
https://github.com/rkitover/vimpager/blob/master/vimpager#L177
(Line 177 and 186)

The problem is that since these lines call macros/less.vim after vim starts,
the syntax on code in macros/less.vim (line 39 on my environment) resets highlights to its default.

I know this is not a big problem, but could you consider about it?
(re-executing ~/.vimrc after loading macros/less.vim might be an easy approach?)

Will fix soonish, 2-3 days or so and will let you know.

Thanks,
rshhh

@artm

This comment has been minimized.

Show comment Hide comment
@artm

artm Oct 27, 2011

probably related - some user key mappings are reset as well, e.g. I have the following:

noremap <Up> ^Y 
noremap <Down> ^E  

in my .vimpagerrc but the keys end up unmapped. If I :so ~/.vimpagerrc again they do work as expected.

artm commented Oct 27, 2011

probably related - some user key mappings are reset as well, e.g. I have the following:

noremap <Up> ^Y 
noremap <Down> ^E  

in my .vimpagerrc but the keys end up unmapped. If I :so ~/.vimpagerrc again they do work as expected.

@artm

This comment has been minimized.

Show comment Hide comment
@artm

artm Oct 28, 2011

Solution for my problem is to move the mappings to ~/.vim/after/macros/less.vim which :ru! less.vim sources after the one from vim.

artm commented Oct 28, 2011

Solution for my problem is to move the mappings to ~/.vim/after/macros/less.vim which :ru! less.vim sources after the one from vim.

rkitover added a commit that referenced this issue Nov 13, 2011

re-source vimrc/gvimrc after less.vim
less.vim has a "syntax on" statement which resets a user's custom
highlights to default values (GitHub issue #18.)

Add the commands "source $MYVIMRC" and for gvim "source $MYGVIMRC" after
"runtime! macros/less.vim".
@rkitover

This comment has been minimized.

Show comment Hide comment
@rkitover

rkitover Nov 13, 2011

Owner

Please try the latest version (1.5.8) and let me know if it fixes your issue.

Owner

rkitover commented Nov 13, 2011

Please try the latest version (1.5.8) and let me know if it fixes your issue.

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Nov 15, 2011

The issue seems fixed. Thanks for your support.

ghost commented Nov 15, 2011

The issue seems fixed. Thanks for your support.

@ghost ghost closed this Nov 15, 2011

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment