second test of ninja mode

This commit is contained in:
Eric Fode 2013-10-02 01:26:43 -07:00
parent 4b441163d7
commit bc3d9af746
5 changed files with 80 additions and 33 deletions

BIN
.indent.swp Normal file

Binary file not shown.

BIN
ftplugin/.hoon.vim.swp Normal file

Binary file not shown.

41
ftplugin/hoon.vim Normal file
View File

@ -0,0 +1,41 @@
if exists("b:hoon_did_submode_mapping")
finish
endif
let g:submode_timeout = 0
call submode#enter_with('hoon_ninja', 'i', '', '//' )
call submode#map('hoon_ninja', 'i', '', 'bar', '|')
call submode#map('hoon_ninja', 'i', '', 'gal', '<')
call submode#map('hoon_ninja', 'i', '', 'per', ')')
call submode#map('hoon_ninja', 'i', '', 'gar', '<')
call submode#map('hoon_ninja', 'i', '', 'sel', '[')
call submode#map('hoon_ninja', 'i', '', 'bas', '\')
call submode#map('hoon_ninja', 'i', '', 'hax', '#')
call submode#map('hoon_ninja', 'i', '', 'sem', ';')
call submode#map('hoon_ninja', 'i', '', 'buc', '$')
call submode#map('hoon_ninja', 'i', '', 'hep', '-')
call submode#map('hoon_ninja', 'i', '', 'ser', ']')
call submode#map('hoon_ninja', 'i', '', 'cab', '_')
call submode#map('hoon_ninja', 'i', '', 'kel', '{')
call submode#map('hoon_ninja', 'i', '', 'sig', '~')
call submode#map('hoon_ninja', 'i', '', 'cen', '%')
call submode#map('hoon_ninja', 'i', '', 'ker', '}')
call submode#map('hoon_ninja', 'i', '', 'soq', "'")
call submode#map('hoon_ninja', 'i', '', 'col', ':')
call submode#map('hoon_ninja', 'i', '', 'ket', '^')
call submode#map('hoon_ninja', 'i', '', 'tar', '*')
call submode#map('hoon_ninja', 'i', '', 'com', ',')
call submode#map('hoon_ninja', 'i', '', 'lus', '+')
call submode#map('hoon_ninja', 'i', '', 'tec', '`')
call submode#map('hoon_ninja', 'i', '', 'doq', '"')
call submode#map('hoon_ninja', 'i', '', 'pam', '&')
call submode#map('hoon_ninja', 'i', '', 'tis', '=')
call submode#map('hoon_ninja', 'i', '', 'dot', '.')
call submode#map('hoon_ninja', 'i', '', 'pat', '@')
call submode#map('hoon_ninja', 'i', '', 'wut', '?')
call submode#map('hoon_ninja', 'i', '', 'fas', '/')
call submode#map('hoon_ninja', 'i', '', 'pel', '(')
call submode#map('hoon_ninja', 'i', '', 'zap', '!')
let b:hoon_did_submode_mapping = 1

Binary file not shown.

View File

@ -16,41 +16,47 @@ if exists("*HoonIndent")
finish
endif
if exists('g:hoon_ninja')
inoremap bar \|
inoremap gal <
inoremap per )
inoremap gar >
inoremap sel [
inoremap bas \
inoremap hax #
inoremap sem ;
inoremap buc $
inoremap hep -
inoremap ser ]
inoremap cab _
inoremap kel {
inoremap sig ~
inoremap cen %
inoremap ker }
inoremap soq '
inoremap col :
inoremap ket ^
inoremap tar *
inoremap com ,
inoremap lus +
inoremap tec `
inoremap doq "
inoremap pam &
inoremap tis =
inoremap dot .
inoremap pat @
inoremap wut ?
inoremap fas /
inoremap pel (
inoremap zap !
if exists("b:hoon_did_submode_mapping")
finish
endif
set g:submode_timeout = 0
call submode#enter_with('hoon_ninja', 'i', '', '/ninja')
call submode#enter_with('hoon_ninja', 'i', '', '//')
call submode#map('hoon_ninja', 'i', '', 'bar', '|')
call submode#map('hoon_ninja', 'i', '', 'gal', '<')
call submode#map('hoon_ninja', 'i', '', 'per', ')')
call submode#map('hoon_ninja', 'i', '', 'gar', '<')
call submode#map('hoon_ninja', 'i', '', 'sel', '[')
call submode#map('hoon_ninja', 'i', '', 'bas', '\')
call submode#map('hoon_ninja', 'i', '', 'hax', '#')
call submode#map('hoon_ninja', 'i', '', 'sem', ';')
call submode#map('hoon_ninja', 'i', '', 'buc', '$')
call submode#map('hoon_ninja', 'i', '', 'hep', '-')
call submode#map('hoon_ninja', 'i', '', 'ser', ']')
call submode#map('hoon_ninja', 'i', '', 'cab', '_')
call submode#map('hoon_ninja', 'i', '', 'kel', '{')
call submode#map('hoon_ninja', 'i', '', 'sig', '~')
call submode#map('hoon_ninja', 'i', '', 'cen', '%')
call submode#map('hoon_ninja', 'i', '', 'ker', '}')
call submode#map('hoon_ninja', 'i', '', 'soq', "'")
call submode#map('hoon_ninja', 'i', '', 'col', ':')
call submode#map('hoon_ninja', 'i', '', 'ket', '^')
call submode#map('hoon_ninja', 'i', '', 'tar', '*')
call submode#map('hoon_ninja', 'i', '', 'com', ',')
call submode#map('hoon_ninja', 'i', '', 'lus', '+')
call submode#map('hoon_ninja', 'i', '', 'tec', '`')
call submode#map('hoon_ninja', 'i', '', 'doq', '"')
call submode#map('hoon_ninja', 'i', '', 'pam', '&')
call submode#map('hoon_ninja', 'i', '', 'tis', '=')
call submode#map('hoon_ninja', 'i', '', 'dot', '.')
call submode#map('hoon_ninja', 'i', '', 'pat', '@')
call submode#map('hoon_ninja', 'i', '', 'wut', '?')
call submode#map('hoon_ninja', 'i', '', 'fas', '/')
call submode#map('hoon_ninja', 'i', '', 'pel', '(')
call submode#map('hoon_ninja', 'i', '', 'zap', '!')
let b:hoon_did_submode_mapping = 1
function! HoonIndent(lnum)
let prevlnum = prevnonblank(a:lnum-1)
if prevlnum == 0