Skip to content

Commit b246c84

Browse files
authored
Merge pull request #1457 from fox0430/develop
v0.3.0
2 parents b2c2177 + 7ed4b1a commit b246c84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2165
-698
lines changed

.github/workflows/build.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'LICENSE'
7+
- '*.md'
8+
- 'documents/'
9+
- 'docs/'
10+
branches:
11+
- develop
12+
- master
13+
pull_request:
14+
paths-ignore:
15+
- 'LICENSE'
16+
- '*.md'
17+
- 'documents/'
18+
- 'docs/'
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
nim: [ '1.4.2', 'stable', 'devel' ]
26+
name: Build on ${{ matrix.nim }}
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Setup nim
30+
uses: jiro4989/setup-nim-action@v1
31+
with:
32+
nim-version: ${{ matrix.nim }}
33+
- run: nimble build -y

.github/workflows/actions.yaml renamed to .github/workflows/test.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
# - macOS-latest
4141
# - windows-latest
4242
env:
43-
NIM_VERSION: 1.4.8
43+
NIM_VERSION: stable
4444
steps:
4545
- uses: actions/checkout@v1
4646
- run: |
@@ -88,8 +88,3 @@ jobs:
8888

8989
- name: Run integtation test
9090
run: shpec ./shpec.sh
91-
92-
- name: Build on Nim devel
93-
run: |
94-
choosenim -y devel
95-
nimble build

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A command line based editor inspired by vi/vim written in Nim.
77

88
This project's goal is a very customizable, high productivity, user friendly, high performance and funny animation editor.
99

10-
![moe](https://user-images.githubusercontent.com/15966436/93508284-5fa0ca00-f959-11ea-8282-d64f540e0c54.png)
10+
![moe](https://user-images.githubusercontent.com/15966436/146791140-e020a07f-7ca1-4bfd-a6a4-f20f4c7885db.png)
1111

1212
## Features
1313

documents/howtouse.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
| <kbd>**Z**</kbd> <kbd>**Z**</kbd><br>Write current file and exit | <kbd>**Z**</kbd> <kbd>**Q**</kbd><br>Same as `:q!` | <kbd>**Ctrl**</kbd> <kbd>**w**</kbd> <kbd>**c**</kbd><br>Close current window | <kbd>**?**</kbd><br>`keyword` Search backwards |
6161
| <kbd>**/**</kbd><br>`keyword` Search forwards | <kbd>**\\**</kbd> <kbd>**r**</kbd><br>Quick Run | <kbd>**s**</kbd> OR <kbd>**c**</kbd><kbd>**u**</kbd><br> Delete current charater and enter insert mode | <kbd>**y**</kbd><kbd>**{**</kbd><br> Yank to the previous blank line |
6262
| <kbd>**y**</kbd><kbd>**}**</kbd><br> Yank to the next blank line | <kbd>**y**</kbd><kbd>**l**</kbd><br> Yank a character| <kbd>**X**</kbd> OR <kbd>**d**</kbd><kbd>**h**</kbd><br> Cut a character before cursor | <kbd>**g**</kbd><kbd>**a**</kbd><br> Show current character info |
63+
| <kbd>**t**</kbd><kbd>**x**</kbd><br> Move to the left of the next ```x``` (any character) on the current line | <kbd>**T**</kbd><kbd>**x**</kbd><br> Move to the right of the back ```x ``` (any character) on the current line | <kbd>**y**</kbd><kbd>**t**</kbd><br><kbd>**Any key**</kbd><br> Yank characters to an any character | <kbd>**c**</kbd><kbd>**f**</kbd><br><kbd>**Any key**</kbd><br> Delete characters to an any character and enter insert mode |
6364

6465
</details>
6566

example/moerc.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ enable = false
6767

6868
allBuffer = false
6969

70-
[StatusBar]
70+
[StatusLine]
7171

72-
multipleStatusBar = true
72+
multipleStatusLine = true
7373

7474
merge = false
7575

moe.nimble

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "0.2.8.0"
3+
version = "0.3.0"
44
author = "fox0430"
55
description = "A command lined based text editor"
66
license = "GPLv3"
@@ -10,10 +10,12 @@ bin = @["moe"]
1010
# Dependencies
1111

1212
requires "nim >= 1.4.2"
13-
requires "https://github.com/walkre-niboshi/nim-ncurses >= 1.0.2"
14-
requires "unicodedb >= 0.9.0"
15-
requires "parsetoml >= 0.4.0"
13+
requires "ncurses >= 1.0.2"
14+
requires "unicodedb >= 0.10.0"
15+
requires "parsetoml >= 0.6.0"
1616

1717
task release, "Build for release":
18-
exec "nim c -o:moe -d:release src/moe"
18+
exec "nimble build -d:release"
1919

20+
task debug, "Build for debug":
21+
exec "nimble build -d:debug --debugger:native --verbose -y"

shpec.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe "moe is an editor"
4343
describe "invocation options"
4444

4545
it "can display it's version"
46-
assert equal `moe -v | grep -oPq "^moe v\d+\.\d+\.\d+\.\d+$";echo $?` 0
46+
assert equal `moe -v | grep -oPq "^moe v\d+\.\d+\.\d+$";echo $?` 0
4747
end
4848

4949
it "can display command line options"

src/moe.nim

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import os, times
1+
import std/[os, times]
22
import moepkg/[ui, editorstatus, normalmode, insertmode, visualmode,
33
replacemode, filermode, exmode, buffermanager, logviewer,
44
cmdlineoption, bufferstatus, help, recentfilemode, quickrun,
@@ -17,6 +17,18 @@ proc loadPersistData(status: var EditorStatus) =
1717
currentMainWindowNode.restoreCursorPostion(currentBufStatus,
1818
status.lastPosition)
1919

20+
proc addBufferStatus(status: var EditorStatus,
21+
parsedList: CmdParsedList) =
22+
23+
if parsedList.path.len > 0:
24+
for path in parsedList.path:
25+
if dirExists(path):
26+
status.addNewBuffer(path, Mode.filer)
27+
else:
28+
status.addNewBuffer(path)
29+
else:
30+
status.addNewBuffer
31+
2032
proc initEditor(): EditorStatus =
2133
let parsedList = parseCommandLineOption(commandLineParams())
2234

@@ -33,14 +45,10 @@ proc initEditor(): EditorStatus =
3345
exitUi()
3446
quit())
3547

36-
if parsedList.len > 0:
37-
for p in parsedList:
38-
if dirExists(p.filename):
39-
result.addNewBuffer(p.filename, Mode.filer)
40-
else:
41-
result.addNewBuffer(p.filename)
42-
else:
43-
result.addNewBuffer
48+
if parsedList.isReadonly:
49+
result.isReadonly = true
50+
51+
result.addBufferStatus(parsedList)
4452

4553
result.loadPersistData
4654

src/moepkg/backup.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import os, times, re
1+
import std/[os, times, re]
22
import settings, unicodeext, fileutils, bufferstatus, gapbuffer, messages,
33
commandline
44

src/moepkg/bookmark.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import os
1+
import std/os
22

33
type Bookmark* = object
44
path*: string

0 commit comments

Comments
 (0)