質問編集履歴

3

画像の追加

2015/12/02 15:10

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -227,3 +227,15 @@
227
227
  export PATH=$HOME/.nodebrew/current/bin:$PATH
228
228
 
229
229
  ```
230
+
231
+ nodejsとphpをQuickRunした時の画面結果を2枚ずつ載せます
232
+
233
+ ![イメージ説明](b7284b836c70c37836c298913ca42d99.png)
234
+
235
+ ![イメージ説明](427e400f14a6081724ea7c250670028b.png)
236
+
237
+ ![イメージ説明](7bbf6882b699aa791bc74ad8cb0b1989.png)
238
+
239
+ ![イメージ説明](34031f3255a77fed9fd22881800916d0.png)
240
+
241
+ ご覧の通りnodeでは動きませんが、phpだと動くのがわかると思います。

2

\.bashrc, \.bash_profile 追加

2015/12/02 15:10

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -76,6 +76,8 @@
76
76
 
77
77
  ```linux
78
78
 
79
+ " .vimrc
80
+
79
81
  " 表示設定
80
82
 
81
83
  set number "行番号を表示する
@@ -179,3 +181,49 @@
179
181
  " ------------------------- "
180
182
 
181
183
  ```
184
+
185
+
186
+
187
+ ```linux
188
+
189
+ # .bash_profile
190
+
191
+
192
+
193
+ # Get the aliases and functions
194
+
195
+ if [ -f ~/.bashrc ]; then
196
+
197
+ . ~/.bashrc
198
+
199
+ fi
200
+
201
+ # User specific environment and startup programs
202
+
203
+ PATH=$PATH:$HOME/bin
204
+
205
+ export PATH
206
+
207
+ ```
208
+
209
+
210
+
211
+ ```linux
212
+
213
+ # .bashrc
214
+
215
+
216
+
217
+ # Source global definitions
218
+
219
+ if [ -f /etc/bashrc ]; then
220
+
221
+ . /etc/bashrc
222
+
223
+ fi
224
+
225
+ # User specific aliases and functions
226
+
227
+ export PATH=$HOME/.nodebrew/current/bin:$PATH
228
+
229
+ ```

1

情報の追加

2015/12/02 11:44

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -35,3 +35,147 @@
35
35
 
36
36
 
37
37
  quickrunをnode.jsで実行する方法を教えて下さい。
38
+
39
+
40
+
41
+ 追加でquickrunで実行するserver.jsと.vimrcのすべてのソースを追記します。
42
+
43
+ ```linux
44
+
45
+ //server.js
46
+
47
+ var http = require('http');
48
+
49
+
50
+
51
+ var server = http.createServer();
52
+
53
+ server.on('request', doRequest);
54
+
55
+ server.listen(process.env.PORT, process.env.IP);
56
+
57
+ console.log('Server running!');
58
+
59
+
60
+
61
+ // リクエストの処理
62
+
63
+ function doRequest(req, res) {
64
+
65
+ res.writeHead(200, {'Content-Type': 'text/plain'});
66
+
67
+ res.write('Hello World\n');
68
+
69
+ res.end();
70
+
71
+ }
72
+
73
+ ```
74
+
75
+
76
+
77
+ ```linux
78
+
79
+ " 表示設定
80
+
81
+ set number "行番号を表示する
82
+
83
+ set title "編集中のファイル名を表示
84
+
85
+ set showmatch "括弧入力時の対応する括弧を表示
86
+
87
+ syntax on "コードの色分け
88
+
89
+ set tabstop=4 "インデントをスペース4つ分に設定
90
+
91
+ set smartindent "オートインデント
92
+
93
+
94
+
95
+ " 行番号の色を設定
96
+
97
+ hi LineNr ctermbg=none ctermfg=8
98
+
99
+ hi CursorLineNr ctermbg=10 ctermfg=255
100
+
101
+ set cursorline
102
+
103
+ hi clear CursorLine
104
+
105
+
106
+
107
+ " 検索設定
108
+
109
+ set ignorecase "大文字/小文字の区別なく検索する
110
+
111
+ set smartcase "検索文字列に大文字が含まれている場合は区別して検索する
112
+
113
+ set wrapscan "検索時に最後まで行ったら最初に戻る
114
+
115
+ "
116
+
117
+ "
118
+
119
+ "---------------------------
120
+
121
+ " Start Neobundle Settings.
122
+
123
+ "---------------------------
124
+
125
+ " bundleで管理するディレクトリを指定
126
+
127
+ set runtimepath+=~/.vim/bundle/neobundle.vim/
128
+
129
+ "
130
+
131
+ " Required:
132
+
133
+ call neobundle#begin(expand('~/.vim/bundle/'))
134
+
135
+ "
136
+
137
+ NeoBundleFetch 'Shougo/neobundle.vim'
138
+
139
+ " quickrumを設定
140
+
141
+ NeoBundle 'thinca/vim-quickrun'
142
+
143
+ let g:quickrun_config = {
144
+
145
+ \ "node": {
146
+
147
+ \ "command": "node",
148
+
149
+ \ "tempfile": "{tempname()}.js"
150
+
151
+ \ }
152
+
153
+ \ }
154
+
155
+ "
156
+
157
+ " autocloseを設定
158
+
159
+ NeoBundle 'Townk/vim-autoclose'
160
+
161
+ "
162
+
163
+ call neobundle#end()
164
+
165
+ "
166
+
167
+ " Required:
168
+
169
+ filetype plugin indent on
170
+
171
+ "
172
+
173
+ NeoBundleCheck
174
+
175
+ " -------------------------
176
+
177
+ " End Neobundle Settings.
178
+
179
+ " ------------------------- "
180
+
181
+ ```