Comments (13)
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.
@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.
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.
That would be nice to have support for vim modelines, even partial (at least syntax hight., tabs, ...).
- Simple description of vim modeline: http://www.lornajane.net/posts/2011/using-modelines-in-vim.
from notepad-plus-plus.
@milipili: that would be great, but should be in another request :)
from notepad-plus-plus.
Of course :)
from notepad-plus-plus.
it's done for xml, php, html and bash : 9b91480
from notepad-plus-plus.
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.
@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.
@mat-m yes something like that. or as i wrote above, support vim comments.
from notepad-plus-plus.
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.
e.g. Makefile
from notepad-plus-plus.
@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)
- [BUG] File inaccessible HOT 5
- [BUG] Neither [[:upper:]] nor [[:lower:]] function without ‘Match case’ selected HOT 1
- [BUG] fold_in folds to much !
- [BUG] Clear All Marks Has Different Behavior HOT 1
- [Feature request] Remove horizontal white space HOT 1
- [BUG] Multi-editing not showing multiple cursors HOT 4
- [Feature request] More than one bookmark color HOT 2
- [BUG] Custom draw not working in TreeView controls inside plugins
- Issue with Foxpro for DOS
- [BUG] Verical Edge Incorrect HOT 4
- [BUG] Lua: cannot add additional styles HOT 1
- [BUG] "In all sub-folders" when searching does not go through all sub-folders HOT 3
- Use DIR_O in nppSpecifics.mak properly
- Feature Request: Adding Strike-Through Option for Lines HOT 2
- Try don't use the REST API to get PR message in CI build
- [Feature request] Add user-defined tag or attribute names to HTML parser
- [BUG] No file/tab to "left" or "right" when using Document List
- [BUG] Improper item enabling when "Close Multiple Documents" menu is shown
- [BUG] Find & Replace dialog vertical resize arrows
- [Feature request] Simplify Macro warning message on upgrade
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notepad-plus-plus.