sponsor Vim development Vim logo Vim Book Ad

popup_it : a easy config auto complete popup

 script karma  Rating 38/11, Downloaded by 698  Comments, bugs, improvements  Vim wiki

created by
777 us
 
script type
utility
 
description
a easy config auto complete popup plugin

"             You can put a user auto popup table in you .vimrc like this:
"             let useTable[filetype] = [[auto_exec_complete1, key_word], ...]
"
"             This is a example for c file.
"             let usrTable = {}
"             let usrTable["c"] = [
"                         \ ["\<c-x>\<c-o>",'\k.','\k->',
"                         \ 'gtk_\k\{2,\}','GTK_\k\{1,\}','Gtk\k\{1,\}',
"                         \ 'g_\k\{2,\}', 'G_\k\{1,\}'],
"                         \ ["\<c-n>",'\k\{3,\}'],
"                         \]
"             When you type . -> gtk_(>2char) GTK_(>1char) Gtk_(>1char)
"             g_(>2char) G_(>1char) than <c-x><c-o> exec.
"             When you type >3char <c-n> exec.

Blow is default auto popup table
"defTable: {{{1
let s:defTable = {}
let s:defTable["*"]    = [
            \ ["\<c-n>",'\k\{3,\}']
            \]
let s:defTable["c"]    = [
            \ ["\<c-x>\<c-o>",'\k.','\k->'],
            \ ["\<c-n>",'\k\{3,\}'],
            \]
let s:defTable["tex"]  = [
            \ ["\<c-n>",'\\\k\{2,\}','\([\|{\)\.\*\k\{2,\}'],
            \]
let s:defTable["html"] = [
            \ ["\<c-x>\<c-o>",'<','</','<\.\*\s\+\k','<\.\*\k\+\s\*="\k'],
            \]

 
install details
Put this file in your VIM plugin dir  
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
popup_it.vim 01 2009-03-14 6.0 777 us Initial upload
ip used for rating: 3.12.161.77

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github