-
Notifications
You must be signed in to change notification settings - Fork 6
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
Need instructions for "Configurable to support international variations in quotation marks" #21
Comments
I use |
Hi Caleb. Thanks for the comment. Just an FYI, I got something working; I found this mapping on an old 2011 forum post. function! LanguageSettings()
if &spelllang =~ 'fr'
set keymap=french
:imap <expr> " getline('.')[col('.')-2]=~'\S' ? ' »' : '« '
:imap <expr> ' getline('.')[col('.')-2]=~'\S' ? ' »' : '« '
elseif &spelllang =~ 'en'
:silent! iunmap "
:silent! iunmap '
endif
endfunction To complete this in my French keymap, I have the mappings for the question mark and exclamation mark including the nonbreakable space which also works fine:
My only issue now is I can't seem to get everything in one place. The keymap file doesn't seem to support an expression as with imap. And if I try to load the ?! mappings with imap (that include a tab and u-00a0 it totally hangs my terminal. Anyways it is possible now for me to painlessly type in French with my favorite editor! |
I think that this is out of scope for this plugin. I'd like to close the issue with a pointer to vim-sandwich, /ping @alerque |
I'm not quite sure why this would be out of scope? Or perhaps I misunderstand what the OP wanted. Is the problem just that French quote styles include two characters on each end instead of one? Other than the series of glyphs used what is fundamentally different about what they want to accomplish? |
Sorry, I wasn't clear. By "out of scope," I meant that I didn't think that we would implement this directly in the plugin itself. On the README, we offer advice about non-English quote characters, but I didn't think that we would ever directly implement them in the plugin. (We could, but so far nobody seems to have taken on that work.) That said, I was mostly trying to clean up the issues that seemed stale to me. If you want to leave this open to gather other suggestions or as a note for a future enhancement, that makes sense too. |
In French also there is a non breakable space between the quote mark and text.
I just tried as a test to put u00a0 twice between the french quotes as below but it did' work.
autocmd FileType *.adoc call textobj#quote#init({ 'double':'« »', 'single':'«»', 'educate': 1 })
Can textobj help me out here? Or any other suggestions?
The text was updated successfully, but these errors were encountered: