prepare release v0.9.0
This commit is contained in:
commit
1c9d6a2fea
5 changed files with 130 additions and 31 deletions
29
.github/CONTRIBUTING.md
vendored
Normal file
29
.github/CONTRIBUTING.md
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Ex-Mode Contributing Guidelines
|
||||||
|
|
||||||
|
Current Maintainers:
|
||||||
|
|
||||||
|
- [@jazzpi](https://github.com/jazzpi)
|
||||||
|
- [@LongLiveCHIEF](https://github.com/LongLiveCHIEF)
|
||||||
|
|
||||||
|
This project is accepting new maintainers. Interested parties should
|
||||||
|
|
||||||
|
1. Open a new issue, titled: `New Maintainer Request`
|
||||||
|
2. Assign the issue to [@lloeki](https://github.com/lloeki)
|
||||||
|
3. The last line of your request should `/cc @jazzpi @LongLiveCHIEF`
|
||||||
|
|
||||||
|
## Pull Requests
|
||||||
|
|
||||||
|
- If the PR *fixes* or should result in the closure of any issues, use the `fixes #` or `closes #` syntax to ensure issue will
|
||||||
|
close when your PR is merged
|
||||||
|
- All pull-requests that fix a bug or add a new feature *must* have accompanying tests before they will be merged. If you want
|
||||||
|
to speed up the merge of your PR, please contribute these tests
|
||||||
|
- *note*: if you submit a PR but are unsure how to write tests, please begin your PR title with `[needs tests]`
|
||||||
|
- Please use the [pull request template](PULL_REQUEST_TEMPLATE.md) as a guide for submitting your PR.
|
||||||
|
- Include a `/cc` for @LongLiveCHIEF and @jazzpi the current maintainers
|
||||||
|
|
||||||
|
## Issues
|
||||||
|
|
||||||
|
- Be aware of the responsibilities of `ex-mode` vs `vim-mode`
|
||||||
|
- If you have identified a bug we would welcome any Pull Requests that either:
|
||||||
|
- Fix the issue
|
||||||
|
- Create failing tests to confirm the bug
|
||||||
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
Fixes # .
|
||||||
|
|
||||||
|
Changes Proposed in this Pull Request:
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
|
||||||
|
I have written tests for:
|
||||||
|
|
||||||
|
- [ ] New features introduced
|
||||||
|
- [ ] Bugs fixed
|
||||||
|
- [ ] Neither (I'm just enhancing tests!)
|
||||||
|
|
||||||
|
@jazzpi @LongLiveCHIEF
|
||||||
|
|
@ -35,3 +35,15 @@ module.exports = ExMode =
|
||||||
consumeVim: (vim) ->
|
consumeVim: (vim) ->
|
||||||
@vim = vim
|
@vim = vim
|
||||||
@globalExState.setVim(vim)
|
@globalExState.setVim(vim)
|
||||||
|
|
||||||
|
config:
|
||||||
|
splitbelow:
|
||||||
|
title: 'Split below'
|
||||||
|
description: 'when splitting, split from below'
|
||||||
|
type: 'boolean'
|
||||||
|
default: 'false'
|
||||||
|
splitright:
|
||||||
|
title: 'Split right'
|
||||||
|
description: 'when splitting, split from right'
|
||||||
|
type: 'boolean'
|
||||||
|
default: 'false'
|
||||||
|
|
|
||||||
|
|
@ -127,11 +127,11 @@ class Ex
|
||||||
|
|
||||||
tabe: (args) => @tabedit(args)
|
tabe: (args) => @tabedit(args)
|
||||||
|
|
||||||
tabnew: ({ range, args }) =>
|
tabnew: (args) =>
|
||||||
if args.trim() is ''
|
if args.args.trim() is ''
|
||||||
atom.workspace.open()
|
atom.workspace.open()
|
||||||
else
|
else
|
||||||
@tabedit(range, args)
|
@tabedit(args)
|
||||||
|
|
||||||
tabclose: (args) => @quit(args)
|
tabclose: (args) => @quit(args)
|
||||||
|
|
||||||
|
|
@ -258,13 +258,23 @@ class Ex
|
||||||
filePaths = args.split(' ')
|
filePaths = args.split(' ')
|
||||||
filePaths = undefined if filePaths.length is 1 and filePaths[0] is ''
|
filePaths = undefined if filePaths.length is 1 and filePaths[0] is ''
|
||||||
pane = atom.workspace.getActivePane()
|
pane = atom.workspace.getActivePane()
|
||||||
if filePaths? and filePaths.length > 0
|
if atom.config.get('ex-mode.splitbelow')
|
||||||
newPane = pane.splitUp()
|
if filePaths? and filePaths.length > 0
|
||||||
for file in filePaths
|
newPane = pane.splitDown()
|
||||||
do ->
|
for file in filePaths
|
||||||
atom.workspace.openURIInPane file, newPane
|
do ->
|
||||||
|
atom.workspace.openURIInPane file, newPane
|
||||||
|
else
|
||||||
|
pane.splitDown(copyActiveItem: true)
|
||||||
else
|
else
|
||||||
pane.splitUp(copyActiveItem: true)
|
if filePaths? and filePaths.length > 0
|
||||||
|
newPane = pane.splitUp()
|
||||||
|
for file in filePaths
|
||||||
|
do ->
|
||||||
|
atom.workspace.openURIInPane file, newPane
|
||||||
|
else
|
||||||
|
pane.splitUp(copyActiveItem: true)
|
||||||
|
|
||||||
|
|
||||||
sp: (args) => @split(args)
|
sp: (args) => @split(args)
|
||||||
|
|
||||||
|
|
@ -335,13 +345,22 @@ class Ex
|
||||||
filePaths = args.split(' ')
|
filePaths = args.split(' ')
|
||||||
filePaths = undefined if filePaths.length is 1 and filePaths[0] is ''
|
filePaths = undefined if filePaths.length is 1 and filePaths[0] is ''
|
||||||
pane = atom.workspace.getActivePane()
|
pane = atom.workspace.getActivePane()
|
||||||
if filePaths? and filePaths.length > 0
|
if atom.config.get('ex-mode.splitright')
|
||||||
newPane = pane.splitLeft()
|
if filePaths? and filePaths.length > 0
|
||||||
for file in filePaths
|
newPane = pane.splitRight()
|
||||||
do ->
|
for file in filePaths
|
||||||
atom.workspace.openURIInPane file, newPane
|
do ->
|
||||||
|
atom.workspace.openURIInPane file, newPane
|
||||||
|
else
|
||||||
|
pane.splitRight(copyActiveItem: true)
|
||||||
else
|
else
|
||||||
pane.splitLeft(copyActiveItem: true)
|
if filePaths? and filePaths.length > 0
|
||||||
|
newPane = pane.splitLeft()
|
||||||
|
for file in filePaths
|
||||||
|
do ->
|
||||||
|
atom.workspace.openURIInPane file, newPane
|
||||||
|
else
|
||||||
|
pane.splitLeft(copyActiveItem: true)
|
||||||
|
|
||||||
vsp: (args) => @vsplit(args)
|
vsp: (args) => @vsplit(args)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -496,27 +496,52 @@ describe "the commands", ->
|
||||||
submitNormalModeInputText('tabnew')
|
submitNormalModeInputText('tabnew')
|
||||||
expect(atom.workspace.open).toHaveBeenCalled()
|
expect(atom.workspace.open).toHaveBeenCalled()
|
||||||
|
|
||||||
describe ":split", ->
|
it "opens a new tab for editing when provided an argument", ->
|
||||||
it "splits the current file upwards", ->
|
spyOn(Ex, 'tabnew').andCallThrough()
|
||||||
pane = atom.workspace.getActivePane()
|
spyOn(Ex, 'tabedit')
|
||||||
spyOn(pane, 'splitUp').andCallThrough()
|
|
||||||
filePath = projectPath('split')
|
|
||||||
editor.saveAs(filePath)
|
|
||||||
keydown(':')
|
keydown(':')
|
||||||
submitNormalModeInputText('split')
|
submitNormalModeInputText('tabnew tabnew-test')
|
||||||
expect(pane.splitUp).toHaveBeenCalled()
|
expect(Ex.tabedit)
|
||||||
|
.toHaveBeenCalledWith(Ex.tabnew.calls[0].args...)
|
||||||
|
|
||||||
|
describe ":split", ->
|
||||||
|
it "splits the current file upwards/downward", ->
|
||||||
|
pane = atom.workspace.getActivePane()
|
||||||
|
if atom.config.get('ex-mode.splitbelow')
|
||||||
|
spyOn(pane, 'splitDown').andCallThrough()
|
||||||
|
filePath = projectPath('split')
|
||||||
|
editor.saveAs(filePath)
|
||||||
|
keydown(':')
|
||||||
|
submitNormalModeInputText('split')
|
||||||
|
expect(pane.splitDown).toHaveBeenCalled()
|
||||||
|
else
|
||||||
|
spyOn(pane, 'splitUp').andCallThrough()
|
||||||
|
filePath = projectPath('split')
|
||||||
|
editor.saveAs(filePath)
|
||||||
|
keydown(':')
|
||||||
|
submitNormalModeInputText('split')
|
||||||
|
expect(pane.splitUp).toHaveBeenCalled()
|
||||||
# FIXME: Should test whether the new pane contains a TextEditor
|
# FIXME: Should test whether the new pane contains a TextEditor
|
||||||
# pointing to the same path
|
# pointing to the same path
|
||||||
|
|
||||||
describe ":vsplit", ->
|
describe ":vsplit", ->
|
||||||
it "splits the current file to the left", ->
|
it "splits the current file to the left/right", ->
|
||||||
pane = atom.workspace.getActivePane()
|
if atom.config.get('ex-mode.splitright')
|
||||||
spyOn(pane, 'splitLeft').andCallThrough()
|
pane = atom.workspace.getActivePane()
|
||||||
filePath = projectPath('vsplit')
|
spyOn(pane, 'splitRight').andCallThrough()
|
||||||
editor.saveAs(filePath)
|
filePath = projectPath('vsplit')
|
||||||
keydown(':')
|
editor.saveAs(filePath)
|
||||||
submitNormalModeInputText('vsplit')
|
keydown(':')
|
||||||
expect(pane.splitLeft).toHaveBeenCalled()
|
submitNormalModeInputText('vsplit')
|
||||||
|
expect(pane.splitLeft).toHaveBeenCalled()
|
||||||
|
else
|
||||||
|
pane = atom.workspace.getActivePane()
|
||||||
|
spyOn(pane, 'splitLeft').andCallThrough()
|
||||||
|
filePath = projectPath('vsplit')
|
||||||
|
editor.saveAs(filePath)
|
||||||
|
keydown(':')
|
||||||
|
submitNormalModeInputText('vsplit')
|
||||||
|
expect(pane.splitLeft).toHaveBeenCalled()
|
||||||
# FIXME: Should test whether the new pane contains a TextEditor
|
# FIXME: Should test whether the new pane contains a TextEditor
|
||||||
# pointing to the same path
|
# pointing to the same path
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue