Ex mode for Atom
Find a file
Edvin Hultberg 30ad82671b
Merge pull request #225 from sarangjo/master
Add existing command information to README
2019-02-25 15:52:09 +01:00
.github Update contributing guidelines 2016-08-15 23:31:08 +02:00
keymaps Support Ctrl-[ to close ex-mode 2017-10-17 16:31:54 -04:00
lib Refactor :write command 2018-05-29 23:55:46 +02:00
spec add gdefault option implementation test 2017-08-13 17:18:26 +09:00
styles distinguish prefix from input 2015-08-03 12:21:01 +02:00
.editorconfig add editorconfig 2017-07-29 17:38:07 +02:00
.gitignore blank package 2015-02-19 08:29:59 +01:00
.travis.yml Use vim-mode-plus on Travis 2017-05-25 01:27:09 +02:00
CHANGELOG.md 📝 update CHANGELOG 2018-05-29 23:14:45 +02:00
LICENSE.md blank package 2015-02-19 08:29:59 +01:00
package.json Prepare 0.18.0 release 2017-08-19 09:44:09 +02:00
README.md Add existing command information to README 2018-12-13 14:39:51 -08:00

ex-mode package

ex-mode for Atom's vim-mode

Use

Install both vim-mode-plus (or the deprecated vim-mode) and ex-mode. Type : in command mode. Enter w or write.

Extend

Use the service to register commands, from your own package, or straight from init.coffee:

# in Atom's init.coffee
atom.packages.onDidActivatePackage (pack) ->
  if pack.name == 'ex-mode'
    Ex = pack.mainModule.provideEx()
    Ex.registerCommand 'z', -> console.log("Zzzzzz...")

You can also add aliases:

atom.packages.onDidActivatePackage (pack) ->
  if pack.name == 'ex-mode'
    Ex = pack.mainModule.provideEx()
    Ex.registerAlias 'WQ', 'wq'
    Ex.registerAlias 'Wq', 'wq'

Existing commands

This is the baseline list of commands supported in ex-mode.

Command Operation
q/quit/tabc/tabclose Close active tab
qall/quitall Close all tabs
tabe/tabedit/tabnew Open new tab
e/edit/tabe/tabedit/tabnew <file> Edit given file
tabn/tabnext Go to next tab
tabp/tabprevious Go to previous tab
tabo/tabonly Close other tabs
w/write Save active tab
w/write/saveas <file> Save as
wall/wa Save all tabs
sp/split Split window
sp/split <file> Open file in split window
s/substitute Substitute regular expression in active line
vsp/vsplit Vertical split window
vsp/vsplit <file> Open file in vertical split window
delete Cut active line
yank Copy active line
set <options> Set options
sort Sort all lines in file
sort <line range> Sort lines in line range

See lib/ex.coffee for the implementations of these commands. Contributions are very welcome!

Status

Groundwork is done. More ex commands are easy to add and will be coming as time permits and contributions come in.

License

MIT