Giter Site home page Giter Site logo

Comments (13)

dail8859 avatar dail8859 commented on May 14, 2024

Hi. I'm actually working on a plugin that will do this. The language can be detected based on either file name, file extension, regular expression matches, or possibly other rules. If you have any more examples of files that Notepad++ does not currently detect I'd be glad to use those to test while I'm developing it. I plan on making the rules user-configurable too.

from notepad-plus-plus.

c33s avatar c33s commented on May 14, 2024

@dail8859 as i wrote in the issue, it is about the native support of this feature, without any other plugins and tools. can you add this functionality to the main code and create a PR? would be awesome.

from notepad-plus-plus.

dail8859 avatar dail8859 commented on May 14, 2024

Its not a minor change so it would be a tough time getting the PR accepted. What I can do is finish the plugin and see what people think of it. If it seems like something useful and get a general consensus that it would be useful natively, then it would be pretty easy to integrate it in the main code. I'd hate to put alot of time into a PR just to get rejected.

P.S. Just curious, is there a specific reason you'd want it supported natively instead of through a plugin?

from notepad-plus-plus.

milipili avatar milipili commented on May 14, 2024

That would be nice to have support for vim modelines, even partial (at least syntax hight., tabs, ...).

from notepad-plus-plus.

mat-m avatar mat-m commented on May 14, 2024

@milipili: that would be great, but should be in another request :)

from notepad-plus-plus.

milipili avatar milipili commented on May 14, 2024

Of course :)

from notepad-plus-plus.

donho avatar donho commented on May 14, 2024

it's done for xml, php, html and bash : 9b91480

from notepad-plus-plus.

c33s avatar c33s commented on May 14, 2024

please reopen.

the main issue still exists, the user should be able to add syntax highlighting based upon a filename which have no extension (like Vagrantfile -> ruby), just xml, php and bash does not solve the general problem.

from notepad-plus-plus.

mat-m avatar mat-m commented on May 14, 2024

@c33s : you mean like considering the filename as an extension and being allowed to say 'Vagrantfile' in the ruby extensions list ?

from notepad-plus-plus.

c33s avatar c33s commented on May 14, 2024

@mat-m yes something like that. or as i wrote above, support vim comments.

from notepad-plus-plus.

ljader avatar ljader commented on May 14, 2024

I'm experiencing the same frustration as @c33s every time I open "Vagrantfile" and I need to set syntax to Ruby.

Supporting vim commands can lead to non trivial amount of work, so please consider for now a simpler implementation:

  • if file does not have extension, then treat whole filename as an extension and search for syntax in user settings.

I think the code should go here:
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/ScitillaComponent/Buffer.cpp#L206

@mat-m and @donho what do you think about this?

from notepad-plus-plus.

linquize avatar linquize commented on May 14, 2024

e.g. Makefile

from notepad-plus-plus.

c33s avatar c33s commented on May 14, 2024

@ljader 's solution would greatly improve the usability. just treating the filename as extension if the file has no extension would be great.

@donho please reopen this issue, the request for supporting vim comments is still here.

edit:
maybe split the issue in multiple issues.

from notepad-plus-plus.

Related Issues (20)

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.