Switch to Github Flavored Markdown mode for ~~strikethu~~; add continuelist.js for fancy listmaking.
This commit is contained in:
parent
7cc9d0594d
commit
9d229dde5c
@ -1,4 +1,4 @@
|
||||
FROM node:6.10.0-slim
|
||||
FROM node:8-alpine
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
@ -8,12 +8,17 @@ RUN mkdir -p /usr/src/app/db
|
||||
VOLUME ["/usr/src/app/db"]
|
||||
|
||||
RUN npm install -g nodemon
|
||||
RUN apt-get update && apt-get install -y vim git
|
||||
RUN apk --no-cache add vim git
|
||||
COPY .vimrc /root/.vimrc
|
||||
|
||||
COPY package.json /usr/src/app/
|
||||
COPY . /usr/src/app
|
||||
RUN npm install
|
||||
|
||||
# Currently at CodeMirror-5.29.0.
|
||||
# To upgrade, in host CodeMirror dir, do `git pull` and `git checkout tags/###`.
|
||||
# Running `npm run build` here to save a step.
|
||||
RUN cd /usr/src/app/CodeMirror && npm run build
|
||||
|
||||
# Use nodemon to start app.
|
||||
CMD [ "nodemon" ]
|
||||
|
@ -10,10 +10,13 @@
|
||||
<link rel="stylesheet" href="lib/codemirror.css">
|
||||
<link rel="stylesheet" href="addon/dialog/dialog.css">
|
||||
<script src="lib/codemirror.js"></script>
|
||||
<script src="addon/edit/continuelist.js"></script>
|
||||
<script src="addon/mode/overlay.js"></script>
|
||||
<script src="mode/markdown/markdown.js"></script>
|
||||
<script src="mode/gfm/gfm.js"></script>
|
||||
<script src="addon/selection/active-line.js"></script>
|
||||
<script src="addon/dialog/dialog.js"></script>
|
||||
<script src="addon/search/searchcursor.js"></script>
|
||||
<script src="mode/markdown/markdown.js"></script>
|
||||
<script src="addon/edit/matchbrackets.js"></script>
|
||||
<script src="keymap/vim.js"></script>
|
||||
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
|
||||
@ -39,6 +42,7 @@
|
||||
.CodeMirror {
|
||||
height: 96%;
|
||||
}
|
||||
.cm-s-default .cm-emoji {color: #009688;}
|
||||
</style>
|
||||
<!-- favicon design by Rockicon of thenounproject.com -->
|
||||
</head>
|
||||
@ -52,7 +56,12 @@
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("editor"), {
|
||||
mode: "markdown",
|
||||
mode: {
|
||||
name: "gfm",
|
||||
tokenTypeOverrides: {
|
||||
emoji: "emoji"
|
||||
}
|
||||
},
|
||||
lineNumbers: "true",
|
||||
keyMap: "vim",
|
||||
matchBrackets: true,
|
||||
@ -60,7 +69,9 @@
|
||||
viewportMargin: Infinity,
|
||||
indentUnit: 4,
|
||||
styleActiveLine: true,
|
||||
autofocus: true
|
||||
autofocus: true,
|
||||
theme: "default",
|
||||
extraKeys: {"Enter": "newlineAndIndentContinueMarkdownList"}
|
||||
});
|
||||
// Add my .vimrc stuff.
|
||||
CodeMirror.Vim.map('jj', '<Esc>', 'insert');
|
||||
|
Loading…
Reference in New Issue
Block a user