Merge: Vim autocomplete search in doc and 2 new useful Vim functions
authorJean Privat <jean@pryen.org>
Tue, 10 Mar 2015 10:10:31 +0000 (17:10 +0700)
committerJean Privat <jean@pryen.org>
Tue, 10 Mar 2015 10:10:31 +0000 (17:10 +0700)
* The omnifunc for Nit search for autocomplete suggestions in the doc. So if you write `12.modulo`, then hit `Ctrl-X Ctrl-O` (launching the omnifunc), it will suggest `%` to replace the `modulo` part. This is useful when guessing the name of the wanted entity.

* The Nitdoc function can be mapped to `Ctrl-D` to show the doc associated to the word under the cursor. There is still no semantic analysis here, so it will list all possible docs.

* The NitGitGrep function can be mapped to `Ctrl-G` to find instances of the word under the cursor in the currect directory using `git grep`. It will first try to display any definitions and then its uses. This one is a bit trickier to use, but it can be very useful.

----
Bonus hint! You can select the size of the preview window to 5 lines with `set previewheight=5` (@Morriar)

Pull-Request: #1192
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>


Trivial merge