Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 6391c77eed3bd88eac89673e381653a282b44144 @spiiph committed Aug 17, 2009
Showing with 792 additions and 0 deletions.
  1. +215 −0 doc/space.txt
  2. +396 −0 plugin/space.vim
  3. +181 −0 test/tests.txt
215 doc/space.txt
@@ -0,0 +1,215 @@
+*space.txt* Smart Space Key
+
+ *space.vim*
+
+ ______ ______ _____ _____ _____
+ / _____\ | ___ \ / ___ \ / ___/ / ___/
+ \ \____ | ___ / | \ / | | | | \__
+ \___ \ | | | |X| | | |___ | /___
+ /______/ \_| \_/ \_/ \____/ \____/
+
+ By Henrik Öhman <speeph@gmail.com>
+
+
+ Reference Manual ~
+
+
+ *space-toc*
+
+1. Intro |space-intro|
+2. Usage |space-usage|
+3. Hooks |space-hooks|
+4. Status line integration |space-statusline|
+5. Configuration |space-configuration|
+6. License |space-license|
+
+
+
+==============================================================================
+1. Intro *space-intro*
+
+space.vim is a plugin which remaps the *<Space>* key to act as a clever key
+to repeat motions. To disable space.vim, set the "space_loaded" global
+variable in your |vimrc| file: >
+ :let g:space_loaded = 1
+
+space.vim hooks into several of the more complex motion commands, such as
+|search-commands|, |jumpto-diffs|, |quickfix| and |location-list| and more
+commands. When a command that space.vim has hooked into is issued, it remaps
+the <Space> key to repeat that command, and it also remaps <S-Space> and
+<BS> to do the reverse.
+
+NOTE:~Due to terminal restrictions, <S-Space> may not be available. For that
+reason, the <BS> key is also used for reverse motions. Wherever this document
+talks of <S-Space>, <BS> can be used in its place.
+
+NOTE:~space.vim has some problems with the |'foldopen'| option. Since Vim
+won't open folds if a command is part of a mapping, space.vim tries to
+emulate this behaviour. This works well for all Normal mode mappings and for
+most Visual mode mappings. Only for searches using |/| and |?| in Visual mode
+is space.vim unable to emulate |'foldopen'|.
+
+NOTE:~Some |filetype| plugins map the section text objects ([[, [], ][, ]])
+and the method motions ([m, [M, ]m, ]M). space.vim is unable to hook into
+these mappings in a well defined way. There is definitely room for
+improvement here.
+
+==============================================================================
+2. Usage *space-usage*
+
+Using space.vim is intuitive. Issue a command, such as a search, and the
+<Space> key to go to the next match, and <S-Space> to go to the previous
+match. Thus, the following sequence >
+ /foo<CR>
+ n
+ N
+
+is equivalent to >
+ /foo<CR>
+ <Space>
+ <S-Space>
+
+This works with counts, and with Visual mode too >
+ /foo<CR>
+ V
+ 4<Space>
+
+space.vim tries to immitate Vim in its logic when specifying the direction for
+the repeated movement. For the search commands, <Space> behaves like |n|, and
+<S-Space> behaves like |N|, which means that a <Space> following a search using
+|?|, will actually find the previous match. For other commands, <Space> is
+configured to use the variant of the command that has the meaning of "next".
+Thus, <Space> is always mapped to |:lnext|, |[[|, |zj| etc, and never the
+reverse.
+
+The full power of space.vim will become apparent if you use |jumpto-diffs|,
+in particular on non-US keyboards, or |quickfix| and |location-list|
+commands. Remember all that finger stretching and keyboard dancing to quickly
+browse through a series of diffs for a fast overview of what your colleague
+managed to screw up this time? No more! >
+ ]c Jump to the next diff
+ <Space> Repeat the ]c motion
+ ... Nothing interesting, keep pressing space
+ <S-Space> Wait, there was something! Let's go back one diff
+
+Or why not quickly browse through all file which contain the sentence 'over
+9000' in all subdirectories? >
+ :lvimgrep /over 9000/ **/* Find all the matches and add them to the
+ location-list
+ <Space> <Space> is now mapped to :lnext
+ <S-Space> And <S-Space> is mapped to :lprevious
+
+Neat, huh? To get an overview of all the commands space.vim hooks into, and
+enables <Space> and <S-Space> mappings for, read on. |space-hooks|
+
+==============================================================================
+3. Hooks *space-hooks*
+
+This is a list of all the commands that space.vim hooks into and provides
+<Space> and <S-Space> navigation for.
+
+Character movements: |left-right-motions|
+ |f||F||t||T||;||,|
+
+Search commands: |search-commands|
+ |star||gstar||#||g#||n||N|
+
+Diff jumps: |jumpto-diffs|
+ |]c||[c|
+
+Parenthesis and bracket jumps: |various-motions|
+ |])||[(||]}||[{|
+
+Method jumps: |various-motions|
+ |]m||[m||]M||[M|
+
+Section jumps: |object-motions|
+ |]]||[]||][||[[|
+
+Fold movements:
+ |zj||zk||]z||[z|
+
+Quickfix commands: |quickfix|
+ |:make|
+ |:vimgrep|
+ |:grep|
+ |:cc|
+ |:cnext|
+ |:cprevious|
+ |:cNext|
+ |:cfirst|
+ |:clast|
+ |:crewind|
+ |:cfile|
+ |:cnfile|
+ |:cpfile|
+ |:cNfile|
+
+Location list commands: |location-list|
+ |:lmake|
+ |:lvimgrep|
+ |:lgrep|
+ |:ll|
+ |:lcnext|
+ |:lcprevious|
+ |:lcNext|
+ |:lcfirst|
+ |:lclast|
+ |:lcrewind|
+ |:lcfile|
+ |:lcnfile|
+ |:lcpfile|
+ |:lcNfile|
+
+==============================================================================
+4. Status line integration *space-statusline*
+
+It is possible to display the current command assigned to <Space> in the
+status line using the GetSpaceMovement() function. Here's an example: >
+
+ function! SlSpace()
+ if exists("*GetSpaceMovement")
+ return "[" . GetSpaceMovement() . "]"
+ else
+ return ""
+ endif
+ endfunc
+ set statusline+=%{SlSpace()}
+
+==============================================================================
+5. Configuration *space-configuration*
+
+It is possible to avoid using the <Space> key for groups of navigation
+commands using global variables. For instance, you may wish to use <Space> to
+repeat the last command only for diff jumps and quickfix and location list
+commands. Here's a list of commands that disable the use of the <Space> key
+
+Disable <Space> for character movements >
+ let g:space_no_character_movements = 1
+
+Disable <Space> for search commands >
+ let g:space_no_search = 1
+
+Disable <Space> for diff jumps >
+ let g:space_no_diff = 1
+
+Disable <Space> for parenthesis and bracket jumps >
+ let g:space_no_brace = 1
+
+Disable <Space> for method jumps >
+ let g:space_no_method = 1
+
+Disable <Space> for section jumps >
+ let g:space_no_section = 1
+
+Disable <Space> for fold movements >
+ let g:space_no_folds = 1
+
+Disable <Space> for quickfix and location list commands >
+ let g:space_no_quickfix = 1
+
+==============================================================================
+6. License *space-license*
+
+space.vim is licensed under the same terms as Vim itself.
+vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
396 plugin/space.vim
@@ -0,0 +1,396 @@
+" space.vim - Smart Space key
+" Author: Henrik Öhman <speeph@gmail.com>
+" URL: http://github.com/spiiph/vim-space/tree/master
+" Version: 1.7
+" LastChanged: $LastChangedDate: 2009-04-23 01:42:43 +0200 (to, 23 apr 2009) $
+" Revision: $Revision: 171 $
+"
+" Licensed under the same terms as Vim itself.
+"
+" NOTE: Using this script has some problems with 'foldopen', since vim won't
+" open folds if a command is part of a mapping. This is possible to
+" emulate in Normal mode, and in most cases in Visual mode. Only for
+" searches using '/' and '?' have I been unsuccessful in finding a
+" solution.
+" ============================================================================
+
+
+" Set this variable to disable space.vim
+"
+" let g:loaded_space = 1
+
+" These variables disables the usage of <Space> for groups of different
+" movement commands
+"
+" Disable <Space> for character movements, e.g. fFtT;,
+" let g:space_no_character_movements = 1
+"
+" Disable <Space> for searches, e.g. /?#*nN
+" let g:space_no_search = 1
+"
+" Disable <Space> for diff commands, e.g. [c and ]c
+" let g:space_no_diff = 1
+"
+" Disable <Space> for brace movement commands, e.g. [(, ]), [{ and ]}
+" let g:space_no_brace = 1
+"
+" Disable <Space> for method movement commands, e.g. [m, ]m, [M and ]M
+" let g:space_no_method = 1
+"
+" Disable <Space> for section movement commands, e.g. [[, ]], [] and ][
+" let g:space_no_section = 1
+"
+" Disable <Space> for fold movement commands, e.g. [z, ]z, zj and zk
+" let g:space_no_folds = 1
+"
+" Disable <Space> for quickfix and location list commands, e.g. :cc, :ll, etc.
+" let g:space_no_quickfix = 1
+
+" It is possible to display the current command assigned to <Space> in the
+" status line using the GetSpaceMovement() function. Here's an example:
+"
+" function! SlSpace()
+" if exists("*GetSpaceMovement")
+" return "[" . GetSpaceMovement() . "]"
+" else
+" return ""
+" endif
+" endfunc
+" set statusline+=%{SlSpace()}
+
+" TODO: Make the mapping assignments more dynamical, and allow user defined
+" commands?
+
+if exists("g:space_debug")
+ let g:space_no_character_movements = 0
+ let g:space_no_search = 0
+ let g:space_no_diff = 0
+ let g:space_no_brace = 0
+ let g:space_no_method = 0
+ let g:space_no_section = 0
+ let g:space_no_folds = 0
+ let g:space_no_quickfix = 0
+ echomsg "Running space.vim in debug mode."
+elseif exists("g:space_loaded")
+ finish
+endif
+let g:loaded_space = 1
+
+noremap <expr> <silent> <Space> <SID>do_space(0, "<Space>")
+noremap <expr> <silent> <S-Space> <SID>do_space(1, "<S-Space>")
+noremap <expr> <silent> <BS> <SID>do_space(1, "<BS>")
+
+" character movement commands
+if !exists("g:space_no_character_movements") || !g:space_no_character_movements
+ noremap <expr> <silent> f <SID>setup_space("char", "f")
+ noremap <expr> <silent> F <SID>setup_space("char", "F")
+ noremap <expr> <silent> t <SID>setup_space("char", "t")
+ noremap <expr> <silent> T <SID>setup_space("char", "T")
+ noremap <expr> <silent> ; <SID>setup_space("char", ";")
+ noremap <expr> <silent> , <SID>setup_space("char", ",")
+endif
+
+" search commands
+if !exists("g:space_no_search") || !g:space_no_search
+ noremap <expr> <silent> * <SID>setup_space("search", "*")
+ noremap <expr> <silent> # <SID>setup_space("search", "#")
+ noremap <expr> <silent> g* <SID>setup_space("search", "g*")
+ noremap <expr> <silent> g# <SID>setup_space("search", "g#")
+ noremap <expr> <silent> n <SID>setup_space("search", "n")
+ noremap <expr> <silent> N <SID>setup_space("search", "N")
+ let s:search_mappings = 1
+else
+ let s:search_mappings = 0
+endif
+
+" diff next/prev
+if !exists("g:space_no_diff") || !g:space_no_diff
+ noremap <expr> <silent> ]c <SID>setup_space("diff", "]c")
+ noremap <expr> <silent> [c <SID>setup_space("diff", "[c")
+endif
+
+" previous/next unmatched ( or [
+if !exists("g:space_no_brace") || !g:space_no_brace
+ noremap <expr> <silent> ]) <SID>setup_space("paren", "])")
+ noremap <expr> <silent> [( <SID>setup_space("paren", "[(")
+
+ noremap <expr> <silent> ]} <SID>setup_space("curly", "]}")
+ noremap <expr> <silent> [{ <SID>setup_space("curly", "[{")
+endif
+
+" start/end of a method
+if !exists("g:space_no_method") || !g:space_no_method
+ noremap <expr> <silent> ]m <SID>setup_space("method_start", "]m")
+ noremap <expr> <silent> [m <SID>setup_space("method_start", "[m")
+
+ noremap <expr> <silent> ]M <SID>setup_space("method_end", "]M")
+ noremap <expr> <silent> [M <SID>setup_space("method_end", "[M")
+endif
+
+" previous/next section or '}'/'{' in the first column
+if !exists("g:space_no_section") || !g:space_no_section
+ noremap <expr> <silent> ]] <SID>setup_space("section_start", "]]")
+ noremap <expr> <silent> [[ <SID>setup_space("section_start", "[[")
+
+ noremap <expr> <silent> ][ <SID>setup_space("section_end", "][")
+ noremap <expr> <silent> [] <SID>setup_space("section_end", "[]")
+endif
+
+if !exists("g:space_no_folds") || !g:space_no_folds
+ noremap <expr> <silent> zj <SID>setup_space("fold_next", "zj")
+ noremap <expr> <silent> zk <SID>setup_space("fold_next", "zk")
+
+ noremap <expr> <silent> ]z <SID>setup_space("fold_start", "]z")
+ noremap <expr> <silent> [z <SID>setup_space("fold_start", "[z")
+endif
+
+
+" quickfix and location list commands
+if !exists("g:space_no_quickfix") || !g:space_no_quickfix
+ cnoremap <expr> <CR> <SID>parse_cmd_line()
+ let s:quickfix_mappings = 1
+else
+ let s:quickfix_mappings = 0
+endif
+
+" TODO: Have all mappings add the remapped sequence to a list, and use that
+" list to remove mappings.
+command! SpaceRemoveMappings call <SID>remove_space_mappings()
+function! s:remove_space_mappings()
+ silent! unmap <Space>
+ silent! unmap <S-Space>
+ silent! unmap <BS>
+
+ silent! unmap f
+ silent! unmap F
+ silent! unmap t
+ silent! unmap T
+ silent! unmap ;
+ silent! unmap ,
+
+ silent! unmap *
+ silent! unmap #
+ silent! unmap g*
+ silent! unmap g#
+ silent! unmap n
+ silent! unmap N
+
+ silent! unmap ]c
+ silent! unmap [c
+
+ silent! unmap [(
+ silent! unmap ])
+ silent! unmap [{
+ silent! unmap ]}
+
+ silent! unmap ]]
+ silent! unmap [[
+ silent! unmap ][
+ silent! unmap []
+
+ silent! unmap ]m
+ silent! unmap [m
+ silent! unmap ]M
+ silent! unmap [M
+
+ silent! unmap zj
+ silent! unmap zk
+ silent! unmap ]z
+ silent! unmap [z
+
+ silent! cunmap <CR>
+
+ silent! unlet g:loaded_space
+endfunction
+
+" TODO: Check if the '\>!\=' part of the pattern fails when 'iskeyword'
+" contains '!'
+" NOTE: Since Vim allows commands like ":'k,'lvim /foo/ *", it's a little
+" tedious to write a perfect regexp.
+let s:qf_re = '\%(' .
+ \ 'mak\%[e]\|' .
+ \ 'v\%[imgrep]\|' .
+ \ 'gr\%[ep]\|' .
+ \ 'c\%(' .
+ \ 'c\|' .
+ \ 'p\%[revious]\|' .
+ \ '[nN]\%[ext]\|' .
+ \ '\(fir\|la\)\%[st]\|' .
+ \ 'r\%[ewind]\|' .
+ \ '\(f\|nf\|Nf\|pf\)\%[ile]' .
+ \ '\)' .
+ \ '\)\>!\='
+
+let s:lf_re = 'l\%(' .
+ \ 'mak\%[e]\|' .
+ \ 'v\%[imgrep]\|' .
+ \ 'gr\%[ep]\|' .
+ \ 'l\|' .
+ \ 'p\%[revious]\|' .
+ \ 'ne\%[xt]\|N\%[ext]\|' .
+ \ '\(fir\|la\)\%[st]\|' .
+ \ 'r\%[ewind]\|' .
+ \ '\(f\|nf\|Nf\|pf\)\%[ile]' .
+ \ '\)\>!\='
+
+function! s:parse_cmd_line()
+ let cmd = getcmdline()
+ let type = getcmdtype()
+
+ if s:search_mappings && (type == '/' || type == '?')
+ return <SID>setup_space("search", cmd)
+ elseif s:quickfix_mappings && type == ':'
+ if cmd =~ s:lf_re
+ return <SID>setup_space("lf", cmd)
+ elseif cmd =~ s:qf_re
+ return <SID>setup_space("qf", cmd)
+ endif
+ end
+ return "\<CR>"
+endfunc
+
+function! s:setup_space(type, command)
+ let cmd = a:command
+ let s:cmd_type = "undefined"
+
+ if a:type == "char"
+ let s:space_move = ";"
+ let s:shift_space_move = ","
+ let s:cmd_type = "hor"
+ if cmd =~ "[;,]$"
+ let cmd = <SID>maybe_open_fold(cmd)
+ endif
+ elseif a:type == "diff"
+ let s:space_move = "]c"
+ let s:shift_space_move = "[c"
+ elseif a:type == "method_start"
+ let s:space_move = "]m"
+ let s:shift_space_move = "[m"
+ let s:cmd_type = "block"
+ let cmd = <SID>maybe_open_fold(cmd)
+ elseif a:type == "method_end"
+ let s:space_move = "]M"
+ let s:shift_space_move = "[M"
+ let s:cmd_type = "block"
+ let cmd = <SID>maybe_open_fold(cmd)
+ elseif a:type == "section_start"
+ let s:space_move = "]]"
+ let s:shift_space_move = "[["
+ let s:cmd_type = "block"
+ let cmd = <SID>maybe_open_fold(cmd)
+ elseif a:type == "section_end"
+ let s:space_move = "]["
+ let s:shift_space_move = "[]"
+ let s:cmd_type = "block"
+ let cmd = <SID>maybe_open_fold(cmd)
+ elseif a:type == "paren"
+ let s:space_move = "])"
+ let s:shift_space_move = "[("
+ let s:cmd_type = "block"
+ let cmd = <SID>maybe_open_fold(cmd)
+ elseif a:type == "curly"
+ let s:space_move = "]}"
+ let s:shift_space_move = "[{"
+ let s:cmd_type = "block"
+ let cmd = <SID>maybe_open_fold(cmd)
+ elseif a:type == "fold_next"
+ let s:space_move = "zj"
+ let s:shift_space_move = "zk"
+ elseif a:type == "fold_start"
+ let s:space_move = "]z"
+ let s:shift_space_move = "[z"
+ elseif a:type == "search"
+ let s:space_move = "n"
+ let s:shift_space_move = "N"
+ let s:cmd_type = "search"
+ let cmd = <SID>maybe_open_fold(cmd)
+ elseif a:type == "qf"
+ let s:space_move = "cn"
+ let s:shift_space_move = "cN"
+ let s:cmd_type = "quickfix"
+ let cmd = <SID>maybe_open_fold(cmd)
+ elseif a:type == "lf"
+ let s:space_move = "lne"
+ let s:shift_space_move = "lN"
+ let s:cmd_type = "quickfix"
+ let cmd = <SID>maybe_open_fold(cmd)
+ endif
+ call <SID>debug_msg("setup_space(type = " . a:type .
+ \ ", command = " . cmd . ")")
+ return cmd
+endfunc
+
+function! s:do_space(shift, default)
+ " <Space>
+ if a:shift == 0
+ if exists("s:space_move")
+ let cmd = <SID>maybe_open_fold(s:space_move)
+ call <SID>debug_msg("do_space(cmd = " . cmd . ")")
+ else
+ let cmd = a:default
+ endif
+ " <S-Space> and <BS>
+ else
+ if exists("s:shift_space_move")
+ let cmd = <SID>maybe_open_fold(s:shift_space_move)
+ call <SID>debug_msg("do_space(cmd = " . cmd . ")")
+ else
+ let cmd = a:default
+ endif
+ endif
+ return cmd
+endfunc
+
+function! s:maybe_open_fold(cmd)
+ if !exists("g:space_no_foldopen") && &foldopen =~ s:cmd_type
+ " special treatment of :ex commands
+ if s:cmd_type == "quickfix"
+ if getcmdtype() == ':'
+ return "\<CR>zv"
+ else
+ return ":\<C-u>" . (v:count ? v:count : "") . a:cmd . "\<CR>zv"
+ endif
+ " special treatment of /foo and ?foo commands
+ elseif s:cmd_type == "search" && getcmdtype() =~ "[/?]"
+ return "\<CR>zv"
+ else
+ if mode() =~ "[vV]"
+ " NOTE: That this works is probably a bug in vim. Let's hope
+ " it stays that way. ;)
+ return ":\<C-u>normal! gv" . (v:count ? v:count : "")
+ \ . a:cmd . "zv\<CR>"
+ "return a:cmd . "zv"
+ else
+ return a:cmd . "zv"
+ endif
+ endif
+ else
+ if s:cmd_type == "quickfix"
+ if getcmdtype() == ':'
+ return "\<CR>"
+ else
+ return ":\<C-u>" . (v:count ? v:count : "") . a:cmd . "\<CR>"
+ endif
+ elseif s:cmd_type == "search" && getcmdtype() =~ "[/?]"
+ return "\<CR>"
+ else
+ return a:cmd
+ endif
+ endif
+endfunc
+
+function! s:debug_msg(string)
+ if exists("g:space_debug")
+ echomsg a:string
+ endif
+endfunc
+
+function! GetSpaceMovement()
+ if exists("s:space_move")
+ return s:space_move
+ else
+ return ""
+ end
+endfunc
+
+" vim: et sts=4 sw=4
181 test/tests.txt
@@ -0,0 +1,181 @@
+= Quick test
+ = normal (+folded/-folded)
+ + f<Space><S-Space>
+ + /foo<CR><Space><S-Space>
+ + n<Space><S-Space>
+ + ]}<Space><S-Space>
+ + ]m<Space><S-Space>
+ + ]]<Space><S-Space>
+ + zj<Space><S-Space>
+ + [z<Space><S-Space>
+ + :cc<CR><Space><S-Space>
+ + :ll<CR><Space><S-Space>
+ = visual (-folded)
+ + f<Space><S-Space>
+ + /foo<CR><Space><S-Space>
+ + n<Space><S-Space>
+ + ]}<Space><S-Space>
+ + ]m<Space><S-Space>
+ + ]]<Space><S-Space>
+ + zj<Space><S-Space>
+ + [z<Space><S-Space>
+ = visual (+folded)
+ / /foo<CR><Space><S-Space>
+ + n<Space><S-Space>
+ + ]m<Space><S-Space>
+ + ]]<Space><S-Space>
+ + zj<Space><S-Space>
+ = normal (no foldopen)
+ + f<Space><S-Space>
+ + /foo<CR><Space><S-Space>
+ + n<Space><S-Space>
+ + ]}<Space><S-Space>
+ + ]m<Space><S-Space>
+ + ]]<Space><S-Space>
+ + zj<Space><S-Space>
+ + [z<Space><S-Space>
+ + :cc<CR><Space><S-Space>
+ + :ll<CR><Space><S-Space>
+ = visual (no foldopen)
+ + /foo<CR><Space><S-Space>
+ + n<Space><S-Space>
+ + ]m<Space><S-Space>
+ + ]]<Space><S-Space>
+ + zj<Space><S-Space>
+ + [z<Space><S-Space>
+
+= Test normal mode mappings
+ + f
+ + F
+ + t
+ + T
+ + ;
+ + ,
+ + *
+ + g*
+ + #
+ + g#
+ + /
+ + ?
+ + n
+ + N
+ + ]c
+ + [c
+ + ])
+ + [(
+ + ]}
+ + [{
+ + ]m
+ + [m
+ + ]M
+ + [M
+ + ]]
+ + [[
+ + ][
+ + []
+
+= Test visual mode mappings
+ + f
+ + F
+ + t
+ + T
+ + ;
+ + ,
+ + *
+ + g*
+ + #
+ + g#
+ + /
+ + ?
+ + n
+ + N
+ + ]c
+ + [c
+ + ])
+ + [(
+ + ]}
+ + [{
+ + ]m
+ + [m
+ + ]M
+ + [M
+ + ]]
+ + [[
+ + ][
+ + []
+
+= Test quickfix and location list commands
+ + :cc
+ + :cp
+ + :cN
+ + :cn
+ + :cfir
+ + :cla
+ + :cr
+ - :cf
+ + :cnf
+ + :cNf
+ + :cpf
+ + :ll
+ + :lp
+ + :lN
+ + :lne
+ + :lfir
+ + :lla
+ + :lr
+ - :lf
+ + :lnf
+ + :lNf
+ + :lpf
+
+= Test folding
+" set foldopen=hor,search,block,quickfix
+ + f hor
+ + F hor
+ + t hor
+ + T hor
+ + ; hor
+ + , hor
+ + * search
+ + g* search
+ + # search
+ + g# search
+ / / search
+ / ? search
+ + n search
+ + N search
+ + ]) block
+ + [( block
+ + ]} block
+ + [{ block
+ + ]m block
+ + [m block
+ + ]M block
+ + [M block
+ + ]] block
+ + [[ block
+ + ][ block
+ + [] block
+ + :cc qf
+ + :cp qf
+ + :cN qf
+ + :cn qf
+ + :cfir qf
+ + :cla qf
+ + :cr qf
+ + :ll qf
+ + :lp qf
+ + :lN qf
+ + :lne qf
+ + :lfir qf
+ + :lla qf
+ + :cr qf
+
+= Test count
+ - 4fx
+ - 4n
+ - 4/foo
+ - :4cn
+ - etc
+ - 4<Space>
+ - :4lvim //

0 comments on commit 6391c77

Please sign in to comment.