Merge: vim plugin: intro NitExecute to interpret the current file with `nit`
authorJean Privat <jean@pryen.org>
Tue, 15 Sep 2015 19:18:41 +0000 (15:18 -0400)
committerJean Privat <jean@pryen.org>
Tue, 15 Sep 2015 19:18:41 +0000 (15:18 -0400)
commit19b8d731a129e7e2295760d04d12ce0b79d818eb
treefc8a73c06d199fdb3152afec9676a720c76f75ae
parent3db1439cf59dda267b461ce65bd39ce250bc3340
parenta1561a96f298ceef324529f34b11686893861844
Merge: vim plugin: intro NitExecute to interpret the current file with `nit`

Adds the `:NitExecute` command (or `:NitE` as shortcut) to interpret the current file with `nit`.

This is very similar to the manual `:!nit %` but it saves modified buffers to a temp file to execute the content of the current buffer and not the last saved content.

This is completely up to you but I recommend mapping this to `ctrl-f` to fit between `ctrl-d -> Nitdoc` and `ctrl-g -> NitGitGrep`. Here are the required lines for `.vimrc`:

~~~
" Map the Nitdoc command to Ctrl-D
map <C-d> :Nitdoc<enter>

" Map the NitGitGrep function to Ctrl-G
map <C-g> :call NitGitGrep()<enter>

" Map the NitExecute function to Ctrl-F <------- The new one
map <C-f> :NitExecute<enter>
~~~

Pull-Request: #1717
Reviewed-by: Jean Privat <jean@pryen.org>