<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/wrapping-code-comments-kmi9oyftr" -->

---
title: Wrapping Code Comments | daily.dev
description: A short reflection on how code comments should ideally be wrapped to a different column than surrounding code, with the comment content width being relative to...
canonical: https://daily.dev/posts/wrapping-code-comments-kmi9oyftr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Wrapping Code Comments | daily.dev
og:description: A short reflection on how code comments should ideally be wrapped to a different column than surrounding code, with the comment content width being relative to...
og:url: https://daily.dev/posts/wrapping-code-comments-kmi9oyftr
og:image: https://api.daily.dev/og/posts/kmi9OyfTR.png
og:image:alt: Wrapping Code Comments
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Wrapping Code Comments

**[matklad](https://daily.dev/sources/matklad)** · 2 min read · 2 upvotes · 0 comments

## Summary

A short reflection on how code comments should ideally be wrapped to a different column than surrounding code, with the comment content width being relative to the comment's indentation level. The author argues for wrapping code at 100 columns but comment content at 70 columns (relative to the comment start), noting this isn't well-supported by current tools like the VS Code Rewrap extension or Emacs M-q. The post also touches on why hard-wrapping is preferable to soft-wrapping for comments, since correct soft-wrapping requires understanding the text's semantic structure (e.g., markdown lists).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://matklad.github.io/2026/02/21/wrapping-code-comments.html>

## Similar posts on daily.dev

- [Clean Code Is Not the Same as Clear Code: Comments Were Never the Problem](https://daily.dev/posts/clean-code-is-not-the-same-as-clear-code-comments-were-never-the-problem-6lmauekpv) · DEV · 74 upvotes · 14 comments
- [Ruby Multiline Comments Explained with Examples](https://daily.dev/posts/ruby-multiline-comments-explained-with-examples-szdbqw4wl) · RUBYLAND · 0 upvotes · 0 comments
- [Mistakes I see engineers making in their code reviews](https://daily.dev/posts/mistakes-i-see-engineers-making-in-their-code-reviews-uvlezwfro) · Lobsters · 2 upvotes · 0 comments

---

Tags: [#vscode](https://daily.dev/tags/vscode)

[View this post on daily.dev](https://daily.dev/posts/wrapping-code-comments-kmi9oyftr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Wrapping Code Comments","url":"https://daily.dev/posts/wrapping-code-comments-kmi9oyftr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/wrapping-code-comments-kmi9oyftr"},"datePublished":"2026-02-21T12:20:23.871Z","dateModified":"2026-02-21T12:20:39.694Z","description":"A short reflection on how code comments should ideally be wrapped to a different column than surrounding code, with the comment content width being relative to...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"matklad","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"matklad","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/c34dbbf360354a179786e8a127718b12","url":"https://daily.dev/sources/matklad"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/wrapping-code-comments-kmi9oyftr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"vscode","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"matklad","item":"https://daily.dev/sources/matklad"},{"@type":"ListItem","position":3,"name":"Wrapping Code Comments"}]}
```

