Giter VIP home page Giter VIP logo

auto-omni's Introduction

Auto Omnicompletion

Instalation

Plug 'BrandonRoehl/auto-omni'
Plugin 'BrandonRoehl/auto-omni'
git clone https://github.com/BrandonRoehl/auto-omni.git ~/.vim/bundle/auto-omni

Configuration

This plugin does exactly that.

inspired by AutoComplPop this plugin will just pop open the omni completion menu in standard vim on key press if the omnifunc is set for that filetype

First just add the plugin to your vimrc

filetype plugin on

" Enable omni for all types and auto set it
" [Recomended]
set omnifunc=syntaxcomplete#Complete

" Enable omni completion per file.
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
" Then set the how the popup behaves
" this plugin sets the default behavior to
set completeopt=noinsert,menuone
" I suggest leaving the noinsert option set otherwise
" the plugin will always insert the first item in the popup

You can manually set the keys that trigger the completion by default all alpha keys will trigger it

# Default keys
let g:auto_omnicomplete_key =
            \ 'a b c d e f g h i j k l m n o p q r s t u v w x y z ' .
            \ 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'

My Setup

set omnifunc=syntaxcomplete#Complete
set completeopt=noinsert,menuone
let g:rubycomplete_buffer_loading=1
let g:rubycomplete_classes_in_global=1
let g:rubycomplete_rails=0
let g:loaded_sql_completion=0
let g:omni_sql_no_default_maps=1

auto-omni's People

Contributors

brandonroehl avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

shsiangg stuqdog

auto-omni's Issues

Enable Tab key only for hint window

The plugin creates a shortcut for the Tab key, to select the appropriate suggestion for autocompletion. This function overrides using the tab key in insert mode for another function.

imap <Tab> <c-o>: echo "here"

The above does not work, the solution would be to limit the tab shortcut of the plugins only to the suggestions window.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.