Here is the test.html file which in editing status:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="box1"></div>
<div id="box2"></div>
<script charset="utf-8" type="text/javascript">
var oBox1 = document.getElementById("box1");
var oBox2 = document.getElementById("box2");
oBox1
</script>
</body>
</html>
I want to add .innerHTML
in oBox1
,why can't add it ?
If i remove the following setting in .vimrc
,.innerHTML
can added at the end of oBox1
,but i can't call auto completion with double ,
.
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType javascript inoremap . <C-X><C-O>
Paste all the setting in my .vimrc
:
set nowritebackup
set clipboard^=unnamed,unnamedplus
set ruler
set noundofile
set autochdir
set tabstop=4
set sts=4
set expandtab
set softtabstop=4
set shiftwidth=4
set mouse=a
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
autocmd BufRead + exec "%s/\t/ /g"
set backspace=indent,eol,start
set fo+=w
set wrap
autocmd FileType * setlocal textwidth=120
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType javascript inoremap . <C-X><C-O>
set number
set guifont=Bitstream\ Vera\ Sans\ Mono\ 14
set guifontwide=Noto\ Sans\ CJK\ SC\ 14
execute pathogen#infect()
execute pathogen#helptags()
syntax on
"filetype plugin indent on
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-f>"
let g:UltiSnipsJumpBackwardTrigger="<c-b>"
let g:UltiSnipsSnippetDirectories=['/home/debian/.vim/bundle/vim-snippets/UltiSnips']
let g:UltiSnipsEnableSnipMate=0
" list all snippets for current filetype
let g:UltiSnipsListSnippets="<c-l>"
let g:emmet_html5 = 1
let mapleader = ','
let g:user_emmet_leader_key = ','
let g:user_emmet_install_global = 1
set linespace=4
:set
" when you are editing "test.html
" , which then will include "filetype
" & "syntax
" & "omnifunc
" , active at that Exact time.