Comments (6)
I added this fix into this file to test for myself, and it seems to mess up the formatting of float literals, (e.g., with 100.5, the "100" part will be Normal and the ".5" part will be Number). Any thoughts on how to fix this? I'm not that great with regex.
from python-syntax.
Actually managed to fix it by changing it to
syn match pythonBtInIsolator "\(\.\)\@<!\<\k\+\D\>" contains=pythonBuiltinFunc,pythonStatement
(added \D to the keyword search)
from python-syntax.
@jevogel Can you create a pull request?
However it seems containedin=pythonBtInIsolator
is redundant and can be removed. And the regexp probably also can be simplified.
from python-syntax.
So I've tried a simplified version of the patch. It works but it breaks highlighting for numbers even with the fix from @jevogel. For example complex numbers, hexadecimal numbers and error checking for numbers don't work. Also I don't really like to use \@<!
which can be really slow. So I think it's a bad idea to apply the patch.
from python-syntax.
Can you detail in which aspects complex, hexadecimals and number error checking are broken? They seem to work fine for me with @jevogel's patch. Performance can be improved by only doing 1-character lookbehind, "\(\.\)\@1<!\<\K\+\>"
. (\K = \k but excluding digits)
from python-syntax.
@anntzer try my fork https://github.com/purpleP/python-syntax.git
from python-syntax.
Related Issues (20)
- datetime formatting in "{}" formay string
- None is highlighted differently in Python 3 than in Python 2 HOT 2
- "{{" not recognized as an escape HOT 1
- Please add new syntax (await, async) highlight HOT 1
- The identifier next to "async def" is not highlighted as function name HOT 2
- Function annotations? HOT 1
- No difference in highlighting of `print` between Python 2 and 3 HOT 1
- More module attributes HOT 1
- self isn't highlighted in classes HOT 6
- highlight keyword in keyword arguments in function calls with kwargs HOT 1
- highliting isn't semantic aware. HOT 1
- matrix multiplication HOT 1
- `is not` does not highlight
- exec is a function under Python3, not a statement HOT 2
- How to enable folding ? HOT 4
- async / await not highlighted
- Python 3.6 f-string literal support HOT 2
- Python 3.6 underscores in numeric literal support HOT 1
- This project is dead, time to fork HOT 6
- Tabbing behaviour is broken
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 python-syntax.