Giter Club home page Giter Club logo

syntaxtic's Introduction

Syntaxtic

INSTALL FROM CHROME WEBSTORE

https://chrome.google.com/extensions/detail/cgjalgdhmbpaacnnejmodfinclbdgaci

INSTALLING FROM DEV

  1. git clone http://github.com/matheeeny/Syntaxtic.git

  2. cd syntaxtic

  3. yarn install

  4. cake autobuild

  5. Browse to chrome://extensions/ in Chrome

  6. Uninstall any previous versions of the extension that you installed via the chrome web store

  7. On the top right-hand side of the page click "+ Developer mode"

  8. A few more buttons should appear, click the one that says "Load unpacked extension..."

  9. Navigate to the source directory and click ok. Your done!

    You only have to do this process if your your trying to load an unpacked extension that isn't already loaded. If you want to reload your freshly saved changes, just click reload by the extension logo.

     chrome development intro:
     http://code.google.com/chrome/extensions/getstarted.html#load
    

Happy forking!

syntaxtic's People

Contributors

deiga avatar ajmath avatar wesalvaro avatar lendormi avatar snorpey avatar jonaldomo avatar jdipierro avatar dofy avatar janisz avatar reasonableperson avatar hortegilles avatar axelcostaspena avatar

Stargazers

Lê Quang Thắng avatar  avatar sjain avatar hyhnet avatar  avatar Dr. Victor Vasconcelos avatar Harry Hopkinson avatar Jose A Lerma III avatar Jack avatar Daniel Spinola avatar Michael Lawler avatar Abdullah Dahmash avatar  avatar Victor Vuelma avatar Nikolay Kost avatar Gabo Lugo avatar eg avatar Joshua corpening avatar  avatar ☕ avatar  avatar Diego avatar Greg Cardoni avatar CY. Kim avatar  avatar Sorin Sbarnea avatar tsangint avatar Mr.Tam avatar Kevin Mok avatar ch1dyc4t avatar Yeongpil Y. avatar UniverseX avatar Jack Liu Shurui avatar Minh-Triet Pham Tran avatar Alexandr avatar Dongkyu Han avatar Jonathan Fok kan avatar MR.LI /MR LEE avatar Satoshi Tanda avatar segger avatar Jeremy Dombrowski avatar Kevin Hatfield avatar Leo Caseiro avatar Dmitry Ledentsov avatar Andrew avatar Spencer avatar edward avatar Bartosz Rybacki avatar  avatar  avatar M Haidar Hanif avatar Hailin, Zeng avatar  avatar Will Owens avatar Su Shi avatar Mariusz Szczepańczyk avatar Sean avatar Dane O'Connor avatar Igor avatar Denis avatar Haji avatar Colin avatar Matt Keranen avatar  avatar  avatar  avatar Steve Huff avatar John Monteiro avatar  avatar

Watchers

 avatar  avatar James Cloos avatar

syntaxtic's Issues

Floating gutter

It would be nice to see the gutter floating on the left of the page so that it's visible even if/when you scroll horizontally.

I have no suggestions how this could be done just now but it would definitely be a nice feature. However, I have done a little investigation and saw that this may not be so simple as the gutter itself is a table column and one that is generated within shCore.js so might involve a feature request for the SyntaxHighlighter project.

I've experimented a little bit in case you wanted to implement this yourself (if at all) and found that the following CSS change works well but requires some JavaScript changes too;

shCore.css

.syntaxhighlighter table {
  table-layout: fixed !important; /* Ensures content is kept within page width (incl. scroll bars) */
}
.syntaxhighlighter table td.code .container {
  overflow: auto !important; /* Ensures scroll bar is displayed only when needed */
  padding-bottom: 1px !important; /* Stops hanging letters being clipped by scroll bar (may need increased) */
}

Unfortunately, the downside of this is that some JavaScript will need to be called after content_script.js:64 as well as any time the window is resized. This JavaScript will be responsible for ensuring .syntaxhighlighter table td.gutter has width: Npx !important where N is equal to the width of its last child div. Otherwise, the gutter won't appear at all as table-layout: fixed calculates the layout based on the column widths and not that of their contents. How this script looks I'll leave up to you.

Option to disable highlighting/line numbers

Hilighting is great and all, but copying the source copies also the line-numbers, which is highly annoying.

So either make it so that copying only copies the source, give the chance to disable hilighting individually or to disable line numbering.

Not working with Search by Image (by Google) Extension.

Highlight / Line numbers chekboxes causing:

Uncaught TypeError: Cannot read property 'style' of undefined
  toggle_element
  toggle_gutter
  (anonymous function)

Neither of the two functionals seems to be working.

Chrome 25.0.1364.45 beta OS X 10.6.8

TypeScript Syntax Highlight

Hi, thanks for this extension.

That would be nice if extensions .ts would have similar syntaxhighlighting as JavaScript .js

Would you need a PR? I'm happy to do it, just don't know where to start...thanks

Add right-click file option

It would be nice to open in the extension by right-clicking a file. I can think of two good use-cases.

  1. User has extension set to normally download file and would like to manually trigger extension instead of automatically doing so.
  2. For unsupported extensions, user could right-click and send to plugin.

'Could not load JavaScript' when installing extension

I received the following error:
screenshot 2015-11-20 14 58 21

Having tried it a couple times, the JS file that causes the error is not always the same. background.js was mentioned once, too.

Installing from source worked fine, but I can't seem to activate the plugin to use it, unfortunately. Am I doing anything incorrectly?

Java: multi-line highlighting is greedy

Regexp for Java multi-line highlighting is greedy, which makes all code between the first "/" and the last "/" appear as a comment.
For example, the following code:

/*
 foo
 */
 
public class Foo {
    /*
      Start of Foo
     */
 
    public static void main(String[] args) {
 
    }
 
    /*
      End of Foo
     */
 
    @Override
    public String toString() {
        return super.toString();
    }
}

is shown as
pic1
while it should be
pic2

Local files?

I can't get syntax highlighting to work on local files. I've tried .c and .cpp. Are they supported?

support for local files

hi,all
I wish the Syntaxtic support local files, and i edited manifest.json like this:
"permissions": [ "tabs", "http:///", "https:///", "ftp:///", "file:///*" ],

and reload the extension or chrome,but nothing changed.

Please don't flood the DevTools console

I love this plugin but I must have it constantly disabled and enabling it when I need it, because it floods the DevTools console, and is the web developer workspace.

image

Dropped support for CoffeeScript

To support the latest version of SyntaxHighlighter, the custom implementation of the coffeescript brush was dropped since there is no publicly available brush.

completely wrong

idea about using list of regexp to do highlighting (which is in SyntaxHighlighter) is completely wrong.

if we have rest of the line comment everything in it should be comment and no string rules should apply to it's content. how you going to solve this in list of regexps I can't imagine.

Highlighting and anchor on a given line

In development, I run into errors where I have a source url AND a line number. It'd be awesome if this extension checked the url for a line number, and if found, highlighted the given line and anchored the view port on it.

Seems like there could be a configuration option to support various url line number formats too.

So a github style url like:

https://raw.github.com/matheeeny/Syntaxtic/master/manifest.json#L12

And backtrace style urls like:

http://localhost:3000/assets_dev/templates/mealbox/_meal_list.js?body=1:12:1

could be supported.

Thoughts?

Please add pls as .sql alias

Hi Developer

I started using Syntaxtic! and felt awesome. It is useful in my day to day life.
But I daily deal with .sql, .pls, .java and .xml. .pls is not being identified. Please add .pls as .sql alias.
And create language hightlighting for xml aswell.

Thanks in advance

Thanks
Sandeep

XML not displayed

When viewing an xml document chrome displays the message "This XML file does not appear to have any style information associated with it. The document tree is shown below." but Syntactic causes the tree to not appear.

Large margin

I'm seeing an ugly margin on all themes on Windows XP SP3 running Chrome 11.0.696.71. I've not tried another OS yet but can do later if required. I've tracked down the CSS responsible;

shCore.css:61

.syntaxhighlighter {
  margin: 1em 0 1em 0 !important;
  padding: 1px !important;
}

Suggested change:

.syntaxhighlighter {
  margin: 0 !important;
  padding: 0 !important;
}

However, the biggest whitespace exists because the user agent stylesheet is declaring margin: 8px. Therefore, explicitly declaring the following somewhere should help;

body {
  margin: 0 !important;
  padding: 0 !important; /* Not required but covers all bases */
}

This could probably be done in content_script.js:122.

file type detection by header

Instead of just reading the file extension, we read the Content-Type as a priority. Reason being there are a lot of frameworks out there that use server-side languages to compile front-end html/css/etc.

CSS definitions are gettings stale

CSS definitions need to be updated again, as a lot of new ones are missing.

Would it be feasible to make a script which would parse the w3c definition for keywords?

Add custom extension support

I'd like to open .txt files with this and others want misc. extensions. Why not just add custom extension support, so we can open whatever we want?

syntax highlighting on view source?

Is it just me or does syntax highlighting not work when viewing the source of a page? Got the impression that this extension would do just that but not too sure if that's the case.

Thanks.

Fonts done wrong

"Generated" CSS gives

font-size: normal !important;
font-family: 'Consolas, monospace' !important;

in style#fontOverride instead of

font-size: normal !important;
font-family: 'Consolas', 'monospace' !important;

. This breaks fonts, and Times New Roman isn't the best font for coding.

Remove need to hack compiled version of SyntaxHighlighter

To support the latest SyntaxHighlighter in the laziest way possible, I had to modify the compiled code so that it still added in a global SyntaxHighlighter object attached to window. To fix this properly, we need to be able to use requirejs from within the extension.

tomorrow theme

can you please add tomorrow theme as a possibile choise? i can convert it, if you need an help

Hiding Tool Bar

Syntaxic is injecting the following style on bitbucket:
<style>.toolbar {display:none}</style>

which hides an important tool bar in bitbucket (and possibly many other sites)

Url rewriting problem

Most websites are using url rewriting so there is no file extension at all = the app doesn't load the highlighter. In such cases (especially when view-source page is called) there should be a default highlighter fallback. I guess as long we're here web guys this should be a html multihighlighter.

File support: .log

I have have log files from remote servers that I'd like to view with this. Any chance of adding support?

Do better at keeping in sync with upstream library

We need a way to make changes to the main SyntaxLibrary library and allow though to be merged upstream. I have created a fork of SyntaxHighlighter here and use that a basis for this project. Any changes made to the core library would be committed to the fork and then potentially merged upstream.

This task will involve finding the changes made to the core library via this project and creating issues, pull-requests, and branches for each major update. I will create a syntaxtic branch in https://github.com/matheeeny/SyntaxHighlighter and use that as the upstream repo for all changes to the library.

fonts busted on Mac OS X

may be a dupe of #39, but I don't have any of these fonts except like Courier and Times New Roman, which both suck.

  1. How about removing the font setting altogether and simply using the browser's default? Many people have this configured to their liking.
  2. Or, choose from a list of popular fixed-width fonts hosted on Google Fonts, because you won't have to package them. If someone wants a custom font, they can paste in the Google Fonts URL of what they want.

Toolbar help item

I've noticed that clicking this tiny icon doesn't actually do anything but open an empty popup when clicked (at least for me anyway). I've tried multiple different examples but never loads anything inside the popup and the following error is always logged in the console;

Uncaught TypeError: Cannot call method 'focus' of undefined
e.toolbar.items.help.execute:1
e.toolbar.handler:1
h:1

I realise that the SyntaxHighlighter library is responsible for this but it may be more user-friendly to hide the toolbar altogether;

shCore.css

.syntaxhighlighter .toolbar {
  display: none !important;
}

Obviously it might be nicer to overload its functionality instead to provide the user with bespoke help, but I realise shCore.js is almost impossible to edit for the latest version.

add .plx extension

Please add .plx extension. This would greatly help with perl scripts that ends .plx.

Thanks for the great work.

Pheej

Add support for beautifying

Often, I view minified files online. I've installed JS Beautify for this, but the problem is that Syntaxtic fires before that extension are able to do its ting.

Could you add beautifying capabilities, or make it possible to trigger highlighting manually instead of automatically?

file type detection should be configurable

As a user I want to turn off some file extensions from being handled by this tool, because other plugins are already handling them.

Specific case:
The Syntaxtic is coloring the .diff and .patch files, but I already have an extension "Git Patch Viewer" that -at least for me - is much better at handling my .patch files. The problem is that the Syntaxtic goes first when it detects .patch file, and then the Git Patch Viewer does not work on this file.

Multi-clicking select all bug

I've noticed that when attempting to select all via multi-clicking (2-4 clicks I think) that the syntax highlighter loses its formatting and can cause the page to scroll to the top and can take a long time before it re-renders. This appears to be the case with all SyntaxHighlighter implementations but embedded instances can cancel out the effect easily by clicking outside the pre/script affected. Unfortunately, since this extension is a full page instance it cannot really be clicked outside of.

I suppose an event handler could be used to overload the multi-clicking action and swallow the event. Not sure though.

Although not directly related to this bug it might be nice to add an event handler to listen to select all key events (e.g. Ctrl+A) to only select the contents of the container and not the gutter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.