News for hackers. Stuff that matters.
Re:Vim Colors by andrewguenther on Tuesday June 30, 2015 @03:01AM (#9803442)
I wish I could choose a language to preview the schemes with. My biggest gripe with many of these themes is that is looks great in some languages and terrible for everything else.
Re:Vim Colors by synthmeat on Tuesday June 30, 2015 @03:11AM (#9803468)
Slightly related, I don't like (mostly in OOP langs) when I have something like:

    import lang.native.api.Something;
    import third.party.api.Else;
...and syntax file goes to colorize Something, but Else is perceived as common text.

I'm aware of limitations of vim, being text editor and not an IDE, but I'd rather syntax file to ignore the native API then to have me draw visual distinction between native and third-party classes when, effectively, I couldn't care less. The dissimilarity is just visual noise to me. :/

Re:Vim Colors by bergmann on Tuesday June 30, 2015 @04:19AM (#9803719)
I agree many of the default Vim syntax highlighting files leave a lot to be desired. You can improve it though and Vim highlighting is actually very powerful. I use a C syntax highlighting improvement plugin to add (among other things) highlighting to operators and function names in calls[1].

You can also quite easily customise syntax highlighting by placing your own additional syntax file in .vim/after/syntax for a language. I use this to add some more custom keywords. You could quite easily add highlight support for ".Else" in an after/syntax file.

[1] https://github.com/justinmk/vim-syntax-extra

Re:Vim Colors by erikb on Tuesday June 30, 2015 @06:57AM (#9804252)
Why is something limited in highlighting because it's a text editor and not an IDE? Highlighting is about text so it's quite a core feature of an editor.
Re:Vim Colors by andrewaylett on Tuesday June 30, 2015 @07:04AM (#9804287)
Usually because the text editor is limited to regular expression and region matching, while the IDE parses the language into an AST so it knows what each bit actually means.
Re:Vim Colors by outworlder on Tuesday June 30, 2015 @03:35PM (#9807884)
Except a text editor can also generate the AST.
Re:Vim Colors by andrewaylett on Tuesday June 30, 2015 @03:50PM (#9807978)
What I meant was that the limitation in highlighting is usually due to the limitation in pattern matching. Of course, IDEs usually contain text editors, and they often do highlight using an AST. But that's expensive, both to develop and to run, and especially if you're not going to use the AST for any other IDE-like activity. Pattern-matching is cheap and usually good enough.
Re:Vim Colors by erikb on Thursday July 02, 2015 @09:53AM (#9818845)
Okay, you are not talking about a problem in principle but how it practically is in reality. I don't know if text editors like Sublime/Atom also have that problem but when it comes to vim I can agree with that. Wouldn't wonder if there are some better external highlighters that can be integrated with vim. I heard that people use a vim plugin for using external linters for static analysis of code and spell checking.

And just to make sure, we agree that adding a feature like AST based highlighting wouldn't make an editor an IDE, right?

Re:Vim Colors by andrewaylett on Tuesday July 07, 2015 @08:53AM (#9845070)
Agreed.
Re:Vim Colors by shawnps on Tuesday June 30, 2015 @03:14AM (#9803485)
I agree. I sent a tweet to the author requesting it, hopefully he sees it: https://twitter.com/shawnps/status/615780187800629248
Re:Vim Colors by nathanaelkane on Tuesday June 30, 2015 @05:15AM (#9803890)
Yep, saw it, thanks :)
Re:Vim Colors by masukomi on Tuesday June 30, 2015 @05:32PM (#9808563)
vim color schemes previewed in a variety of popular languages: https://code.google.com/p/vimcolorschemetest/ Just choose a language at the bottom of the page. Then wait... it takes a while to load the next page because its got a lot of html in many iframes
Re:Vim Colors by hnnew on Tuesday June 30, 2015 @03:13AM (#9803475)
Seconded. A language selector would make choosing a theme for your language with this tool much more effortless.
Re:Vim Colors by derefr on Tuesday June 30, 2015 @03:46AM (#9803606)
It occurs to me that the fewer lexical types a language has, the less possible it is to highlight it in a pleasant way. Lisps and Forths (and most assembly languages) must look unpleasantly spare; and an encoding like Urbit's Nock would be literally monochrome.
Re:Vim Colors by escherize on Tuesday June 30, 2015 @05:37AM (#9803970)
Unpleasantly spare?

http://take.ms/k83XH

Re:Vim Colors by derefr on Tuesday June 30, 2015 @03:10PM (#9807713)
Clojure is an exception to the number of lexical types found in most Lisps, note. Scheme doesn't highlight nearly as nicely.
Re:Vim Colors by darklajid on Tuesday June 30, 2015 @07:03AM (#9804285)
Now please explain blurb/nth-blurb :)
Re:Vim Colors by escherize on Tuesday June 30, 2015 @08:48AM (#9804762)
That's code for a fancy loading screen, which animates some svg thing and also shows a couple happy messages (aka blurbs.)
Re:Vim Colors by likeclockwork on Tuesday June 30, 2015 @11:54AM (#9806170)
I would really like to read the rest of the source of whatever that application is.

Are you using Reagent?

Re:Vim Colors by escherize on Tuesday June 30, 2015 @09:36PM (#9809527)
I am using reagent and re-frame. Sadly the codebase is closed source. :(
Re:Vim Colors by outworlder on Tuesday June 30, 2015 @03:36PM (#9807895)
OMG! How do I do that? Mind sharing your configuration?
Re:Vim Colors by escherize on Tuesday June 30, 2015 @09:39PM (#9809545)
Sure, I use emacs prelude. I think you can get the same results here if you just use prelude + the amazing theme called moe. My emacs config (which is to be used inside/ontop of prelude) is at https://github.com/escherize/prelude-dotemacs
Re:Vim Colors by kagamine on Tuesday June 30, 2015 @06:39AM (#9804180)
loved the rainbow brackets on that, it must be so useful to see where they match up with colour.
Re:Vim Colors by escherize on Tuesday June 30, 2015 @08:49AM (#9804766)
It is! Also when your cursor is on a paren, the text editor lights up its partner: http://take.ms/PJS1p
Re:Vim Colors by mdcox on Tuesday June 30, 2015 @01:04PM (#9806763)
What bothers me isn't the isolated color scheme, but that without a ton of work (rolling it yourself?) the javascript in .js, .html, .erb, and any other file it might be in is highlighted completely differently.
Re:Vim Colors by couchand on Tuesday June 30, 2015 @10:33AM (#9805480)
You can actually do quite a bit to help with that by switching around which colors are assigned to which syntax rules, if you're willing to dive into the code.
Re:Vim Colors by golergka on Tuesday June 30, 2015 @04:42AM (#9803783)
Yes.

Especially when you switch from C-style languages to assembly, for example. Or to line-break sensitive formats like Python or YAML. Or markdown.

Re:Vim Colors by nathanaelkane on Tuesday June 30, 2015 @05:14AM (#9803887)
Completely agree and it's pretty high on the TODO list.