simply_sideways
simply_sideways

Reputation: 13

How to make current line bold in VS Code editor?

In VS Code, if my caret cursor is on a given line is it possible for the code on that line alone to become bold?

Similar to how putting the following in settings.json allows for highlighting of the background of current line, per this and this:

    "workbench.colorCustomizations": {
      "editor.lineHighlightBackground": "#404040"
    },

Or how putting this would make all text bold, per this question:

"editor.fontWeight": "bold"

Except instead of a background modification I'd like to bold the font/text/code itself, and instead of all text, just the current line. (The bolded text need not be selected, just on the same line as the caret.)

Thanks.

Upvotes: 1

Views: 4368

Answers (2)

Ian McGowan
Ian McGowan

Reputation: 3801

Another "not really an answer, but might be helpful" link. If you choose the whole line to "mark" it would make that line bold, or a different style.

https://marketplace.visualstudio.com/items?itemName=ryu1kn.text-marker

  1. Features
  2. Highlight/Unhighlight text from both command palette or right-click menu
  3. Update existing highlight rules from the right-click menu
  4. Jump to the next/previous location of the same highlighted pattern Highlight text using a regular expression

Upvotes: 0

Ian McGowan
Ian McGowan

Reputation: 3801

It seems unlikely, since VSCode is a text editor, not a word processor. If your document is in markdown mode, and you have the right extension installed, Cmd/Ctrl-B does markdown.extension.editing.toggleBold, but it does that by adding/removing characters to the selected text. E.g. for me "This is a test" becomes "**This is a test**", which is interpreted as bold.

If you want to "tag" lines of code to say they're important, something like bookmarks might work? https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks

Upvotes: 1

Related Questions