Omni Completion is only finding patterns for variables declared with the var
keyword. Variables declared with const
or let
cannot be found.
const apple
let blueberry
var carrot
// Omni Completion only finds patterns for 'carrot'
~/.vimrc
"Start pathogen plugin manager
execute pathogen#infect()
"Enable syntax, changing font/colors
syntax on
"FILETYPE DETECTION
"Enable file type detection
filetype on
"Enable loading file type plugins
filetype plugin on
"Enable loading indent file
filetype indent on
"TABS
"expand tabs to spaces
set expandtab
"spaces for automatic indents
set shiftwidth=2
"make existing tabs appear like 2 spaces
set softtabstop=2
"MAPS
"map jk to escape
:inoremap jk <Esc>
"map omnicompletion to space
"https://stackoverflow.com/questions/7722177/how-do-i-map-ctrl-x-ctrl-o-to-ctrl-space-in-terminal-vim
"For some reason <C-Space> is interpreted as <C-@>
inoremap <C-@> <C-x><C-o>
"APPEARANCE
"turn on relative line numbers
set number relativenumber
"Omnicompletion (autocompletion)
set omnifunc=syntaxcomplete#Complete