11

I'd like to be able to break lines longer than 100 characters into multiple lines of less than 100 characters in IntelliJ IdeaVim. The Vim solution in vim command to restructure/force text to 80 columns doesn't work.

Community
  • 1
  • 1
brandones
  • 1,847
  • 2
  • 18
  • 36

1 Answers1

8

It's not implemented in IdeaVim yet. Feel free to vote for https://youtrack.jetbrains.com/issue/VIM-1310 about :set textwidth and https://youtrack.jetbrains.com/issue/VIM-186 about gq to re-wrap comments.

Andrey Vlasovskikh
  • 16,489
  • 7
  • 44
  • 62
  • 1
    If this matters to you, please vote on those issues! It's 2020 and `gq`/`gw` remains unsupported. – David Gay May 29 '20 at 19:38
  • 1
    There is a workaround as posted in the comments of [VIM-186](https://youtrack.jetbrains.com/issue/VIM-186#focus=Comments-27-4355985.0-0) by Tej Chajed: (reposting gist here for visibility): Install https://plugins.jetbrains.com/plugin/7234-wrap-to-column plugin and map in your .ideavimrc: `nmap gqq :action com.andrewbrookins.idea.wrap.WrapAction` and `vmap gq :action com.andrewbrookins.idea.wrap.WrapAction` (see [full comment](https://youtrack.jetbrains.com/issue/VIM-186#focus=Comments-27-4355985.0-0) for limitations of workaround.) – Anton Petrov Mar 25 '22 at 14:09