# How to prefix docstring of map with a space?

**URL:** <https://discuss.kakoune.com/t/how-to-prefix-docstring-of-map-with-a-space/1518>\
**Category:** Help\
**Created:** [January 3, 2021, 7:09pm UTC](https://discuss.kakoune.com/t/how-to-prefix-docstring-of-map-with-a-space/1518 "2021-01-03T19:09:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vbauerster](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vbauerster](https://discuss.kakoune.com/u/vbauerster)\
**Post date:** [January 3, 2021, 7:09pm UTC](https://discuss.kakoune.com/t/how-to-prefix-docstring-of-map-with-a-space/1518/1 "2021-01-03T19:09:57Z")

</div>

I’ve noticed that all of the following doesn’t preserve a prefix space of the docstring.  
In other words first space gets trimmed.

```auto
map global user x nop -docstring ' test'
map global user x nop -docstring %{ test}

```

and this one literally puts `<space>test`

```auto
map global user x nop -docstring '<space>test'
map global user x nop -docstring %{<space>test}

```

Is there a way to preserve a prefix space?

---

<div class="post-metadata">

**Author:** ![vbauerster](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vbauerster](https://discuss.kakoune.com/u/vbauerster)\
**Post date:** [January 3, 2021, 7:18pm UTC](https://discuss.kakoune.com/t/how-to-prefix-docstring-of-map-with-a-space/1518/2 "2021-01-03T19:18:24Z")

</div>

Subsequent question why prefix space(s) gets trimmed?

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [January 3, 2021, 11:39pm UTC](https://discuss.kakoune.com/t/how-to-prefix-docstring-of-map-with-a-space/1518/3 "2021-01-03T23:39:38Z")

</div>

I believe prefixed spaces get trimmed so that you can do things like:

```auto
define-command \
    -docstring "
         do-fancy-thing [<switches>]: Do a fancy thing.

         Switches:
             -foo Do a foo.
             -bar Order a drink.
    " \
    do-fancy-thing \
%{
    # ...
}

```

…and have that docstring actually show up with the proper indentation at runtime.
