The block movement commands, for eg. moveblock_n, moveblock_N, etc., treat type annotation Function as if it were the start of a new function, and so on (if the user has set ignorecase on). Moving with ]] (or [[, etc.) through
"""
"""
function findlast(testf::Function, A)
for (i, a) in Iterators.reverse(pairs(A))
testf(a) && return i
end
return nothing
end
findlast(testf::Function, A::Union{AbstractArray, AbstractString}, b::Begin) =
findprev(testf, A, last(keys(A)))
with the cursor originally at the top, the cursor will stop at four points: first (correctly) at the beginning of function findlast, then at the Function annotation of the testf argument, then at the next Function annotation and then at the Begin type annotation (that I made up for this illustration).
I think this happens because these movements ultimately call moveto_block_delim (in autoload/julia_blocks.vim), and that uses the search function to look for the block starting keywords. And according to Vim documentation, "'ignorecase', 'smartcase' and 'magic' are used" by search automatically.
A fix should be to save the user's ignorecase preference, set noignorecase before the search and searchpair calls in this file (and other files if any), and then restore the original ignorecase preference.
The block movement commands, for eg.
moveblock_n
,moveblock_N
, etc., treat type annotationFunction
as if it were the start of a new function, and so on (if the user hasset ignorecase
on). Moving with]]
(or[[
, etc.) throughwith the cursor originally at the top, the cursor will stop at four points: first (correctly) at the beginning of
function findlast
, then at theFunction
annotation of thetestf
argument, then at the nextFunction
annotation and then at theBegin
type annotation (that I made up for this illustration).I think this happens because these movements ultimately call
moveto_block_delim
(inautoload/julia_blocks.vim
), and that uses thesearch
function to look for the block starting keywords. And according to Vim documentation, "'ignorecase', 'smartcase' and 'magic' are used" bysearch
automatically.A fix should be to save the user's
ignorecase
preference, setnoignorecase
before thesearch
andsearchpair
calls in this file (and other files if any), and then restore the originalignorecase
preference.