Friday, February 3, 2017

Re: path autoexpansion (autcompletion) when saving files or changing directories

On Friday, February 3, 2017 at 4:45:06 PM UTC-8, Frank Shute wrote:
> Hi Victoria,
>
> What you want to have a look at is:
>
> :h cmdline-completion
>
> I use:
>
> set wildmode=list
>
> in $MYVIMRC and that seems to do the same job as my shell. i.e I hit tab to
> complete.
>
> HTH.
>
>
> Regards,
>
>
>
> On 4 February 2017 at 00:25, Victoria Stuart wrote:
> > Hello: please forgive me if this is a FAQ; I searched (a lot: Google ...) but Icould not find a solution. I am using neovim 0.1.7 (recent switch from Vim 8.0).
> >
> > Say I want to save a file (:sav) in a different path on my system (Arch Linux); e.g., I am in ~/projects/... , and I want to save it to ~/temp/... or even another mountpoint, such as /mnt/another_drive/...
> >
> > I find myself having to know/manually type the complete path; I don't have auto-completion, as in a bash terminal.
> >
> > Likewise, if in Vim (nvim) I want to :cd, again I have to manuallt type the path (no autocompletion).
> >
> > FYI, I have the NerdTREE and SuperTab plugins installed, if that helps. Thanks, appreciated!
> >
> > --
> > --
> > You received this message from the "vim_use" maillist.
> > Do not top-post! Type your reply below the text you are replying to.
> > For more information, visit http://www.vim.org/maillist.php
> >
> > ---
> > You received this message because you are subscribed to the Google Groups "vim_use" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
> Frank

Hi; thank you very much for your reply -- appreciated!

OK: I'm missing something obvious, or there is a problem with my ~/.vimrc (that I am also using with nvim. Note however that I had the identical issue in Vim, and this path expansion never worked, for me.

I have these lines in .vimrc,

set wildmode=longest,list,full
set wildmenu

and I read the "cmdline-completion" help. When I try that tab completion; e.g.

:sav <tab>

or <shift-tab>, etc. as suggested in that helpfile, the only autocomplete suggestions offered are a text files that exist at the root level of that current working path; e.g.

untitled " a plain-text file on /mnt/Vancouver

or

new " a plain-text file on ~/ [/home/victoria/]
new2 " ditto ...
new3
new4
new5

If I try, e.g., to autocomplete anything else, i.e.

:sav ~/pro <tab> " intending to autocomplete to ~/projects/

I get nothing, at all. Ditto (e.g.) for

:sav /mnt/Vanc <tab> " intending to autocomplete to /mnt/Vancouver/

In fact, at system root [ / ] level

:sav / <tab> only gives a few, odd suggestions:

kdeinit5__0
klauncherXM2012...
klauncherXM5301...
swapfile

I should also have mentioned that I have the FZF (fuzzy completion) plugin installed, as well -- though I had this issue even before I installed that beast (in part, to address this issue). Anyway, the mappings for those fzf completions involve Ctrl-X or <leader> bindings (not plain <tab>, <Shift-tab>, etc.).

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: