Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [dictionary]

Questions relating to the 'dictionary' or 'dict' setting.

4
votes
2answers
62 views

How can I tell vim to ignore spelling errors inside quotes?

If I'm editing a text file with :set spell, is there any way to have vim not check words within the boundaries of certain characters against the word list? I want to be able to write things like ...
2
votes
0answers
16 views

How to omit dictionary source file in dictionary completion

<C-X><C-K> complete words with long dictionary file name, such as /home/xxx/.vim/mydict. I'd like to omit or shorten the descriptive info. I have googled but got no hints. Any advice?
1
vote
1answer
52 views

Is there a Set datatype in VimScript?

I am aware of lists and dictionaries in vim. But are sets supported in VIM to store only unique values? Or do I just have to use a dictionary with some dummy value?
0
votes
2answers
122 views

How to get the specific key in a dictionary using the just the key's value?

Suppose I have a dictionary declared like this: g:dict = { \ 'foo' : ['foobar'], \ 'bar' : ['barfoo'] \} how can I get the key for barfoo using just the value(barfoo) itself?
0
votes
2answers
206 views

How to enable dictionary autocompletion without spell option set

I noticed, that in any source code file, regardless of the programming language, I can use the dictionary autocompletion (Ctrl + x Ctrl+k) if the spell option is set, if it's not, then the editor ...
-1
votes
2answers
291 views

Can add() and insert() be performed on a dictionary?

Can add() and insert() be performed on a dictionary? The help file is unclear on this. If so, what is the correct syntax? If these functions do not work on dictionaries, then how can I add or insert ...
1
vote
2answers
505 views

Filter dict items using list of keys

Give the following dictionary: let mydict = {'foo': {'a': 1, 'b': 2}, 'bar': {'c': 3, 'd': 4}} And a list of keys: let myfilter = ['foo', 'asdf'] How would one do a concise "left outer join (if ...
6
votes
1answer
136 views

When using the dictionary feature in vim, can you make dashes a matching part of a word?

The dictionary feature in vim allows you to use a file (for instance /usr/share/dict/words) and set multiple paths within the dict option to search on. Now the file I'm searching on has several ...