# vim: Allow trailing whitespace for \`:norm\` command \(\#46403\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d2b31b47b65f84db73becbf4eb4ddcbbb7dd5cdb)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d2b31b47b65f84db73becbf4eb4ddcbbb7dd5cdb

Requested commit: d2b31b47b65f84db73becbf4eb4ddcbbb7dd5cdb

Commit: d2b31b47b65f84db73becbf4eb4ddcbbb7dd5cdb

Tree: 9579780c6abdc9ca48ea541b1d247de0c4d4c395

Author: AidanV

Committer: GitHub

## Message

```
vim: Allow trailing whitespace for `:norm` command (#46403)

Fix a bug with `:norm` that disallowed trailing whitespace.

Commands that accept generic args (defined with `args()`) now preserve
trailing whitespace, while commands that accept filenames (defined with
`filename()`) have whitespace pre-trimmed. This allows, for example, 
`:norm I  ` to correctly insert spaces, matching NeoVim's behavior.

Release Notes:

- vim: Fixed `:norm` command to preserve trailing whitespace in
arguments (e.g., `:norm I ` now correctly inserts two spaces)

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

- [4e368d485c267b3f26e3a7410b77e086fa16157e](https://git.cafe/gitcafe/zed/commit/4e368d485c267b3f26e3a7410b77e086fa16157e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d2b31b47b65f84db73becbf4eb4ddcbbb7dd5cdb?format=markdown)
