Skip to content

Commit

Permalink
Merge pull request #496 from fox0430/develop
Browse files Browse the repository at this point in the history
v0.1.5
  • Loading branch information
fox0430 authored Feb 7, 2020
2 parents b8ccc4c + 016b16f commit 3052316
Show file tree
Hide file tree
Showing 30 changed files with 1,325 additions and 210 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: c
compiler:
- gcc
services:
- xvfb
before_install:
- sudo ln -sf /lib/x86_64-linux-gnu/libncursesw.so.5.9 /usr/lib/x86_64-linux-gnu/libncursesw.so
- export CHOOSENIM_NO_ANALYTICS=1
Expand All @@ -11,6 +13,9 @@ before_install:
- export PATH=~/.nimble/bin:$PATH
- echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile
- choosenim stable
# Manual install xclip v0.13
- wget http://mirrors.kernel.org/ubuntu/pool/universe/x/xclip/xclip_0.13-1_amd64.deb
- sudo dpkg -i xclip_0.13-1_amd64.deb
before_script:
- set -e
- export PATH=$(pwd)/nim/bin:$(pwd):$PATH
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This project's goal is a very customizable, high productivity, high performance

- Simple file manager

- Auto close paren
- Auto close/delete paren

- Simple auto indent

Expand Down
57 changes: 51 additions & 6 deletions documents/configfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,41 +73,81 @@ default is ibeam
insertModeCursor
```

Auto save setting (bool)
Auto save (bool)
default is false
```
autoSave
```

Auto save interval setting (minits) (int)
Auto save interval (minits) (int)
default is 5 (5 minits)
```
autoSaveInterval
```

Live reload of configuration file setting (bool)
Live reload of configuration file (bool)
default is false
```
liveReloadOfConf
```

Realtime search setting (bool)
Realtime search (bool)
default is true
```
realtimeSearch
```

Pop-up window in ex mode setting (bool)
Pop-up window in ex mode (bool)
default is true
```
popUpWindowInExmode
```

Highlighting when replace text setting (bool)
Highlight replacement text (bool)
default is true
```
replaceTextHighlight
```
Highlight a pair of paren (bool)
default is true
```
highlightPairOfParen
```

Auto delete paren (bool)
default is true
```
autoDeleteParen
```

Smooth scroll (bool)
default is true
```
smoothScroll
```

Smooth scroll speed (int)
default is 16
```
smoothScrollSpeed
```
highlight other uses of the current word under the cursor (bool)
default is true
```
highlightCurrentWord
```

System clipboard (bool)
default is true
```
systemClipboard
```

Highlight full-width space (bool)
default is true
```
highlightFullWidthSpace
```

### TabLine table
Dispaly all bufer in tab line (bool)
Expand Down Expand Up @@ -730,3 +770,8 @@ Background color when replace text
```
replaceTextBg
```

Background color of current word
```
currentWordBg
```
24 changes: 15 additions & 9 deletions documents/howtouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,21 @@ Check command bar
```sv``` - Horizontal split window

```livereload on``` or ```livereload on``` - Change setting of live reload of configuration file
```theme themeName``` - Change color theme : Exmaple ```theme dark```
```tab on``` or ```tab off``` - Change tab line setting
```synatx on``` or ```syntax off``` - Change syntax highlighting setting
```tabstop number``` - Change tabStop setting : Exmaple ```tabstop 2```
```paren on``` or ```paren off``` - Change auto close paren setting
```indent on``` or ```indent off``` - Chnage auto indent sestting
```linenum on``` or ```linenum off``` - Change dispaly line number setting
```statusbar on``` or ```statusbar on``` - Change display stattus bar setting
```realtimesearch on``` or ```realtimesearch off``` - Change real-time search setting
```theme themeName``` - Change color theme : Example ```theme dark```
```tab on``` or ```tab off``` - Change setting to tab line
```synatx on``` or ```syntax off``` - Change setting to syntax highlighting
```tabstop number``` - Change setting to tabStop : Exmaple ```tabstop 2```
```paren on``` or ```paren off``` - Change setting to auto close paren
```indent on``` or ```indent off``` - Chnage sestting to auto indent
```linenum on``` or ```linenum off``` - Change setting to dispaly line number
```statusbar on``` or ```statusbar on``` - Change setting to display stattus bar
```realtimesearch on``` or ```realtimesearch off``` - Change setting to real-time search
```deleteparen on``` or ```deleteparen off``` - Change setting to auto delete paren
```smoothscroll on``` or ```smoothscroll off``` - Change setting to smooth scroll
```scrollspeed number``` - Set smooth scroll speed : Example ```scrollspeed 10```
```highlightcurrentword on``` or ```highlightcurrentword off``` - Change setting to highlight other uses of the current word
```clipboard on``` or ```clipboard off``` - Change setting to system clipboard
```highlightfullspace on``` or ```highlightfullspace off``` - Change setting to highlight full width space
```noh``` - Turn off highlights

```log``` - Open messages log viwer
12 changes: 12 additions & 0 deletions example/moerc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ realtimeSearch = true

popUpWindowInExmode = true

replaceTextHighlight = true

highlightPairOfParen = true

autoDeleteParen = true

systemClipboard = true

highlightFullWidthSpace = true

[TabLine]

allBuffer = false
Expand Down Expand Up @@ -191,3 +201,5 @@ popUpWinCurrentLineBg = "gray"
replaceText = "default"

replaceTextBg = "red"

currentWordBg = "gray"
2 changes: 1 addition & 1 deletion moe.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.1.4"
version = "0.1.5"
author = "fox0430"
description = "A command lined based text editor"
license = "GPLv3"
Expand Down
9 changes: 8 additions & 1 deletion src/moe.nim
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import moepkg/exmode
import moepkg/searchmode
import moepkg/buffermanager
import moepkg/logviewer
import moepkg/cmdoption
import moepkg/cmdlineoption
import moepkg/settings
import moepkg/commandview

Expand All @@ -26,6 +26,11 @@ proc main() =
status.timeConfFileLastReloaded = now()
changeTheme(status)

setControlCHook(proc() {.noconv.} =
exitUi()
quit()
)

if existsDir(parsedList.filename):
try: setCurrentDir(parsedList.filename)
except OSError:
Expand All @@ -34,6 +39,8 @@ proc main() =
status.bufStatus.add(BufferStatus(mode: Mode.filer, lastSavetime: now()))
else: addNewBuffer(status, parsedList.filename)

disableControlC()

while status.numOfMainWindow > 0:

case status.bufStatus[status.currentBuffer].mode:
Expand Down
2 changes: 1 addition & 1 deletion src/moepkg/cmdoption.nim → src/moepkg/cmdlineoption.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import parseopt
type ComdParsedList* = tuple[filename: string]

proc writeVersion() =
echo "v0.1.4"
echo "v0.1.5"
quit()

proc writeHelp() =
Expand Down
16 changes: 13 additions & 3 deletions src/moepkg/commandview.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ type

const exCommandList = [
ru"!",
ru"deleteparen",
ru"b",
ru"bd",
ru"bfirst",
ru"blast",
ru"bnext",
ru"bprev",
ru"buf",
ru"clipboard",
ru"cursorLine",
ru"e",
ru"highlightcurrentword",
ru"highlightfullspace",
ru"highlightparen",
ru"indent",
ru"linenum",
ru"livereload",
Expand All @@ -27,6 +32,8 @@ const exCommandList = [
ru"qa",
ru"qa!",
ru"realtimesearch",
ru"scrollspeed",
ru"smoothscroll",
ru"statusbar",
ru"syntax",
ru"tab",
Expand Down Expand Up @@ -299,9 +306,12 @@ proc suggestExCommandOption(status: var Editorstatus, exStatus: var ExModeViewSt
arg = if (strutils.splitWhitespace($exStatus.buffer)).len > 1: (strutils.splitWhitespace($exStatus.buffer))[1] else: ""

case command:
of "cursorLine", "indent", "linenum", "livereload", "realtimesearch", "statusbar", "syntax", "tabstop": argList = @["on", "off"]
of "theme": argList= @["vivid", "dark", "light", "config"]
of "e": suggestFilePath(status, exStatus, key)
of "cursorLine", "highlightparen", "indent", "linenum", "livereload", "realtimesearch", "statusbar", "syntax", "tabstop", "smoothscroll", "clipboard", "highlightcurrentword", "highlightfullspace":
argList = @["on", "off"]
of "theme":
argList= @["vivid", "dark", "light", "config"]
of "e":
suggestFilePath(status, exStatus, key)
else: discard

for i in 0 ..< argList.len:
Expand Down
Loading

0 comments on commit 3052316

Please sign in to comment.