René's URL Explorer Experiment


Title: Highlight C++11+ attribute specifications · Issue #57 · vim-jp/vim-cpp · GitHub

Open Graph Title: Highlight C++11+ attribute specifications · Issue #57 · vim-jp/vim-cpp

X Title: Highlight C++11+ attribute specifications · Issue #57 · vim-jp/vim-cpp

Description: I have for the time being implemented this in my own local copy (in ~/.vim/syntax). I am not an expert at vim syntax files, so I have one minor problem which is that if you have [noreturn], the noreturn will be highlighted (and some othe...

Open Graph Description: I have for the time being implemented this in my own local copy (in ~/.vim/syntax). I am not an expert at vim syntax files, so I have one minor problem which is that if you have [noreturn], the nor...

X Description: I have for the time being implemented this in my own local copy (in ~/.vim/syntax). I am not an expert at vim syntax files, so I have one minor problem which is that if you have [noreturn], the nor...

Opengraph URL: https://github.com/vim-jp/vim-cpp/issues/57

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Highlight C++11+ attribute specifications","articleBody":"I have for the time being implemented this in my own local copy (in ~/.vim/syntax). I am not an expert at vim syntax files, so I have one minor problem which is that if you have `[noreturn]`, the `noreturn` will be highlighted (and some other weird edge cases), but I'm not able to fix this myself, so I've simply attached attached my diff so far:\r\n\r\n```diff\r\ndiff --git a/usr/local/share/nvim/runtime/syntax/cpp.vim b/home/cactus/.vim/syntax/cpp.vim\r\nindex ed38913..92fd735 100644\r\n--- a/usr/local/share/nvim/runtime/syntax/cpp.vim\r\n+++ b/home/cactus/.vim/syntax/cpp.vim\r\n@@ -47,6 +47,8 @@ if !exists(\"cpp_no_cpp11\")\r\n   syn region cppRawString\tmatchgroup=cppRawStringDelimiter start=+\\%(u8\\|[uLU]\\)\\=R\"\\z([[:alnum:]_{}[\\]#\u003c\u003e%:;.?*\\+\\-/\\^\u0026|~!=,\"']\\{,16}\\)(+ end=+)\\z1\"+ contains=@Spell\r\n   syn match cppCast\t\t\"\\\u003c\\(const\\|static\\|dynamic\\)_pointer_cast\\s*\u003c\"me=e-1\r\n   syn match cppCast\t\t\"\\\u003c\\(const\\|static\\|dynamic\\)_pointer_cast\\s*$\"\r\n+  syn region cppAttrSpec\tmatchgroup=cppAttributeDelimiter start=+\\[\\[+ end=+\\]\\]+ contains=TOP\r\n+  syn keyword cppAttribute\tnoreturn carries_dependency contained containedin=cppAttrSpec\r\n endif\r\n \r\n \" C++ 14 extensions\r\n@@ -56,6 +58,7 @@ if !exists(\"cpp_no_cpp14\")\r\n   syn match cppNumber\t\tdisplay \"\\\u003c[1-9]\\('\\=\\d\\+\\)*\\(u\\=l\\{0,2}\\|ll\\=u\\)\\\u003e\" contains=cFloat\r\n   syn match cppNumber\t\tdisplay \"\\\u003c0x\\x\\('\\=\\x\\+\\)*\\(u\\=l\\{0,2}\\|ll\\=u\\)\\\u003e\"\r\n   syn case match\r\n+  syn keyword cppAttribute\tdeprecated contained containedin=cppAttrSpec\r\n endif\r\n \r\n \" C++ 20 extensions\r\n@@ -65,12 +68,14 @@ if !exists(\"cpp_no_cpp20\")\r\n   syn keyword cppStructure\tconcept\r\n   syn keyword cppType\t\tchar8_t\r\n   syn keyword cppModule\t\timport module export\r\n+  syn keyword cppAttribute\tlikely unlikely no_unique_address contained containedin=cppAttrSpec\r\n endif\r\n \r\n \" C++ 17 extensions\r\n if !exists(\"cpp_no_cpp17\")\r\n   syn match cppCast\t\t\"\\\u003creinterpret_pointer_cast\\s*\u003c\"me=e-1\r\n   syn match cppCast\t\t\"\\\u003creinterpret_pointer_cast\\s*$\"\r\n+  syn keyword cppAttribute\tfallthrough nodiscard maybe_unused contained containedin=cppAttrSpec\r\n endif\r\n \r\n \" The minimum and maximum operators in GNU C++\r\n@@ -90,6 +95,8 @@ hi def link cppBoolean\t\tBoolean\r\n hi def link cppConstant\t\tConstant\r\n hi def link cppRawStringDelimiter\tDelimiter\r\n hi def link cppRawString\t\tString\r\n+hi def link cppAttributeDelimiter\tStorageClass\r\n+hi def link cppAttribute\tStorageClass\r\n hi def link cppNumber\t\tNumber\r\n hi def link cppModule\t\tInclude\r\n```\r\n\r\nI have made an effort to not highlight attributes outside of valid contexts (e.g. `likely` is not highlighted unless it's inside an attribute specifier), but it seems to have some unfortunate side effects. At the moment, this is the resulting highlighting in a few cases:\r\n![image](https://user-images.githubusercontent.com/3360049/126176186-a2ea0408-15d6-4775-8fef-d82a22820813.png)\r\n","author":{"url":"https://github.com/sophec","@type":"Person","name":"sophec"},"datePublished":"2021-07-19T14:25:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/57/vim-cpp/issues/57"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bd0e05d3-ed9b-e467-6a61-5ac43b194b35
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB6A4:79F9B:1E248AB:2B5A9FF:6A4CEB29
html-safe-nonce74b51ea60c731d83b72762e23ca8427731643562e8589266b5483aee93506f4d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkE0Ojc5RjlCOjFFMjQ4QUI6MkI1QTlGRjo2QTRDRUIyOSIsInZpc2l0b3JfaWQiOiI5OTQyNzQ3NjAzMjQ4Njg5MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd53ca566c486d4f43214b357cce07664c0b677d78608ad405aa95d03c787b777
hovercard-subject-tagissue:947710537
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/vim-jp/vim-cpp/57/issue_layout
twitter:imagehttps://opengraph.githubassets.com/23b40196599d789bace7ed3e17d15639c3f079cf4c579abb9a26ad220f308a26/vim-jp/vim-cpp/issues/57
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/23b40196599d789bace7ed3e17d15639c3f079cf4c579abb9a26ad220f308a26/vim-jp/vim-cpp/issues/57
og:image:altI have for the time being implemented this in my own local copy (in ~/.vim/syntax). I am not an expert at vim syntax files, so I have one minor problem which is that if you have [noreturn], the nor...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesophec
hostnamegithub.com
expected-hostnamegithub.com
None299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8
turbo-cache-controlno-preview
go-importgithub.com/vim-jp/vim-cpp git https://github.com/vim-jp/vim-cpp.git
octolytics-dimension-user_id1051958
octolytics-dimension-user_loginvim-jp
octolytics-dimension-repository_id4631849
octolytics-dimension-repository_nwovim-jp/vim-cpp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id4631849
octolytics-dimension-repository_network_root_nwovim-jp/vim-cpp
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec5a57f04eeb310f57c73fd6d751d957e2ca27ed2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/vim-jp/vim-cpp/issues/57#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvim-jp%2Fvim-cpp%2Fissues%2F57
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvim-jp%2Fvim-cpp%2Fissues%2F57
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=vim-jp%2Fvim-cpp
Reloadhttps://github.com/vim-jp/vim-cpp/issues/57
Reloadhttps://github.com/vim-jp/vim-cpp/issues/57
Reloadhttps://github.com/vim-jp/vim-cpp/issues/57
Please reload this pagehttps://github.com/vim-jp/vim-cpp/issues/57
vim-jp https://github.com/vim-jp
vim-cpphttps://github.com/vim-jp/vim-cpp
Notifications https://github.com/login?return_to=%2Fvim-jp%2Fvim-cpp
Fork 45 https://github.com/login?return_to=%2Fvim-jp%2Fvim-cpp
Star 149 https://github.com/login?return_to=%2Fvim-jp%2Fvim-cpp
Code https://github.com/vim-jp/vim-cpp
Issues 11 https://github.com/vim-jp/vim-cpp/issues
Pull requests 6 https://github.com/vim-jp/vim-cpp/pulls
Actions https://github.com/vim-jp/vim-cpp/actions
Projects https://github.com/vim-jp/vim-cpp/projects
Wiki https://github.com/vim-jp/vim-cpp/wiki
Security and quality 0 https://github.com/vim-jp/vim-cpp/security
Insights https://github.com/vim-jp/vim-cpp/pulse
Code https://github.com/vim-jp/vim-cpp
Issues https://github.com/vim-jp/vim-cpp/issues
Pull requests https://github.com/vim-jp/vim-cpp/pulls
Actions https://github.com/vim-jp/vim-cpp/actions
Projects https://github.com/vim-jp/vim-cpp/projects
Wiki https://github.com/vim-jp/vim-cpp/wiki
Security and quality https://github.com/vim-jp/vim-cpp/security
Insights https://github.com/vim-jp/vim-cpp/pulse
Highlight C++11+ attribute specificationshttps://github.com/vim-jp/vim-cpp/issues/57#top
https://github.com/sophec
sophechttps://github.com/sophec
on Jul 19, 2021https://github.com/vim-jp/vim-cpp/issues/57#issue-947710537
https://user-images.githubusercontent.com/3360049/126176186-a2ea0408-15d6-4775-8fef-d82a22820813.png
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.