Listing of vim options by context, not alphabetical - vim

When I do :help options, it gives me an alphabetical list of all options that can be used with set. However, it is hard to tell which options are for which context.
Is there any documentation out there that shows vim options sorted by context, like display, paths/cwd, shortcuts, etcetera?

No list is authoritative, but you may want have a look at :options command. It creates a temporary "interactive" buffer with many options / descriptions / values sorted by topic.

Related

Modify file sort by name in vim netrw plugin (old version) in Cygwin?

Due to security, tight control of user rights, and understaffed IT, I have very limited opportunities to upgrade my Cygwin installation. I am using netrw version v149 plugin for vim, which sorts files like so:
20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip
20181217.1904.zip*
I find this odd, since bash lists the files like so:
20181217.1904.zip*
20181217.1904+20190101.1954.zip*
20181217.1904+20190102.1731.zip
In both cases, the sort is by file name, in ascending order. However, the netrw sort seems to treat the "+" character as preceding ".", while the reverse is true in the bash sort.
I find the latter to be much more useful, and wonder how it is that the plugin is using a different character precedence. Is there a simple and pain-free way to get the second sorting scheme in netrw v.149?
This can be done. Like open say the directory which contains these files in vim. Then:
Use the r key to set Reverse sorting order.
Then press the s key to sort using a particular style : by name, time or file size.
Hope this helps you somehow mate.
EDIT : If you want to persist say the reverse order and the particular style all the time, then add these to your vim config file :
let g:netrw_sort_by="time" "this chooses the style of sorting
let g:netrw_sort_direction="reverse" "this persists reverse sorting

How to make vim show search result list dynamically while :tj SomeSymbol is being typing?

all. I know after generating a tag file, when I use :tj SomeSymbol, I can either jump to the expected location when SomeSymbol is unique within the project, or be given a list to choose. But I want more convenient way.
When I'm typing :tj SomeSymbol, I wish there's a popup menu showing all possible locations as if vim was searching the tag file for the expected symbol. In this way I can choose quickly and conveniently.
The final effect I want may be like what qtcreator gives:
So is there any way to do this ?
There is nothing built-in. Vim's completion popup menu currently can only be used for selecting candidate matches to be inserted into the text; it's not a general-purpose selector / filter. For tags, Vim only offers the selection by number as in the :tselect / :tjump commands. However, some plugins have implemented custom filtering (often in combination with fuzzy matching for easy drill-down into the candidate lists). I still use FuzzyFinder, which (though unmaintained for quite some time) offers (among others) a :FufTag command that lets you interactively select from tag matches.

Order vimrc options by occurence in VIM doc

I'm struggling to order considerable amount of miscellaneous options in my .vimrc file.
Somewhere I saw an idea to order the .vimrc file by the order in which options are described in the VIM documentation.
So I wonder, is there any way to do this more or less automatically?
I, too, don't really get what you are after or why you would want it but you can certainly group and sort all your set ... lines together.
First, move your cursor on the first line with:
gg
Then, mark the current line with:
ma
Then, group all your set ... instructions together at the top of the file with:
:g/^set/m0
Then, order them alphabetically with:
:.'a-sort
As for doing it "more or less automatically", pay attention to what you are doing instead.

Vim Autocomplete Menu Format

When I'm using Autocompletion in Vim, it doesn't just show the words, it shows information to the right of it:
For me it's not important where the matches are coming from (in this case, it's the path to the dictionary file). As you can see, the paths form a block of text that really distracts from the matches...Is there a way to just show the matching words?
I'm using Vim's builtin complete features, no YCM/neocomplcache/...
I'm not aware of any way to turn that off, other than completely turning off the completion popup menu with :set completeopt-=menu; this will insert one candidate after the other on <C-N>, so you're losing the overview altogether.
When you're writing a custom completion (see :help complete-functions), you can influence / suppress the additional information; it's the menu attribute of the returned match objects. So you could in theory re-implement the dictionary completion in Vimscript, but I'd advise against that, because it will be cumbersome and probably also much slower.
So, unless you have a lot of energy to write and submit a patch (e.g. a new option to turn that off, or restrict to a certain length), it's best to accept this as a fact and learn to focus on the first column.

How to merge completion candidates for vim?

I often rely on omni-completion to edit source codes, so my current .vimrc contains following setting to gain quick access to intended candidates:
inoremap <C-f> <C-x><C-o>
Now I find there are many kinds of ins-completions except for omni-completion and become interested to use both tags and file names completions too.
1. Whole lines i_CTRL-X_CTRL-L
2. keywords in the current file i_CTRL-X_CTRL-N
3. keywords in 'dictionary' i_CTRL-X_CTRL-K
4. keywords in 'thesaurus', thesaurus-style i_CTRL-X_CTRL-T
5. keywords in the current and included files i_CTRL-X_CTRL-I
6. tags i_CTRL-X_CTRL-]
7. file names i_CTRL-X_CTRL-F
8. definitions or macros i_CTRL-X_CTRL-D
9. Vim command-line i_CTRL-X_CTRL-V
10. User defined completion i_CTRL-X_CTRL-U
11. omni completion i_CTRL-X_CTRL-O
12. Spelling suggestions i_CTRL-X_s
13. keywords in 'complete' i_CTRL-N*emphasized text*
The question is, how can I list up whole candidates from these specific completion sources on a ins-complete-menu with single command, <C-f>.
Use the default completion (CTRL-N / CTRL-P); its completion sources can be configured via the 'complete' option. Unfortunately, from your list, only tags (not file names) can be (and is by default) included in there. (But don't you know beforehand that you want file completion? I particularly like the many different completion commands because they narrow down the result list, which for me is far more valuable than not having to think about which completion to invoke.)
If you really want an all-encompassing completion, you'd have to implement that yourself as a user-completion, and you'd have to re-implement all the built-in sources, as there currently is no way to programmatically get them.
You should check the plugin neocomplcache. It can acomplish this but the setting may not be trivial.

Resources