Skip to content
View in the app

A better way to browse. Learn more.

PHP论坛人

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

強化 vi編輯器 文字顏色

Featured Replies

------------
前言
------------

讓 vi編輯器 文字顏色還可以更豐富一些,在黑色背景下,文字可以更容易辨識



編輯
vi /etc/vim/vimrc



搜尋並找到這幾行字

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
"syntax on



在它的底下,貼上內容




" ===== 啟用語法高亮 =====
syntax on

" ===== 啟用 256 色 =====
set t_Co=256

" ===== 深色背景 =====
set background=dark

" ===== 顏色主題 =====
colorscheme murphy

" ===== 顯示括號配對 =====
set showmatch

" ===== 搜尋結果高亮 =====
set hlsearch

" ===== 即時搜尋 =====
set incsearch







儲存檔案並離開vi編輯器
按 Esc,輸入 :wq,按 Enter



----------------
登出SSH
----------------

登出
exit



再重新登入SSH



比如剛才修改的檔案,可以明顯看到文字與其顏色表現


開啟
vi /etc/vim/vimrc


離開vi編輯器
按 Esc,輸入 :q,按 Enter

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.