From 28f2bb60f14c2a473a8adb58d57e8815d4394284 Mon Sep 17 00:00:00 2001 From: Romain Lafourcade Date: Sat, 4 Jul 2015 23:31:39 +0200 Subject: [PATCH] modified readme --- README.md | 74 ++++++------------------------------------------------- 1 file changed, 7 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 3993be9..fa3c77a 100644 --- a/README.md +++ b/README.md @@ -16,82 +16,22 @@ Use your favorite plugin manager or dump `qlist.vim` in your `plugin` directory: # Windows %userprofile%\vimfiles\plugin\qlist.vim -## Usage +Don't forget to execute the following command to make the documentation +globally available: -This plugin adds two custom commands to your configuration, `:Ilist` and `:Dlist`, overrides these four normal mode commands: `[I`, `]I`, `[D`, `]D` and adds their visual mode counterparts. +on Unix-like systems... -Those commands still behave like the originals and share the same requirements. There are two differences, though: + :helptags ~/.vim/doc -* The first difference is the whole point of this humble plugin: instead of displaying the results as a non-interactive list, we use the quickfix list. The benefits are huge... +on Windows... - * the results can be displayed in an interactive window where you can search and move around with regular Vim commands, - * the results are still accessible even if the quickfix window is closed, - * older searches can be re-called if needed. - -* The second difference is minimal but worth noting... - - * `:Ilist foo` works like `:ilist /foo`, - * `:Dlist bar` works like `:dlist /bar`. - -The `/` forces vim to perform regular expression search instead of the default whole word search. This is actually a built-in feature that happens to be quite handy for quick searches: - - :ilist foo " only finds exact word 'foo' - :ilist /foo " finds all words containing 'foo' - -Here are explanations of all the commands: - - [I " List every occurence of the word under the cursor - " in the current buffer and included files. - " Comments are skipped. - " Search starts from the top. - - ]I " List every occurence of the word under the cursor - " in the current buffer and included files. - " Comments are skipped. - " Search starts after the current position. - - :Ilist foo " List every word containing 'foo' in the current - " buffer and included files. - " Comments are skipped. - " Search starts from the top. - - [D " List every definition of the symbol under the cursor - " in the current buffer and included files. - " Search starts from the top. - - ]D " List every definition of the symbol under the cursor - " in the current buffer and included files. - " Search starts after the current position. - - :Dlist foo " List every definition containing 'foo' in the current - " buffer and included files. - " Search starts from the top. - -For more information, please read `:help include-search`. - -## Configuration - -If you don't want to override `[I`, `]D` and friends, you can still map each command to whatever works for you. Below are the default mappings that you can use as a basis for your own configuration: - - " normal mode - nmap [I QlistIncludefromtop - nmap ]I QlistIncludefromhere - nmap [D QlistDefinefromtop - nmap ]D QlistDefinefromhere - - " visual mode - xmap [I QlistIncludefromtopvisual - xmap ]I QlistIncludefromherevisual - xmap [D QlistDefinefromtopvisual - xmap ]D QlistDefinefromherevisual - -`:help quickfix` is a recommended read if you are unfamiliar with the quickfix feature. + :helptags %userprofile%\vimfiles\doc ## TODO -* Add proper documentation. * Add options? ## DONE * Add a gifcast to the `README`. (sort of) +* Add proper documentation.