Skip to content

shaunxcode/mug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mug

coffeescript based command line text editor which utilizes codemirror modes.

#What? Yeah basically vim but written in coffee with way less features!

Right now you can edit and save files and issue some very basic commands. (or eval any coffee script form)

You start in insert mode, pressing escape brings you back to visual mode.

In visual mode

  • i insert mode
  • : command
  • > short cut for :do ->
  • / regular expression
  • s,save save file
  • sa,saveAs save file as
  • q,quit quit
  • sq,wq save and quit
  • esc exit command mode

When writing commands you have access to the entire Mug object via @doc. This is mainly useful for manipulating @doc.lines e.g.

:do -> @doc.lines = (line.map((c) -> c.toUpperCase()) for line in @doc.lines)

would upper case all of the lines in the document.

#TODO file/project explorer

tabs for multiple files

break multiline editor out into a term-ui widget

add selecting of text/cut/copy/paste

add regex searching

show result of commands

plugin system (move almost all functionality out into this)

code mirror syntax highlighting

web server mode (starts express server for your project so

you can do js fiddle style rapid dev)

paren/bracket matching

clear empty lines on backspace

add ctrl+f and ctrl+b for quick page up/down

show significant white space

utilize code mirror for smart indent

history/undo

$ and ctrl A , w for navigating in visual mode

example json editing mode to show off power of plugins

About

coffeescript based command line text editor which utilizes codemirror modes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published