Open yakir12 opened 4 years ago
We could add !
(and maybe even @
) to the iskeyword
option, but that makes no distinction between characters used at the beginning or at the end of a word. Therefore something iike !something
would be recognized as a keyword, and something
would not be completed unless it also appeared by itself.
I'm not sure what's the best option here.
In any case if you want to give it a try you can give this command in a julia file:
:setlocal iskeyword+=!,@-@
Trying it out. So yea, it would irritate only when I use a Boolean not on a variable that was predefined in another unopened file (rare-ish), or on some function that wasn't spelled out yet (not so rare). Hmm... Is there a way for me to define this in the vim.rc
/init.vim
file? I want to see how irritating this could be.
I guess you could add this to vimrc/init.vim:
autocmd FileType julia setlocal iskeyword+=!
(now that I think about it adding @
is probably not a good idea since it's not really part of the name...)
Note that this does not only affect completion, but also word movements (e.g. using commands like dw
, ciw
and such), and the functionality of word search with *
/#
(this one is potentially a major drawback in my mind).
Thanks. I'll try it for a while and report back.
(feature) It would be cool if when I tab-complete the name of a mutating function, the exclamation mark with be included: So in this code:
when I write
fu<tab>
I getfun!
instead of justfun
.