# Formatting and Surrounding Text

*Lx* can add formatting around selected text.

For example, select `hello` in a Markdown file. Press **Ctrl+B**. *Lx* changes it to:

```md
**hello**
```

The word stays selected. You can apply another format right away.

## Formatting shortcuts

These shortcuts are available when the current file type supports them:

- **Ctrl+B** makes text bold
- **Ctrl+I** makes text italic
- **Ctrl+U** underlines text

They are off by default. Turn them on in your settings:

```lua
config.format_shortcuts = true
```

Turn them off again with:

```lua
config.format_shortcuts = false
```

Turning off the shortcuts does not remove formatting commands. You can still run them from the command palette or assign different keys.

For typed surrounding and the `format:surround` command, see [Auto Surround](auto_surround.md).
