# splitjoin.vim **Repository Path**: Trikoala/splitjoin.vim ## Basic Information - **Project Name**: splitjoin.vim - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-10-23 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [](http://travis-ci.org/AndrewRadev/splitjoin.vim) ## Usage This plugin is meant to simplify a task I've found too common in my workflow: switching between a single-line statement and a multi-line one. It offers the following default keybindings, which can be customized: * `gS` to split a one-liner into multiple lines * `gJ` (with the cursor on the first line of a block) to join a block into a single-line statement.  I usually work with ruby and a lot of expressions can be written very concisely on a single line. A good example is the "if" statement: ``` ruby puts "foo" if bar? ``` This is a great feature of the language, but when you need to add more statements to the body of the "if", you need to rewrite it: ``` ruby if bar? puts "foo" puts "baz" end ``` The idea of this plugin is to introduce a single key binding (default: `gS`) for transforming a line like this: ``` html