Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,28 @@ class FirstCommandTest : VimTestCase() {
val command = injector.vimscriptParser.parseCommand("first")
assertTrue(command is SelectFirstFileCommand)
}

@Test
fun `command parsing bfirst`() {
val command = injector.vimscriptParser.parseCommand("bfirst")
assertTrue(command is SelectFirstFileCommand)
}

@Test
fun `command parsing bf`() {
val command = injector.vimscriptParser.parseCommand("bf")
assertTrue(command is SelectFirstFileCommand)
}

@Test
fun `command parsing brewind`() {
val command = injector.vimscriptParser.parseCommand("brewind")
assertTrue(command is SelectFirstFileCommand)
}

@Test
fun `command parsing br`() {
val command = injector.vimscriptParser.parseCommand("br")
assertTrue(command is SelectFirstFileCommand)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,16 @@ class LastCommandTest : VimTestCase() {
val command = injector.vimscriptParser.parseCommand("last")
assertTrue(command is SelectLastFileCommand)
}

@Test
fun `command parsing blast`() {
val command = injector.vimscriptParser.parseCommand("blast")
assertTrue(command is SelectLastFileCommand)
}

@Test
fun `command parsing bl`() {
val command = injector.vimscriptParser.parseCommand("bl")
assertTrue(command is SelectLastFileCommand)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,16 @@ class NextFileCommandTest : VimTestCase() {
val command = injector.vimscriptParser.parseCommand("next")
assertTrue(command is NextFileCommand)
}

@Test
fun `command parsing bnext`() {
val command = injector.vimscriptParser.parseCommand("bnext")
assertTrue(command is NextFileCommand)
}

@Test
fun `command parsing bn`() {
val command = injector.vimscriptParser.parseCommand("bn")
assertTrue(command is NextFileCommand)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,16 @@ class PreviousFileCommandTest : VimTestCase() {
assertTrue(command is PreviousFileCommand)
assertEquals("4", command.argument)
}

@Test
fun `command parsing bprevious`() {
val command = injector.vimscriptParser.parseCommand("bprevious")
assertTrue(command is PreviousFileCommand)
}

@Test
fun `command parsing bp`() {
val command = injector.vimscriptParser.parseCommand("bp")
assertTrue(command is PreviousFileCommand)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import com.maddyhome.idea.vim.ex.ranges.Range
import com.maddyhome.idea.vim.vimscript.model.ExecutionResult

/**
* see "h :first"
* see "h :bfirst"
*/
@ExCommand(command = "fir[st]")
data class SelectFirstFileCommand(val range: Range, val modifier: CommandModifier, val argument: String) :
@ExCommand(command = "bf[irst],br[ewind]")
data class BfirstCommand(val range: Range, val modifier: CommandModifier, val argument: String) :
Command.SingleExecution(range, modifier, argument) {

override val argFlags: CommandHandlerFlags =
flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)
flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_FORBIDDEN, Access.READ_ONLY)

override fun processCommand(
editor: VimEditor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import com.maddyhome.idea.vim.ex.ranges.Range
import com.maddyhome.idea.vim.vimscript.model.ExecutionResult

/**
* see "h :last"
* see "h :blast"
*/
@ExCommand(command = "la[st]")
data class SelectLastFileCommand(val range: Range, val modifier: CommandModifier, val argument: String) :
@ExCommand(command = "bl[ast]")
data class BlastCommand(val range: Range, val modifier: CommandModifier, val argument: String) :
Command.SingleExecution(range, modifier, argument) {

override val argFlags: CommandHandlerFlags =
flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)
flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_FORBIDDEN, Access.READ_ONLY)

override fun processCommand(
editor: VimEditor,
Expand Down