Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Commit

Permalink
Remove bad example
Browse files Browse the repository at this point in the history
  • Loading branch information
Iron-E committed Apr 29, 2020
1 parent 5a64548 commit 5f67d1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ function! s:FooMode()
endfunction
```

After defining said function, you can create a mapping to enter the mode. Be sure to use `<expr>`. Example:
After defining said function, you can create a mapping to enter the mode. Example:

```viml
command! FooModeEnter call libmodal#Enter('FOO', funcref('s:FooMode'))
nnoremap <expr> <leader>n FooModeEnter
nnoremap <leader>n :FooModeEnter
```

- Note the `funcref()` call. __It must be there__ or else `libmodal#Enter` won't execute properly.
Expand Down
4 changes: 2 additions & 2 deletions doc/libmodal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ To define a new mode, you must first create a |user-function| to pass into
<

After defining said |user-function|, you can create a |mapping| to enter the
mode. Be sure to use |map-<expr>|. Example:
mode.

>
command! FooModeEnter call libmodal#Enter('FOO', funcref('s:FooMode'))
nnoremap <expr> <leader>n FooModeEnter
nnoremap <leader>n :FooModeEnter
<

- NOTE: the |funcref()| call must be there or else |libmodal#Enter| won't
Expand Down

0 comments on commit 5f67d1b

Please sign in to comment.