Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo syntax highlighting in vim and nano
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Meet Joe Black
n00b
n00b


Joined: 19 Mar 2005
Posts: 40

PostPosted: Wed Aug 29, 2012 3:15 am    Post subject: Gentoo syntax highlighting in vim and nano Reply with quote

Does anybody know why is Gentoo syntax highlighting in vim is worse then in nano?
vim: http://imgur.com/TZUvR
nano: http://imgur.com/ytDS7
_________________
Some strange sentences ? Grammar mistakes ?
I'll be happy if you write a short PM, I always try to improve my English.
Back to top
View user's profile Send private message
dwbowyer
Apprentice
Apprentice


Joined: 18 Apr 2008
Posts: 155

PostPosted: Wed Aug 29, 2012 4:28 am    Post subject: Reply with quote

more users (devs) use nano. It's even mentioned in the handbook. So more effort has gone into default config.
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Wed Aug 29, 2012 6:45 am    Post subject: Reply with quote

dwbowyer wrote:
more users (devs) use nano

Users, likely. Devs? I doubt that very, very much.

But to answer the original question: I guess because nobody cares enough to improve it. It works pretty well as it is, so I don't think it has bothered anyone enough to submit a patch.

I actually took on maintenance of app-vim/gentoo-syntax recently and am looking into improvements. So: patches and suggestions welcome!
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Wed Aug 29, 2012 7:11 am    Post subject: Reply with quote

Well one problem with the gentoo-syntax is that it shows something as valid even if it may not be the right thing. For instance if I wrote "ap-vim" and then put a "/" at the end, it will show up as nicely colored even though there is a misspelling in there.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Aug 29, 2012 12:36 pm    Post subject: Reply with quote

Meet Joe Black ...

gentoo-syntax only provides syntax highlighting for vim, there are no specific syntax rules provided for nano (that I know of). Nano probably treats all the files as though there are .sh or .config ... which may or may not be better depending on whats expected to be highlighted, and how. Mostly the gentoo-syntax works well, your example might have been better served had you used ebuilds rather than package.accept_keywords. Anyhow, I don't think either of the examples is glorious and casts the other into the shade.

There are also considerations of the use of terminal, vim itself (ie: colour theme), and how the user chooses to configure thier working environment. So, with that in mind, here is vim using gentoo-syntax which for me works fine.

best ... khay
Back to top
View user's profile Send private message
Meet Joe Black
n00b
n00b


Joined: 19 Mar 2005
Posts: 40

PostPosted: Wed Aug 29, 2012 3:38 pm    Post subject: Reply with quote

khayyam, I use standard nano with standard /etc/nanorc:
http://imgur.com/ZVN7s
The syntax highlighting in vim is default also. This is and ebuild highlighting in
nano: http://imgur.com/uUnQV
vim: http://imgur.com/shqpG
Do you use special config for your vim?
_________________
Some strange sentences ? Grammar mistakes ?
I'll be happy if you write a short PM, I always try to improve my English.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Aug 29, 2012 4:05 pm    Post subject: Reply with quote

Meet Joe Black wrote:
Do you use special config for your vim?

Joe ... I have my own ~/.vimrc and ~/.vim/* yes ... but I also use vim's 'colorscheme' and the capabilities offered by .Xdefaults to provide a colour pallete with calebrated colour relationships. The gentoo-syntax is the same none the less, its just the colours asigned that change how the highlighting is displayed.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum