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

Whole line completion using tags file

Expand Messages
  • Leandro Adamson
    Hi, I d like to use Ctrl+X Ctrl+L to autocomplete whole lines that are in tag files. C+X C+L works for completing lines in the same buffer, Ctrl +N works for
    Message 1 of 1 , Dec 30, 2011
      Hi,

      I'd like to use Ctrl+X Ctrl+L to autocomplete whole lines that are in
      tag files. C+X C+L works for completing lines in the same buffer, Ctrl
      +N works for completing keywords in tag files, and Ctrl+] works for
      completing single tags, but I can't get C+X C+L to complete lines that
      are in tag files.

      The help for 'complete' says:

      This option specifies how keyword completion |ins-completion|
      works
      when CTRL-P or CTRL-N are used. It is also used for whole-
      line
      completion |i_CTRL-X_CTRL-L|. It indicates the type of
      completion
      and the places to scan. It is a comma separated list of
      flags:
      . scan the current buffer ('wrapscan' is ignored)
      [...]
      ] tag completion
      t same as "]

      So it seems like what I want should be possible. The default value of
      'complete' is ".,w,b,u,t,i" and so includes 't'. And unless I'm more
      than slightly crazy I believe C+X C+L has been doing whole line
      completion from tag files for me for years and only recently stopped
      working.

      I've tried lots of combinations under my normal user account and fresh
      user accounts, and no luck. Vim 7.2 on Debian Squeeze and Vim 7.1.314
      on Debian Lenny. I'm using ctags-exuberant to generate the tag file,
      and have tried different options with that too. The files being
      tagged are PHP, and I'm not using PHP omni completion. I tried
      creating small tag files from just one subdirectory of code, same
      result. The tag files themselves look ok, and are working for Ctrl+N
      and Ctrl+].

      :set tags=/home/user/tags
      :echo tagfiles()
      ['/home/user/tags']
      :set complete=.,w,b,u,t,i (also tried just 't', and putting 't' in
      the first or second position)

      Any ideas?

      --
      Leandro

      --
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.