Add javascript support by ayang · Pull Request #2 · vim-scripts/AutoComplPop · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README
6 changes: 6 additions & 0 deletions autoload/acp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ function acp#meetsForPythonOmni(context)
\ a:context =~ '\k\.\k\{' . g:acp_behaviorPythonOmniLength . ',}$'
endfunction

"
function acp#meetsForJavascriptOmni(context)
return g:acp_behaviorJavascriptOmniLength >= 0 &&
\ a:context =~ '\k\.\k\{' . g:acp_behaviorJavascriptOmniLength . ',}$'
endfunction

"
function acp#meetsForPerlOmni(context)
return g:acp_behaviorPerlOmniLength >= 0 &&
Expand Down
8 changes: 8 additions & 0 deletions doc/acp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ default behavior is as follows:
Omni ruby ".", "::" or non-word character + ":"
(|+ruby| required.)
Omni python "." (|+python| required.)
Omni javascript "." (|+javascript| required)
Omni xml "<", "</" or ("<" + non-">" characters + " ")
Omni html/xhtml "<", "</" or ("<" + non-">" characters + " ")
Omni css (":", ";", "{", "^", "@", or "!")
Expand Down Expand Up @@ -223,6 +224,13 @@ OPTIONS *acp-options*
<
Length of keyword characters before the cursor, which are needed to
attempt python omni-completion. If negative value, this completion
will be never attempted.

*g:acp_behaviorJavascriptOmniLength* >
let g:acp_behaviorJavascriptOmniLength = 0
<
Length of keyword characters before the cursor, which are needed to
attempt javascript omni-completion. If negative value, this completion
will be never attempted.

*g:acp_behaviorPerlOmniLength* >
Expand Down
8 changes: 8 additions & 0 deletions plugin/acp.vim