#vim ~/.bashrc
i 進入編輯模式
在最後面加上
- alias ls='ls --color=auto'
vim /etc/vim/vimrc
- syntax on (拿掉";")
- set nu(顯示行數)
- colorscheme style_name <--- /usr/share/vim/vim72/colors/ 有default的可以選
- set mouse=a (support mouse)
- 開啟時回到離開時的地方
if has("autocmd")
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("quot;)|exe("norm '\"")|else|exe "norm quot;|endif|endif
endif
- set tabstop=4 (設定tab =4空格)
" Vim color file
" Maintainer: Alex Esplin (alex.esplin@gmail.com)
" Last Change:
" URL:
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name="doriath"
hi Normal guifg=#d2ffc6 guibg=#0e2a1a
hi Cursor guibg=#54ff9f guifg=#0e2a1a
"hi CursorIM
"hi Directory
"hi DiffAdd
"hi DiffChange
"hi DiffDelete
"hi DiffText
"hi ErrorMsg
hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none
hi Folded guibg=#4e9271 guifg=#0e2a1a
hi FoldColumn guibg=grey30 guifg=tan
hi IncSearch guibg=khaki guifg=slategrey
hi LineNr guifg=khaki
hi ModeMsg guifg=goldenrod
hi MoreMsg guifg=SeaGreen
hi NonText guibg=LightBlue guibg=SeaGreen
hi Question guifg=springgreen
hi Search guibg=DarkRed guifg=DarkSeaGreen4
hi SpecialKey guifg=yellowgreen
hi StatusLine guibg=#c2dfa5 guifg=black gui=none
hi StatusLineNC guibg=#c2dfa5 guifg=grey50 gui=none
hi Title guifg=IndianRed
hi Visual guibg=olivedrab guifg=khaki gui=none
"hi VisualNOS
hi WarningMsg guifg=salmon
"hi WildMenu
"hi Menu
hi Scrollbar guibg=#0e2a1a
"hi Tooltip
" syntax highlighting groups
hi Comment guifg=#1d96e7
hi Constant guifg=#00ff62
hi Identifier guifg=#28dbd2
hi Statement guifg=#ffff5b
hi PreProc guifg=IndianRed
hi Type guifg=#ff3636
hi Special guifg=navajowhite
"hi Underlined
hi Ignore guifg=grey40
"hi Error
hi Todo guifg=orangered guibg=yellow2
" Maintainer: Alex Esplin (alex.esplin@gmail.com)
" Last Change:
" URL:
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name="doriath"
hi Normal guifg=#d2ffc6 guibg=#0e2a1a
hi Cursor guibg=#54ff9f guifg=#0e2a1a
"hi CursorIM
"hi Directory
"hi DiffAdd
"hi DiffChange
"hi DiffDelete
"hi DiffText
"hi ErrorMsg
hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none
hi Folded guibg=#4e9271 guifg=#0e2a1a
hi FoldColumn guibg=grey30 guifg=tan
hi IncSearch guibg=khaki guifg=slategrey
hi LineNr guifg=khaki
hi ModeMsg guifg=goldenrod
hi MoreMsg guifg=SeaGreen
hi NonText guibg=LightBlue guibg=SeaGreen
hi Question guifg=springgreen
hi Search guibg=DarkRed guifg=DarkSeaGreen4
hi SpecialKey guifg=yellowgreen
hi StatusLine guibg=#c2dfa5 guifg=black gui=none
hi StatusLineNC guibg=#c2dfa5 guifg=grey50 gui=none
hi Title guifg=IndianRed
hi Visual guibg=olivedrab guifg=khaki gui=none
"hi VisualNOS
hi WarningMsg guifg=salmon
"hi WildMenu
"hi Menu
hi Scrollbar guibg=#0e2a1a
"hi Tooltip
" syntax highlighting groups
hi Comment guifg=#1d96e7
hi Constant guifg=#00ff62
hi Identifier guifg=#28dbd2
hi Statement guifg=#ffff5b
hi PreProc guifg=IndianRed
hi Type guifg=#ff3636
hi Special guifg=navajowhite
"hi Underlined
hi Ignore guifg=grey40
"hi Error
hi Todo guifg=orangered guibg=yellow2
各種語法的 vim color style --- 有C、Java等
更改gnome-terminal的顏色:
(GNOME Terminal-->Edit-->Profile Preferences-->Colors)
- text color #D3D7CF
- background color #2E3436
還有很多不錯的設定
vimrc設定教學
沒有留言:
張貼留言