-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special characters for markers? #164
Comments
I was able to manually place a sign with the arrow so it's definitely possible. I'll look into this over the weekend |
Awesome, thanks! |
Thanks for suggesting this feature @dbmrq and agreeing to look into it @kshenoy. I too would really appreciate the ability to use special characters as markers! Please let me know once the feature is implemented so that I can try it out and report back on whether or not it works correctly in Vim 8 and Neovim 0.3.1-dev. |
I looked into this and the code that messes things up is the following in autoload/signature/utils.vim::signature#utils#Input()
The help for It also recommends using I'm trying to figure out how to recognize that something is double-wide in order to increment the index by 1 or if there's a better way of going about it. |
That's really weird that However, this seems to work: function! GetChar(string, position)
let string = a:string
let i = 0
while i < strchars(a:string, 1)
if i == a:position
return strcharpart(string, 0, 1)
else
let string = substitute(string, '.', '', '')
endif
let i += 1
endwhile
endfunction
Edit: Some more background: what makes this possible is that |
Oh, and since the regex pattern seems to work properly, the function can be further simplified to this: function! GetChar(string, pos)
let pattern = '.\{-' . a:pos . '}\(.\).*'
return substitute(a:string, pattern, '\1', '')
endfunction So your code could be changed to this: if match(l:in, '\d') >= 0
let pattern = '.\{-' . l:in . '}\(.\).*'
let l:char = substitute(b:SignatureIncludeMarkers, pattern, '\1', '')
" ... (I didn't test it, but it should work.) |
Hello @kshenoy and @dbmrq! I know that this issue is already closed, but I wanted to report that I have been using the improved version of this plugin for several days with |
@gkapfham No problem, thanks for letting us know. :) |
I just added this to my .vimrc:
Hoping
m0
would give me that little arrow as a marker. But the markers just completely stopped working instead. Is there a reason why some characters aren't allowed as markers?Thanks!
The text was updated successfully, but these errors were encountered: