我的节点Dockfile
:
# Set the base image to ubuntu
FROM ubuntu
# Define working directory
ADD . /src
WORKDIR /src
# Install Node.js & other dependencies
RUN apt-get update && \
apt-get -y install curl && \
apt-get -y install sudo && \
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - && \
apt-get -y install python build-essential nodejs
RUN npm install -g node-gyp && \
node-gyp clean && \
npm cache clean
RUN node -v
# Install nodemon
RUN …
Run Code Online (Sandbox Code Playgroud) 我想用突出显示程序中常用的某些功能来扩展JS语法突出显示。我正在使用janus使我的所有插件井井有条。现在,我在其中有一个文件vim-chino
,然后在其中有一个syntax
文件夹和一个ftdetect
文件夹。在两个我都有一个chino.vim
文件。这是我的syntax/chino.vim
文件:
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'javascript'
endif
syn match chinoKeywords "ChinoView"
hi def link chinoKeywords Function
let b:current_syntax = "javascript"
if main_syntax == 'javascript'
unlet main_syntax
endif
Run Code Online (Sandbox Code Playgroud)
在我中,ftdetect/chino.vim
我有:
function! s:DetectJS()
if getline(1) =~# '^#!.*/bin/env\s\+node\>'
setfiletype javascript
endif
endfunction
autocmd BufNewFile,BufRead * call s:DetectJS()
Run Code Online (Sandbox Code Playgroud)
我希望它ChinoView
在任何javascript文件中突出显示。我觉得JS的语法突出显示要么是覆盖它,要么是没有被读取。
编辑:如果我不得不猜测发生了什么事,那是当它看起来b:current_syntax
已经有一种语法,因此就退出了。