]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add basic usage for fold and conceal #334
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Mon, 30 Jul 2018 00:40:56 +0000 (09:40 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Mon, 30 Jul 2018 00:41:51 +0000 (09:41 +0900)
README.md
doc/vim-markdown.txt

index bb26e05fa2b5612cf07d33d8958d845fe6dc4d4e..0a81bb31aad731c72932e6f0e33b9ee2093cb16c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -52,6 +52,37 @@ cd ~/.vim
 tar --strip=1 -zxf vim-markdown-master.tar.gz
 ```
 
 tar --strip=1 -zxf vim-markdown-master.tar.gz
 ```
 
+## Basic usage
+
+### Folding
+
+Folding is enabled for headers by default.
+
+The following commands are useful to open and close folds:
+
+- `zr`: reduces fold level throughout the buffer
+- `zR`: opens all folds
+- `zm`: increases fold level throughout the buffer
+- `zM`: folds everything all the way
+- `za`: open a fold your cursor is on
+- `zA`: open a fold your cursor is on recursively
+- `zc`: close a fold your cursor is on
+- `zC`: close a fold your cursor is on recursively
+
+[Options](#options) are available to disable folding or change folding style.
+
+Try `:help fold-expr` and `:help fold-commands` for details.
+
+### Concealing
+
+Concealing is set for some syntax such as bold, italic, code block and link.
+
+Concealing lets you conceal text with other text. The actual source text is not modified. If you put your cursor on the concealed line, the conceal goes away.
+
+[Options](#options) are available to disable or change concealing.
+
+Try `:help concealcursor` and `:help conceallevel` for details.
+
 ## Options
 
 ### Disable Folding
 ## Options
 
 ### Disable Folding
index 8a4d5360ca2531b0f40f47b523df22750f52ce41..29ed66ddc5f7940de3f647cd4b26a8a225ef488f 100644 (file)
@@ -5,7 +5,10 @@ Contents ~
 
  1. Introduction                                    |vim-markdown-introduction|
  2. Installation                                    |vim-markdown-installation|
 
  1. Introduction                                    |vim-markdown-introduction|
  2. Installation                                    |vim-markdown-installation|
- 3. Options                                              |vim-markdown-options|
+ 3. Basic usage                                      |vim-markdown-basic-usage|
+  1. Folding                                             |vim-markdown-folding|
+  2. Concealing                                       |vim-markdown-concealing|
+ 4. Options                                              |vim-markdown-options|
   1. Disable Folding                             |vim-markdown-disable-folding|
   2. Change fold style                         |vim-markdown-change-fold-style|
   3. Set header folding level           |vim-markdown-set-header-folding-level|
   1. Disable Folding                             |vim-markdown-disable-folding|
   2. Change fold style                         |vim-markdown-change-fold-style|
   3. Set header folding level           |vim-markdown-set-header-folding-level|
@@ -31,11 +34,11 @@ Contents ~
   15. Do not automatically insert bulletpoints
                         |vim-markdown-do-not-automatically-insert-bulletpoints|
   16. Change how to open new files  |vim-markdown-change-how-to-open-new-files|
   15. Do not automatically insert bulletpoints
                         |vim-markdown-do-not-automatically-insert-bulletpoints|
   16. Change how to open new files  |vim-markdown-change-how-to-open-new-files|
4. Mappings                                            |vim-markdown-mappings|
5. Commands                                            |vim-markdown-commands|
6. Credits                                              |vim-markdown-credits|
7. License                                              |vim-markdown-license|
8. References                                        |vim-markdown-references|
5. Mappings                                            |vim-markdown-mappings|
6. Commands                                            |vim-markdown-commands|
7. Credits                                              |vim-markdown-credits|
8. License                                              |vim-markdown-license|
9. References                                        |vim-markdown-references|
 
 ===============================================================================
                                                     *vim-markdown-introduction*
 
 ===============================================================================
                                                     *vim-markdown-introduction*
@@ -77,6 +80,52 @@ If you are not using any package manager, download the tarball [5] and do this:
   cd ~/.vim
   tar --strip=1 -zxf vim-markdown-master.tar.gz
 <
   cd ~/.vim
   tar --strip=1 -zxf vim-markdown-master.tar.gz
 <
+===============================================================================
+                                                     *vim-markdown-basic-usage*
+Basic usage ~
+
+-------------------------------------------------------------------------------
+                                                         *vim-markdown-folding*
+Folding ~
+
+Folding is enabled for headers by default.
+
+The following commands are useful to open and close folds:
+
+                                                              *vim-markdown-zr*
+- 'zr': reduces fold level throughout the buffer
+                                                              *vim-markdown-zR*
+- 'zR': opens all folds
+                                                              *vim-markdown-zm*
+- 'zm': increases fold level throughout the buffer
+                                                              *vim-markdown-zM*
+- 'zM': folds everything all the way
+                                                              *vim-markdown-za*
+- 'za': open a fold your cursor is on
+                                                              *vim-markdown-zA*
+- 'zA': open a fold your cursor is on recursively
+                                                              *vim-markdown-zc*
+- 'zc': close a fold your cursor is on
+                                                              *vim-markdown-zC*
+- 'zC': close a fold your cursor is on recursively
+
+Options are available to disable folding or change folding style.
+
+Try ':help fold-expr' and ':help fold-commands' for details.
+
+-------------------------------------------------------------------------------
+                                                      *vim-markdown-concealing*
+Concealing ~
+
+Concealing is set for some syntax such as bold, italic, code block and link.
+
+Concealing lets you conceal text with other text. The actual source text is not
+modified. If you put your cursor on the concealed line, the conceal goes away.
+
+Options are available to disable or change concealing.
+
+Try ':help concealcursor' and ':help conceallevel' for details.
+
 ===============================================================================
                                                          *vim-markdown-options*
 Options ~
 ===============================================================================
                                                          *vim-markdown-options*
 Options ~