mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	| @@ -2576,9 +2576,9 @@ assert_false({actual} [, {msg}])				*assert_false()* | |||||||
| 		"Expected False but got {actual}" is produced. | 		"Expected False but got {actual}" is produced. | ||||||
|  |  | ||||||
| assert_inrange({lower}, {upper}, {actual} [, {msg}])	 *assert_inrange()* | assert_inrange({lower}, {upper}, {actual} [, {msg}])	 *assert_inrange()* | ||||||
| 		This asserts number values.  When {actual}  is lower than | 		This asserts number and |Float| values.  When {actual}  is lower | ||||||
| 		{lower} or higher than {upper} an error message is added to | 		than {lower} or higher than {upper} an error message is added | ||||||
| 		|v:errors|. | 		to |v:errors|.  Also see |assert-return|. | ||||||
| 		When {msg} is omitted an error in the form | 		When {msg} is omitted an error in the form | ||||||
| 		"Expected range {lower} - {upper}, but got {actual}" is | 		"Expected range {lower} - {upper}, but got {actual}" is | ||||||
| 		produced. | 		produced. | ||||||
| @@ -4631,7 +4631,7 @@ gettabinfo([{arg}])					*gettabinfo()* | |||||||
| 			tabnr		tab page number. | 			tabnr		tab page number. | ||||||
| 			variables	a reference to the dictionary with | 			variables	a reference to the dictionary with | ||||||
| 					tabpage-local variables | 					tabpage-local variables | ||||||
| 			windows		List of |window-ID|s in the tag page. | 			windows		List of |window-ID|s in the tab page. | ||||||
|  |  | ||||||
| gettabvar({tabnr}, {varname} [, {def}])				*gettabvar()* | gettabvar({tabnr}, {varname} [, {def}])				*gettabvar()* | ||||||
| 		Get the value of a tab-local variable {varname} in tab page | 		Get the value of a tab-local variable {varname} in tab page | ||||||
|   | |||||||
| @@ -944,6 +944,11 @@ can sometimes be slow, thus it timeouts after 150 msec.  If you notice the | |||||||
| indenting isn't correct, you can set a larger timeout in msec: > | indenting isn't correct, you can set a larger timeout in msec: > | ||||||
| 	let g:pyindent_searchpair_timeout = 500 | 	let g:pyindent_searchpair_timeout = 500 | ||||||
|  |  | ||||||
|  | If looking back for unclosed parenthesis is still too slow, especially during | ||||||
|  | a copy-paste operation, or if you don't need indenting inside multi-line | ||||||
|  | parentheses, you can completely disable this feature: > | ||||||
|  | 	let g:pyindent_disable_parentheses_indenting = 1 | ||||||
|  |  | ||||||
|  |  | ||||||
| R								*ft-r-indent* | R								*ft-r-indent* | ||||||
|  |  | ||||||
|   | |||||||
| @@ -155,6 +155,20 @@ commands in CTRL-X submode				*i_CTRL-X_index* | |||||||
| |i_CTRL-X_s|		CTRL-X s	spelling suggestions | |i_CTRL-X_s|		CTRL-X s	spelling suggestions | ||||||
| {not available when compiled without the |+insert_expand| feature} | {not available when compiled without the |+insert_expand| feature} | ||||||
|  |  | ||||||
|  | commands in completion mode (see |popupmenu-keys|) | ||||||
|  |  | ||||||
|  | |complete_CTRL-E| CTRL-E	stop completion and go back to original text | ||||||
|  | |complete_CTRL-Y| CTRL-Y	accept selected match and stop completion | ||||||
|  | 		CTRL-L		insert one character from the current match | ||||||
|  | 		<CR>		insert currently selected match | ||||||
|  | 		<BS>		delete one character and redo search | ||||||
|  | 		CTRL-H		same as <BS> | ||||||
|  | 		<Up>		select the previous match | ||||||
|  | 		<Down>		select the next match | ||||||
|  | 		<PageUp>	select a match several entries back | ||||||
|  | 		<PageDown>	select a match several entries forward | ||||||
|  | 		other		stop completion and insert the typed character | ||||||
|  |  | ||||||
| ============================================================================== | ============================================================================== | ||||||
| 2. Normal mode						*normal-index* | 2. Normal mode						*normal-index* | ||||||
|  |  | ||||||
| @@ -839,6 +853,17 @@ tag		char	      note action in Normal mode	~ | |||||||
| |z<Left>|	z<Left>		   same as "zh" | |z<Left>|	z<Left>		   same as "zh" | ||||||
| |z<Right>|	z<Right>	   same as "zl" | |z<Right>|	z<Right>	   same as "zl" | ||||||
|  |  | ||||||
|  | ============================================================================== | ||||||
|  | 2.6 Operator-pending mode			*operator-pending-index* | ||||||
|  |  | ||||||
|  | These can be used after an operator, but before a {motion} has been entered. | ||||||
|  |  | ||||||
|  | tag		char		action in Insert mode	~ | ||||||
|  | ----------------------------------------------------------------------- | ||||||
|  | |o_v|		v		force operator to work characterwise | ||||||
|  | |o_V|		V		force operator to work linewise | ||||||
|  | |o_CTRL-V|	CTRL-V		force operator to work blockwise | ||||||
|  |  | ||||||
| ============================================================================== | ============================================================================== | ||||||
| 3. Visual mode						*visual-index* | 3. Visual mode						*visual-index* | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1880,6 +1880,9 @@ A jump table for the options with a short description can be found at |Q_op|. | |||||||
| 		context:{n}	Use a context of {n} lines between a change | 		context:{n}	Use a context of {n} lines between a change | ||||||
| 				and a fold that contains unchanged lines. | 				and a fold that contains unchanged lines. | ||||||
| 				When omitted a context of six lines is used. | 				When omitted a context of six lines is used. | ||||||
|  | 				When using zero the context is actually one, | ||||||
|  | 				since folds require a line in between, also | ||||||
|  | 				for a deleted line. | ||||||
| 				See |fold-diff|. | 				See |fold-diff|. | ||||||
|  |  | ||||||
| 		iblank		Ignore changes where lines are all blank.  Adds | 		iblank		Ignore changes where lines are all blank.  Adds | ||||||
|   | |||||||
| @@ -1201,7 +1201,7 @@ x	A single character, with no special meaning, matches itself | |||||||
| \%u20AC	Matches the character specified with up to four hexadecimal | \%u20AC	Matches the character specified with up to four hexadecimal | ||||||
| 	characters. | 	characters. | ||||||
| \%U1234abcd	Matches the character specified with up to eight hexadecimal | \%U1234abcd	Matches the character specified with up to eight hexadecimal | ||||||
| 	characters. | 	characters, up to 0x7fffffff | ||||||
|  |  | ||||||
| ============================================================================== | ============================================================================== | ||||||
| 7. Ignoring case in a pattern					*/ignorecase* | 7. Ignoring case in a pattern					*/ignorecase* | ||||||
|   | |||||||
| @@ -103,6 +103,8 @@ gn			Search forward for the last used search pattern, like | |||||||
| 			E.g., "dgn" deletes the text of the next match. | 			E.g., "dgn" deletes the text of the next match. | ||||||
| 			If Visual mode is active, extends the selection | 			If Visual mode is active, extends the selection | ||||||
| 			until the end of the next match. | 			until the end of the next match. | ||||||
|  | 			Note: Unlinke `n` the search direction does not depend | ||||||
|  | 			on the previous search command. | ||||||
|  |  | ||||||
| 								*gN* *v_gN* | 								*gN* *v_gN* | ||||||
| gN			Like |gn| but searches backward, like with `N`. | gN			Like |gn| but searches backward, like with `N`. | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
| " Language:		Python | " Language:		Python | ||||||
| " Maintainer:		Bram Moolenaar <Bram@vim.org> | " Maintainer:		Bram Moolenaar <Bram@vim.org> | ||||||
| " Original Author:	David Bustos <bustos@caltech.edu> | " Original Author:	David Bustos <bustos@caltech.edu> | ||||||
| " Last Change:		2013 Jul 9 | " Last Change:		2019 Feb 21 | ||||||
|  |  | ||||||
| " Only load this indent file when no other was loaded. | " Only load this indent file when no other was loaded. | ||||||
| if exists("b:did_indent") | if exists("b:did_indent") | ||||||
| @@ -53,58 +53,68 @@ function GetPythonIndent(lnum) | |||||||
|     return 0 |     return 0 | ||||||
|   endif |   endif | ||||||
|  |  | ||||||
|   " searchpair() can be slow sometimes, limit the time to 100 msec or what is |  | ||||||
|   " put in g:pyindent_searchpair_timeout |  | ||||||
|   let searchpair_stopline = 0 |  | ||||||
|   let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150) |  | ||||||
|  |  | ||||||
|   " If the previous line is inside parenthesis, use the indent of the starting |  | ||||||
|   " line. |  | ||||||
|   " Trick: use the non-existing "dummy" variable to break out of the loop when |  | ||||||
|   " going too far back. |  | ||||||
|   call cursor(plnum, 1) |   call cursor(plnum, 1) | ||||||
|   let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', |  | ||||||
| 	  \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" |   " Identing inside parentheses can be very slow, regardless of the searchpair() | ||||||
| 	  \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" |   " timeout, so let the user disable this feature if he doesn't need it | ||||||
| 	  \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", |   let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0) | ||||||
| 	  \ searchpair_stopline, searchpair_timeout) |  | ||||||
|   if parlnum > 0 |   if disable_parentheses_indenting == 1 | ||||||
|     let plindent = indent(parlnum) |  | ||||||
|     let plnumstart = parlnum |  | ||||||
|   else |  | ||||||
|     let plindent = indent(plnum) |     let plindent = indent(plnum) | ||||||
|     let plnumstart = plnum |     let plnumstart = plnum | ||||||
|   endif |   else | ||||||
|  |     " searchpair() can be slow sometimes, limit the time to 150 msec or what is | ||||||
|  |     " put in g:pyindent_searchpair_timeout | ||||||
|  |     let searchpair_stopline = 0 | ||||||
|  |     let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150) | ||||||
|  |  | ||||||
|  |     " If the previous line is inside parenthesis, use the indent of the starting | ||||||
|  |     " line. | ||||||
|  |     " Trick: use the non-existing "dummy" variable to break out of the loop when | ||||||
|  |     " going too far back. | ||||||
|  |     let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', | ||||||
|  |             \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" | ||||||
|  |             \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" | ||||||
|  |             \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", | ||||||
|  |             \ searchpair_stopline, searchpair_timeout) | ||||||
|  |     if parlnum > 0 | ||||||
|  |       let plindent = indent(parlnum) | ||||||
|  |       let plnumstart = parlnum | ||||||
|  |     else | ||||||
|  |       let plindent = indent(plnum) | ||||||
|  |       let plnumstart = plnum | ||||||
|  |     endif | ||||||
|  |  | ||||||
|   " When inside parenthesis: If at the first line below the parenthesis add |     " When inside parenthesis: If at the first line below the parenthesis add | ||||||
|   " two 'shiftwidth', otherwise same as previous line. |     " two 'shiftwidth', otherwise same as previous line. | ||||||
|   " i = (a |     " i = (a | ||||||
|   "       + b |     "       + b | ||||||
|   "       + c) |     "       + c) | ||||||
|   call cursor(a:lnum, 1) |     call cursor(a:lnum, 1) | ||||||
|   let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', |     let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', | ||||||
| 	  \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" |             \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" | ||||||
| 	  \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" |             \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" | ||||||
| 	  \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", |             \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", | ||||||
| 	  \ searchpair_stopline, searchpair_timeout) |             \ searchpair_stopline, searchpair_timeout) | ||||||
|   if p > 0 |     if p > 0 | ||||||
|     if p == plnum |       if p == plnum | ||||||
|       " When the start is inside parenthesis, only indent one 'shiftwidth'. |         " When the start is inside parenthesis, only indent one 'shiftwidth'. | ||||||
|       let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', |         let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', | ||||||
| 	  \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" |             \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" | ||||||
| 	  \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" |             \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" | ||||||
| 	  \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", |             \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", | ||||||
| 	  \ searchpair_stopline, searchpair_timeout) |             \ searchpair_stopline, searchpair_timeout) | ||||||
|       if pp > 0 |         if pp > 0 | ||||||
| 	return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) |           return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) | ||||||
|  |         endif | ||||||
|  |         return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) | ||||||
|       endif |       endif | ||||||
|       return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) |       if plnumstart == p | ||||||
|  |         return indent(plnum) | ||||||
|  |       endif | ||||||
|  |       return plindent | ||||||
|     endif |     endif | ||||||
|     if plnumstart == p |  | ||||||
|       return indent(plnum) |  | ||||||
|     endif |  | ||||||
|     return plindent |  | ||||||
|   endif |   endif | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Justin M. Keyes
					Justin M. Keyes