Loading ...
Sorry, an error occurred while loading the content.
 

Re: completely BASH in vi

Expand Messages
  • Oliver Stieber
    Hi, sorry I bothered you. found SuperTab http://www.vim.org/scripts/script.php?script_id=1643 so will take a look at it first. ... -- You received this message
    Message 1 of 4 , Aug 29, 2010
      Hi,
      sorry I bothered you.
      found SuperTab http://www.vim.org/scripts/script.php?script_id=1643 so will take a look at it first.

      On Mon, Aug 30, 2010 at 5:04 AM, Oliver Stieber <oliverthered@...> wrote:
      TAB in BASH does a little more than that, in that it's (often) specific about what it looks up dependant on the command and the previous arguments.

      so taking FSTAB as a (bad?) example:
      The first entry can be a number of things dependant on the types of filing system available.

      The next is a filing system mount point, so a directory

      The next is a type so one of cat /proc/filesystems

      The next is a number of switches to mount

      etc...

      in bash if I type ls -- then TAB it gives me a list of arguments, if I type ls then / is gives me something on the filing system.

      I'll take a look at ins-completion, I was wondering more if there's a generic way to represent a well formatted file layout and what's expected where. I know there are things like c-tags about.


      On Mon, Aug 30, 2010 at 4:13 AM, Ben Fritz <fritzophrenic@...> wrote:


      On Aug 28, 6:21 am, Oliver Stieber <oliverthe...@...> wrote:
      > Hi,
      > I've just sudo mounted my hard drive to get my music off of it, and then vi
      > /etc/fstab so that it come up at boot time.
      > and I had the urge to hit tab to complete the entries in the fstba file as I
      > do with bash or many other things.
      >
      > so then I thought, well if bash already has this feature, how hard would it
      > be to write an extension to vi, so that vi can look at some templates that
      > define completion equivalences for various configuration files or whatever.
      >

      If I understand what you're saying, in this specific case you were
      looking for filename completion, but also completion in general.

      In Vim, in insert mode, CTRL-X followed by CTRL-F will go into
      filename completion.

      On the command-line, TAB will do this for you.

      If you want other kinds of completion in insert mode, there are
      several. See ins-completion (the entire long section) for details.

      --
      You received this message from the "vim_dev" 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 from the "vim_dev" 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
    Your message has been successfully submitted and would be delivered to recipients shortly.